# How to calculate digital photo precision based on camera specification?

I'm doing a project which involves analyzing an object's width from a photo with given precision of about 0.1 mm. I am to the point where I have to choose which camera to buy in order to obtain the desired photo precision.

Let's say I found a 5MP camera. My question is how can I determine what is the "real" value that corresponds to camera's resolution? I read about DPI which has application in printers, and PPI which has application in displays.

Update

Thanks for all answers. I did some calculations based on the assumption that camera is set straight and there is no distortion effect for simplification.

So let say that object i want to measure is 10 cm width (black continouse line on white background). The distance between object and lens is also 10 cm and focal length is 3.6 mm.

object_width_on_image = 10 [cm] * (3.6 [mm]/ 10[cm]) = 3.6 [mm]

From specification i know that resolution is 3264 x 2448 and image area is 6.18 mm x 5.85 mm. Now, if i want to calculate how many pixels those 10 cm will be on the image i will do simple operations:

object_width_in_pixels = 3264 [px] * (3.6 [mm]/6.18 [mm]) = 1901 [px]

So if 1901 px equals 100 mm, than 1 px is about 0.05 mm which is enough for me.

• It doesn't work that way. You cannot calculate image resolution purely on the basis of number of pixels. As a minimum, you need to know the lens OTF, the pixel fill factor, and if not shooting RAW, the filter algorithms. Commented Oct 3, 2016 at 11:21
• @CarlWitthoft I think an expanded version of that is probably what the OP is looking for as an answer to this question. People don't always know what they need to know before they ask a question :-) Commented Oct 3, 2016 at 11:22
• I do not understand what do you mean by "photo precision". You need to have a scale and distortion references. Commented Oct 3, 2016 at 14:15
• I'm voting to close this question as off-topic because this question is about using a camera as a digital instrument, not for photography. Commented Oct 3, 2016 at 14:18

The size of the object on the sensor depends on its real size, the focal length and the distance between sensor and object. In order to determine either of the three, you have to know the other two.

We have a few questions on that already, for example Can we measure size of an object using EXIF data from a photo?, What is the relationship between size of object with distance?

Fyi: By performing measurements on images to determine real world values you have entered the realm of photogrammetry. In order to perform any serious calculations reliably, you have to calibrate your camera in order to know its exact focal length and distortion. Knowing that and the distance of the object, you can determine real world lengths on the object from the photograph.

To the degree and at the distance which a particular camera and lens combination can resolve a grid of 0.1mm dots at a pitch of 0.2mm in both directions into a checkerboard, it is possible to measure objects to within 0.1mm.

In theory, the Nyquist Limit requires each pixel to subtend an angle that intersects the object across a distance of no more than 0.5mm. In practice it might be more but for the back of envelope a 1000px wide sensor would be theoretically limited to measuring objects less than 500mm wide.

However, that upper limit assumes that the interesting dimension of the object lies in the same plane and that that plane is perpendicular to the camera. It also ignores camera design issues like the effect of a Baer filter on resolving power relative to the frequencies in the source and the reflections from the object (and of course optics, noise and the practical need to oversample).

It also assumes a single digital camera and standardized conditions. Anthing other than standardized conditions for 0.1mm is going to be a non-starter. On the other hand multiple cameras or the use of film are alternatives to the other assumption and the standard conditions might be a reference object of known dimension in the image used for measurement.

None of which is to say that it's not doable, but like most important work in photography it requires an amount of effort that most people won't consider worth doing.