Stereo correspondence (source code)

= Stereo correspondence

<Stereo correspondence> identifies image positions in two views that depict the same scene point. This is the matching step needed before <stereoscopic triangulation> can recover that point. <Epipolar geometry> restricts a candidate match to an <epipolar line>; after horizontal <stereo rectification>, that search follows a corresponding image row.<What Is Stereo Reconstruction? by MathWorks>[How Does Stereo Reconstruction Work?; Epipolar Geometry and Camera Rectification]{ref}

For example, matching a corner at horizontal coordinate 120 in the left view with coordinate 96 in the right gives <stereo disparity> 24 <pixels>. A repeated window pattern might offer equally plausible candidates at 96 and 72, producing different inferred depths. Geometry alone does not choose the correct window. A foreground object can also hide the feature in one view: <occlusion in stereo vision> then prevents a visible match. Texture, agreement of nearby matches and explicit rejection of ambiguous locations supply evidence beyond mere proximity along a row. A confident <disparity map> must represent locations where <stereo correspondence> failed as well as those where it succeeded.