Ask Your Question
0

Random Vehicle Detection

asked Feb 28 '13

Ashwin gravatar image

Hi all. I want to calculate the average speed of the vehicle that is crossing the camera. So for that I want to detect the time that is taken by Random vehicle to cross the camera. By using that I can calculate the speed. ( speed=distance/timetaken ). Which method should I use? Can I detect a single object randomly?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
3

answered Feb 28 '13

Following steps should be used to detect the average speed

  1. Create a car detector using a specific technique. OpenCV supports the use of HOG models and the part based modeling by Felzenszwalb and the Felzenszwalb model for cars is available in the OpenCV data folder. Look for latentSVM detector.
  2. For each frame detect if there are cars.
  3. When car is detected apply a tracking algorithm on the detected location.
  4. Track the car over the following frames until it's position reaches the frame border or a location specified.
  5. Use the timing over this functionality to calculate the speed over the distance.
Preview: (hide)

Comments

Hi steven. Thanks for your response. What if, If there is no car for specific amount of time? It should detect all the vehicles, no?

Ashwin gravatar imageAshwin (Feb 28 '13)edit

If there is no car, then no detection will happen and offcourse no tracking will happen. During tracking you will also have to remove all detections happening on your tracked car, else you will see a single car as multiple detections and create a new tracker ID each frame. This you want to avoid.

Maybe just to mention, the available car model is only good at detecting cars sideways, it could get worse if the orientation is not like the trained data.

StevenPuttemans gravatar imageStevenPuttemans (Feb 28 '13)edit

Question Tools

Stats

Asked: Feb 28 '13

Seen: 1,610 times

Last updated: Feb 28 '13