Sunday, January 28, 2007

Headlight (or Blob) Detection

I tried experimenting with Nicholas Howe's Segmentation through Graph Cuts but was largely unsuccessful on night images. I lowered the threshold as Nicholas Howe suggested but it still could not catch anything in the test video clips.

I implemented the sliding average(currently set at n=15 frames) to compute the background image for the motion segmentation. It produces much better results than just the previous frame.

Additionally, I worked on blob detection a little. After I get my image difference, I convert the frame into binary and do a connected component labeling on it. This is thresholded based on area. As you can see in the sample videos, the connected component labeling finds the headlights, but it also catches a lot of other false positives.

night time bike:




car at 5pm:



One idea I have is somehow to incorporate directional motion(like gradient with respect to y) as a possible feature. Since each camera will only be responsible for one traffic stop, we know the direction that the motorbike will be traveling. In this case, we can check if the blob is heading south. If this can be implemented successfully, we can get rid of the cross traffic detection.

No comments: