1 | initial version |
I would say to try to detect the road with a linear Hough transform, then extract the pixels that belong to the road. If it's done, you're halfway there.
Then, do a segmentation. You can use k-means or an adaptative thresholding to segment the "things" on the road. Do some erosion/dilatation to get rid of the noise. Now, you should have the silhouettes of the vehicles.
Finally, use a Kalman filter to track the movement of the objects.
Hope this helps.