Main Content

validate

Validate camera-IMU calibration

Since R2024a

    Description

    [status,info] = validate(params,reprojectionThreshold,predictionThreshold) validates the camera-IMU calibration parameters by checking that the pattern point re-projection errors are below the specified reprojection threshold and that the IMU prediction errors are below the specified prediction threshold.

    ___ = validate(___,Name=Value) specifies additional options using one or more name-value arguments.

    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.

    Threshold for the pattern point reprojection errors, specified as either a positive numeric scalar.

    Threshold for IMU prediction errors, specified as either a six-element vector or two-element vector.

    If predictionThreshold is a six-element vector, it is in the form [TR_X, TR_Y, TR_Z, ROT_X, ROT_Y, ROT_Z]. TR_X, TR_Y, and TR_Z are the translation error thresholds along the x, y, and z axes, in meters. ROT_X, ROT_Y, and ROT_Z are the rotation error thresholds about the x, y, and z axes, in radians.

    If predictionThreshold is a two-element vector, it is in the form [TR_Th, ROT_Th]. TR_Th and ROT_Th are the translation and rotation error thresholds for the xyz-axes.

    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: validate(params,1,1,IMUPredictionErrorMode="percentage")

    Reprojection error mode, specified as either "mean" or "all":

    • "mean" — The validate function verifies that the mean reprojection error per image is less than the specified reprojectionThreshold value.

    • "all" — The validate function verifies that all the pattern point projection errors are less than the specified reprojectionThreshold value.

    IMU prediction error mode, specified as either "percentage" or "absolute":

    • "percentage" — The validate function verifies that the translation and rotation error percentage between the successive image pairs that use optimized camera poses is less than the specified predictionThreshold value.

    • "absolute" — The validate function verifies that the absolute value of the translation and rotation errors is less than the specified predictionThreshold value.

    Output Arguments

    collapse all

    Parameter validation status, returned as an integer in the range [0, 6]:

    • 0 — All parameter validation checks passed.

    • 1 — Reprojection error is exceeds than the specified reprojection threshold.

    • 2 — IMU prediction error exceeds than the specified IMU prediction threshold.

    • 3 — Estimated IMU bias values are outside expected bounds.

    • 4 — Calibration optimization did not converge.

    • 5 — Calibration optimization solution is not usable.

    • 6 — More than one validation check failed.

    Parameter validation information, returned as a struct containing these fields:

    • ReprojectionErrorAboveThreshold — Indication that the reprojection error is exceeds the reprojectionThreshold threshold, returned as a logical 1 (true) or logical 0 (false).

    • PredictionErrorAboveThreshold — Indication that the IMU prediction error is exceeds than the IMU prediction threshold, returned as a logical 1 (true) or logical 0 (false).

    • BiasValuesOutOfBounds — Indication that the estimated IMU bias values are outside expected bounds, returned as a logical 1 (true) or logical 0 (false).

    • CalibrationOptimizationNotConverged — Indication that the calibration optimization could not converge, returned as a logical 1 (true) or logical 0 (false).

    • CalibrationOptimizationResultNotUsable — Indication that the calibration optimization solution is not usable, returned as a logical 1 (true) or logical 0 (false).

    Version History

    Introduced in R2024a