Contenu principal

cameraCalibrationErrors

R2026b

Object for storing standard errors of estimated camera parameters

Description

cameraCalibrationErrors contains the standard errors of estimated camera parameters. You can access the intrinsics and extrinsics standard errors using the object properties. You can display the standard errors using the object’s displayErrors object function.

Creation

Create a cameraCalibrationErrors object by calling the estimateCameraParameters function.

Properties

expand all

Standard error of the estimated intrinsics for a camera, specified as a intrinsicsEstimationErrors object.

Standard error of the estimate rotations and translations for a camera relative to the calibration pattern, specified as a extrinsicsEstimationErrors object.

Object Functions

displayErrorsDisplay standard errors of camera parameter estimates

Examples

collapse all

Create a set of calibration images.

images = imageDatastore(fullfile(toolboxdir("vision"),"visiondata", ...
 "calibration","mono"));

Detect the calibration pattern.

[imagePoints,patternDims] = detectCheckerboardPoints(images.Files);

Generate the world coordinates of the corners of the squares. The units of the square size are in millimeters.

squareSize = 29; % millimeters
worldPoints = patternWorldPoints("checkerboard",patternDims,squareSize);

Calibrate the camera.

I = readimage(images,1); 
imageSize = [size(I,1),size(I,2)];
[params,~,errors] = estimateCameraParameters(imagePoints,worldPoints,ImageSize=imageSize);

Display the standard errors.

displayErrors(errors,params);
			Standard Errors of Estimated Camera Parameters
			----------------------------------------------

Intrinsics
----------
Focal length (pixels):   [  715.6004 +/- 3.2097      711.9391 +/- 3.9533  ]
Principal point (pixels):[  568.2643 +/- 5.3069      356.9332 +/- 3.2326  ]
Radial distortion:       [   -0.3489 +/- 0.0084        0.1572 +/- 0.0442  ]

Extrinsics
----------
Rotation vectors:
                         [   -0.6072 +/- 0.0053       -0.1847 +/- 0.0072       -0.3856 +/- 0.0023  ]
                         [   -0.7277 +/- 0.0049       -0.1056 +/- 0.0071        0.1941 +/- 0.0026  ]
                         [   -0.6704 +/- 0.0050       -0.1504 +/- 0.0072       -0.1352 +/- 0.0025  ]
                         [   -0.5807 +/- 0.0055       -0.2958 +/- 0.0073       -0.5644 +/- 0.0024  ]
                         [   -0.3148 +/- 0.0064       -0.1499 +/- 0.0073       -0.1077 +/- 0.0011  ]
                         [   -0.7540 +/- 0.0050        0.0044 +/- 0.0071        0.0324 +/- 0.0029  ]
                         [   -0.7581 +/- 0.0051        0.1884 +/- 0.0071        0.4301 +/- 0.0030  ]
                         [   -0.7508 +/- 0.0050        0.0705 +/- 0.0071        0.2047 +/- 0.0028  ]
                         [   -0.6224 +/- 0.0052        0.0170 +/- 0.0072        0.3644 +/- 0.0023  ]
                         [    0.3477 +/- 0.0063       -0.2275 +/- 0.0072       -0.0426 +/- 0.0014  ]

Translation vectors (mm):
                         [ -151.2156 +/- 5.9311      -28.2216 +/- 3.6489      798.5417 +/- 3.7745  ]
                         [ -215.3819 +/- 6.8378      -61.0244 +/- 4.2600      922.2884 +/- 4.4834  ]
                         [ -135.4469 +/- 6.9656      -45.6901 +/- 4.2781      938.6421 +/- 4.3475  ]
                         [ -156.7286 +/- 6.5718      -28.8202 +/- 4.0424      885.0802 +/- 4.2501  ]
                         [ -180.6922 +/- 6.5872      -25.8705 +/- 4.0686      887.2998 +/- 4.5253  ]
                         [ -184.5416 +/- 7.5880      -81.3827 +/- 4.6929     1021.8031 +/- 4.7191  ]
                         [ -141.0393 +/- 7.7491     -105.2355 +/- 4.7829     1043.4016 +/- 4.6635  ]
                         [ -180.5464 +/- 7.5515      -74.8831 +/- 4.6742     1017.9787 +/- 4.6574  ]
                         [ -209.2900 +/- 7.2992      -89.5635 +/- 4.5438      984.2866 +/- 4.7521  ]
                         [ -325.3385 +/- 6.2035     -121.2853 +/- 4.0001      829.3924 +/- 4.7997  ]

Version History

Introduced in R2014b