0
\$\begingroup\$

I have an image with EXIF information encoded into it. What I need to know is what information I can use to determine the length of a certain object. For example, are there tags that hold the camera opening angle and distance from the object in focus? (from which I could calculate distance using trig). Are there other approaches?

\$\endgroup\$
4

1 Answer 1

0
\$\begingroup\$

You need:

  • The sensors size/definition (or "pixel size"), so that when you measure the size in pixels you can transform that to millimetres on the sensor. This is found on the Exif (Focal plane resolution) but can also be deduced from cameras specs, it won't vary between shots.
  • The focal length of the lens. This is also part of the Exif (Focal length), but this is the "nominal" focal length, if you focus on something close it will be somewhat different (on my lens the front lens extends when focusing close), but the various EXIF that report the focal length remain the same (at least as far as I can tell, with my camera(*)).
  • The focusing distance. This is also part of the Exif, but not very accurate, the purpose of the camera being to be in focus, not measuring distance. To give you an idea, shooting at an object exactly one metre from the front lens the focusing distance is reported to be 1.10m-1.40m. Shooting something across the street, the focusing distance is reported as being 8.4m-infinity. Needless to say, this is not terribly accurate.

And of course you can only evaluate the size of things that are strictly perpendicular to the camera axis (so, for heights, the camera need to be horizontal). Otherwise you have to factor in the angle, but you have to obtain it using external cues.

Sot it all depends how accurate you want/need to be....

(*) Canon EOS 70D + Canon EF 50mm f/1.8

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.