A stereo depth image can use the same numerical disparity increment across its field, yet that increment does not correspond to one fixed millimeter change in depth. The conversion is nonlinear.
For a robot interpreting a surface at two different distances, this matters before any product accuracy claim enters the discussion. Geometry alone explains why a small matching difference can have a much larger distance consequence farther away.
The distance comes from a ratio
Consider an ideal rectified stereo pair with a horizontal baseline. Assume compatible principal-point references so the disparity offset is zero, and assume the two images provide a valid correspondence for the same stationary scene point.
Let B be baseline in meters, f be the applicable horizontal focal length in pixels, and d be horizontal disparity in pixels. The ideal relationship is:
Z = f × B / d.
Z is depth along the camera's forward axis in this model. It is not automatically the straight-line range from the camera to an off-axis point.
OpenCV's Depth Map from Stereo Images tutorial, version 4.12.0, introduces this inverse relationship through stereo geometry. The calculation needs focal length and disparity in compatible image units; a focal length copied in millimeters cannot simply replace a focal length in pixels.
This article assumes the geometry is already known. It examines the distance conversion rather than presenting a lens-calibration procedure.
An original pair of distances
Invent a stereo arrangement with baseline B = 0.080 m and focal length f = 600 pixels. Their product is 48 meter-pixels.
At disparity 24 pixels, calculated depth is 48/24 = 2.00 m.
If the disparity increases to 25 pixels, depth becomes 48/25 = 1.92 m. One pixel of disparity change has changed the reported depth by 0.08 m, or 80 mm.
Now consider a point with disparity 8 pixels in the same arrangement. Its calculated depth is 48/8 = 6.00 m.
Increasing that disparity to 9 pixels gives 48/9 = approximately 5.33333 m. The same one-pixel increment now changes depth by approximately 666.67 mm.
The disparity increment stayed fixed. Its meaning in distance changed because the denominator was smaller.
None of these values comes from a camera data sheet or a robot experiment. They are declared inputs illustrating ideal sensitivity, not guaranteed depth steps or measured errors.
The response is also asymmetric
A one-pixel change in the opposite direction does not produce an equal and opposite depth change.
Around disparity 24, reducing disparity to 23 gives approximately 2.08696 m. That is an increase of about 86.96 mm, compared with the 80 mm decrease produced by moving from 24 to 25.
The inverse relationship explains the difference. Treating depth as a linear scale in disparity would hide this asymmetry.
A local sensitivity approximation can still be useful when the disparity change is sufficiently small. Its magnitude is:
Small depth change ≈ Z² / (f × B) × small disparity change.
For the invented 2 m point, a 0.10-pixel perturbation gives an approximate magnitude of 8.33 mm. For the 6 m point, the approximation gives 75 mm, nine times as much because the distance is three times greater.
Using the exact ratio for a positive 0.10-pixel change gives about 8.30 mm and 74.07 mm respectively. The approximation describes a local slope, not an exact finite-step conversion.
Subpixel numbers still need evidence
A matching algorithm can represent disparity with fractional values. That increases the numerical granularity available to the conversion, but it does not establish that every fraction is an equally accurate observation.
An estimated 24.10 pixels can be a useful output without being a certified correspondence accurate to 0.10 pixel. Noise, scene structure, calibration, and matching behavior affect the estimate.
The historical Intel RealSense Depth Testing Methodology, January 2018, Revision 1.02, distinguishes depth accuracy, coverage, spatial noise, and temporal noise. It also describes evaluating spatial variation in disparity units as well as distance units.
That separation matters here. A sensitivity calculation converts an assumed disparity perturbation into a depth consequence. It does not identify whether a real perturbation is random noise, systematic bias, an invalid match, or a mixture of causes.
A fine disparity display should therefore not be read as a complete uncertainty statement.
Geometry is only part of usable depth
The ratio assumes a valid corresponding point in both views. If matching selects the wrong feature, the resulting depth can be numerically precise but physically wrong. If a correspondence is unavailable, the ideal equation does not create the missing observation.
Likewise, averaging a depth surface may make it look smoother without proving its absolute depth correct. Spatial smoothness and agreement with an independently known distance describe different properties.
Changing baseline or focal length changes the sensitivity in the model. It also changes the imaging arrangement and the conditions under which useful correspondences are available. The algebra alone is not a recommendation to maximize one parameter without considering the rest of the system.
Near zero disparity, the ideal ratio grows without bound. That mathematical behavior is not evidence that a camera can measure arbitrarily distant objects. Practical matching, image sampling, and the documented operating range remain limits.
Read the result with its assumptions
For the invented arrangement, “a one-pixel disparity change” is incomplete until the starting disparity is known. At 24 pixels it has one distance effect; at 8 pixels it has another.
The useful record keeps baseline, focal-length units, image geometry, starting disparity, and the meaning of the assumed perturbation together. It can then explain depth sensitivity without confusing it with lateral point spacing, a lens correction, or a tested camera accuracy specification.
Sources checked October 23, 2026:
OpenCV, Depth Map from Stereo Images, version 4.12.0 tutorial: https://docs.opencv.org/4.12.0/dd/d53/tutorial_py_depthmap.html
Intel RealSense, Depth Testing Methodology, January 2018, Revision 1.02, official historical document: https://www.realsenseai.com/wp-content/uploads/2019/11/RealSense_DepthQualityTesting.pdf
Image note: The accompanying site-library robot vision scene is a conceptual illustration; no stereo-camera identity is verified. It is not a measured disparity map, a RealSense product test, or verification of the hypothetical depth calculations.