Main Content

showReprojectionErrors

Visualize means reprojection error for images as bar graph

Since R2024a

    Description

    showReprojectionErrors(params) visualizes the mean reprojection error for each calibration image as a bar graph for the camera-IMU calibration parameters.

    showReprojectionErrors(params,Name=Value) specifies one or more name-value arguments.

    ax = showReprojectionErrors(___) returns the axes that the reprojection errors are plotted on.

    Input Arguments

    collapse all

    Estimated camera-to-IMU calibration parameters, specified as a cameraIMUParameters object.

    Use the estimateCameraIMUTransform function to get the estimated camera-to-IMU calibration parameters.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: showReprojectionErrors(params,Threshold=[0.2 0.2 0.2 0.1 0.1 0.1])

    Parent axes, specified as an Axes object handles, in which to plot the reprojection errors. By default, the showReprojectionErrors function plots the estimates in the a new figure.

    Plotted reprojection error threshold value, specified as a nonnegative numeric scalar. Units are in pixels.

    Output Arguments

    collapse all

    Axes graphic handle, returned as an Axes object. This object contains the properties of the figure that you plot the transformation onto.

    Tips

    • If there are large reprojection errors in a small number of calibration images, it could indicate one of these issues in the image dataset:

      • The motion of the camera that is too fast, causing motion blur.

      • The camera did not capture all of the patterns of the calibration board in the affected calibration images. This may cause camera-pose estimation inaccuracy.

      To improve calibration results, use the estimateCameraIMUTransform function and remove the images with large reprojection errors from the specified calibration images.

    • If there are large reprojection errors for all calibration images, consider recollecting the dataset to get more accurate calibration results.

    • If both reprojection error and IMU prediction error are low, then that is an indication of good calibration results. Use the showIMUPredictionErrors function to visualize the IMU prediction errors.

    • Using calibration results with larger reprojection errors may result in the IMU-predicted poses having similar reprojection errors while using visual-inertial odometry (VIO). Use the Threshold name-value argument to plot a reprojection error threshold value that matches your expectation from your VIO.

    Version History

    Introduced in R2024a