Calibration configuration object. More...
#include <cvb/foundation/metric_aqs12.hpp>
Public Types | |
enum class | ExtrinsicCalibrationModel { None = CExports::CVMETM_None , AffineMatrix = CExports::CVMETM_AffineTransformation , SpecificTransformationParameters = CExports::CVMETM_SpecificTransformationParameters } |
Enum for extrinsic calibration model. More... | |
Public Member Functions | |
AQS12Piece | Aqs12Piece () const noexcept |
Gets the AQS12 piece. More... | |
void | SetHomographyCalculated (bool flag) noexcept |
Sets the calculate homography flag. More... | |
bool | IsHomographyCalculated () const noexcept |
Gets the calculate homography flag. More... | |
void | SetCorrectionOfLaserPlaneInclinationCalculated (bool flag) noexcept |
Sets the flag for the calculation of the correction for the laser plane inclination. More... | |
bool | IsCorrectionOfLaserPlaneInclinationCalculated () const noexcept |
Gets the flag for the calculation of the correction for the laser plane inclination. More... | |
void | SetExtrinsicCalibrationModel (ExtrinsicCalibrationModel model) noexcept |
Sets the extrinsic calibration model. More... | |
ExtrinsicCalibrationModel | GetExtrinsicCalibrationModel () const noexcept |
Gets the extrinsic calibration model. More... | |
void | SetEstimateEncoderStep (bool flag) |
Sets the flag for the estimation of the encoder step (scale in Y). More... | |
bool | IsEncoderStepEstimated () const noexcept |
Gets the flag for the estimation of the encoder step (scale in Y). More... | |
void * | Handle () const noexcept |
Returns C-API style handle to Node Object. More... | |
Static Public Member Functions | |
static std::unique_ptr< CalibrationConfiguration > | Create (const AQS12Piece &aqs12) |
Creates a calibration configuration object. More... | |
static std::unique_ptr< CalibrationConfiguration > | CreateExtrinsic (const AQS12Piece &aqs12) |
Creates an extrinsic calibration configuration object. More... | |
static std::unique_ptr< CalibrationConfiguration > | FromHandle (HandleGuard< CalibrationConfiguration > &&guard) |
Creates a calibration configuration object from a classic API handle. More... | |
Calibration configuration object.
This class allows for the configuration of calibrations performed using CreateCalibratorFromAqs12Piece or CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece.
|
strong |
Enum for extrinsic calibration model.
Calibrating a laser triangulation system extrinsically involves transforming an intrinsically calibrated point cloud to a world coordinate system. This transformation includes not only rotation and translation but also correction of the laser plane's inclination about the x and z axes, and scaling. The scaling in the x and z directions depends on the laser plane's inclination. If the scaling in the y direction (known as the encoder step) is unknown, it can be estimated by enabling it via the function SetEstimateEncoderStep, too. The transformation parameters can be represented by three 3D matrices. Multiplying them results in an affine 3D matrix:
and where
m11,...m33: individual elements of the affine matrix
Syx and Syz: shear parameters that correct an inclined laser plane
Scale.X,Y,Z: scaling factors
R: 3D rotation matrix calculated from the RotationAngles.
There are two ways to estimate the transformation: You may simply estimate the 9 individual elements of the affine matrix m11,..., m33 or estimate the parameters for rotation, scale and shear. The advantage of estimating the single elements is that the system of equations is linear and easy to solve. Whereas estimating the parameters lead to a non-linear system of equations and might not yield a reasonable result in very rare cases. However, using the non-linear system of equations models the errors more accurately and is thus recommended.
The model for the extrinsic calibration can be set in the calibration configuration object via function SetExtrinsicCalibrationModel or be specified directly like in function CalculateCorrectionOfLaserPlaneInclination.
Enumerator | |
---|---|
None | Extrinsic transformation will not be estimated. |
AffineMatrix | Elements of affine matrix m11,..., m33 are estimated. Note: If this model is enabled, the encoder step is always estimated. |
SpecificTransformationParameters | Transformation parameters like rotation, scale and shear are estimated (recommended). Note: When using this model, you can enable or disable the estimation of the encoder step (scale in Y) via function SetEstimateEncoderStep. |
|
inlinenoexcept |
Gets the AQS12 piece.
|
inlinestatic |
Creates a calibration configuration object.
Using this calibration configuration, the homography is estimated. For the extrinsic calibration the SpecificTransformationParameters model is selected and the encoder step is estimated.
[in] | aqs12 | AQS12 piece. |
|
inlinestatic |
Creates an extrinsic calibration configuration object.
Using this calibration configuration, the homography is not estimated. For the extrinsic calibration the SpecificTransformationParameters model is selected and the encoder step is estimated.
[in] | aqs12 | AQS12 piece. |
|
inlinestatic |
Creates a calibration configuration object from a classic API handle.
[in] | guard | Life time guard for C-API handle. |
Any | exception derived from std::exception including CvbException. |
The calibration configuration object takes ownership of the handle, so you must share it before using this function.
|
inlinenoexcept |
Gets the extrinsic calibration model.
|
inlinenoexcept |
Returns C-API style handle to Node Object.
|
inlinenoexcept |
Gets the flag for the calculation of the correction for the laser plane inclination.
|
inlinenoexcept |
Gets the flag for the estimation of the encoder step (scale in Y).
|
inlinenoexcept |
Gets the calculate homography flag.
|
inlinenoexcept |
Sets the flag for the calculation of the correction for the laser plane inclination.
If you enable the estimation of the correction for the laser plane inclination, the SpecificTransformationParameters model is selected for the extrinsic calibration and the encoder step will estimated. If you like to choose another extrinsic calibration model, please use function SetExtrinsicCalibrationModel instead.
[in] | flag | Value of flag to be set. |
|
inline |
Sets the flag for the estimation of the encoder step (scale in Y).
If one of the following constraints is met, you cannot disable the estimation of the encoder step (an error will be thrown):
Whereas if None is set as extrinsic calibration model, you cannot enable the estimation of the encoder step.
[in] | flag | Value of flag to be set. |
|
inlinenoexcept |
Sets the extrinsic calibration model.
[in] | model | Model to be set. |
|
inlinenoexcept |
Sets the calculate homography flag.
Note: If the estimation of the homography is enabled, the encoder step is always estimated, too. It cannot be disabled in this case.
[in] | flag | Value of flag to be set. |