9 py::class_<ErrorMinimizer, std::shared_ptr<ErrorMinimizer>,
Parametrizable> pyErrorMinimizer(p_class,
"ErrorMinimizer");
11 pyErrorMinimizer.doc() = R
"pbdoc( 12 An error minimizer will compute a transformation matrix such as to minimize the error between the reading and the reference. 14 Typical error minimized are point-to-point and point-to-plane. 17 py::class_<ErrorElements>(pyErrorMinimizer, "ErrorElements",
"A structure holding data ready for minimization. The data are \"normalized\", for instance there are no points with 0 weight, etc.")
28 .def(py::init<const DataPoints&, const DataPoints&, const OutlierWeights&, const Matches&>(), py::arg(
"requestedPts"), py::arg(
"sourcePts"), py::arg(
"outlierWeights"), py::arg(
"matches"));
34 .def(
"getResidualError", &
ErrorMinimizer::getResidualError, py::arg(
"filteredReading"), py::arg(
"filteredReference"), py::arg(
"outlierWeights"), py::arg(
"matches"))
static Matrix crossProduct(const Matrix &A, const Matrix &B)
Helper funtion doing the cross product in 3D and a pseudo cross product in 2D.
T getPointUsedRatio() const
Return the ratio of how many points were used for error minimization.
PM::OutlierWeights OutlierWeights
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.
virtual T getOverlap() const
If not redefined by child class, return the ratio of how many points were used (with weight) for erro...
T weightedPointUsedRatio
the ratio of how many points were used (with weight) for error minimization
DataPoints reference
reference point cloud
An error minimizer will compute a transformation matrix such as to minimize the error between the rea...
ErrorElements getErrorElements() const
Return the last the ErrorElements structure that was used for error minimization. ...
int nbRejectedPoints
number of points with all matches set to zero weights
T getWeightedPointUsedRatio() const
Return the ratio of how many points were used (with weight) for error minimization.
OutlierWeights weights
weights for every association
int nbRejectedMatches
number of matches with zero weights
virtual TransformationParameters compute(const DataPoints &filteredReading, const DataPoints &filteredReference, const OutlierWeights &outlierWeights, const Matches &matches)
Find the transformation that minimizes the error.
The superclass of classes that are constructed using generic parameters. This class provides the para...
virtual Matrix getCovariance() const
If not redefined by child class, return zero matrix.
void pybindErrorMinimizer(py::class_< PM > &p_class)
T pointUsedRatio
the ratio of how many points were used for error minimization
Matches matches
associations
PM::TransformationParameters TransformationParameters
DataPoints reading
reading point cloud