In order to count the vehicles in the different lanes of the road, even if the video camera is remotely controlled, an automatic segmentation of the lanes must be performed.
Two images are generated from the scene: an average image (emphasizing the still regions of the scene) and a differential image (enhancing the moving parts of the scene). [...]"
Old paper describing a general algorithm for image segmentation. It needs initial markers to start from. It's also implemented in OpenCV.
Might be useful mostly for background maintenance.
TheWatershedTransformationAppliedToImageSegmentation.pdf
Also see: http://docs.opencv.org/master/doc/py_tutorials/py_imgproc/py_watershed/py_watershed.html http://cmm.ensmp.fr/~beucher/wtshed.html
"Traffic monitoring
In order to count the vehicles in the different lanes of the road, even if the video camera is remotely controlled, an automatic segmentation of the lanes must be performed. Two images are generated from the scene: an average image (emphasizing the still regions of the scene) and a differential image (enhancing the moving parts of the scene). [...]"