# How can the height of a subject in picture be calculated? [duplicate]

Maybe is not the perfect stackexchange site to ask this but I try. Feel free to move or close my question, but, if you can, suggest me where I can ask this one:

I took a photo with a compact digital camera and EXIF says that focal length is 6.2mm (and equivalent focal length of 35mm = 38mm ). My subject is about 14kms away and it takes up almost the entire height of the picture of 2560 x 1664.

How can I calculate the height of my subject? I do not ask the highest precision but a tolerance of +/- 10%.

This is the photo: Etna I want to know the volcano's smoke height.

You can go through the lens magnification.

M = f / ( f - d)

You know the projected size and want the real size, so you divide the projected size by M

H_r = H_p / M

In this case you get: M = 38 / ( 38-14.000.000), H_r = 24 / -0.0000027143 = -8.818.105mm ~ -8,818km

Note the inverted projection by the negative M.

The measurement is most accurate if your camera was level. If keeping the camera level means that the subject you want to measure only fills part of the frame, then you need to measure (with a select rectangle) the height in pixels and divide the pixel size with the sensor pixels size to get the proportion of the 24mm sensor size it filled up. If you held it at an angle, you have to divide by cos(angle_you_held_it).

• +1 as per @Octopus and for a new way to Rome which is about 779 km away from me :) – Christian Jun 7 '13 at 22:33
• my idea was about 7km, because the mount etna's high is 3,329 m and the height of the smoke cloud was about double the height of Etna from the point where I was, but I wasn't at sea level and my camera was level , then 8km is probably rigth. I accept your answer because I can understand the ratio you show, but I'd like to upvote one more time the @octopus answer because the value is very similar! Thanks (Why not you upvote for me? ;) ). – Christian Jun 7 '13 at 22:53
• I always forget that :) Now I did it. – Michael Nielsen Jun 8 '13 at 9:38

It's probably not the place to ask, but the answer is fairly easy to arrive at using similar triangles. Given that the feature fills your shot, you have two ratios that should be the same:

``````focal length : sensor height

distance to feature : height of feature
``````

Since you have a 38mm focal length (at 35mm equivalent and a 35mm frame height is 24mm) then you could say:

``````38mm : 24mm = 14km : x
``````

The number you seek (x) is about 8.85km.

• +1 for the speedy answer. I wait some other answer (if any) to accept your, just to clear in my mind if the formula is correct. I hope you do not take it badly :) – Christian Jun 7 '13 at 22:15
• Really thanks my friend, if I could I would have upvoted again! – Christian Jun 7 '13 at 22:54