FUNCTION REFERENCE
showReprojectionErrors
Plot the reprojection errors of a camera calibration.
Plot the reprojection errors of a camera calibration.
Syntax
showReprojectionErrors(params)Syntax
ax = showReprojectionErrors(params, view, 'HighlightIndex', idx, 'Parent', ax)params is a cameraParameters from estimateCameraParameters. view 'BarGraph' (default) draws one bar per pattern, the mean of the per-point error lengths hypot(ReprojectionErrors(:, 1, p), ReprojectionErrors(:, 2, p)), with a dashed line at MeanReprojectionError and the legend "Overall Mean Error: 0.xx pixels". 'ScatterPlot' draws the x and y error of every point, one colour per pattern. HighlightIndex draws those patterns in red (circles in the scatter plot); Parent draws into that axes instead of the current one. ax is the axes used.
Example
w = generateCheckerboardPoints([7 10], 25); c = cameraIntrinsics([800 790], [322 238], [480 640]); r = [0.3 0 0; 0 0.3 0; 0.2 -0.2 0.1]; ip = zeros(54, 2, 3); for k = 1:3, ip(:, :, k) = worldToImage(c, rotationVectorToMatrix(r(k, :)), [-100 -60 500], w); end; params = estimateCameraParameters(ip, w, 'ImageSize', [480 640]); figure; ax = showReprojectionErrors(params, 'ScatterPlot'); numel(get(ax, 'Children')) % 3Differences from MATLAB: highlighted bars are a second bar series drawn over the first. Stereo, fisheye and multi-camera parameters are not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.