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:
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"