validate
Syntax
Description
[
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.status
,info
] = validate(params
,reprojectionThreshold
,predictionThreshold
)
___ = validate(___,
specifies additional options using one or more name-value arguments.Name=Value
)
Input Arguments
params
— Estimated camera-to-IMU calibration parameters
cameraIMUParameters
object
Estimated camera-to-IMU calibration parameters, specified as a cameraIMUParameters
object.
Use the estimateCameraIMUTransform
function to get the estimated camera-to-IMU
calibration parameters.
reprojectionThreshold
— Threshold for pattern point reprojection errors
positive numeric scalar
Threshold for the pattern point reprojection errors, specified as either a positive numeric scalar.
predictionThreshold
— Threshold for IMU prediction errors
positive numeric scalar | M-element vector of positive numeric scalars
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")
ReprojectionErrorMode
— Reprojection error mode
"mean"
(default) | "all"
Reprojection error mode, specified as either "mean"
or
"all"
:
"mean"
— Thevalidate
function verifies that the mean reprojection error per image is less than the specifiedreprojectionThreshold
value."all"
— Thevalidate
function verifies that all the pattern point projection errors are less than the specifiedreprojectionThreshold
value.
IMUPredictionErrorMode
— IMU prediction error mode
"percentage"
(default) | "absolute"
IMU prediction error mode, specified as either "percentage"
or
"absolute"
:
"percentage"
— Thevalidate
function verifies that the translation and rotation error percentage between the successive image pairs that use optimized camera poses is less than the specifiedpredictionThreshold
value."absolute"
— Thevalidate
function verifies that the absolute value of the translation and rotation errors is less than the specifiedpredictionThreshold
value.
Output Arguments
status
— Calibration validation status
integer in the range [0, 6]
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.
info
— Parameter validation information
structure
Parameter validation information, returned as a struct containing these fields:
ReprojectionErrorAboveThreshold
— Indication that the reprojection error is exceeds thereprojectionThreshold
threshold, returned as a logical1
(true
) or logical0
(false
).PredictionErrorAboveThreshold
— Indication that the IMU prediction error is exceeds than the IMU prediction threshold, returned as a logical1
(true
) or logical0
(false
).BiasValuesOutOfBounds
— Indication that the estimated IMU bias values are outside expected bounds, returned as a logical1
(true
) or logical0
(false
).CalibrationOptimizationNotConverged
— Indication that the calibration optimization could not converge, returned as a logical1
(true
) or logical0
(false
).CalibrationOptimizationResultNotUsable
— Indication that the calibration optimization solution is not usable, returned as a logical1
(true
) or logical0
(false
).
Version History
Introduced in R2024a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)