This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Stereo Vision

Stereo rectification, disparity, and dense 3-D reconstruction

Stereo vision is the process of recovering depth from camera images by comparing two or more views of the same scene. The output of this computation is a 3-D point cloud, where each 3-D point corresponds to a pixel in one of the images.

Stereo image rectification projects images onto a common image plane in such a way that the corresponding points have the same row coordinates. This process is useful for stereo vision, because the 2-D stereo correspondence problem reduces to a 1-D problem. As an example, stereo image rectification is often used as a pre-processing step for computing disparity or creating anaglyph images.


Camera CalibratorEstimate geometric parameters of a single camera
Stereo Camera CalibratorEstimate geometric parameters of a stereo camera


triangulate3-D locations of undistorted matching points in stereo images
undistortImageCorrect image for lens distortion
undistortPointsCorrect point coordinates for lens distortion
cameraMatrixCamera projection matrix
disparityDisparity map between stereo images
estimateUncalibratedRectificationUncalibrated stereo rectification
rectifyStereoImagesRectify a pair of stereo images
reconstructSceneReconstruct 3-D scene from disparity map
stereoParametersObject for storing stereo camera system parameters
stereoAnaglyphCreate red-cyan anaglyph from stereo pair of images
pcshowPlot 3-D point cloud
plotCameraPlot a camera in 3-D coordinates
rotationMatrixToVectorConvert 3-D rotation matrix to rotation vector
rotationVectorToMatrixConvert 3-D rotation vector to rotation matrix


Coordinate Systems

Specify pixel Indices, spatial coordinates, and 3-D coordinate systems

Stereo Calibration App

Calibrate a stereo camera, which you can then use to recover depth from images.

Depth Estimation From Stereo Video

This example shows how to detect people in video taken with a calibrated stereo camera and determine their distances from the camera.

Code Generation for Depth Estimation From Stereo Video

This example shows how to use the MATLAB® Coder™ to generate C code for a MATLAB function, which uses the stereoParameters object produced by Stereo Camera Calibrator app or the estimateCameraParameters function.