Take camera footage from pedestrian overpass (North Avenue) and count the number of vehicles that pass.
Methodology:
Initially I had expected that using optical flow and implement the following logic:
What actually transpired:
The following link shows a 30 second clip of traffic passing underneath the North Avenue pedestrian walkway: 30 second clip of traffic flow (compressed)
Optical flow, rather than generating simple motion "blobs", takes the above 30 second clip and turns it into a motion "cloud": optical flow generated from 30 second clip of traffic flow
After playing around with morphological operators and BW thresholding, I still wasn't able to clean up the motion "cloud" to a point that would provide consistent results: 30 seconds of optical flow after applying BW threshold & morphological operators
The best explanation I have come up with to explain away my optical flow problems, is that the original footage was taken from a camera that was not kept 100% stationary. The tripod I had planned on using to stabilize the camera initially was not tall enough to "see" over the cement handrail of the pedestrian overpass. As a result, the human bipod was used to stabilize the camera, with less than perfect results.
I strongly suspect that in order for optical flow techniques to be useful, I need to encode a basic "digital stabilizer" to steady the image and prevent it from moving around excessively.
Methodology rethought:
Since the motion "cloud" data obtained from optical flow techniques was so difficult to handle, I stepped back and used the simple technique of image differencing to identify motion. This time, things went much more smoothly: 30 second clip of traffic flow processed with image differencing
This technique provides the motion "blobs" that I had originally intended to derive from optical flow data. After simple thresholding, the strength of image differencing for this application was obvious: BW thresholding of 30 sec image differencing data
Things to come:
Overall progress has been occurring at a phenomenonly slow rate. I am hoping that this is due to the learning curve associated with Visual C++ & the need to develop tools (i.e. morphological operators, matrix manipulation tools, etc) as problems present themselves.
For now, I plan on continuing to approach the problem using image differencing data. However, I am rather curious about the feasibility of "digitally stabilizing" the poor camera image which should allow the use of optical flow instead of image differencing to obtain motion information. Yet I suspect that the general lack of texture variations when looking at a road may significantly hinder any such attempt.