Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Monday, June 30, 2008

Focal Length Calculation for a DSLR Camera

Canon 400D with a Vivitar 400mm Lens
As I'm studying for a subject concerning cameras at university, I have to used a formula for calculating the required focal length to fill the sensor with an image. And I thought this formula could be quite practical for you as well.

That formula is
f = d * I / (I + O)
where f[m] denotes the required focal length to picture an image with the width of O[m] on the sensor with the width of I[m] when the object is d[m] away from the camera.

For my Canon EOS 400D camera with a sensor dimension of 22.2mm x 14.8mm a sample calculation could look like this:

I would like to picture an object that is 20cm wide and 1m away from my camera. So I set d = 1m, O = 0.02m and I = 0.0148m (sensor width).
Inserting into the formula from above this gives me a focal length of f=0.0689m or 69mm.

This formula is valid for all cameras (just find out your sensor dimensions) and all lenses.