How to calculate vehicle speed?

In summary, the conversation discusses the difficulties in calculating the speed of a vehicle using image processing. The individual is taking video frames of a moving car and wants to use the frame rate to calculate the time elapsed and distance traveled. However, the decrease in size of the vehicle as it moves away poses a challenge. Suggestions are made to use markers or measure between two landmarks, but the individual's project is focused on image processing. They are advised to brush up on trigonometry and consider the height of the tracked point above the road to calculate the distance. The conversation concludes by highlighting the need for two initial conditions in order to accurately calculate the speed of the vehicle.
  • #1
ramdas
79
0
hello everyone ,i am doing my project in image processing.i am taking video of car moving on the road and taking video frames of the same.

i want to calculate speed of vehicle.using frame rate i can calculate the time elapsed by vehicle to cover some distance. but i have one difficulty, As the vehicle goes away its size goes down also we can’t use linear scale to compute the distance .for this can anybody help me for distance computation?
i am adding images ,so that u can get an idea about it..thank u
 

Attachments

  • 123.jpg
    123.jpg
    20.1 KB · Views: 555
Mathematics news on Phys.org
  • #2
Can't you just use some markers? Or just go measure the distance between two landmarks that are already there?
 
  • #3
sir, my project is based on image processing and i have to measure the distance traveled by vehicle by subtracting vehicle's position at frame 4 to position of the same at frame 1 from the video frames that i will capture with some time intervals(frame rate). can i use some geometrical relation or any mathematical theory to calculate the distance? thank u..
 
  • #4
ramdas said:
sir, my project is based on image processing and i have to measure the distance traveled by vehicle by subtracting vehicle's position at frame 4 to position of the same at frame 1 from the video frames that i will capture with some time intervals(frame rate). can i use some geometrical relation or any mathematical theory to calculate the distance? thank u..

You can get the tangential component of the velocity by measuring the change in position of any single point in the image of the vehicle. But that won't give you the radial component, which you will have to calculate from the change in the size of the image of the vehicle. And for both calculations... Brush up on your trigonometry - you'll be needing it.
 
  • #5
But that won't give you the radial component, which you will have to calculate from the change in the size of the image of the vehicle.
If the height h is known, the road is not tilted and you can make some reasonable assumption for the height of the tracked point above the road, you can calculate the radial distance (and everything else) from the tangential component.
 
  • #6
mfb said:
If the height h is known, the road is not tilted and you can make some reasonable assumption for the height of the tracked point above the road, you can calculate the radial distance (and everything else) from the tangential component.

Ah - yes, you're right. Although the assumption that the road is not tilted is a fairly strong constraint on the possible motion of the vehicle, the more I think about it, the more reasonable that constraint seems, at least for a "project".
 
  • #7
A tilted or even a curved road can be taken into account, if necessary. Just makes calculations a bit more complicated.
 
  • #8
You don't have enough information, simply taking a picture of a moving vehicle to computer its speed. In its simplest form the vehicle is moving directly towards you, eliminating all the more complex equations.

Consider this thought experiment. You put a piece of poster board at one end of a hallway and shoot a photo of it from 10 ft away and from 20 ft away. When you check the pixel dimensions of the poster board in the images, the one 10 ft away was 969 pixels high, the one 20 ft away was 510 pixels high, a close approximation to a linear ratio of distance to height, ie, Hx/Hy = Dx/Dy; 510/969 = 10/20; .52 = .5

So then you go outside and shoot some images of your garage door… at 25 feet and 50 feet. As you might expect the ratios of height to distance are again nearly identical. And again, the height measurements are in pixels.

But it turns out this is not enough data to compute speed. You are looking for dX/dT. dT is easy. Sample every 30th frame and I get a ‘per second’ dT. But what about dX. Suppose that with dT = 1 sec, I discern that the height becomes twice as large as it was 1 second ago… but which is the correct distance… from 20 to 10 feet or from 50 to 25 feet? I can’t tell and obviously, one would have to be moving more than twice as fast as the other.

So what if the real initial height is known? My poster board is 3 feet tall. It still doesn’t work without knowing an initial distance… I need to know 3 of the 4 variables in order to solve for the fourth. But, I don’t have any practical way of measuring distance with the camera.

You have got to have two initial conditions to be able to know the final conditions in order to be able to compute dX.
 

1. How do I calculate the speed of a vehicle?

The speed of a vehicle can be calculated by dividing the distance traveled by the time it takes to cover that distance. This can be represented by the formula: speed = distance/time.

2. What units should I use when calculating vehicle speed?

The distance should be measured in meters or kilometers and the time should be measured in seconds or hours. This will give the speed in meters per second (m/s) or kilometers per hour (km/h).

3. Is there a more accurate way to calculate vehicle speed?

Yes, using a speedometer or GPS device will give a more accurate measurement of vehicle speed as it takes into account factors such as acceleration and deceleration.

4. How does the weight of a vehicle affect its speed?

The weight of a vehicle can affect its speed in two ways. Firstly, a heavier vehicle will require more energy to move, resulting in a slower speed. Secondly, a heavier vehicle may have a higher maximum speed, but will take longer to accelerate to that speed.

5. Can I use the same formula to calculate the speed of a moving object other than a vehicle?

Yes, the same formula (speed = distance/time) can be used to calculate the speed of any moving object, as long as the distance is measured in meters or kilometers and the time is measured in seconds or hours.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
3
Replies
102
Views
4K
  • Mechanical Engineering
Replies
3
Views
954
  • Classical Physics
2
Replies
49
Views
2K
  • General Math
Replies
6
Views
2K
Replies
8
Views
2K
  • Mechanics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
1K
Replies
6
Views
7K
Replies
13
Views
1K
Back
Top