LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

line detection

Hi all,
I am doing a project to detect and calculate the distance between two lanes along the road using Labview 7.1. I have tried capturing a video (AVI) and processed it by using extract single colour plane, threshold, remove small particles, etc to make the image easier to calibrate. But the problem is in the AVI, every image is different because of different light intensity. With the same threshold value, lanes on some images disappear or there are more particles that cannot be filtered.
Can anyone teach me how to do detect specifically (in my case, the two lanes on the road) and calculate the distance and displayed the result on the original images? Sorry for the long story. Below are an example of one of the images on the video.
Thank you very much! Your help is very much appreciated.
 
0 Kudos
Message 1 of 6
(3,846 Views)
I have done this for determining one lane, and whether or not the vehicle(camera) is centered in that lane.  You will want to use adaptive thresholding to overcome the lighting issues.  Break your image down into small areas where the lane information would be.  Read back the average grayscale value for that area, and use that to scale your thresholding algorithms.  Once you find your lane delineations, it is just math to see where they are in relation to one another.  Absolute distances will be difficult to determine, though.
0 Kudos
Message 2 of 6
(3,825 Views)

Hi Brian,

Thank you for the advice. Anyway, I have done setting a Region of Interest for the image. But, I'm still not very clear about the addaptive thresholding that you have mentioned. Would you please elaborate more detail or show me with an example of that? Sorry for the trouble. Thank you very much.

0 Kudos
Message 3 of 6
(3,799 Views)
Here is an example.  You should be able to alter this VI to do what you want.  It is an early version, so it is kind of messy, but it works.
Message 4 of 6
(3,788 Views)

Hi Brian,

When the VI was run, there's nothing appear on the 3 windows. I already change the file path with my own image, the problem still the same. Can you check and see is there any problem? Anyway, I look through the block diagram and I think I got some rough idea from what you've done. But's the algorithm is kind of complicated, I think I need time to understand it. So, thank you very much for being so helpful!

0 Kudos
Message 5 of 6
(3,763 Views)
You need to do more than change the path.  Use your troubleshooting tools to see what files it is trying to open up.
0 Kudos
Message 6 of 6
(3,759 Views)