Single and Stereo Camera Calibration

Estimate intrinsic, extrinsic, and lens distortion parameters, xtract 3-D information from 2-D images

Use these functions and the Camera Calibrator app to estimate camera intrinsics, extrinsics, and lens distortion parameters. Use these camera parameters to remove lens distortion effects from an image, measure planar objects, reconstruct 3-D scenes from multiple cameras, and perform other computer vision applications.

3-D vision is the process of reconstructing a 3-D scene from two or more views of the scene. Using the Computer Vision Toolbox™, you can:

  • Perform dense 3-D reconstruction using a calibrated stereo pair of cameras.

  • Reconstruct the scene using an uncalibrated stereo pair of cameras, up to unknown scale.

  • Compute a sparse 3-D reconstruction from multiple images, using a single-calibrated camera.

Apps

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

Functions

expand all

Detect Calibration Pattern

detectCheckerboardPointsDetect checkerboard pattern in image
generateCheckerboardPointsGenerate checkerboard corner locations
undistortImageCorrect image for lens distortion
undistortPointsCorrect point coordinates for lens distortion

Get Camera Parameters

estimateCameraParametersCalibrate a single or stereo camera
cameraPoseToExtrinsicsConvert camera pose to extrinsics
estimateCameraMatrixEstimate camera projection matrix from world-to-image point correspondences
estimateStereoBaselineEstimate baseline of stereo camera

Store Results

cameraMatrixCamera projection matrix
cameraIntrinsics Object for storing intrinsic camera parameters
cameraParametersObject for storing camera parameters
cameraCalibrationErrorsObject for storing standard errors of estimated camera parameters
intrinsicsEstimationErrorsObject for storing standard errors of estimated camera intrinsics and distortion coefficients
extrinsicsEstimationErrorsObject for storing standard errors of estimated camera extrinsics
stereoCalibrationErrorsObject for storing standard errors of estimated stereo parameters
stereoParametersObject for storing stereo camera system parameters
estimateFisheyeParametersCalibrate fisheye camera
undistortFisheyeImageCorrect fisheye image for lens distortion
undistortFisheyePointsCorrect point coordinates for fisheye lens distortion
fisheyeCalibrationErrorsObject for storing standard errors of estimated fisheye camera parameters
fisheyeIntrinsicsObject for storing intrinsic fisheye camera parameters
fisheyeIntrinsicsEstimationErrorsObject for storing standard errors of estimated fisheye camera intrinsics
fisheyeParametersObject for storing fisheye camera parameters
disparityBMCompute disparity map using block matching
disparitySGMCompute disparity map through semi-global matching
reconstructSceneReconstruct 3-D scene from disparity map
rectifyStereoImagesRectify a pair of stereo images
triangulate3-D locations of undistorted matching points in stereo images
extrinsicsCompute location of calibrated camera
extrinsicsToCameraPoseConvert extrinsics to camera pose
relativeCameraPoseCompute relative rotation and translation between camera poses
pcshowPlot 3-D point cloud
plotCameraPlot a camera in 3-D coordinates
showExtrinsicsVisualize extrinsic camera parameters
showReprojectionErrorsVisualize calibration errors
stereoAnaglyphCreate red-cyan anaglyph from stereo pair of images
rotationMatrixToVectorConvert 3-D rotation matrix to rotation vector
rotationVectorToMatrixConvert 3-D rotation vector to rotation matrix

Topics

Fisheye Calibration Basics

Fisheye camera model and calibration in MATLAB

What Is Camera Calibration?

Estimate the parameters of a lens and image sensor of an image or video camera

Coordinate Systems

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

Single Camera Calibrator App

Estimate camera intrinsics, extrinsics, and lens distortion parameters.