AI Glossary / Computer vision and multimodal AI / Beginner

Stereo cameras

Definition

Stereo cameras are a pair of cameras, or an integrated two-camera system, that capture a scene from separated viewpoints. By matching corresponding image locations and using calibrated geometry, a stereo-vision system can estimate depth. The separation between the camera centers is called the baseline.

What it means

Objects appear at slightly different positions in the two images because the cameras view them from different locations. This difference, called disparity after appropriate geometric processing, provides information about distance.

The hardware pair alone does not produce trustworthy depth. Calibration, image synchronization, correspondence estimation, and interpretation of uncertain matches are essential parts of the system.

In a common rectified stereo setup, corresponding points are arranged along the same image row, simplifying the search for matches. Rectification is a geometric transformation of the images; it does not remove occlusion or make every pixel matchable.

How it works

Calibrate the cameras to estimate their internal imaging parameters and relative position and orientation. Account for lens distortion and make sure the physical mounting remains consistent with that calibration.

Capture corresponding views, ideally synchronized when the scene or cameras move. Rectify the images if using a rectified stereo method, then search for matching image content along the appropriate lines.

Convert disparity into depth using the calibrated geometry. For an ideal rectified pair with the standard compatible coordinate convention, depth is focal length in pixels multiplied by baseline, divided by disparity in pixels.

Reject or flag unreliable matches. Textureless regions, repeated patterns, reflective surfaces, transparent objects, occlusions, and motion can make correspondence difficult. The final depth map should retain invalid or uncertain regions rather than presenting every pixel as equally trustworthy.

Three practical examples

1. Robotics: A stereo system estimates nearby scene geometry to support navigation and obstacle awareness within a larger validated perception system.

2. Industrial inspection: A calibrated setup measures suitable visible surfaces when its accuracy and material limitations meet the application requirements.

3. Spatial interaction: A device uses depth estimates to relate visible objects and motions to a three-dimensional workspace.

Think of it this way

Think of looking at a nearby finger alternately with your left and right eyes. Its apparent position changes relative to the background, and that shift is larger for nearer objects under similar viewing conditions.

The analogy captures binocular geometry but not the complete engineering problem. Cameras need calibration and algorithms to find correspondences, and biological vision uses additional cues beyond this simple demonstration.

Worked example

Assume an ideal rectified stereo pair has focal length 800 pixels and baseline 0.10 meters. A point with disparity 40 pixels has estimated depth Z = 800 × 0.10 / 40 = 2 meters.

At disparity 20 pixels, the estimated depth is four meters. At disparity ten pixels, it is eight meters. Smaller disparity corresponds to greater depth under this model.

Now consider a one-pixel disparity difference around 40: disparities 39 and 41 imply approximately 2.051 and 1.951 meters. Around disparity ten, values nine and eleven imply approximately 8.889 and 7.273 meters.

The same absolute disparity uncertainty can therefore create much larger depth uncertainty for distant points. This example assumes correct correspondence and calibration; systematic errors or wrong matches can produce worse behavior than the simple arithmetic suggests.

Illustrative case study

Fictional case: A workshop tests stereo cameras to measure cartons on a table. Textured cardboard gives usable matches, but glossy wrapping and plain white areas create holes and unstable depths.

The team evaluates against reference measurements across the intended distance range and marks invalid regions explicitly. It improves lighting and capture conditions where appropriate, while avoiding claims that every material can be measured equally well.

After the camera bracket is accidentally moved, the team checks calibration before relying on new measurements. A previously accurate setup can become inaccurate when the relationship between its cameras changes, even though both images still look normal.

Common misconceptions and mistakes

Do not confuse disparity with depth. They are related through geometry, and depth is inversely related to disparity in the simple rectified model.

Do not mix focal length in millimeters with disparity in pixels without the required conversion. Units must be consistent.

Do not assume zero or missing disparity is a valid nearby surface. It can represent an infinite-distance limit in ideal geometry or, commonly, a failed measurement that needs separate treatment.

Do not assume increasing baseline is always beneficial. It can improve depth sensitivity while making correspondence, overlap, close-range coverage, and physical integration more difficult.

Business use

Stereo cameras can provide depth using visual correspondence and a known geometric baseline. This can be useful when scene texture, lighting, distance, and materials fit the method's operating conditions.

Evaluate measurement error and invalid-depth coverage together. A system that reports only easy pixels may appear highly accurate while leaving critical regions unmeasured. Include calibration stability, synchronization, processing latency, and failure recovery in the deployment plan, and validate the complete downstream task rather than relying on a visually attractive colored depth map.

People also ask

Do stereo cameras always need projected light?

No. Passive stereo uses available scene appearance, although some systems add illumination or projected texture to support matching.

Can two arbitrary photographs form a stereo measurement?

They need suitable geometric information and corresponding content; an ordinary image pair does not automatically provide calibrated metric depth.

Does a longer baseline always give better results?

No. It changes accuracy potential and matching difficulty, so the useful baseline depends on the scene and distance range.

Check your understanding

With fixed focal length and baseline, disparity halves from 30 pixels to 15 pixels. What happens to depth in the ideal rectified model?

Answer: It doubles, because depth is proportional to the reciprocal of disparity.

Related terms

  • Disparity
  • Baseline
  • Rectification
  • Depth map
  • Epipolar geometry
  • Stereo vision
  • camera calibration
  • triangulation

Learn next

Calculate depths for several disparities using one calibrated baseline and focal length. Then add a small disparity error and observe how depth sensitivity changes with distance before studying correspondence algorithms.

  • Baseline
  • Disparity

More in Computer vision and multimodal AI

  • Steerable filter - A steerable filter is an oriented filter whose response at arbitrary angles can be synthesized from a fixed set of basis-filter responses.
  • Steerable pyramid - A steerable pyramid is a multiscale image representation that separates information into orientation-selective frequency bands, together with residual low-...
  • Steering kernel - A steering kernel is a local weighting function whose shape, orientation, and scale adapt to estimated image structure.
  • Stixel - A stixel is a compact, vertically organized element used to represent parts of a scene in a structured visual-perception model.
  • Stroke-based rendering - Stroke-based rendering is a way of creating an image by placing and drawing discrete elements, such as brush marks, ink lines, or dots.
  • Structural similarity (SSIM) - Structural similarity, usually abbreviated SSIM, is an image comparison measure that evaluates local patterns using brightness, contrast, and structural...

Sources

OpenCV, Depth Map from Stereo Images: https://docs.opencv.org/3.4.18/dd/d53/tutorial_py_depthmap.html . The official tutorial was read for stereo disparity and the baseline–focal-length depth relationship. Numerical examples and the workshop case are original teaching illustrations.

Previous: Stepwise regression Next: STIT logic

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer