No jobs
Core 10 min 2 of 3

Triangulation and its uncertainty

Two rays never meet. Where you say the point is, and how sure you are, both depend on the baseline.

What this repairs

Thinking of triangulation as an intersection, and of depth error as a fixed percentage rather than as a quantity growing with the square of distance.

With exact measurements, the two back-projected rays intersect at the world point. With real measurements they do not — two lines in 3D generically miss each other, and a single pixel of noise is enough. "Triangulation" is therefore not an intersection but an estimation problem: which point best explains both observations?

The cheapest answer is the midpoint of the shortest segment connecting the rays. It is easy to picture and it is not the best estimator, because it is the optimum of the wrong cost — distance in 3D rather than reprojection error in the images, and those disagree once the cameras differ. The estimator most pipelines use minimises reprojection error directly, and the difference matters most exactly where triangulation is hardest.

Why depth error grows quadratically

  1. Z=fBdZ = \frac{f B}{d}

    Depth from disparity, for a rectified pair with focal length f (px) and baseline B (m).

  2. Zd=fBd2\frac{\partial Z}{\partial d} = -\frac{f B}{d^{2}}

    Differentiate. The sensitivity of depth to disparity itself depends on disparity.

  3. σZZdσd=fBd2σd=Z2fBσd\sigma_Z \approx \left|\frac{\partial Z}{\partial d}\right| \sigma_d = \frac{fB}{d^2}\,\sigma_d = \frac{Z^{2}}{fB}\,\sigma_d

    Substitute d = fB/Z. Depth uncertainty is quadratic in depth and inversely proportional to the baseline — the single most useful formula in stereo.

Check yourself

A stereo rig has f=700f = 700 px, B=12B = 12 cm, and matches to σd=0.5\sigma_d = 0.5 px. What is the depth uncertainty at 3 m and at 30 m?

Show answer

σZ=Z2σd/(fB)=Z20.5/(7000.12)=Z2/168\sigma_Z = Z^2 \sigma_d / (fB) = Z^2 \cdot 0.5 / (700 \cdot 0.12) = Z^2 / 168 . At 33 m that is 5.4\approx 5.4 cm — around 1.8%1.8\% . At 3030 m it is 5.4\approx 5.4 m, which is 18%18\% and useless for anything that needs to avoid an obstacle. Same sensor, same matcher, hundredfold difference in usefulness. Automotive stereo rigs have long baselines for exactly this reason.

Euler View - ML Experiment Monitor