One of the most common tasks when doing scientific photography, particularly when it is aimed at archaeological, heritage, or rock art documentation, is to incorporate metric references that allow interpreting the dimensions of an object, a support, or a specific motif. This is an apparently simple practice, but it is often resolved mechanically: a scale is placed within the scene and it is assumed that, from that moment on, the entire photograph can be measured accurately.
However, having a metric reference within an image is one thing, and assigning a valid scale to the objects represented in it is quite another. The presence of a ruler, an IFRAO scale, or a similar element can help understand the general dimensions of a scene, but it does not guarantee by itself that any measurement taken on the image directly corresponds to reality.
The problem is easily noticed when the scale and the object we intend to measure are not at the same distance from the camera. Photographic projection causes apparent sizes to vary with depth, surface orientation, and the position from which the shot is taken. A reference placed in the foreground may be perfectly legible yet prove of little use for measuring a motif located several centimeters or meters behind it.
This circumstance does not render the photograph useless; it simply requires determining what type of measurement we want to obtain and for which plane of the scene it will be valid. A metric reference may be sufficient for visual appreciation or local measurement, but it does not replace geometric rectification, much less an orthophoto or a photogrammetric model when working with complex objects.
Finding the scale of an image
There are two main reasons to establish a scale on a photograph. The first is to perform measurements with editing tools, such as Photoshop’s Ruler, using millimeters, centimeters, or other physical units. The second is to prepare an image intended for a report, publication, or catalog, incorporating a graphic scale that helps interpret the dimensions of the represented object.
Both uses are related, although not exactly equivalent. A graphic scale included in the image may be correct as an informative element and yet not allow precise measurement of the entire scene. Similarly, an image may be correctly calibrated for a specific plane without that calibration being applicable to other elements located at different depths.
Before modifying the document size or entering values in an editing program, it is advisable to identify where the area of interest is and what geometric relationship it maintains with the metric reference. This step, which may seem obvious, avoids many subsequent errors.
Assigning a scale from a known reference
The most favorable situation occurs when a known metric reference has been included in the same plane as the object to be measured. If a ruler, scale, or pattern of known dimensions is located next to the motif and parallel to its surface, it is possible to establish a relationship between a real distance and its equivalent in pixels.

For example, if a 100 mm reference occupies 500 pixels in the image, each pixel will represent 0.2 mm within that plane. From this relationship, the physical width of the photograph can be calculated and the document adjusted so that measurement tools return values in real units.
The basic relationship can be expressed as follows:
millimeters per pixel = real length of the reference / length of the reference in pixels
Once this equivalence is known, the physical size of the image will be:
physical width = image width in pixels × millimeters per pixel
In Photoshop, this information can be entered via Image > Analysis > Set Measurement Scale > Custom. The program allows associating a length measured in pixels with a logical length expressed, for example, in millimeters. It is also possible to change the document size without resampling the image, so that the same number of pixels is preserved and only the relationship between those pixels and physical units changes.

However, this operation does not correct perspective. It only establishes a valid working scale for the area where the reference is located. If the object we want to measure is closer or farther from the camera, or is on an inclined surface, the values obtained will no longer correspond exactly to reality.
The reference plane and the plane of interest
It is common to relate this issue to the focus plane, since usually the main motif and the reference are located in the same sharpness zone. However, focus itself is not the factor that determines the metric validity of the image. What matters is that the reference and the object share, as much as possible, the same geometric plane.
A scale placed next to a flat surface can serve to measure details of that surface, provided the camera has been positioned reasonably perpendicular and the distance variation within the scene is small. In contrast, a ruler placed in front of a rock, a relief panel, or a three-dimensional object does not allow its scale to be automatically transferred to all represented points.
Therefore, the scale should be understood as a local reference. The farther we move away from the plane to which it belongs, the greater the measurement uncertainty.
When it is necessary to measure a flat surface of some extent — an inscription, a painting, a wall, a technical drawing, or a facade — it is more appropriate to rectify the perspective. For this, several known points, a grid, a rectangle, or any other geometric reference that allows transforming the image are required. The goal is to recover, as much as possible, the original proportion of the photographed surface.
Measuring based on focus distance and metadata
There is a third possibility when no metric reference has been included within the photograph. If we keep the original file and its metadata, we can estimate the image scale from the subject distance, the focal length used, and the sensor dimensions.

The fields SubjectDistance and FocalLength can provide part of the necessary information. The first expresses a distance to the subject, while the second records the focal length used in the shot. From both data, the lens magnification can be approximated and, subsequently, the scene width covered by the image.
In an approximation based on thin lens optics, magnification can be expressed as:
M = f / (d − f)
where f represents the focal length and d the subject distance, both expressed in the same units. Knowing the magnification, the scene width can be estimated by dividing the active sensor width by that value:
scene width = sensor width / M
If we know the scene width corresponding to the plane of interest, we can assign it as the physical width of the document. Thus, measurements taken on that area of the photograph will have an approximate correspondence with reality.
However, this method should be considered an estimate. EXIF data are not always complete, the distance recorded by the camera may be imprecise or not exactly match the point we want to document, and some lenses modify their effective focal length when focusing at short distances. Extension tubes, macro systems, lenses with internal focusing, and certain adapters also introduce variations that are not always reflected in the metadata.
For this reason, whenever possible, the calculation obtained from the EXIF should be verified with a known dimension. A simple check with a ruler placed in the same working plane can reveal whether the estimate is sufficient or if there is a significant deviation.
To facilitate these calculations, the online magnification factor calculator can be used. The operation and formulas related to lens magnification and extension tubes are explained in more detail in the article on calculations regarding lens magnification factor and extension tubes.
Automating scale adjustment
When working with a large number of images, repeating these calculations manually can be impractical. A script can retrieve part of the information available in the metadata, request missing data, and automatically adjust the document size.

This automation can be useful, especially when the photographs come from the same equipment, the same lens, and a known workflow. However, automation does not eliminate initial limitations. If the focus distance is not available, if the sensor width is not known precisely, or if the documented object does not coincide with the plane on which magnification was calculated, the result will remain approximate.
Therefore, any tool of this type should serve to accelerate a known procedure, not to replace geometric verification of the image.
Scale, accuracy, and documentation
In heritage photography, it is advisable to keep the original file as a capture document and reserve scale, annotation, or layout modifications for derived copies. This way, metadata, native resolution, and image traceability are preserved, while versions adapted for reports, inventories, or publications can be generated.
When an image has been calibrated for a specific plane, it is useful to indicate this explicitly. A brief note can prevent misinterpretations:
Scale valid for the plane of the documented surface. Measurements made outside this plane should be considered approximate.
Accuracy does not depend solely on a formula or the presence of a scale within the scene. It depends on how that scale has been used, the geometry of the shot, the quality of the metadata, and the relationship between the measured object and the reference plane.
A well-used scale provides valuable information. Poorly placed or interpreted without considering capture conditions, it can introduce an appearance of accuracy that the photograph does not possess.
