Image resampling 2026-11-05
Image resampling evaluates image data on a new sampling grid, often while resizing, rotating or rectifying an image. An output pixel is mapped to a source location, which may lie between stored source pixels. An interpolation rule estimates its value; a boundary rule handles locations outside the recorded image.[ref]
Geometric Image Transformations in the OpenCV documentation. Detailed Description, inverse mapping, interpolation and extrapolation
For example, bilinear interpolation at the center of four source samples with values gives their equally weighted mean, 25. Nearest-neighbor interpolation instead selects one sample and retains its value. These methods trade smoothness against preservation of discrete labels. Reducing image size also changes the sampling rate: a low-pass filter before subsampling can suppress aliasing, whereas interpolation alone cannot guarantee its removal. Stereo rectification uses image resampling to construct aligned virtual views without physically moving either camera.
OpenCV 2026-11-05
OpenCV is a software library for computer vision and image processing. Its camera-geometry tools connect observed pixel coordinates to models of imaging, including camera calibration, correction of lens distortion, stereo rectification and three-dimensional reconstruction.[ref]
Camera Calibration and 3D Reconstruction by OpenCV. Detailed Description and calibration/reconstruction functions; pinned documentation version4.13.0
A checkerboard calibration target supplies known geometry that can be observed from several camera positions. Fitting the model compares detected image points with projected target points. The resulting reprojection error measures agreement in the image, rather than independently confirming every physical dimension of the reconstructed scene.
A simple perspective projection illustrates the distinction: in , replacing and by and for leaves unchanged. This scale ambiguity of perspective projection means that image agreement alone cannot verify a chosen unit of length. A camera baseline or a target of known size supplies additional metric information. Using the library well therefore includes checking geometric assumptions and units, alongside the numerical fit.
Stereo correspondence 2026-11-05
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.[ref]
What Is Stereo Reconstruction? by MathWorks. How Does Stereo Reconstruction Work?; Epipolar Geometry and Camera Rectification
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.
Stereo rectification 2026-11-05
Stereo rectification transforms a pair of images so that corresponding epipolar lines become aligned scan lines. In a horizontal stereo arrangement, a scene point visible in both rectified views should have the same vertical image coordinate. This turns a two-dimensional matching search into a one-dimensional search along a row.[ref]
Camera Calibration and 3D Reconstruction by OpenCV. stereoRectify(), horizontal stereo case, R1/R2 and P1/P2
For example, a feature initially at left row 100 and right row 104 can be mapped to the same row in virtual aligned views. Camera calibration supplies geometry for the transforms, and image resampling evaluates the transformed images on a new pixel grid. The new images need not retain every border region. Stereo rectification aligns the geometric search; it does not identify the correct partner among repeated patterns or restore a feature hidden in one view. The rectified focal length and coordinate offsets must also be used when converting stereo disparity to depth.
Stereoscopic triangulation 2026-11-05
Stereoscopic triangulation reconstructs a scene point from corresponding image positions and known camera geometry. Each image position determines a viewing direction. Two correctly matched views constrain the point to lie on both viewing rays; one view alone leaves its position along a ray undetermined.
For an ideal aligned pair, put the left camera at the origin and the right one at in a Cartesian coordinate system, with their axes pointing in the positive direction. Assume a common focal length , square pixels, corrected distortion and image coordinates measured from aligned principal points. Forward perspective projection givesThe stereo disparity therefore determines all three coordinates:Here is depth along the camera axis; the Euclidean distance from the left camera is instead . If use pixels and the camera baseline uses metres, the recovered coordinates use metres. Without a known length scale, the images alone do not determine metric size.[ref]
Camera Calibration and 3D Reconstruction by OpenCV. Detailed Description, camera intrinsic matrix and the distortion-free pinhole projection equations
Real cameras require calibration before these simplified equations apply. Stereo rectification transforms the images to an aligned geometry. With noisy measurements, viewing rays need not intersect exactly; minimizing reprojection error instead seeks a point whose projected positions agree as closely as possible with the observations. Reconstruction also depends on stereo correspondence: a mathematically precise intersection of mismatched viewing directions can still describe the wrong scene point.[ref]
What Is Stereo Reconstruction? by MathWorks. Stereo Camera Calibration; Stereo Image Rectification; Disparity Map Computation; 3-D Scene Reconstruction
