Using the 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, such as 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 the MATLAB® workspace. For a list of functions, see Camera Calibration.
Follow this workflow to calibrate your camera using the app.
Prepare the images, camera, and calibration pattern.
Add the images and select standard or fisheye camera model.
Calibrate the camera.
Evaluate the calibration accuracy.
Adjust the parameters to improve the accuracy (if necessary).
Export the parameters object.
If the default values work well, then you do not need to make any adjustments before exporting the parameters.
Choose a Calibration Pattern
The Camera Calibrator app supports checkerboard, circle grid, and custom detector patterns. For details on each of these patterns and PDF files containing printable patterns, see Calibration Patterns.
Capture Calibration Images
For best calibration 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 more details on camera setup and capturing images, see Prepare Camera and Capture Images.
Using the Camera Calibrator App
Open the App
MATLAB Toolstrip: On the Apps tab, in the Image Processing and Computer Vision section, click the Camera Calibrator icon.
MATLAB command prompt: Enter
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 of the selected pattern. For details on camera setup and capturing images, see Prepare Camera and Capture Images.
After you add images, the Image and Pattern Properties dialog box to your session, appears. Before the calibrator can analyze the calibration patterns, you must select the calibration pattern to detect and set image properties for the pattern structure. For more details on this dialog, see Select Calibration Pattern and Set Properties.
Once you are satisfied with the accepted images, on the Calibration tab, select Calibrate. The default calibration settings use a 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 or adding or removing images, and then calibrating again. If you switch between the standard and fisheye camera models, you must recalibrate.
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.
To improve the calibration, you can remove high-error images, add more images, or modify the calibrator settings.
Consider adding more images if:
You have fewer than 10 images.
The calibration patterns do not cover enough of the image frame.
The calibration patterns do not have enough variation in orientation with respect to the camera.
Consider removing images if the images:
Have a high mean reprojection error.
Contain a calibration pattern at an angle greater than 45 degrees relative to the camera plane.
Incorrectly detected calibration pattern points.
Export Camera Parameters
When you are satisfied with your calibration accuracy, select Export Camera Parameters for a standard camera model or Export Camera Parameters for a fisheye camera model. You can either export the camera parameters to an object in the MATLAB workspace or generate the camera parameters as a MATLAB script.
 Zhang, Z. “A Flexible New Technique for Camera Calibration.” IEEE Transactions on Pattern Analysis and Machine Intelligence. 22, no. 11 (November 2000): 1330–34. https://doi.org/10.1109/34.888718.
 Heikkila, J., and O. Silven. “A Four-step Camera Calibration Procedure with Implicit Image Correction.” In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition. 1106–12. San Juan, Puerto Rico: IEEE Comput. Soc, 1997. https://doi.org/10.1109/CVPR.1997.609468.
 Scaramuzza, Davide, Agostino Martinelli, and Roland Siegwart. "A Toolbox for Easily Calibrating Omnidirectional Cameras." In Proceedings of IEEE International Workshop on Intelligent Robots and Systems 2006 (IROS 2006), 5695–701. Beijing, China: IEEE, 2006. https://doi.org/10.1109/IROS.2006.282372
 Urban, Steffen, Jens Leitloff, and Stefan Hinz. “Improved Wide-Angle, Fisheye and Omnidirectional Camera Calibration.” ISPRS Journal of Photogrammetry and Remote Sensing 108 (October 2015): 72–79. https://doi.org/10.1016/j.isprsjprs.2015.06.005.
- Prepare Camera and Capture Images
- Select Calibration Pattern and Set Properties
- Evaluating the Accuracy of Single Camera Calibration
- Measuring Planar Objects with a Calibrated Camera
- Camera Calibration Using AprilTag Markers
- Structure from Motion from Two Views
- Structure from Motion from Multiple Views
- Depth Estimation from Stereo Video
- 3-D Point Cloud Registration and Stitching
- Uncalibrated Stereo Image Rectification
- Checkerboard pattern
- Symmetric Circles Grid Pattern
- Asymmetric Circles Grid Pattern