11#include "./linePrimitive.h"
13#include "./covarianceFit.h"
33 template <
class DataPo
int,
class _NFilter,
typename T>
36 PONCA_FITTING_DECLARE_DEFAULT_TYPES
37 PONCA_FITTING_DECLARE_MATRIX_TYPE
42 check = Base::PROVIDES_LINE && Base::PROVIDES_POSITION_COVARIANCE,
48 PONCA_FITTING_APIDOC_FINALIZE
51 static const int smallestEigenValue = DataPoint::Dim - 1;
52 if (Base::finalize() ==
STABLE)
54 if (Base::line().isValid())
56 Base::setLine(Base::barycenterLocal(),
57 Base::m_solver.eigenvectors().col(smallestEigenValue).normalized());
59 return Base::m_eCurrentState;
61 PONCA_FITTING_IS_SIGNED(
false)
65 template <
class DataPo
int,
class _NFilter,
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...
FIT_RESULT finalize()
Finalize the procedure.
CovarianceLineFitImpl< DataPoint, _NFilter, T > & covarianceLineFit()
Explicit conversion to CovarianceLineFitImpl , to access methods potentially hidden by heritage.
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.