:: AForge.NET Framework :: Articles :: Forums ::

Speed of cars

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Speed of cars

Postby jgdfox » Mon Feb 16, 2009 5:53 pm

I need to know if with this tools I can generate a program that calculates the speed of a vehicle in a video in real time. Thank you very much!
Posts: 1
Joined: Mon Feb 16, 2009 5:50 pm

Re: Speed of cars

Postby andrew.kirillov » Tue Feb 17, 2009 7:21 am


Of course there is not function like GetCarSpeed( videoFeed ), but there are image processing tools, which may help in this task. I would suggest you to take a look at Motion Detection sample application provided with AForge.NET framework. This may be used as a startup/idea in your development. The idea is that you need to detect moving object/car first and than by tracking it in video feed you may try calculating object's speed.
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Speed of cars

Postby joan » Tue Feb 17, 2009 11:33 am

I think it also really depends on your input videos... Are the cars filmed from above, from a side, at an angle ?

Then if you want to compute real speed, you'll need a way to translate from pixel distances to real worl units distances. This may prove a hard part if you don't have some kind of references frame within the video or don't know the internal parameters of the camera. (If filmed at an angle, perspective will be a tough problem)

Before programming it, how do you do it manually ? Do you have some specific lines of known spacing on the ground between which the cars speed are measured ?
User avatar
Posts: 20
Joined: Sat Jan 24, 2009 3:25 pm

Return to AForge.NET Framework