I'd like to take precise measurements of a mechanical part. I have taken a picture of the part and I was wondering if there's a software able to help me in taking different measurements of the same part. Basically, I'd like something that, after a "calibration" step where I provide a known measurement of a given detail, is able to derive the rest of the part details' sizes.

I could do it just using a caliper, but if I need to take many measurements, the process becomes really time consuming.

  • if you know the measurement of something on your photo, you could just scale the image accordingly. But I doubt you can get a precise measurement unless you used a tripod positioned completely perpendicular to your subject with no perspective or lens distortion.
    – Luciano
    May 18 '17 at 14:13

The picture would need to be perfectly orthogonal to remove perspective, differences of sizes due to distance, lens aberration, etc.

It would be almost impossible, but if the image is taken properly (Using a very long focal length and using a high enough resolution image) it could give approximate measures. Then use any vector based program that can have a raster image on top and build from that. (Only linear measures, not curved surfaces)

There are some programs to make an approximate 3D model if you have a strong perspective, for example, a house. (Sketchup has a mode to trace the approximated vanishing points and build from that)

But, no. The only way to take real measures would be a laser 3D scanner or another 3d or cloud point scanning method, but they use different images to triangulate. Not just one image.

  • Agreed: lens distortion and perspective issues pretty much guarantee that "precise measurements" (the intent) are not possible. Remember: things further from the camera will appear smaller. This is not the case in a technical drawing.
    – Yorik
    May 18 '17 at 15:47
  • Lens distortion can be calibrated away, its a common procedure in computer vision systems.
    – joojaa
    May 18 '17 at 17:55
  • Yup. I am just mentioning some variables.
    – Rafael
    May 18 '17 at 20:03

A camera produces an image that loses any scale information. That is because the projection is flat (or spherical, depending on the lens geometry). Objects at different distances appear sized differently. Likewise certain objects can appear the same.


Image 1: The projection loses sense of scale.

By placing a measurement in an image you can re calibrate a single plane, if the camera is orthogonal to that plane. If the measurement a square, but not 2 edges then you can can also account for perspective distortion so camera need not be orthogonal anymore.

If the object is 3-dimensional then you can not use a single image to measure the object. But you can use 2 images, or preferably more than 2 images. This is called stereo geometry (for a fun explanation see the fundamental matrix song). Of course you should also eliminate the camera distortions. Quite many scientific and commercial packages exists for this. Ones that i have used are:

  • Tracking software like:
  • OpenCV a programming framework for visual related algorithms
  • Matlab

Now it's worth noting that you still must know ONE dimension in the image or setup otherwise you only get the relative distances between points. So still the image loses scale, to fix this you need to know one dimension.

You can get pretty accurate measurements with this, but consider using structured light methods.


... after a "calibration" step where I provide a known measurement of a given detail, is able to derive the rest of the part details' sizes.

The free program ImageJ is available for Windows, Mac and Linux.

This webpage explains "Spatial Calibration", and how to use ImageJ with uncalibrated images or images that contain spatial calibration meta data.

In addition to the regular menu features there are thousands of plugins, some of which pertain to measurement are:

In addition to the standard menu tools and plethora of plugins you can write your own.


I've never seen a software that could help but if you're shooting photos of the object you should use a scale similar to what is used in crime scenes:

enter image description here


When I used to do vehicle wraps I would use:

enter image description here

Sticky Ruler

After taking the pictures I would bring them into Illustrator to help in the design. It might help you when you bring them into a CAD or drafting program.

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