How does projection work with cameras?

98 Views Asked by At

So I want to measure the displacement of a model car at a bunch of times as it crosses a distance of two metres.

Now, I intend to do this by filming it, measuring what percentage of the frame it has travelled at each time step, calculating the length of the frame given the distance between the camera and the car and then finding that percentage of that distance.

Let me show you the method I've intended to use to find the distance across.

I took a photo with the camera at a distance of 0.3m, and found that a 0.3-metre ruler took up 70% of the frame.

enter image description here To calculate $x$, I would think I can just write: $$0.7x=0.3$$ and hence that $x\approx0.43m$.

Given $x$ and noting that the camera has a focal length of 0.008m, I can find the length at any distance using similar triangles as follows: enter image description here

$$\frac{y}{0.43}=\frac{0.6+0.008}{0.3+0.008}$$ $$y\approx0.85m$$

Unfortunately, when I tried to experimentally calculate the values I found I undershot by somewhere around 10cm.

Am I misunderstanding how this kind of geometry works? Do I not understand how camera's work? How can I do this? What other variables do I need to take into account?

1

There are 1 best solutions below

2
On BEST ANSWER

You misunderstand how cameras work. The vertex of the triangle is at the lens. The focal length ($0.008$) is the distance from the lens to the sensor on the other side.

Provided that your lens has no fisheye effect, pincushion effect, or other such distortion--that is, if a photo of a chessboard from directly above the board comes out as a perfectly square and regular chessboard--your calculation only needs to consider the triangles between the lens and the subject. You can ignore what goes on behind the lens. (You assume it is geometrically similar to what happens in front.)

Therefore you should not put the $0.008$ focal length in your diagram at all. You should have only one triangle with leg $0.3$ and another with leg $0.3 + 0.3.$ Then you will find that $y \approx 0.86.$