Photography & Capture

Rectified Stereo Depth & Disparity Uncertainty Calculator

Convert calibrated disparity to depth and inspect first-order versus direct perturbed-disparity limits.

How the calculation works

Depth Z = focal_pixels*baseline/disparity m. First-order depth perturbation magnitude = focal_pixels*baseline/disparity**2*disparity_error m. Depth at disparity plus perturbation = focal_pixels*baseline/(disparity+disparity_error) m. Depth at disparity minus perturbation = focal_pixels*baseline/(disparity-disparity_error) if disparity > disparity_error else "Unbounded as disparity approaches zero" m. Left-camera horizontal X = baseline*offset_u/disparity m. Left-camera vertical Y = baseline*offset_v/disparity m.

Worked example

Example inputs — Rectified focal length (pixels): 1000; Stereo camera baseline (m): 0.1; Positive rectified disparity (pixels): 20; Symmetric disparity perturbation / standard-error input (pixels): 0.5; Left image horizontal offset from principal point (pixels): 100; Left image vertical offset from principal point (pixels): 50. Expected results — Depth Z: 5 m; First-order depth perturbation magnitude: 0.125 m; Depth at disparity plus perturbation: 4.87804878 m; Depth at disparity minus perturbation: 5.128205128 m; Left-camera horizontal X: 0.5 m; Left-camera vertical Y: 0.25 m.

Assumptions and limits

Ideal planning model with editable equipment/scene parameters. Camera calibration, optical design, lighting variation and the stated assumptions affect practical results. Parallel rectified pinhole stereo with matching pixel focal scales and supplied baseline. Disparity is positive in the chosen calibration convention. A supplied perturbation is not automatically a confidence interval. Lens distortion, matching errors, occlusions, calibration covariance and varying focal scales are excluded.

Reference and further reading

Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.

Related calculators

Browse all 1000 calculators →

Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.