CVB++ 15.0
CalibrationConfiguration Class Referencefinal

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< CalibrationConfigurationCreate (const AQS12Piece &aqs12)
 Creates a calibration configuration object. More...
 
static std::unique_ptr< CalibrationConfigurationCreateExtrinsic (const AQS12Piece &aqs12)
 Creates an extrinsic calibration configuration object. More...
 
static std::unique_ptr< CalibrationConfigurationFromHandle (HandleGuard< CalibrationConfiguration > &&guard)
 Creates a calibration configuration object from a classic API handle. More...
 

Detailed Description

Calibration configuration object.

This class allows for the configuration of calibrations performed using CreateCalibratorFromAqs12Piece or CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece.

Member Enumeration Documentation

◆ ExtrinsicCalibrationModel

enum class ExtrinsicCalibrationModel
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.

Member Function Documentation

◆ Aqs12Piece()

AQS12Piece Aqs12Piece ( ) const
inlinenoexcept

Gets the AQS12 piece.

Returns
AQS12 piece.

◆ Create()

static std::unique_ptr< CalibrationConfiguration > Create ( const AQS12Piece aqs12)
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.

Parameters
[in]aqs12AQS12 piece.
Returns
The variable to receive the resulting calibration configuration object.
Examples
Foundation/CppMetricCalibration, and Foundation/CppMetricCalibrationInclinationLaserPlane.

◆ CreateExtrinsic()

static std::unique_ptr< CalibrationConfiguration > CreateExtrinsic ( const AQS12Piece aqs12)
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.

Parameters
[in]aqs12AQS12 piece.
Returns
The variable to receive the resulting calibration configuration object.

◆ FromHandle()

static std::unique_ptr< CalibrationConfiguration > FromHandle ( HandleGuard< CalibrationConfiguration > &&  guard)
inlinestatic

Creates a calibration configuration object from a classic API handle.

Parameters
[in]guardLife time guard for C-API handle.
Returns
The calibration configuration created from the classic API handle.
Exceptions
Anyexception derived from std::exception including CvbException.

The calibration configuration object takes ownership of the handle, so you must share it before using this function.

◆ GetExtrinsicCalibrationModel()

ExtrinsicCalibrationModel GetExtrinsicCalibrationModel ( ) const
inlinenoexcept

Gets the extrinsic calibration model.

Returns
Extrinsic calibration model.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Returns C-API style handle to Node Object.

Returns
C-API handle

◆ IsCorrectionOfLaserPlaneInclinationCalculated()

bool IsCorrectionOfLaserPlaneInclinationCalculated ( ) const
inlinenoexcept

Gets the flag for the calculation of the correction for the laser plane inclination.

Returns
True, if the correction for the laser plane inclination will be calculated.

◆ IsEncoderStepEstimated()

bool IsEncoderStepEstimated ( ) const
inlinenoexcept

Gets the flag for the estimation of the encoder step (scale in Y).

Returns
True, if encoder step will be estimated.

◆ IsHomographyCalculated()

bool IsHomographyCalculated ( ) const
inlinenoexcept

Gets the calculate homography flag.

Returns
True, if homography will be calculated.

◆ SetCorrectionOfLaserPlaneInclinationCalculated()

void SetCorrectionOfLaserPlaneInclinationCalculated ( bool  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.

Parameters
[in]flagValue of flag to be set.

◆ SetEstimateEncoderStep()

void SetEstimateEncoderStep ( bool  flag)
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.

Parameters
[in]flagValue of flag to be set.

◆ SetExtrinsicCalibrationModel()

void SetExtrinsicCalibrationModel ( ExtrinsicCalibrationModel  model)
inlinenoexcept

Sets the extrinsic calibration model.

Parameters
[in]modelModel to be set.

◆ SetHomographyCalculated()

void SetHomographyCalculated ( bool  flag)
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.

Parameters
[in]flagValue of flag to be set.