HOW TO CALCULATE THE DISTANCE BETWEEN TO POINTS IN AN IMAGE?
There’s a reason all those CSI shows put an object of a known size in the image for scaling. You need the angle of view of the lens for both the vertical and horizontal planes at the particular focal length. I don’t believe that information is readily available. You might be able to get it from the lens manufacturer. It also depends on the size of the sensor. A 35mm sensor will have a greater angle of view than a 24mm sensor with the same lens at the same focal length. If you can get the information, then I believe the formula is (mathematicians, feel free to contradict me.): x = 2 x D x tan(A / 2) D = distance from camera to subject x = height or width of the subject A = visual angle. My camera does not record camera-to-subject distance in the EXIF data. Even if it did, I think that there would be a considerable margin of error. The distance is not necessary for autofocus, as the algorithms use features of the subject to focus the lens. Calculating the distance would be an additional