Camera calibration 2026-11-05
Camera calibration estimates the parameters relating points in a scene to measured image coordinates. In the ideal pinhole model,
where contains focal lengths and the principal point, while the rotation matrix and translation locate the camera relative to the scene. Lens distortion requires additional parameters.[ref]
A calibration experiment photographs a flat board with a known grid from several orientations. Detected grid corners provide image measurements; their known spacing supplies geometric constraints and a length scale. Parameters are fitted by minimizing reprojection error. Multiple orientations help separate camera geometry from board pose. For an ideal camera with focal length 1000 pixels, a point displaced sideways at depth projects 50 pixels from the principal point.[ref]
A checkerboard calibration target is a planar pattern of alternating dark and light squares with known geometry, used to estimate camera calibration parameters. Image measurements of internal corner intersections are paired with known target coordinates. Several tilted views constrain the image projection and distortion model.[ref]
For a board with nine squares across and six down, the internal-corner grid has eight columns and five rows. If square spacing is 20 millimetres, one can assign corner coordinates millimetres for and . Supplying only unit grid spacing instead yields translation estimates in square-size units. A useful experiment varies the target's orientation and image position, then examines reprojection error. Repeated identical views provide less geometric information; a warped board or inaccurate corner measurements can also bias the fitted camera model.
Computer vision 2026-11-05
Computer vision infers information about a scene from digital images or video. Tasks include recognizing objects, image segmentation and estimating three-dimensional geometry. A digital image records pixel measurements after image formation; lighting, viewpoint and occlusion therefore affect what can be inferred. A dark pixel can indicate a dark surface, a shadow or a surface facing away from the light.
For example, in rectified stereo vision with parallel cameras, horizontal disparity is related to depth by , where is focal length in pixel units and is camera separation. similar triangles give the relation; a smaller disparity means greater distance. The relation requires corresponding scene points and calibrated geometry. Since , a fixed disparity error produces much greater depth error for distant points. Camera calibration, correspondence and uncertainty are thus part of the computation, rather than details that can be ignored after acquiring a picture.
Depth map 2026-11-05
A depth map assigns a distance-related value to each accepted image location. The geometry must specify whether this means depth along the camera axis or Euclidean distance along the viewing ray. Units, missing values and the coordinate frame are also part of the representation. In calibrated stereoscopy, converting a disparity map through the camera geometry produces depth estimates.[ref]
For an ideal camera, suppose a point has coordinates metres. Its axial depth is two metres, but its Euclidean distance from the camera center is metres. The same scene can thus yield different valid numerical maps under different conventions. A missing stereo correspondence requires an invalid-location marker rather than a fabricated depth. Camera calibration and measurement uncertainty determine how confidently accepted values describe the scene.
Epipolar geometry 2026-11-05
Epipolar geometry describes the projective relationship between two camera views. A scene point away from the camera baseline and the two camera centers determine an epipolar plane. Its intersections with the image planes are corresponding epipolar lines. Knowing one image point therefore constrains its partner to a line rather than the whole second image.[ref]
With image points in homogeneous coordinates, a fundamental matrix expresses the constraint
For an ideal horizontally rectified pair this reduces to equality of image-row coordinates, while horizontal displacement remains free and carries stereo disparity. A line constraint does not determine depth: many scene points along one viewing ray satisfy the geometry. Correct stereo correspondence selects a partner, and camera calibration then supports metric stereoscopic triangulation.
The fundamental matrix encodes the epipolar geometry of two distinct camera centers using image homogeneous coordinates. For matching image points , the ideal constraint is
Thus is an epipolar line in the right image, while is an epipolar line in the left image. A nondegenerate fundamental matrix has matrix rank two and is defined only up to nonzero scale.[ref]
For an ideal horizontally aligned stereo pair with matched image coordinate origins, one possible scale convention is
Putting gives , so the right point must satisfy . Its horizontal coordinate remains free: the constraint reduces the search to a line but does not determine stereo disparity or depth. Repeated texture can still make stereo correspondence ambiguous.
With camera calibration matrices and relative pose under the convention , the relation is , where . Translation direction affects the geometry, but multiplying by a scalar only rescales : the fundamental matrix alone cannot establish a metric camera baseline. Pure rotation has and requires a different geometric description.[ref]
Occlusion in stereo vision occurs when a scene feature visible from one camera is hidden behind another surface from the second viewpoint. Such a feature has no visible partner, even if camera calibration is exact. Stereo correspondence must allow unmatched locations instead of forcing every image location to have a partner.[ref]
Consider a nearby post in front of a distant wall. Moving the viewpoint sideways shifts the post's projection more than the wall's because their depths differ. A strip of wall exposed beside the post in one image can therefore be covered in the other. Matching that strip to the post invents a depth belonging to the wrong surface. Missing-value masks and consistency checks can help represent this limitation, while smoothing a disparity map across the boundary can conceal it rather than recover the hidden wall.
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]
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.
Principal point 2026-11-05
In an ideal camera model, the principal point is the intersection of the optical axis with the image plane, expressed in image pixel coordinates . It supplies the coordinate offset in perspective projection. For a scene point expressed relative to the camera, the model is
where are focal lengths in pixel units. Thus the principal point belongs to the camera's internal geometry; the camera's position and orientation in the world are separate parameters.[ref]
For , , metres and metres, the horizontal coordinate is pixels. A point on the optical axis instead has and projects to . The principal point is often near the image center, but camera calibration estimates it rather than establishing that it must be exactly centered. Cropping an image also changes the principal point's coordinate values: removing 20 columns from the left changes to , without physically moving the optical axis.
Reprojection error 2026-11-05
A reprojection error compares an observed image point with the position predicted by projecting a reconstructed scene point through a camera model. If is an observed position and its prediction, the residual is . One possible aggregate is the per-point root mean square Euclidean norm:
Coordinates in pixels give an error in pixels. Least squares instead minimizes the associated sum of squares; normalization conventions should be stated when reporting a summary.[ref]
For an observation and prediction , the Euclidean norm of the residual is 5 pixels. Camera calibration can adjust model parameters to reduce many such residuals, while stereoscopic triangulation can adjust a reconstructed point with the camera parameters fixed. Low reprojection error tests agreement with observations under that model; incorrect stereo correspondence or an incorrect camera baseline can still produce wrong scene geometry.
Scale ambiguity of perspective projection means that image coordinates alone cannot determine absolute scene size and distance. In an ideal camera with focal length and centered image coordinates,
Replacing by for any positive leaves unchanged. A geometrically similar scene twice as large and twice as far away therefore produces the same projection.[ref]
For example, a object at depth and a object at depth subtend the same image height under this model. Extra metric information, such as a known object length or a measured camera baseline, supplies a scale. In stereo vision, scaling the reconstructed scene and the assumed baseline together preserves the image observations; measuring the baseline breaks that freedom. Camera calibration of focal length alone does not provide an absolute length for an otherwise unknown scene.
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]
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.
Stereo vision 2026-11-05
Stereo vision estimates three-dimensional structure from images taken at different viewpoints. After camera calibration and alignment into a common image geometry, a point's horizontal displacement between the two views is its stereo disparity . For parallel ideal cameras with camera baseline and focal length in pixel units, similar triangles give
For pixels, and pixels, the inferred depth is . Doubling the depth halves the stereo disparity, making distant structure harder to measure accurately.[ref]
A practical apparatus uses two rigidly mounted cameras, a calibration target and synchronized exposures. Matching the same physical feature is essential: repeated textures, hidden surfaces and motion can give false correspondences. The measurement is therefore geometric inference from matched observations, not an intrinsic depth label stored in each pixel.[ref]