CVB++ 15.0
Cvb::Foundation::Metric Namespace Reference

Namespace for metric calibration. More...

Namespaces

namespace  AQS12
 Namespace specific to AQS12 calibration pieces.
 
namespace  LaserLineExtraction
 Namespace for functions and classes extracting lase lines from the Foundation package.
 

Classes

class  AQS12DensePointCloudSegmentor
 Segmentor object to configure face segmentation of AQS12 calibration piece on dense point clouds. More...
 
class  AQS12RangeMapSegmentor
 Segmentor object to configure face segmentation of AQS12 calibration piece on range maps. More...
 
class  CalibrationConfiguration
 Calibration configuration object. More...
 
class  DensePointCloudSegmentor
 Base class for segmentor object to configure and compute segmentation on dense point clouds. More...
 
class  RangeMapSegmentor
 Base class for segmentor object to configure and compute segmentation on range maps. More...
 

Typedefs

using TransformationResult = std::tuple< AffineMatrix3D, Cvb::optional< std::vector< Point3D< double > > >, Cvb::optional< AffineTransformationParameters > >
 Result for calculating an extrinsic transformation. More...
 
using RigidBodyTransformationResult = std::tuple< AffineMatrix3D, Cvb::optional< std::vector< Point3D< double > > >, AffineTransformationParameters >
 Result for calculating a rigid body transformation. More...
 
using AQS12CalibratorResult = std::pair< LaserPlaneHomographyCalibrator3DPtr, std::array< Point3D< double >, 12 > >
 Result for calculating the calibrator based on the AQS12 calibration piece. More...
 

Enumerations

enum class  CalibrationPiece { AQS12 }
 Defines the calibration piece to use for face segmentation.
More...
 
enum class  SegmentationMethod { KmeansClustering = CExports::CVMSM_KmeansClustering }
 Defines the segmentation method for labeling the faces of the calibration piece.
More...
 

Functions

AffineMatrix3D CalculateAffineTransformation (const std::vector< Point3D< double > > &referencePoints, const std::vector< Point3D< double > > &measuredPoints)
 Calculates an affine transformation. More...
 
TransformationResult CalculateCorrectionOfLaserPlaneInclination (const std::vector< Point3D< double > > &referencePoints, const std::vector< Point3D< double > > &measuredPoints, CalibrationConfiguration::ExtrinsicCalibrationModel model=CalibrationConfiguration::ExtrinsicCalibrationModel::SpecificTransformationParameters, bool estimateEncoderStep=true, bool calculateResiduals=true)
 Calculates an extrinsic calibration and the correction for the laser plane inclination. More...
 
RigidBodyTransformationResult CalculateRigidBodyTransformation (const std::vector< Point3D< double > > &referencePoints, const std::vector< Point3D< double > > &measuredPoints, bool calculateResiduals=true)
 Calculates a rigid body transformation. More...
 
AQS12CalibratorResult CreateCalibratorFromAqs12Piece (const ImagePlane &imagePlane, const AQS12RangeMapSegmentor &segmentor, const CalibrationConfiguration &config)
 Calculates intrinsic and extrinsic calibration parameters from the given range map image of an AQS12 calibration piece and creates a new calibration object. More...
 
AQS12CalibratorResult CreateCalibratorFromAqs12Piece (const ImagePlane &imagePlane, const AQS12RangeMapSegmentor &segmentor, const CalibrationConfiguration &config, Rect< int > aoi)
 Calculates intrinsic and extrinsic calibration parameters from the range map image of an AQS12 calibration piece on the given area of interest and creates a new calibration object. More...
 
TransformationResult CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece (const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const CalibrationConfiguration &config)
 Calculates an extrinsic calibration and the correction for the laser plane inclination (affine transformation) from the given dense point cloud of an AQS12 calibration piece. More...
 
TransformationResult CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece (const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const CalibrationConfiguration &config, Rect< int > aoi)
 Calculates an extrinsic calibration and the correction for the laser plane inclination (affine transformation) from the dense point cloud of an AQS12 calibration piece on the given area of interest. More...
 
RigidBodyTransformationResult CalculateRigidBodyTransformationFromAqs12Piece (const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const AQS12Piece &aqs12)
 Calculates a rigid body transformation from a given dense point cloud of an AQS12 calibration piece. More...
 
RigidBodyTransformationResult CalculateRigidBodyTransformationFromAqs12Piece (const DensePointCloud &cloud, const AQS12DensePointCloudSegmentor &segmentor, const AQS12Piece &aqs12, Cvb::Rect< int > aoi)
 Calculates a rigid body transformation from a dense point cloud of an AQS12 calibration piece on the given area of interest. More...
 

Detailed Description

Namespace for metric calibration.

Remarks
CMake users: Link to imported target CVB::CvbFoundationMetric

Typedef Documentation

◆ AQS12CalibratorResult

Result for calculating the calibrator based on the AQS12 calibration piece.

The first element returned is the calibrator, the second contains the residuals of the 12 AQS12 points.

◆ RigidBodyTransformationResult

Result for calculating a rigid body transformation.

The first element returned is the transformation (affine matrix and translation), the second contains optional residuals and the third contains transformation parameters.

◆ TransformationResult

Result for calculating an extrinsic transformation.

The first element returned is the transformation (affine matrix and translation), the second contains optional residuals and the third contains optional transformation parameters.

Enumeration Type Documentation

◆ CalibrationPiece

enum class CalibrationPiece
strong

Defines the calibration piece to use for face segmentation.

Enumerator
AQS12 

The AQS12 calibration piece.

◆ SegmentationMethod

enum class SegmentationMethod
strong

Defines the segmentation method for labeling the faces of the calibration piece.

Enumerator
KmeansClustering 

Clustering top, base and faces using kmeans.

Function Documentation

◆ CalculateAffineTransformation()

AffineMatrix3D CalculateAffineTransformation ( const std::vector< Point3D< double > > &  referencePoints,
const std::vector< Point3D< double > > &  measuredPoints 
)
inline

Calculates an affine transformation.

This function estimates translation and the individual elements of an affine matrix. If you rather like to estimate the specific transformation parameters rotation, scale and shear (which is recommended for laser triangulation systems), please use function CalculateCorrectionOfLaserPlaneInclination instead.

Parameters
[in]referencePointsVector with reference points.
[in]measuredPointsVector with corresponding measured points. Note, that these points have to represent the same body as the reference points.
Returns
Affine transformation.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CalculateCorrectionOfLaserPlaneInclination()

TransformationResult CalculateCorrectionOfLaserPlaneInclination ( const std::vector< Point3D< double > > &  referencePoints,
const std::vector< Point3D< double > > &  measuredPoints,
CalibrationConfiguration::ExtrinsicCalibrationModel  model = CalibrationConfiguration::ExtrinsicCalibrationModel::SpecificTransformationParameters,
bool  estimateEncoderStep = true,
bool  calculateResiduals = true 
)
inline

Calculates an extrinsic calibration and the correction for the laser plane inclination.

Parameters
[in]referencePointsVector with reference points.
[in]measuredPointsVector with corresponding measured points. Note, that these points have to represent the same body as the reference points.
[in]modelExtrinsic calibration model.
[in]estimateEncoderStepTrue if encoder step (scale in Y) should be estimated. Note: If AffineTransformation is selected as extrinsic calibration model, the encoder step is always estimated.
[in]calculateResidualsTrue if residuals should be calculated.
Returns
The calibration result: affine transformation, optional array with residuals (if calculateResiduals=true) and optional transformation parameters (if model = SpecificTransformationParameters).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece() [1/2]

TransformationResult CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece ( const DensePointCloud cloud,
const AQS12DensePointCloudSegmentor segmentor,
const CalibrationConfiguration config 
)
inline

Calculates an extrinsic calibration and the correction for the laser plane inclination (affine transformation) from the given dense point cloud of an AQS12 calibration piece.

For this function, create an extrinsic calibration configuration object using CreateExtrinsic() and change the extrinsic calibration model if desired via SetExtrinsicCalibrationModel().

Parameters
[in]cloudDense point cloud.
[in]segmentorAQS12 segmentor object for dense point clouds.
[in]configCalibration configuration object.
Returns
The calibration result: affine transformation, array with residuals and - if SpecificTransformationParameters is selected as extrinsic calibration model - optional transformation parameters.
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
Foundation/CppMetricCalibrationInclinationLaserPlane.

◆ CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece() [2/2]

TransformationResult CalculateCorrectionOfLaserPlaneInclinationFromAqs12Piece ( const DensePointCloud cloud,
const AQS12DensePointCloudSegmentor segmentor,
const CalibrationConfiguration config,
Rect< int >  aoi 
)
inline

Calculates an extrinsic calibration and the correction for the laser plane inclination (affine transformation) from the dense point cloud of an AQS12 calibration piece on the given area of interest.

For this function, create an extrinsic calibration configuration object using CreateExtrinsic() and change the extrinsic calibration model if desired via SetExtrinsicCalibrationModel().

Note
The area of interest must be selected on the grid of the dense point cloud. Left, top, right and bottom are indices for row and column.
Parameters
[in]cloudDense point cloud.
[in]segmentorAQS12 segmentor object for dense point clouds.
[in]configCalibration configuration object.
[in]aoiArea of interest of projected xy plane.
Returns
The calibration result: affine transformation, array with residuals and - if SpecificTransformationParameters is selected as extrinsic calibration model - optional transformation parameters.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CalculateRigidBodyTransformation()

RigidBodyTransformationResult CalculateRigidBodyTransformation ( const std::vector< Point3D< double > > &  referencePoints,
const std::vector< Point3D< double > > &  measuredPoints,
bool  calculateResiduals = true 
)
inline

Calculates a rigid body transformation.

Parameters
[in]referencePointsVector with reference points.
[in]measuredPointsVector with corresponding measured points. Note, that these points have to represent the same body as the reference points.
[in]calculateResidualsTrue if residuals should be calculated.
Returns
The calibration result: affine transformation, optional array with residuals (if calculateResiduals=true) and transformation parameters.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CalculateRigidBodyTransformationFromAqs12Piece() [1/2]

RigidBodyTransformationResult CalculateRigidBodyTransformationFromAqs12Piece ( const DensePointCloud cloud,
const AQS12DensePointCloudSegmentor segmentor,
const AQS12Piece aqs12 
)
inline

Calculates a rigid body transformation from a given dense point cloud of an AQS12 calibration piece.

Parameters
[in]cloudDense point cloud.
[in]segmentorAQS12 segmentor object for dense point clouds.
[in]aqs12AQS12 calibration piece.
Returns
The calibration result: affine transformation, array with residuals and transformation parameters.
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
Foundation/CppMetricCalibrationRigidBodyTrafo.

◆ CalculateRigidBodyTransformationFromAqs12Piece() [2/2]

RigidBodyTransformationResult CalculateRigidBodyTransformationFromAqs12Piece ( const DensePointCloud cloud,
const AQS12DensePointCloudSegmentor segmentor,
const AQS12Piece aqs12,
Cvb::Rect< int >  aoi 
)
inline

Calculates a rigid body transformation from a dense point cloud of an AQS12 calibration piece on the given area of interest.

Note
The area of interest must be selected on the grid of the dense point cloud. Left, top, right and bottom are indices for row and column.
Parameters
[in]cloudDense point cloud.
[in]segmentorAQS12 segmentor object for dense point clouds.
[in]aqs12AQS12 calibration piece.
[in]aoiArea of interest of projected xy plane.
Returns
The calibration result: affine transformation, array with residuals and transformation parameters.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CreateCalibratorFromAqs12Piece() [1/2]

AQS12CalibratorResult CreateCalibratorFromAqs12Piece ( const ImagePlane imagePlane,
const AQS12RangeMapSegmentor segmentor,
const CalibrationConfiguration config 
)
inline

Calculates intrinsic and extrinsic calibration parameters from the given range map image of an AQS12 calibration piece and creates a new calibration object.

This function calculates homography and - if set in the calibration configuration object - an extrinsic calibration and the correction for the laser plane inclination (see also ExtrinsicCalibrationModel). Create an intrinsic calibration configuration object using Create() and change the extrinsic calibration model if desired via SetExtrinsicCalibrationModel(). The calibration parameters are saved to a newly created calibrator object.

Parameters
[in]imagePlanePlane of range map image.
[in]segmentorAQS12 segmentor object for range maps.
[in]configCalibration configuration object.
Returns
The variable to receive the resulting calibrator object and the residuals.
Exceptions
Anyexception derived from std::exception including CvbException.
Examples
Foundation/CppMetricCalibration.

◆ CreateCalibratorFromAqs12Piece() [2/2]

AQS12CalibratorResult CreateCalibratorFromAqs12Piece ( const ImagePlane imagePlane,
const AQS12RangeMapSegmentor segmentor,
const CalibrationConfiguration config,
Rect< int >  aoi 
)
inline

Calculates intrinsic and extrinsic calibration parameters from the range map image of an AQS12 calibration piece on the given area of interest and creates a new calibration object.

This function calculates homography and - if set in the calibration configuration object - an extrinsic calibration and the correction for the laser plane inclination (see also ExtrinsicCalibrationModel). Create an intrinsic calibration configuration object using Create() and change the extrinsic calibration model if desired via SetExtrinsicCalibrationModel(). The calibration parameters are saved to a newly created calibrator object.

Parameters
[in]imagePlanePlane of range map image.
[in]segmentorAQS12 segmentor object for range maps.
[in]configCalibration configuration object.
[in]aoiArea of interest.
Returns
The variable to receive the resulting calibrator object and the residuals.
Exceptions
Anyexception derived from std::exception including CvbException.