Main Content

extrinsicsEstimationErrors

Object for storing standard errors of estimated camera intrinsics 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,boardSize] = detectCheckerboardPoints(images.Files);

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

squareSize = 29;
worldPoints = generateCheckerboardPoints(boardSize,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.6096 +/- 0.0054       -0.1789 +/- 0.0073       -0.3835 +/- 0.0024  ]
                         [   -0.7283 +/- 0.0050       -0.0996 +/- 0.0072        0.1964 +/- 0.0027  ]
                         [   -0.6722 +/- 0.0051       -0.1444 +/- 0.0074       -0.1329 +/- 0.0026  ]
                         [   -0.5836 +/- 0.0056       -0.2901 +/- 0.0074       -0.5622 +/- 0.0025  ]
                         [   -0.3157 +/- 0.0065       -0.1441 +/- 0.0075       -0.1067 +/- 0.0011  ]
                         [   -0.7581 +/- 0.0052        0.1947 +/- 0.0072        0.4324 +/- 0.0030  ]
                         [   -0.7515 +/- 0.0051        0.0767 +/- 0.0072        0.2070 +/- 0.0029  ]
                         [   -0.6223 +/- 0.0053        0.0231 +/- 0.0073        0.3663 +/- 0.0024  ]
                         [    0.3443 +/- 0.0063       -0.2226 +/- 0.0073       -0.0437 +/- 0.0014  ]

Translation vectors (mm):
                         [ -146.0516 +/- 6.0391      -26.8688 +/- 3.7318      797.9026 +/- 3.9002  ]
                         [ -209.4357 +/- 6.9636      -59.4567 +/- 4.3578      921.8197 +/- 4.6295  ]
                         [ -129.3824 +/- 7.0907      -44.1032 +/- 4.3751      937.6830 +/- 4.4913  ]
                         [ -151.0048 +/- 6.6904      -27.3255 +/- 4.1339      884.2788 +/- 4.3925  ]
                         [ -174.9499 +/- 6.7056      -24.3501 +/- 4.1605      886.4961 +/- 4.6686  ]
                         [ -134.3096 +/- 7.8887     -103.4984 +/- 4.8925     1042.4553 +/- 4.8184  ]
                         [ -173.9845 +/- 7.6890      -73.1693 +/- 4.7812     1017.2385 +/- 4.8126  ]
                         [ -202.9447 +/- 7.4327      -87.9093 +/- 4.6481      983.6956 +/- 4.9072  ]
                         [ -319.8861 +/- 6.3213     -119.8901 +/- 4.0922      829.4581 +/- 4.9591  ]
Introduced in R2013b