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. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Single Camera Calibrator App

Camera Calibrator Overview

You can use the Camera Calibrator app to estimate camera intrinsics, extrinsics, and lens distortion parameters. You can use these camera parameters for various computer vision applications. These applications include removing the effects of lens distortion from an image, measuring planar objects, or reconstructing 3-D scenes from multiple cameras.

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

Single Camera Calibration

Follow this workflow to calibrate your camera using the app:

  1. Prepare images, camera, and calibration pattern.

  2. Add images and select standard or fisheye camera model.

  3. Calibrate the camera.

  4. Evaluate calibration accuracy.

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

  6. Export the parameters object.

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 Camera Calibrator

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

  • MATLAB command prompt: Enter cameraCalibrator

Prepare the Pattern, Camera, and Images

To better 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.

Note

The Camera Calibrator app supports only checkerboard patterns. If you are using a different type of calibration pattern, you can still calibrate your camera using the estimateCameraParameters function. Using a different type of pattern requires that you supply your own code to detect the pattern points in the image.

 Prepare the Checkerboard Pattern

 Camera Setup

 Capture Images

Add Images and Select Camera Model

To begin calibration, you must add images. You can add saved images from a folder or add images directly from a camera. The calibrator analyzes the images to ensure they meet the calibrator requirements. The calibrator then detects the points on the checkerboard.

 Add Images from File

 Acquire Live Images

 Analyze Images

 View Images and Detected Points

Calibrate

Once you are satisfied with the accepted images, 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 calibrating again. If you switch between standard and fisheye camera model, you must recalibrate.

 Select Camera Model

 Standard Model Options

 Fisheye Model Options

 Calibration Algorithm

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

 View Undistorted Image

Improve Calibration

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

 Add or Remove Images

 Standard Model: Change the Number of Radial Distortion Coefficients

 Standard Model: Compute Skew

 Standard Model: Compute Tangential Distortion

 Fisheye Model: Estimate Alignment

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

References

[1] Zhang, Z. “A Flexible New Technique for Camera Calibration.” IEEE Transactions on Pattern Analysis and Machine Intelligence. Vol. 22, Number. 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.

[3] Scaramuzza, D., A. Martinelli, and R. Siegwart. "A Toolbox for Easy Calibrating Omindirectional Cameras." Proceedings to IEEE International Conference on Intelligent Robots and Systems (IROS 2006). Beijing, China, October 7–15, 2006.

[4] Urban, S., J. Leitloff, and S. Hinz. "Improved Wide-Angle, Fisheye and Omnidirectional Camera Calibration." ISPRS Journal of Photogrammetry and Remove Sensing. Vol. 108, 2015, pp.72–79.

See Also

| | | | | | | | |

Related Examples

More About

External Websites