Detect lanes from a filtered image I am working on lane detection system and I would like some suggestions from you as to how to detect lanes from a filtered image which I got after performing certain operations. Firstly, I should mention a few things:


The lane detection would be in a real road environment unlike here.
As of now, I am running it in real-time (O(n)) to be precise, which I would like to maintain.


The following image shows the original image and my filtered image.



As you can see, there are false positives which I want to remove and that is my main problem. Now, these are the few approaches I have thought of:


Check the intensity on the left and right hand side for desired areas. It should be high for desired area and low on both sides.
**Problem: I am finding it difficult to define 'high' and 'low' since the method has to be independent of time of the day.
One approach I thought was to check shapes but I can't think of any algorithm since those are not rectangles, those are essentially distorted parallelograms(?).


One more, I have seen people generate lines on these type of images using hough, this same question does that. If I run hough, I am not getting lines. Is the intensity of the image a problem or should I run Hough on binary mask image? I am currently doing this with MATLAB but I will be finally implementing with OpenCV to keep it real-time.
Finding shapes / lines is a good idea. Threshold tweaking is almost certainly a bad idea.

Hough transform typically expects your lines to be (1) in a binary image and (2) of one pixel width. Try to apply an edge detector (Matlab: edge) on your filtered image in order to get the boundaries of your white regions as one-pixel lines. Then Hough transform should find something.

I would also consider doing edge detection on your original image rather than your feature image. Then you can try to tweak the edge detector, rather than first running your "certain operations" and then detecting edges.

Once you have some lines you will face the problem of finding the good ones. You could look at (i.e. google for) "vanishing point detection", and read about RANSAC.