-
Notifications
You must be signed in to change notification settings - Fork 0
Calculating height
Height (mm)= (Distance to Object (mm) x Object height on sensor (px)) / Focal Length (mm)
Object height on sensor = (Sensor height (mm) × Object height (pixels)) / Sensor height (pixels)

The height of an object in a photo is related to its object height on the sensor, the distance to the object and the focal length. This assumes that the camera is parallel to the centre of the photo. However, as our camera was pointed to the sky, we must use some geometry to adjust for the pitch of the camera. In this scenario, the whole photo vertical FOV contains both above and below the place so
The field of view angle (α) can be calculated from the sensor height and focal length. From the recorded pitch, we can use trigonometry to work out the adjustment to find x from the calculated height, pitch and field of view angle.

The information required can often be found in the photo metadata. On Linux, we used the exif tool. Or the details are likely recorded on the manufacturer's website. In the case of the FAAM cameras, the exact specs were taken from the camera itself Bosch DINION 5000
- Image width x height: 710 x 576
- focal_length_mm = 12 Focal Length in mm
- sensor_height_mm = 4.8 Sensor height in mm
- sensor_width_mm = 6.4 Sensor width in mm
sensor_height_pixels = 576
To calculate the height of the object, we'll need the above information about the camera and the pixel height and the distance between the camera and the object.
- Fundamentals of Photonics, Bahaa E. A. Saleh and Malvin Carl Teich, 2007, FOV diagram
- Introduction to Modern Optics, Author: Grant R. Fowles, Dover Publications, 1989 - thin lens equations