
What you need
Use a measured target at the exact working height, fixed camera settings and a rigid camera mount.
Read the diagram as a data table
| Condition or component | mm |
|---|---|
| 0.100 mm/pixel | 23.5 |
| 0.102 mm/pixel | 23.97 |
The calculation
s = L_reference / p_reference L_object = s × p_object
Lengths L are mm and p are pixels. The single scale applies only under the geometry and height used to measure it.
Worked example
A 50 mm reference spanning 500 pixels gives 0.1 mm/pixel. A part spanning 235 pixels is then estimated at 23.5 mm. If the scale changes to 0.102 mm/pixel, the estimate becomes 23.97 mm.
Try it step by step
- Place the reference beside the part at the same height and measure several spans instead of relying on a single short segment.
- Estimate scale at the center and near the corners to expose perspective or distortion variation.
- Keep focus, resolution and mounting unchanged, then compare object measurements with an independent physical measurement.
- Use distortion correction and a planar transformation when a single scale cannot meet the required accuracy across the workspace.
How to check the result
Record residual error at multiple known distances and positions. The result should show where the simple model is and is not valid.
Common mistake to avoid
A raised part changes apparent scale in a perspective camera. A ruler lying on the table does not automatically calibrate the top of every object.
Reference reading
Primary references for the underlying models, APIs or application context. The worked numbers and plots above are educational calculations, not results reported by these sources.


