11#include "./linePrimitive.h"
13#include "./covarianceFit.h"
33template <
class DataPo
int,
class _WFunctor,
typename T>
36 PONCA_FITTING_DECLARE_DEFAULT_TYPES
37 PONCA_FITTING_DECLARE_MATRIX_TYPE
42 check = Base::PROVIDES_LINE &&
43 Base::PROVIDES_POSITION_COVARIANCE,
49 PONCA_FITTING_APIDOC_FINALIZE
52 static const int smallestEigenValue = DataPoint::Dim - 1;
53 if (Base::finalize() ==
STABLE) {
55 Base::setLine(Base::barycenterLocal(), Base::m_solver.eigenvectors().col(smallestEigenValue).normalized());
57 return Base::m_eCurrentState;
59 PONCA_FITTING_IS_SIGNED(
false)
63template <
class DataPo
int,
class _WFunctor,
typename T>
Procedure that compute and decompose the covariance matrix of the neighbors positions in .
Line fitting procedure that minimize the orthogonal distance between the samples and the fitted primi...
CovarianceLineFitImpl< DataPoint, _WFunctor, T > & covarianceLineFit()
Explicit conversion to CovarianceLineFitImpl , to access methods potentially hidden by heritage.
FIT_RESULT finalize()
Finalize the procedure.
A parametrized line is defined by an origin point and a unit direction vector such that the line co...
Compute the barycenter of the input points.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)
@ CONFLICT_ERROR_FOUND
Multiple classes of the fitting procedure initialize the primitive.
@ STABLE
The fitting is stable and ready to use.