Every published object is open access.◆No gatekeeping. All objects published openly.◆PHOTARCH — research infrastructure for archaeology.◆Every published object is open access.◆No gatekeeping. All objects published openly.◆PHOTARCH — research infrastructure for archaeology.◆
← Guides

Measuring objects from photographs

A photograph can be measured like the object itself — length, width, the diameter of a bead, the distance between two rivets — as long as it is known how many millimetres one pixel covers on the object. This guide explains where that number comes from, how far to trust it, and how to keep it with the picture.

How a photograph carries a true scale

The scale of a photograph is the length on the object, in millimetres, that one pixel covers: millimetres per pixel. With it, any distance in the picture is a distance on the object. At 0.02 mm per pixel, an edge 1,850 pixels long is 1,850 × 0.02 = 37.0 mm.

The scale holds for one picture at one size. Resize the file to half its width, and each pixel covers twice as much: 0.04 mm. Crop it, and the pixels keep their size but the frame changes. A scale is therefore only useful together with the pixel dimensions it was measured on.

Where the millimetres per pixel come from

There are four ways to find the scale, and they are not equally good.

Calipers on the object

Measure a length on the object itself — its longest side — with a digital caliper, then draw the same length in the picture. A blade measured at 42.80 mm that spans 2,140 pixels gives 42.80 ÷ 2,140 = 0.0200 mm per pixel. The measurement is of the object, at its outline, which is what is usually compared.

A calibrated target in the picture

A surface with markers whose positions are known exactly, such as the PHOTARCH board, gives the scale on the plane the object rests on and can correct the perspective at the same time.

A ruler in the frame

The fallback. It is read by eye, and its upper surface usually lies a few millimetres nearer the camera than the object's outline, which makes the object measure slightly too small.

A known distance and focal length

From the lens's focal length f, the distance u to the object and the sensor's pixel pitch, the magnification is f ÷ (u − f). With a 100 mm lens 500 mm from the object, that is 100 ÷ 400 = 0.25, and with 0.006 mm pixels the scale is 0.006 ÷ 0.25 = 0.024 mm per pixel. A distance 5 mm wrong changes the result by about 1.25 %, and most lenses change their focal length slightly as they focus, so this is the least direct of the four.

Whichever it is, write down which. A scale with its method can be judged; a bare number cannot.

100.00 MM THE LONGEST SIDE100.00 MM BY CALIPERS,2,336 PX IN THE PICTURE 1 MILLIMETRES PER PIXEL100.00 ÷ 2,336 = 0.0428;A COPY HALF AS WIDE: 0.0856.THE SCALE FOLLOWS THE FILE 2
  1. THE LONGEST SIDE — 100.00 mm by calipers, 2,336 px in the picture
  2. MILLIMETRES PER PIXEL — 100.00 ÷ 2,336 = 0.0428; a copy half as wide: 0.0856. the scale follows the file
The scale holds in one plane: the one the length was measured in. A part of the object higher than that plane is drawn slightly larger.

How accurate is a measurement from a photograph?

Several things limit it, and they are of very different size:

  • Where a line begins and ends. Placing each end of a drawn line to within one pixel gives an uncertainty of about √2 ÷ the line's length in pixels. On the 2,140-pixel blade above, √2 ÷ 2,140 ≈ 0.07 %.
  • The caliper reading. A display that shows hundredths of a millimetre adds almost nothing. What matters more is how the jaws meet the object, and whether the length in the picture is drawn between the same two points.
  • The lens. Distortion makes a millimetre near the corners a different number of pixels from one in the centre. Keep the object central.
  • Perspective. A camera that is not square to the surface makes one end of the object larger than the other. A calibrated target can correct it; a ruler cannot.
  • Height. Usually the largest, and the subject of the next section.
100 300 1,000 3,000 10,000 0.01 % 0.03 % 0.1 % 0.3 % 1 % 2,140 px · 0.07 % LENGTH OF THE MEASURED LINE · pixels √2 ÷ length Each end of a line is placed to within a pixel. The longer the line, the less it matters. Height above the measured plane is usually larger.
Log scales. The line is drawn from √2 ÷ length; the marked point is the blade measured with calipers in the section above.

The one-plane limit

A camera sees a nearer thing larger, so a scale is exact in one plane only: the plane it was measured in. A part of the object h millimetres above that plane, seen from D millimetres away, measures too large by h ÷ (D − h). For the top of a bead 25 mm high, photographed from 500 mm, that is 25 ÷ 475 ≈ 5.3 %.

A plumb view — straight down — therefore gives length and width in the plane the scale belongs to. It does not give thickness: that needs a side view with a scale of its own, or calipers. How height affects a ruler, and why distance helps, is worked through under Scale in artefact photography.

Off-centre the error grows, and the caliper and the board hold in different planes. Both, and how to state the error as a margin, are under Objects with height.

Why the scale belongs in the file, not burnt into it

A scale bar drawn into the pixels survives resizing, because it shrinks with the picture. But software cannot read it, a crop can remove it, it covers part of the ground, and nothing in it says how it was obtained or how certain it is. The resolution fields that TIFF and EXIF already have are read by most software as print settings.

Image Scale Metadata (ISM) is an open format for carrying the scale inside the file instead: a few XMP fields for the millimetres per pixel, the pixel grid it was measured on, how it was obtained and how certain it is. With those, any program can draw a correct scale bar or measure the object after the file has been resized, and can recognise a crop to another shape and decline to guess. The specification, a viewer and a validator are published there, independent of PHOTARCH. What the fields carry alongside the rest of a picture's record is under Metadata.

Checklist

  • Set the scale from calipers on the object's longest side, or from a calibrated target; use a ruler only when there is nothing else.
  • Keep the camera square to the surface, and the object in the centre of the frame.
  • Photograph from as far away as the lens allows while the object still fills enough of the frame.
  • Measure lengths in the plane the scale belongs to; measure thickness separately.
  • Keep the scale, its method and its uncertainty in the file.

PHOTARCH writes the scale it measures into every exported picture of a measured object as ISM, with the method it was set by and its uncertainty.