ChosunTruck icon indicating copy to clipboard operation
ChosunTruck copied to clipboard

Should improve lane detection algorithm especially at the curvy lanes

Open chi3236 opened this issue 8 years ago • 6 comments

Our lane detection code does not work properly at the very curvy lanes like highway entrance or exit. I'm reading some papers which can improve our lane detection algorithm. https://arxiv.org/pdf/1501.03124.pdf http://research.ijcaonline.org/volume122/number13/pxc3905011.pdf

chi3236 avatar Feb 21 '17 08:02 chi3236

I changed IPM code. The IPM area changes depending on the steering amount. I think it will reduce noises on the curvy road and make the truck drives better.

chi3236 avatar Feb 22 '17 09:02 chi3236

I'm confused by this change, there's a lot of repeating code that I see.

For example: https://github.com/bethesirius/ChosunTruck/blob/0351ab86eebb032d2f440aa3ae95d14656c6f840/linux/src/main2.cc#L173

is repeated here: https://github.com/bethesirius/ChosunTruck/blob/0351ab86eebb032d2f440aa3ae95d14656c6f840/linux/src/main2.cc#L257

You also repeated the IPM code here and then again here

I'm not saying this is incorrect, but I believe this repetition of code is the reason why I cannot implement this correctly into our Windows version. Can you explain why these are repeated?

zappybiby avatar Feb 25 '17 00:02 zappybiby

The lane detection process consist of these stages:

  1. Set the IPM area
  2. Resize the IPMed area
  3. Convert the color from RGB to grey
  4. Sobel filtering and thresholding and we find the lane with the frames which are the result of those screen filtering process.

My code uses move_mouse_pixel variable to change the IPM area. To use this changed IPM area in lane detection, we should do the screen filtering process again, and find the lane with the new frame again. I know the repeating code is bad for the maintanence, so I gonna refactor it soon.

chi3236 avatar Feb 25 '17 15:02 chi3236

Ok! Just adding a function that performs those steps should make the code look better.

I will try to see if I can get that to work today.

In my latest commit I tried to implement it into the replacing move_mouse_pixel with diffOld, and it doesn't seem to help stabilize the ipm... not sure what is wrong.

zappybiby avatar Feb 25 '17 17:02 zappybiby

I have a better idea for implementing adaptive IPM. I will change the code before Tuesday or Wednesday

chi3236 avatar Feb 26 '17 06:02 chi3236

OK, a better adaptive IPM area is implemented https://youtu.be/qb99czlIklA

chi3236 avatar Feb 27 '17 09:02 chi3236