This is machine translation

Translated by Microsoft


Stereo Camera Calibrator App

Stereo Camera Calibrator Overview

You can use the Stereo Camera Calibrator app to calibrate a stereo camera, which you can then use to recover depth from images. A stereo system consists of two cameras: camera 1 and camera 2. The app can either estimate or import the parameters of individual cameras. The app also calculates the position and orientation of camera 2, relative to camera 1.

The Stereo Camera Calibrator app produces an object containing the stereo camera parameters. You can use this object to

The suite of calibration functions used by the Stereo Camera Calibrator app provide the workflow for stereo system calibration. You can use these functions directly in the MATLAB® workspace. For a list of calibration functions, see Single and Stereo Camera Calibration.


You can use the Camera Calibrator app with cameras up to a field of view (FOV) of 95 degrees.

Stereo Camera Calibration

Follow this workflow to calibrate your stereo camera using the app:

  1. Prepare images, camera, and calibration pattern.

  2. Add image pairs.

  3. Calibrate the stereo camera.

  4. Evaluate calibration accuracy.

  5. Adjust parameters to improve accuracy (if necessary).

  6. Export the parameters object.

  7. In some cases, the default values work well, and you do not need to make any improvements before exporting parameters. You can also make improvements using the camera calibration functions directly in the MATLAB workspace. For a list of functions, see Single and Stereo Camera Calibration.

Open the Stereo Camera Calibrator

  • MATLAB Toolstrip: On the Apps tab, in the Image Processing and Computer Vision section, click the Stereo Camera Calibrator icon.

  • MATLAB command prompt: Enter stereoCameraCalibrator

Prepare Pattern, Camera, and Images

To improve the results, use between 10 and 20 images of the calibration pattern. The calibrator requires at least three images. Use uncompressed images or lossless compression formats such as PNG. The calibration pattern and the camera setup must satisfy a set of requirements to work with the calibrator. For greater calibration accuracy, follow these instructions for preparing the pattern, setting up the camera, and capturing the images.

 Prepare the Checkerboard Pattern

 Camera Setup

 Capture Images

Add Image Pairs

To begin calibration, click , specifically two sets of stereo images of the checkerboard,one set from each camera.

 Load Images

 Analyze Images

 View Images and Detected Points



Once you are satisfied with the accepted image pairs, click the Calibrate button on the Calibration tab. The default calibration settings assume the minimum set of camera parameters. Start by running the calibration with the default settings. After evaluating the results, you can try to improve calibration accuracy by adjusting the settings and adding or removing images, and then calibrate again.


Evaluate Calibration Results

You can evaluate calibration accuracy by examining the reprojection errors, examining the camera extrinsics, or viewing the undistorted image. For best calibration results, use all three methods of evaluation.

 Examine Reprojection Errors

 Examine Extrinsic Parameter Visualization

 Show Rectified Images

Improve Calibration

To improve the calibration, you can remove high-error image pairs, add more image pairs, or modify the calibrator settings.

 Add or Remove Images

 Change the Number of Radial Distortion Coefficients

 Compute Skew

 Compute Tangential Distortion

Export Camera Parameters

When you are satisfied with calibration accuracy, click Export Camera Parameters. You can either save and export the camera parameters to an object by selecting Export Camera Parameters or generate the camera parameters as a MATLAB script.

 Export Camera Parameters

 Generate MATLAB Script


[1] Zhang, Z. “A Flexible New Technique for Camera Calibration”. IEEE Transactions on Pattern Analysis and Machine Intelligence.Vol. 22, No. 11, 2000, pp. 1330–1334.

[2] Heikkila, J, and O. Silven. “A Four-step Camera Calibration Procedure with Implicit Image Correction.” IEEE International Conference on Computer Vision and Pattern Recognition. 1997.

See Also

| | | | | | | | |

Related Examples

More About

External Websites