Camera Pixel Scale & Depth Calibration Calculator
Check whether one reference-plane calibration stays within your measured size budget as a part moves in depth. Record the image span of the same known gauge at three positions for each camera setup. Compare the resulting apparent size, signed error and local pixel scale in the same field region.
Audit camera pixel scale across depth
Compare what one fixed calibration reports when the same part moves away from the reference plane.
Edit gauge spans, depth offsets and limits
Only Setup B meets both sampled limits.
25 mm part span · ±0.1 mm error cap · 49.8 px/mm minimum
Setup A
Misses a sampled limit0.2 mm
Worst absolute bias · Near plane
- Lowest local scale
- 49.65 px/mm
- Reference calibration
- 50 px/mm
Setup B
Meets both limits0.1 mm
Worst absolute bias · Near plane
- Lowest local scale
- 49.8 px/mm
- Reference calibration
- 50 px/mm
Inspect the measured depth planes
Signed size error (mm)
Cap ±0.1 mm
Depth offset from reference
- Setup A
- Setup B
- Within error cap
Far · +25 mm from reference
Setup A · -0.175 mm error
24.825 mm inferred · 49.65 px/mm
Outside error cap · Below pixel scale
Setup B · -0.1 mm error
24.9 mm inferred · 49.8 px/mm
Within error cap · Meets pixel scale
Review exact calibration and depth ledger
| Setup | Plane | Depth (mm) | Gauge (px) | Local scale (px/mm) | Inferred span (mm) | Error (mm) | Meets limits |
|---|---|---|---|---|---|---|---|
| A | Near | -15 | 1008 | 252/5 | 126/5 | 1/5 | No |
| A | Reference | 0 | 1000 | 50 | 25 | 0 | Yes |
| A | Far | 25 | 993 | 993/20 | 993/40 | -7/40 | No |
| B | Near | -15 | 1004 | 251/5 | 251/10 | 1/10 | Yes |
| B | Reference | 0 | 1000 | 50 | 25 | 0 | Yes |
| B | Far | 25 | 996 | 249/5 | 249/10 | -1/10 | Yes |
How to use this calculator
- Enter the known gauge length and part span. Set the error cap and minimum measured pixel scale.
- Record signed near and far offsets from the same reference plane.
- Enter the gauge’s measured pixel span at each plane for both setups. Use the same feature, measurement axis and local field region.
- Inspect the error plot and the selected plane’s inferred reading. Compare the worst absolute error and lowest pixel scale.
- Open the exact ledger or download all measurements and derived quantities.
The Formula
The mathematical logic powering this calculation is:
Measure a known gauge of length G along the same image direction and local field region at each depth. If it spans P pixels in a plane, local scale is P ÷ G pixels per millimeter. The fixed calibration for that setup is the scale measured at the reference plane. Nominal part span L projects to L × local scale pixels. Applying the fixed reference calibration gives inferred size L × local scale ÷ reference scale. Signed size error is inferred size minus L. Positive values mean the part appears too large.
The exact absolute error must be at or below the cap and the local scale at or above the minimum at every entered plane. Equality counts. Tied extremes show the earliest plane in near-to-far order. Both setups use the same gauge, proposed part span and depth offsets. The chart shows discrete sampled planes and a symmetric error cap. It makes no interpolation or prediction outside those samples.
Use a consistent optical setup, field location, axis, imaging scale and measurement basis for each lens comparison. The local model assumes the part uses the gauge’s scale over its evaluated span. The pixel density is a sampling quantity. Optical resolution, focus, edge localization, distortion across the image, physical gauge uncertainty and full-field errors require separate evidence.
Gauge and part length accept 0.001–100,000 mm. Near offset is −100,000 to −0.001 mm, far offset is 0.001–100,000 mm and reference offset is zero. Measured pixel spans accept 0.001–1,000,000 px. The error cap accepts 0–100,000 mm and the scale minimum 0–1,000,000 px/mm. Inputs accept three decimal places. Exact rational values govern comparisons and exports.Worked Example
If you input:
- Gauge and part: 20 mm gauge and 25 mm part span.
- Planes: −15 mm, 0 mm and 25 mm from reference.
- Setup A: 1,008, 1,000 and 993 px.
- Setup B: 1,004, 1,000 and 996 px.
- Limits: 0.1 mm absolute error and at least 49.8 px/mm.
Result:
Setup B meets both limits exactly, with ±0.1 mm off-reference error and its lowest local scale of 49.8 px/mm. Setup A reaches 0.2 mm absolute error and 49.65 px/mm. Reducing the cap to 0.099 mm leaves neither setup within both limits.
Frequently Asked Questions
How can the reference-plane error be zero when the instrument has uncertainty?
The reference reading defines the scale, so identifying its own recorded span gives an algebraic zero. Gauge and measurement uncertainty are separate.
Is local pixels per millimeter an optical resolution measurement?
It describes sampling density from the measured gauge. Blur, contrast and edge detection affect how well adjacent features can be resolved.
Why does positive error indicate an oversized reading?
The measured span has more pixels per millimeter than the fixed reference assumes. Dividing those pixels by the smaller reference scale overestimates size.
Can I use the plot for unmeasured depths or off-axis features?
The tool evaluates only the recorded planes and the gauge’s local field region. Use separate observations for other depths or positions.
Similar Calculators
Camera Field of View & Framing Calculator
Compare camera field of view across object distances, focal lengths and sensor crops. Check width and height limits and solve the focal length range that fits.
Numerical Aperture & Microscope Camera Sampling Calculator
Calculate microscope numerical aperture, ideal diffraction cutoff and sample-plane pixel size. Compare two camera relay and binning setups with a contrast curve and field-of-view diagram.
Scale Factor & Print Calibration Calculator
Calculate drawing scale, compare measured print spans on both axes, and find the resize percentages that fit your paper tolerance.
