# What is 'sensor height?'

The accepted answer to the question, How do I calculate the distance of an object in a photo?, refers to sensor height.

What is sensor height and how do find/calculate it in this context? I'm using a LG G2 cell phone for this, and this is the best place for its camera stats I could find: https://www.phonearena.com/phones/LG-G2_id7969.

My current understanding leads me to believe that is the camera sensor size. In the previous link, I was led to the Optical format article at Wikipedia, which would then make the sensor size .09" or just over 2mm. Except when I use that my test pictures are way off and I'm not that bad at measuring things. I would appreciate any help.

• Commented Jul 18, 2018 at 2:20

Sensor height is indeed the physical measurement of the vertical dimension of the sensor's active pixel area.

From Wikipedia's Image sensor format article, the phone's sensor format of 1/3" (actually quoted as 1/3.06" in the LG G2 phonearena.com page you linked to) is 4.8 mm wide by 3.6 mm high.

I think the problem you encountered is assuming that 1/3" was a physical measurement; it is not. So-called 1 inch format (and fractions of it) is confusingly named, and has its roots in tube sensors that were used in broadcast TV. See also, Why is a 1" sensor actually 13.2 × 8.8mm?

Borrowing from @mattdm's deleted answer, regarding using camera phones as measurement devices,

[...] be aware that camera phones are not meant to be precision measuring devices, and many of the calculations tend to be of the "assume a spherical cow" sort (in this case, things like "assume a perfect thin lens and focus at infinity"). So even if you know the exact numbers, you might not be able to calculate distance to objects as nicely as you'd like.

• As an aside, I've seen some lost in translation instance where sensor height and image height were conflated. What is above is indeed the definition of sensor height but if image height is meant, then that definition is the diameter or (usually) radius of a circle which touches the furthest corners of the image (the image circle) Commented Jul 18, 2018 at 18:21

I find that the diagonal measure of this sensor image is 5.867mm. From specification I can't find, the height and length. However, based on the height to length ratio 1920 pixel length by 1080 high I find that the height of this sensor is 2.875mm and the length 5.111mm.

Further the specifications tell me that the focal length of the lens equivalent to a 29mm lens mounted on a 35mm full frame camera. The full frame measures 24mm by 36mm thus its diagonal is 43.27mm. Given this data than the crop factor or magnification factor is 43.27 ÷ 5.867 = 7.37. Thus this phone actually has 29 ÷ 7.37 = 3.935mm lens (likely 4mm).

You can trace out a triangle, image height to lens distance. The height of this triangle is 4mm, the base of this triangle is 2.875mm. the ratio of base to height is 4 ÷ 2.875 = 1.39

The object distance to lens traces out an similar triangle. The base, in this case is 1000mm the height is 1000 X 1.39 = 1,391mm. In other words: With a 4mm lens producing an image height of 2.875mm a 1000mm object must be 1,391mm away from the camera.

My best guess and this may be gobbledygook.

Image format is not usually a very exact number so I prefer pixel sizes. In your case, this would be 1.12 um, or 0.00112 mm. If your image size is 1920 by 1080 pixels, simple multiplication will tell you that your sensor is 2.15 by 1.21 mm. I don't know what your actual image size is, but use that.

On an uncalibrated phone camera, I wouldn't count on any measurements to be very accurate away from the center of the image, especially at close-up. You can try them out and see if they're accurate enough for your needs. If not, you could try estimating your camera's actual focal length and front principal point. Ask another question if you need help with that.

Beyond this, you'll need actual camera calibration if you want accurate results. As far as I know, tools to do that are not very user-friendly and require some programming skills.

• @scottbb The reason 2.15x1.21 mm is too small to fill the 1/3'' format is because this sensor has more pixels than 1920x1080. It's a 13 MP sensor, and 1920x1080 is only ~2 MP. Commented Jul 18, 2018 at 15:14
• You're absolutely right. I was overthinking it.
– scottbb
Commented Jul 18, 2018 at 15:17
• BTW, the real sensor specs are 4160 x 3120 px. devicespecifications.com/en/model/21dc28a2 . It should have been obvious to me that 1920x1080 is the video resolution.
– scottbb
Commented Jul 18, 2018 at 16:12
• @scottbb It stumped me, too, while I was writing the answer. :) Commented Jul 18, 2018 at 18:39