detecting speed of car

조회 수: 12 (최근 30일)
nkumar
nkumar 2013년 9월 17일
I got some codes for tracking a car from
in this i have to find the speed of car,i dont have any idea on this ,kindly can anyone tell how to start finding spped of the car
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 9월 17일
I looked at the demo code and I do not see any speed involved in it.
nkumar
nkumar 2013년 9월 17일
yes walter ,there is no spped calculation ,but i have to find the speed of the cars,kindly provide assistance

댓글을 달려면 로그인하십시오.

답변 (2개)

David Sanchez
David Sanchez 2013년 9월 17일
You have to know the length of the road, then, measure the time taken by the car to go along that stretch of road.
velocity = length/time
  댓글 수: 1
nkumar
nkumar 2013년 9월 17일
can you tell how we can calculate the length of road plz

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2013년 9월 17일
Go there and use a tape measure, or lay down a long piece of string and later measure the length of the string, or use an ultrasonic range finder, or use a surveyor's transit. Or zoom in on it in Google Maps and tell that program to tell you the distance.
If you need to be able to do this for arbitrary scenes, then do you know the camera lens and specifications? With that you could calculate depth of field, and then do a fitting of the crispness on the image in order to estimate the corresponding pixel distance in the image; as you would then be able to calculate pixel to real-world correspondence, you could measure the pixel length of the road, and use the calculated correspondence to calculate the real-world road length.
If you need to work with arbitrary scenes without lens information, then you will need to go through several images until you can find a car or truck shown whose real-world length you can look up in the manufacturer's specifications. Real world information plus pixel distance allows you to calculate the ratio of pixel to real world, and then to measure the pixel length of the road and convert that to real-world distance.
But still the demo has absolutely no reference to speed, so it is not clear why you would care. The demo is only for counting cars.
  댓글 수: 11
nkumar
nkumar 2013년 9월 18일
Thanks walter but one thing i noticed is that ,when taking first 15 frame the values are more or less same,wheter the vehicle crosses the line or not,so how we can determine the vehicle had crossed the line,on which aspect we have to determine it
nkumar
nkumar 2013년 9월 18일
for each frame i am calculating improfile at a same point,but why i get different values,
Is it possible to do it in the following way
Suppose i have drawn a white line on the image and if i take mean of that line point i get values as 255
in next frame if vechile is o that line ,will the mean values be same or different,i tried but am getting same values only 255

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by