Definitionintro
Disparity
Also called binocular disparity, disparity map.
The shift along the scanline between the images of one point in a rectified stereo pair, inversely proportional to its depth.
The disparity of a scene point in a rectified stereo pair is the difference between its column in the first image and its column in the second image; after rectification the two rows are equal, so this one number gives the match. For cameras with focal length in pixels and baseline , a point at depth has , so disparity is inverse depth up to the fixed factor . A disparity map gives one disparity for each pixel of a reference image, and it is the output of stereo matching. This page fixes the sign and the units; the page depth from disparity turns disparities into depths and studies the error.
Definition
Rectified pair. Two cameras have the same intrinsic matrix with focal length , the same rotation, and centers and with , so the second camera is at distance to the right of the first along the axis of the camera frame ( right, down, forward). A pixel has column and row , origin top left. In such a pair a point with depth in the frame of camera 1 has pixels and in the same row .
Disparity. The disparity of is
It is measured in pixels and is a real number. With the second camera on the right, for every point in front of both cameras, and as .
Disparity map. Take the first (left) image as the reference. Its disparity map is the function that gives, for each pixel, the disparity of the scene point seen there. It is defined only where that point is also visible in the second image; at the other pixels, the occluded ones, it is undefined. The disparity map of the second image as reference is with the same sign, so that . A program searches a disparity range , often with disparity levels.
Other conventions. Some texts write or put the second camera on the left. Then the sign flips. If the two rectified cameras have different principal points , the measured disparity is , and the constant must be removed before use. In vision science, binocular disparity is an angle: the difference of the visual directions of a point in the two eyes.
Examples and non-examples
- Check value. With pixels and m, a point at m has pixels. At m it has , and at m it has .
- A tilted plane. For the plane in front of a rectified pair, is an affine function of the pixel, so for constants , , . A plane facing the cameras has constant disparity. This is why many stereo methods model the disparity map as piecewise planar.
- An occluded pixel. A pixel of the left image that sees a point hidden in the right image by a nearer object has no disparity. Near the left edge of a foreground object, the left image sees some background that the right image does not see, which is why a left-right consistency check is needed.
- Non-example: an unrectified pair. If the epipolar lines are not rows, the match of a pixel is a 2D displacement that depends on the camera geometry. This is a correspondence, not a disparity in the sense of this page, until the pair is rectified.
- Non-example: optical flow. The 2D motion of a pixel between two frames of a video is optical flow. For a static scene and a camera that only moves sideways, the flow is a disparity, but in general it has two components and includes the motion of objects.
Related definitions
- Depth and inverse depth. Depth is the distance along the optical axis, not the distance from the center (the range). Disparity is proportional to inverse depth , so a uniform step in disparity is a uniform step in inverse depth. The page depth from disparity gives the conversion and its error.
- Disparity space. The set of triples is the disparity space. A cost volume stores a matching cost at each point of a discrete disparity space.
- Generalized disparity. For more than two views, or for views that are not rectified, Szeliski and others use itself, or a value proportional to it, as the generalized disparity. Plane sweep stereo samples it at fixed steps.
- Half occlusion. A point visible in one image and not in the other is half occluded. Its pixel has no disparity in the sense above.
- Range image. A range image stores a distance or a depth per pixel. A disparity map turns into a depth map pixel by pixel.
References
- Daniel Scharstein and Richard Szeliski, A taxonomy and evaluation of dense two-frame stereo correspondence algorithms, International Journal of Computer Vision 47(1-3), 2002, 7-42, the part that defines the disparity space, the disparity map d(x, y) of the reference image and its relation to depth
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Chapter 12, Depth estimation (rectification, disparity and inverse depth)
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Section 11.12, Image rectification (the epipolar lines made parallel to the rows)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 2RET3M Edit this page History Report an error Markdown