3
\$\begingroup\$

I would like to calculate the angle of view of a photo taken by a smartphone, in order and estimate the distance from a subject of a specific size.

Let's do calculation for a Samsung S7, which has a 26mm focal length (source).

According to this source, the sensor size is 1/2.6", which means 5.5mm wide.

According to Wikipedia, the angle of view formula is: aov = 2*arctan(d / (2*f)) where d is the sensor width and f is the focal length.

2*arctan(5.5 / (2*26)) gives an angle of view of 12.1°.

It think it's a very small angle, so I took a pen and paper to get the calculate the distance from subject:

This gives tan(aov/2) = (s/2) / d, so d = (s/2) / tan(aov/2), where s is the subject size.

(1800/2) / tan(12.1°/2) gives a required distance of... 8.51 meters to take a full person (1.8m).

So I guess there is indeed a mistake here but I don't know where. I double-checked all my calculations and specifications sources.

I wrote a python script for calculations:

import math
subject_size = 1800
focale_length = 26
sensor_width = 5.5
angle_of_view = math.degrees(2 * math.atan(sensor_width/(2*focale_length)))
distance_from_subject = (subject_size/2) / (math.tan(math.radians(angle_of_view/2)))
print('angle of view: %0.2f°, distance from subject: %0.2fm' % (angle_of_view, distance_from_subject/1000))
# "angle of view: 12.64°, distance from subject: 8.51m"
\$\endgroup\$
8
  • 2
    \$\begingroup\$ Welcome to Photo.SE. The way the SE networks work is that duplicate questions are discouraged. Have you searched existing questions here? We've already got about 50 different versions of this same question. \$\endgroup\$
    – Michael C
    Commented Sep 4, 2019 at 17:45
  • 2
    \$\begingroup\$ I'm voting to close this question as off-topic because this is about using a camera as distance-finder rather than using a camera for photography. \$\endgroup\$
    – mattdm
    Commented Sep 4, 2019 at 18:25
  • \$\begingroup\$ @MichaelC I searched a lot before posting here. Even with your comment in mind I can't find out those 50 versions of this question. But I'm new to photography so I guess my current knowledge doesn't allow myself to ask the very specific question related to my problem. \$\endgroup\$ Commented Sep 4, 2019 at 20:41
  • \$\begingroup\$ @mattdm I though it was clear but I want to calculate the distance from subject in order to know where to place my camera. I do math before taking the picture. \$\endgroup\$ Commented Sep 4, 2019 at 20:43
  • \$\begingroup\$ If you know that the subject is 5 feet tall...that doesn't in any way help you choose a lens and in no way informs your composition. It doesn't take into account the background, lighting, composition, etc...all of the things that make the photo. Do as we all do, grab a lens or two and just go shoot ;-). \$\endgroup\$
    – OnBreak.
    Commented Sep 5, 2019 at 16:08

2 Answers 2

1
\$\begingroup\$

It is industry practice to state the focal length of miniature cameras in terms of how they compare to a 35mm film camera of yesteryear. I looked up the S7 and found the manufacture states focal length equals the performance of a 26mm, its actual focal length is 4.2mm. If you think about it, 26mm is just a tad over 1 inch. The focal length is the distance from a cardinal point of the lens barrel structure to the surface of the image chip. The S7 is not even 1 inch thick. Use a 4.2mm focal length and recalculate.

By the way: You will need to know the dimensions of the imaging chip exactly! The 35mm film format is 24mm height by 36mm length and the diagonal is 43.27mm Often the angle of view given is for the diagonal dimension only. Odd -- but TV and computer monitors are sold by diagonal size. Maybe not the most useful data but it yields the bigger number. For the full frame with a 26mm mounted Angle of view is:

46.6 degrees (height)

69.4 degrees (length)

79.5 degrees (diagonal) the one most frequently given.

Checking the size of a 1/2.6 imaging chip

3.81mm height

5.08mm length

6.35mm diagonal

Mount a 4.2mm lens angles of view are:

Height 48.8⁰

Length 62.3⁰

Diagonal 74.2⁰

\$\endgroup\$
8
  • \$\begingroup\$ Thank you for your answer. How do you get this 5.08mm length, given the 1/2.6" sensor size? The table I linked (photoseek.com/2013/…) refers to a 5.5mm length (I tried to calculate myself but 1/2.6" gives me 0.015mm so I don't understand how it works). \$\endgroup\$ Commented Sep 4, 2019 at 20:56
  • \$\begingroup\$ Also, where did you get this 4.2mm actual focal length? Many different specification sources given me a 26mm focal length (and oddly none of them mentioned that this 26mm was not the actual focal length but the 35mm focal length equivalent) \$\endgroup\$ Commented Sep 4, 2019 at 21:03
  • \$\begingroup\$ @roipoussiere 1/2.6" refers to the diameter of an old cathode ray TV tube needed for a TV camera with an imaging area with a 6.35mm diagonal. 1/2.6" is equal to 9.769mm. (1/2.6 inches x 25.4mm/1" = 9.769mm) \$\endgroup\$
    – Michael C
    Commented Sep 4, 2019 at 22:26
  • 1
    \$\begingroup\$ I Googled the S7 and I know what to look for. You can do the same now that you know what to look for. The triangle you drew is the desired object triangle. A ray trace from the axis of the lens to the imaging chip traces out an image triangle. All angles of the two tringles are the same. The image tringle is tiny, the object triangle is large. They congruent. The base of the height of the object triangle is subject distance. The height of image triangle is the focal length. Try to envision these drawn apex touching apex. Now use trigonometry or you can use simple ratio math. \$\endgroup\$ Commented Sep 4, 2019 at 23:48
  • 1
    \$\begingroup\$ The light from the subject traverses the lens. Its path is changed due to the shape and density of the lens material. The path change is due to refraction (Latin to bend inward). The focal length F is the distance rear nodal (cardinal point) to image. This measurement is valid only for objects at an infinite distance away (∞). Since the lens has limited ability to refract. Objects closer than ∞ converge further downstream. Thus S2 is longer than F if the object is nearer than infinity, even longer if object is super close. If image of object is life size, S2 will be twice F. \$\endgroup\$ Commented Sep 5, 2019 at 15:01
2
\$\begingroup\$

In this specific case, your error seems to be the result of using the 35mm equivalent focal length of the lens instead of the actual focal length of the lens.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you! It strange that none of the half-dozen of different website I browsed to check the focal length mentioned that 26mm was actually the 35mm focal equivalent. \$\endgroup\$ Commented Sep 4, 2019 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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