How to calculate vehicle speed?

  • Context: Undergrad 
  • Thread starter Thread starter ramdas
  • Start date Start date
  • Tags Tags
    Speed Vehicle
Click For Summary

Discussion Overview

The discussion revolves around calculating the speed of a vehicle using image processing techniques, specifically through analyzing video frames. Participants explore methods for determining the distance traveled by the vehicle, considering challenges such as perspective changes and the diminishing size of the vehicle in the frames as it moves away.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using markers or measuring distances between landmarks to assist in distance computation.
  • Another participant proposes using geometrical relations or mathematical theories to calculate the distance based on the vehicle's position in different frames.
  • It is mentioned that the tangential component of velocity can be derived from the change in position of a point on the vehicle, but the radial component must be calculated from the change in size of the vehicle's image.
  • Some participants discuss the implications of assuming a flat road and how this affects calculations, with one noting that a tilted or curved road complicates the analysis.
  • A participant presents a thought experiment illustrating the challenges of determining speed from image data, emphasizing the need for multiple known variables to compute distance accurately.

Areas of Agreement / Disagreement

Participants express various viewpoints on the feasibility of calculating vehicle speed from images, with no consensus reached on a definitive method. Some agree on the necessity of certain assumptions, while others highlight the complexities involved.

Contextual Notes

Participants note limitations related to the assumptions of road flatness and the requirement for known initial conditions to compute speed accurately. The discussion reveals dependencies on specific geometric and mathematical principles that remain unresolved.

ramdas
Messages
78
Reaction score
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: 634
Mathematics news on Phys.org
Can't you just use some markers? Or just go measure the distance between two landmarks that are already there?
 
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..
 
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.
 
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.
 
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".
 
A tilted or even a curved road can be taken into account, if necessary. Just makes calculations a bit more complicated.
 
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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
9
Views
2K
  • · Replies 102 ·
4
Replies
102
Views
8K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 49 ·
2
Replies
49
Views
6K
  • · Replies 6 ·
Replies
6
Views
8K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K