05-25-2010 02:35 AM - edited 05-25-2010 02:41 AM
05-25-2010 02:38 AM
05-25-2010 02:48 AM
05-25-2010 03:17 AM - edited 05-25-2010 03:19 AM
I saw this paper. But Its not enough. Its based on RADAR technology.
05-25-2010 10:35 AM
Take two frames where you know the amount of time between the frames. This is dt.
In each frame, you will need to locate the same point on the vehicle. Subtract the position difference in pixels, then multiply by the scaling factor to get actual distance. This is dx.
Divide dx/dt to get speed. If your camera is not perpendicular to the road, include the cosine of the angle from perpendicular to the camera.
Difficulties: It will be difficult to determine a scaling factor since it depends on the distance from the camera to the car. The scaling factor may include the cosine factor, so don't include it twice. Cars in different lanes may require different scaling factors.
Locating the same point on the car also might be difficult. You might use background subtraction to find the leading edge of the car, or you might use pattern matching to find a point on the car.
If the car is heading almost straight toward the camera, it just won't work. It needs to be close to perpendicular. I would say 45 degrees would be about the max usable angle, but that is just a guess.
Bruce
05-25-2010 11:33 PM
For the choice of camera, if this is for a student project, you could try USB webcams. However, if they will work will depend on the lighting situation. You need your car to be 'still' in the image to get a clear image. This means the lighting has to be reasonable so that the 'shutter speed' is fast enough to make the car visible. Does it only need to work in the day? You will need a direct Show compliant web camera.
See other posts about these cameras. Many of these cameras can be run at a sufficient frame rate, if you reduce their resolution.
05-26-2010 10:03 AM - edited 05-26-2010 10:12 AM
05-26-2010 10:41 AM
No sample program, especially for a school project.
It is all a matter of angles and distances. To measure the speed of something using vision, you need to look at it from the side and see how far it moves in a given amount of time. You can figure out the frame rate you need based on the amount of time it takes the fastest object to cross your field of view. You need to calibrate the system to know how much displacement each pixel represents. An easy way to do that is just set up two cones within the field of view and measure the distance between the cones using the camera and a measuring tape.
IMAQ Vision can handle it just fine. The image processing should be a minor part of the project - subtracting the background and locating the leading edge of an object are pretty easy and fast. Figuring out camera, lens, lighting, etc. will be more of a challenge. Any current computer will handle the processing just fine.
Bruce