What methods are used for automatically measuring the dimensions (width/height/distance/etc.) of a subject without having to get in there with a measuring tape?

I am just starting to get into photography, but coming from a programming background it seems like this should be possible given the right tools. I'd like to be able to do this with any Canon DLSR camera.

Maybe there is a laser (separate component) that could be used to determine distance to the subject, which can then be used in an equation along with DOF and other optics variables for the specific lens you're using, to calculate the size of an object.

Or, is the only way manually?

Thanks for your help.

  • 4
    \$\begingroup\$ I hate when someone asks a question and people don't answer and just ask them why would you want to do THAT? But I have to ask why? :) \$\endgroup\$
    – MikeW
    Jun 9, 2013 at 23:04
  • 1
    \$\begingroup\$ @MikeW - More likely question is "what's the Photography aspect of this?" \$\endgroup\$ Jun 9, 2013 at 23:11
  • 1
    \$\begingroup\$ possible duplicate of Can we measure size of an object using EXIF data from a photo? \$\endgroup\$
    – mattdm
    Jun 9, 2013 at 23:26
  • \$\begingroup\$ If you could share why you are interested in such an exercise, it would help to understand your question and possibly allow us to create answers that would tell you what you want to know. \$\endgroup\$
    – Michael C
    Jun 10, 2013 at 0:39
  • 2
    \$\begingroup\$ I'm voting to close this question as off-topic because it doesn't have a clear application to photography. \$\endgroup\$
    – Philip Kendall
    Dec 12, 2015 at 16:38

2 Answers 2


First off to aid in searching for more information, what you're referring to is called Photogrammetry.

From a single image you can't [reliably] measure anything - there's no way of being able to tell if you're looking at a photograph of a photograph (i.e. a flat object very close to the camera).

From 2 or more images you can recover some or all measurements up to a certain accuracy (except in some rare cases), provided you have correspondence information, i.e. you know what parts of the first image correspond to the same parts in the subsequent images. At least 7 different points are required, 8 or more strongly recommended.

There are algorithms to estimate correspondence and with enough images that contain strong distinctive features the results can be quite accurate. To get absolute (as opposed to relative) measurements the camera must be calibrated. There are many ways to do this, the easiest being shooting a calibration target of known size.

Since you're comfortable with programming there are various bits of code that implement these methods (as well as proprietary products with SDKs) search for wide baseline stereo, or structure from motion.

Finally if you know the distance to the object then you can obtain estimates of the size using trigonometry (provided you know the focal length), see this question for more details: How do I calculate the distance of an object in a photo?


for measuring in an image/photo, you can do it now fairly automatically, but you do still need to measure one item, you might want to check out this app below:

the general answer is, Yes and no, if you add in enough information besides the EXIF info, then it can be done, if you don't add enough info in then no, that info is an extremely complex calculation of the perspective of the object, but then also using that to work back to the format and angle of the photo frame, then an exact measurement to the person's eye or frame center, then knowledge of the exact ground surface elevations between you and the object. and even more calculations beyond that.

This app below does all of that, but with estimates of height, ground etc.. it can basically create an “As-Built” drawing from a photo automatically. Both on interior and exterior walls or surfaces, including just furniture surfaces. It even puts the dimensions on for you, it can estimate the scale of the wall or object you’ve taken a photo of so you have something to work with, then once you correct one of the dimensions (as mentioned before, it is only using estimates), all of the dimensions become correct (for that surface plane you are working on). Then you can add more dimensions, and move around existing dimensions too it can even measure areas and perimeters right on that photo.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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