CVB++ 15.0
MatchingParameters Class Referencefinal

A parameter set for matching and down sampling point clouds. More...

#include <cvb/match_3d/match_3d.hpp>

Public Member Functions

 MatchingParameters () noexcept
 Create a parameter set to control the matching algorithm with default values.
More...
 
 MatchingParameters (std::size_t maxScenePoints, std::size_t maxModelPoints) noexcept
 Create a parameter set to control the matching algorithm with default values. More...
 
 MatchingParameters (std::size_t maxScenePoints, std::size_t maxModelPoints, int maxIterations, double tolerance, double minImprovement, double correspondenceThreshold, double convergenceRadius, bool prealign, CorrespondenceType correspondenceMethod) noexcept
 Create a parameter set to control the Match3d ICP algorithm. More...
 
std::size_t MaxModelPoints () const noexcept
 Gets maximum number of model points to use. More...
 
void SetMaxModelPoints (std::size_t maxModelPoints) noexcept
 Sets maximum number of model points to use. More...
 
std::size_t MaxScenePoints () const noexcept
 Gets maximum number of scene points to use. More...
 
void SetMaxScenePoints (std::size_t maxScenePoints) noexcept
 Sets maximum number of scene points to use. More...
 
int MaxIterations () const noexcept
 Gets maximum number of iterations to execute. More...
 
void SetMaxIterations (int value) noexcept
 Sets maximum number of iterations to execute. More...
 
double Tolerance () const noexcept
 Gets tolerance for stopping criteria. More...
 
void SetTolerance (double value) noexcept
 Sets tolerance for stopping criteria. More...
 
double MinImprovement () const noexcept
 Gets threshold for minimum improvement for early stopping criteria. More...
 
void SetMinImprovement (double value) noexcept
 Sets threshold for minimum improvement for early stopping criteria. More...
 
double CorrespondenceThreshold () const noexcept
 Gets special metric used for consensus ICP. More...
 
void SetCorrespondenceThreshold (double value) noexcept
 Sets special metric used for consensus ICP. More...
 
double ConvergenceRadius () const noexcept
 Gets convergence radius to define when two points are considered as a converged match. More...
 
void SetConvergenceRadius (double value) noexcept
 Sets convergence radius to define when two points are considered as a converged match. More...
 
bool Prealign () const noexcept
 Gets true, if pre-alignment of point clouds should be done using the center of gravity. More...
 
void SetPrealign (bool value) noexcept
 Set true, if pre-alignment of point clouds should be done using the center of gravity. More...
 
CorrespondenceType CorrespondenceMethod () const noexcept
 Gets correspondence type used. More...
 
void SetCorrespondenceMethod (CorrespondenceType value) noexcept
 Sets correspondence type used. More...
 

Friends

MatchingResult IcpMatch (const PointCloud &model, const PointCloud &scene, const MatchingParameters &parameters)
 This function matches two point clouds. More...
 

Detailed Description

A parameter set for matching and down sampling point clouds.

Constructor & Destructor Documentation

◆ MatchingParameters() [1/3]

MatchingParameters ( )
inlinenoexcept

Create a parameter set to control the matching algorithm with default values.

Note, that all points are used for the matching per default. If you like to save computation time, reduce number of scene and/or model points using SetMaxScenePoints/SetMaxModelPoints.

◆ MatchingParameters() [2/3]

MatchingParameters ( std::size_t  maxScenePoints,
std::size_t  maxModelPoints 
)
inlinenoexcept

Create a parameter set to control the matching algorithm with default values.

Parameters
[in]maxScenePointsMaximum number of scene points to use. Points are selected randomly. If zero, all points are used.
[in]maxModelPointsMaximum number of model points to use. Points are selected randomly. If zero, all points are used.
Exceptions
Doesnot throw any exception.

◆ MatchingParameters() [3/3]

MatchingParameters ( std::size_t  maxScenePoints,
std::size_t  maxModelPoints,
int  maxIterations,
double  tolerance,
double  minImprovement,
double  correspondenceThreshold,
double  convergenceRadius,
bool  prealign,
CorrespondenceType  correspondenceMethod 
)
inlinenoexcept

Create a parameter set to control the Match3d ICP algorithm.

Parameters
[in]maxScenePointsMaximum number of scene points to use. Points are selected randomly. If zero, all points are used.
[in]maxModelPointsMaximum number of model points to use. Points are selected randomly. If zero, all points are used.
[in]maxIterationsMaximum number of iterations to execute.
[in]toleranceIteration stops if mean distance between aligned point clouds is equal/below this value.
[in]minImprovementThe mean distance between aligned point clouds has to differ more than this value from the results of the previous iteration. Otherwise iteration stops.
[in]correspondenceThresholdParameter for shape sensitivity. It is defined by a value between 0 and 1. A higher value means higher sensitivity. A value of 0 corresponds to the classical ICP without any shape sensitivity. A value between 0.8 and 0.9 is recommended as default value when aligning point clouds.
[in]convergenceRadiusConvergence radius to define when two points are considered as a converged match.
[in]prealignTrue, if pre-alignment of point clouds should be done using the center of gravity.
[in]correspondenceMethodCorrespondence type used.
Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ ConvergenceRadius()

double ConvergenceRadius ( ) const
inlinenoexcept

Gets convergence radius to define when two points are considered as a converged match.

Returns
Convergence radius.
Exceptions
Doesnot throw any exception.

◆ CorrespondenceMethod()

CorrespondenceType CorrespondenceMethod ( ) const
inlinenoexcept

Gets correspondence type used.

Returns
Correspondence type.
Exceptions
Doesnot throw any exception.

◆ CorrespondenceThreshold()

double CorrespondenceThreshold ( ) const
inlinenoexcept

Gets special metric used for consensus ICP.

A value of 0 will result in the classical ICP method.

Returns
Threshold.
Exceptions
Doesnot throw any exception.

◆ MaxIterations()

int MaxIterations ( ) const
inlinenoexcept

Gets maximum number of iterations to execute.

Returns
Maximum number of iterations.
Exceptions
Doesnot throw any exception.

◆ MaxModelPoints()

std::size_t MaxModelPoints ( ) const
inlinenoexcept

Gets maximum number of model points to use.

Returns
The maximum number of points. If zero, all points are used.
Exceptions
Doesnot throw any exception.

◆ MaxScenePoints()

std::size_t MaxScenePoints ( ) const
inlinenoexcept

Gets maximum number of scene points to use.

Returns
The maximum number of points. If zero, all points are used.
Exceptions
Doesnot throw any exception.

◆ MinImprovement()

double MinImprovement ( ) const
inlinenoexcept

Gets threshold for minimum improvement for early stopping criteria.

The mean distance between aligned point clouds has to differ more than this value from the results of the previous iteration. Otherwise iteration stops.

Returns
Threshold.
Exceptions
Doesnot throw any exception.

◆ Prealign()

bool Prealign ( ) const
inlinenoexcept

Gets true, if pre-alignment of point clouds should be done using the center of gravity.

Returns
Value for pre-alignment.
Exceptions
Doesnot throw any exception.

◆ SetConvergenceRadius()

void SetConvergenceRadius ( double  value)
inlinenoexcept

Sets convergence radius to define when two points are considered as a converged match.

Parameters
[in]valueConvergence radius.
Exceptions
Doesnot throw any exception.

◆ SetCorrespondenceMethod()

void SetCorrespondenceMethod ( CorrespondenceType  value)
inlinenoexcept

Sets correspondence type used.

Parameters
[in]valueCorrespondence type.
Exceptions
Doesnot throw any exception.

◆ SetCorrespondenceThreshold()

void SetCorrespondenceThreshold ( double  value)
inlinenoexcept

Sets special metric used for consensus ICP.

A value of 0 will result in the classical ICP method.

Parameters
[in]valueThreshold.
Exceptions
Doesnot throw any exception.

◆ SetMaxIterations()

void SetMaxIterations ( int  value)
inlinenoexcept

Sets maximum number of iterations to execute.

Parameters
[in]valueMaximum number of iterations.
Exceptions
Doesnot throw any exception.

◆ SetMaxModelPoints()

void SetMaxModelPoints ( std::size_t  maxModelPoints)
inlinenoexcept

Sets maximum number of model points to use.

Parameters
[in]maxModelPointsThe maximum number of points. If zero, all points are used.
Exceptions
Doesnot throw any exception.

◆ SetMaxScenePoints()

void SetMaxScenePoints ( std::size_t  maxScenePoints)
inlinenoexcept

Sets maximum number of scene points to use.

Parameters
[in]maxScenePointsThe maximum number of points. If zero, all points are used.
Exceptions
Doesnot throw any exception.

◆ SetMinImprovement()

void SetMinImprovement ( double  value)
inlinenoexcept

Sets threshold for minimum improvement for early stopping criteria.

Parameters
[in]valueThreshold.
Exceptions
Doesnot throw any exception.

◆ SetPrealign()

void SetPrealign ( bool  value)
inlinenoexcept

Set true, if pre-alignment of point clouds should be done using the center of gravity.

Parameters
[in]valueValue for pre-alignment.
Exceptions
Doesnot throw any exception.

◆ SetTolerance()

void SetTolerance ( double  value)
inlinenoexcept

Sets tolerance for stopping criteria.

Parameters
[in]valueTolerance.
Exceptions
Doesnot throw any exception.

◆ Tolerance()

double Tolerance ( ) const
inlinenoexcept

Gets tolerance for stopping criteria.

Iteration stops if mean distance between aligned point clouds is equal/below this value.

Returns
Tolerance.
Exceptions
Doesnot throw any exception.

Friends And Related Function Documentation

◆ IcpMatch

MatchingResult IcpMatch ( const PointCloud model,
const PointCloud scene,
const MatchingParameters parameters 
)
friend

This function matches two point clouds.

Parameters
[in]sceneScene point cloud
[in]modelModel point cloud to be matched to scene.
[in]parametersParameters that control the algorithm.
Returns
Object containing all results.
Exceptions
Anyexception derived from std::exception including CvbException.

This function matches two point clouds by the iterative closest point algorithm (ICP), see: The algorithm follows Arun KS, Huang TS, Blostein SD (1987) Least-squares fitting of two 3D point sets. IEEE Transactions on Pattern Analysis and Machine Intelligence 9:698-700.