Main Content

extrinsicsEstimationErrors

R2026b

Object for storing standard errors of estimated camera extrinsics and distortion coefficients

Description

The extrinsicsEstimationErrors object contains the standard errors of estimated camera extrinsics. You can access the extrinsics standard errors using the object properties. You can display the standard errors using the displayErrors object function.

Creation

Syntax

[params,imgsUsed,Errors] = estimateCameraParameters(imagePoints,worldPoints)

Description

[params,imgsUsed,Errors] = estimateCameraParameters(imagePoints,worldPoints) creates an extrinsicsEstimationErrors object by calling the estimateCameraParameters function with image points and world points. The function returns a stereoCalibrationErrors or cameraCalibrationErrors object as the third argument, which contains the extrinsicsEstimationErrors as a read-only property.

Properties

expand all

This property is read-only.

Standard error of the camera rotations estimate, specified as a scalar.

Standard error of the camera translations estimate, specified as a scalar.

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. Square size of the checkerboard is 29 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 extrinsics errors.

displayErrors(errors.ExtrinsicsErrors,params);
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 R2013b