0

I am using an Olympus M. Zuiko 45mm f/1.8 Camera, I have to calculate the distance at which the lens should be present so that it captures the complete object at once.

I know that the field of view of the camera is 27 degrees, and the aspect ratio is 4:3. Assuming that they are talking about the diagonal field of view.

I want to ensure that the camera at least captures the complete width of the object, so suppose if the camera is capturing a width w, it will be capturing the length 4w/3, therefore the diagonal would come out to be 5w/3.

now, I use simple trigonometry to calculate the desired distance

tan(field_of_view/2) = (diagonal_length/2) / (desired_distance)

so, desired_distance = diagonal_length / (2 * tan(field_of_view / 2))

Although the math looks correct to me, somehow the results do no match the actual phenomenon, can someone please go through this and suggest corrections?

marked as duplicate by mattdm, Hueco, xiota, inkista, scottbb Dec 21 '18 at 14:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Maybe show an example photo? But the first thing that springs to mind is that the sensor size also affects FOV. – user31502 Dec 20 '18 at 15:12
  • 1
    There’s a “computer vision” tag over at stack overflow. This se is more concerned with producing images in the artistic sense but does have some more technical members. That being said, you simply may just have more luck over there. – Hueco Dec 20 '18 at 15:49
  • Do you need precise numbers or are you just trying to ballpark how far away you need to stand? – mattdm Dec 20 '18 at 17:57
2

Your math is unnecessarily complex, no need to compute or use angles (and therefore, no need for any trigonometry).

Using the lens magnification formula M = ƒ/(do - ƒ), where do is the distance from the lens to the object being photographed (and assuming do ≫ ƒ), then your desired lens-to-object distance is:

do = ƒ(1 + 1/M)

But the magnification M is just the ratio of the object's real size to its size on your sensor. Assuming your sensor is a Micro Four-Thirds sensor (based on the lens you're using), with imaging area dimensions sw × sh of 17.3 mm × 13 mm, then the distance formula for your application is just:

do = ƒ(1 + w / sw) = 45 mm * (1 + w / 17.3 mm)

Make sure you use millimeters for your object's width w.

Note: Again, this assumes your magnification is small (M ≪ 1). This is the same thing as saying that your object being photographed is much larger than the width of your sensor. This also means you are not photographing in the macro regime. When magnification is at least, say, 0.1 (just picking a non-insignificant fraction of 1), then the actual precise location of your lens's principal planes (where focal length is measured from) starts to matter. But assuming small magnification, you can just measure your object distance from a reasonable position such as the front of the lens barrel, and call it good enough.

1

You can use Excel to calculate the angle of view and distances enscoped by this field of view. The following is for a 50mm lens mounted on a full frame 24mm height by 36mm length.

For 50mm lens mounted on full frame format 24mm height by 36mm length 46.8mm diagonal. Subject distance 0.5 meters.

=((ATAN((24/2/$B$8)))*180/PI())*2 (answer 27.0° vertical)

=((ATAN((36/2/$B$8)))*180/PI())*2 (answer 39.6° horizontal)

=((ATAN((46.8/2/$B$8)))*180/PI())*2 (answer 42.3° diagonal)

=(TAN(27/2/180*PI()))*2*0.5 (answer 0.24 meters)

=(TAN(39.6/2/180*PI()))*2*0.5 (answer 0.36 meters)

=(TAN(50.2/2/180*PI()))*2*0.5 (answer 0.47 meters)

  • The diagonal of a 36mm by 24mm sensor is approx. 43.3mm, resulting in 46.8° diagonal field of view for your example 50mm lens. Also, the question already has these formulas. – ad42 Dec 20 '18 at 17:39
0

Your approach seems o.k., except the captured length (height?) is 3w/4, not 4w/3. That makes the diagonal 5w/4 instead of 5w/3. The aspect ratio of an image is usually given as the ratio of width to height.

Not the answer you're looking for? Browse other questions tagged or ask your own question.