Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
PointMatcher< T >::ErrorMinimizer Struct Referenceabstract

An error minimizer will compute a transformation matrix such as to minimize the error between the reading and the reference. More...

#include <PointMatcher.h>

Inheritance diagram for PointMatcher< T >::ErrorMinimizer:
Inheritance graph
[legend]

Classes

struct  ErrorElements
 A structure holding data ready for minimization. The data are "normalized", for instance there are no points with 0 weight, etc. More...
 

Public Member Functions

virtual TransformationParameters compute (const DataPoints &filteredReading, const DataPoints &filteredReference, const OutlierWeights &outlierWeights, const Matches &matches)
 Find the transformation that minimizes the error. More...
 
virtual TransformationParameters compute (const ErrorElements &matchedPoints)=0
 Find the transformation that minimizes the error given matched pair of points. This function most be defined for all new instances of ErrorMinimizer. More...
 
 ErrorMinimizer ()
 Construct without parameter. More...
 
 ErrorMinimizer (const std::string &className, const ParametersDoc paramsDoc, const Parameters &params)
 Construct with parameters. More...
 
virtual Matrix getCovariance () const
 If not redefined by child class, return zero matrix. More...
 
ErrorElements getErrorElements () const
 Return the last the ErrorElements structure that was used for error minimization. More...
 
virtual T getOverlap () const
 If not redefined by child class, return the ratio of how many points were used (with weight) for error minimization. More...
 
getPointUsedRatio () const
 Return the ratio of how many points were used for error minimization. More...
 
virtual T getResidualError (const DataPoints &filteredReading, const DataPoints &filteredReference, const OutlierWeights &outlierWeights, const Matches &matches) const
 If not redefined by child class, return max value for T. More...
 
getWeightedPointUsedRatio () const
 Return the ratio of how many points were used (with weight) for error minimization. More...
 
virtual ~ErrorMinimizer ()
 virtual destructor More...
 
- Public Member Functions inherited from PointMatcherSupport::Parametrizable
template<typename S >
get (const std::string &paramName)
 Return the value of paramName, lexically-casted to S. More...
 
std::string getParamValueString (const std::string &paramName)
 Get the value of a parameter, as a string. More...
 
 Parametrizable ()
 Construct a documentation of parameters from a description in the source. More...
 
 Parametrizable (const std::string &className, const ParametersDoc paramsDoc, const Parameters &params)
 Construct with documented parameters. More...
 
virtual ~Parametrizable ()
 Virtual destructor, do nothing. More...
 

Static Public Member Functions

static Matrix crossProduct (const Matrix &A, const Matrix &B)
 Helper funtion doing the cross product in 3D and a pseudo cross product in 2D. More...
 
- Static Public Member Functions inherited from PointMatcherSupport::Parametrizable
template<typename S >
static bool Comp (std::string a, std::string b)
 Return whether a < b, lexically casted to S. More...
 

Protected Attributes

ErrorElements lastErrorElements
 memory of the last computed error More...
 

Additional Inherited Members

- Public Types inherited from PointMatcherSupport::Parametrizable
typedef bool(* LexicalComparison) (std::string a, std::string b)
 A function that returns whether a is smaller than b. More...
 
typedef std::string Parameter
 alias More...
 
typedef std::map< std::string, ParameterParameters
 Parameters stored as a map of string->string. More...
 
typedef std::vector< ParameterDocParametersDoc
 The documentation of all parameters. More...
 
typedef std::set< std::string > ParametersUsed
 Parameters whose value has been read. More...
 
- Public Attributes inherited from PointMatcherSupport::Parametrizable
const std::string className
 name of the class More...
 
Parameters parameters
 parameters with their values encoded in string More...
 
const ParametersDoc parametersDoc
 documentation of parameters More...
 
ParametersUsed parametersUsed
 parameters whose value has actually been read More...
 

Detailed Description

template<typename T>
struct PointMatcher< T >::ErrorMinimizer

An error minimizer will compute a transformation matrix such as to minimize the error between the reading and the reference.

Typical error minimized are point-to-point and point-to-plane.

Definition at line 530 of file PointMatcher.h.

Constructor & Destructor Documentation

◆ ErrorMinimizer() [1/2]

template<typename T >
PointMatcher< T >::ErrorMinimizer::ErrorMinimizer ( )

Construct without parameter.

Definition at line 202 of file ErrorMinimizer.cpp.

◆ ErrorMinimizer() [2/2]

template<typename T >
PointMatcher< T >::ErrorMinimizer::ErrorMinimizer ( const std::string &  className,
const ParametersDoc  paramsDoc,
const Parameters params 
)

Construct with parameters.

Definition at line 207 of file ErrorMinimizer.cpp.

◆ ~ErrorMinimizer()

template<typename T >
PointMatcher< T >::ErrorMinimizer::~ErrorMinimizer ( )
virtual

virtual destructor

Definition at line 213 of file ErrorMinimizer.cpp.

Member Function Documentation

◆ compute() [1/2]

template<typename T >
PointMatcher< T >::TransformationParameters PointMatcher< T >::ErrorMinimizer::compute ( const DataPoints filteredReading,
const DataPoints filteredReference,
const OutlierWeights outlierWeights,
const Matches matches 
)
virtual

Find the transformation that minimizes the error.

Definition at line 218 of file ErrorMinimizer.cpp.

◆ compute() [2/2]

template<typename T>
virtual TransformationParameters PointMatcher< T >::ErrorMinimizer::compute ( const ErrorElements matchedPoints)
pure virtual

Find the transformation that minimizes the error given matched pair of points. This function most be defined for all new instances of ErrorMinimizer.

Implemented in PointToPlaneErrorMinimizer< T >, PointToPlaneWithCovErrorMinimizer< T >, PointToPointWithCovErrorMinimizer< T >, PointToPointErrorMinimizer< T >, PointToPointSimilarityErrorMinimizer< T >, and IdentityErrorMinimizer< T >.

◆ crossProduct()

template<typename T >
PointMatcher< T >::Matrix PointMatcher< T >::ErrorMinimizer::crossProduct ( const Matrix A,
const Matrix B 
)
static

Helper funtion doing the cross product in 3D and a pseudo cross product in 2D.

Definition at line 282 of file ErrorMinimizer.cpp.

◆ getCovariance()

template<typename T >
PointMatcher< T >::Matrix PointMatcher< T >::ErrorMinimizer::getCovariance ( ) const
virtual

If not redefined by child class, return zero matrix.

Reimplemented in PointToPlaneWithCovErrorMinimizer< T >, and PointToPointWithCovErrorMinimizer< T >.

Definition at line 266 of file ErrorMinimizer.cpp.

◆ getErrorElements()

template<typename T >
PointMatcher< T >::ErrorMinimizer::ErrorElements PointMatcher< T >::ErrorMinimizer::getErrorElements ( ) const

Return the last the ErrorElements structure that was used for error minimization.

Definition at line 243 of file ErrorMinimizer.cpp.

◆ getOverlap()

template<typename T >
T PointMatcher< T >::ErrorMinimizer::getOverlap ( ) const
virtual

If not redefined by child class, return the ratio of how many points were used (with weight) for error minimization.

Reimplemented in PointToPlaneErrorMinimizer< T >, PointToPointErrorMinimizer< T >, and PointToPointSimilarityErrorMinimizer< T >.

Definition at line 258 of file ErrorMinimizer.cpp.

◆ getPointUsedRatio()

template<typename T >
T PointMatcher< T >::ErrorMinimizer::getPointUsedRatio ( ) const

Return the ratio of how many points were used for error minimization.

Definition at line 236 of file ErrorMinimizer.cpp.

◆ getResidualError()

template<typename T >
T PointMatcher< T >::ErrorMinimizer::getResidualError ( const DataPoints filteredReading,
const DataPoints filteredReference,
const OutlierWeights outlierWeights,
const Matches matches 
) const
virtual

If not redefined by child class, return max value for T.

Reimplemented in PointToPlaneErrorMinimizer< T >, PointToPointErrorMinimizer< T >, and PointToPointSimilarityErrorMinimizer< T >.

Definition at line 274 of file ErrorMinimizer.cpp.

◆ getWeightedPointUsedRatio()

template<typename T >
T PointMatcher< T >::ErrorMinimizer::getWeightedPointUsedRatio ( ) const

Return the ratio of how many points were used (with weight) for error minimization.

Definition at line 251 of file ErrorMinimizer.cpp.

Member Data Documentation

◆ lastErrorElements

template<typename T>
ErrorElements PointMatcher< T >::ErrorMinimizer::lastErrorElements
protected

memory of the last computed error

Definition at line 571 of file PointMatcher.h.


The documentation for this struct was generated from the following files:


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:38:04