11#include "../../defines.h"
12#include "../concepts.h"
14#include "../primitive/plane.h"
15#include "../tools/mean.h"
16#include "../tools/covariance.h"
18#include <Eigen/Eigenvalues>
20#define COVARIANCE_PLANE_FIT_REQUIREMENTS ProvidesPlane<T>
21#define COVARIANCE_PLANE_DER_REQUIREMENTS ProvidesPlane<T>&& Is3D<DataPoint>
36 template <
class DataPo
int,
class _NFilter,
typename T>
37 requires COVARIANCE_PLANE_FIT_REQUIREMENTS
40 PONCA_FITTING_DECLARE_DEFAULT_TYPES
41 PONCA_FITTING_DECLARE_MATRIX_TYPE
45 PONCA_FITTING_DECLARE_FINALIZE
46 PONCA_FITTING_IS_SIGNED(false)
63 bool _isPositionVector = true) const;
74 bool _isPositionVector = true) const;
79 template <class DataPoint, class _NFilter, typename T>
91 template <class DataPoint, class _NFilter,
int DiffType, typename T>
92 requires COVARIANCE_PLANE_DER_REQUIREMENTS
95 PONCA_FITTING_DECLARE_DEFAULT_TYPES
96 PONCA_FITTING_DECLARE_MATRIX_TYPE
97 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
100 ScalarArray m_dDist{ScalarArray::Zero()};
123 template <
class DataPo
int,
class _NFilter,
int DiffType,
typename T>
128#include "covariancePlaneFit.hpp"
Procedure that compute and decompose the covariance matrix of the neighbors positions.
Internal generic class computing the derivatives of covariance matrix computed by covarianceBase.
[CovariancePlaneFit Definition]
CovariancePlaneDerImpl< DataPoint, _NFilter, DiffType, T > & covariancePlaneDer()
CovariancePlaneDerImpl< DataPoint, _NFilter, DiffType, T > & implicitPrimitiveDer()
typename Base::ScalarArray ScalarArray
ScalarArray dPotential() const
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
VectorArray dNormal() const
Returns the derivatives of the primitive normal.
Plane fitting procedure using only points position.
CovariancePlaneFitImpl< DataPoint, _NFilter, T > & covariancePlaneFit()
CovariancePlaneFitImpl< DataPoint, _NFilter, T > & tangentPlaneBasis()
VectorType tangentPlaneToWorld(const VectorType &_q, bool _isPositionVector=true) const
VectorType worldToTangentPlane(const VectorType &_q, bool _isPositionVector=true) const
typename Base::VectorType VectorType
Compute the barycenter of the input points.
Implicit hyperplane defined by an homogeneous vector .
This Source Code Form is subject to the terms of the Mozilla Public License, v.
CovariancePlaneFitImpl< DataPoint, _NFilter, CovarianceBase< DataPoint, _NFilter, MeanPosition< DataPoint, _NFilter, Plane< DataPoint, _NFilter, T > > > > CovariancePlaneFit
Helper alias for Plane fitting on 3D points using CovariancePlaneFitImpl [CovariancePlaneFit Definiti...
DiffType
Flags defining which derivatives need to be computed.
CovariancePlaneDerImpl< DataPoint, _NFilter, DiffType, CovarianceDer< DataPoint, _NFilter, DiffType, MeanPositionDer< DataPoint, _NFilter, DiffType, T > > > CovariancePlaneDer
Helper alias for Plane fitting on 3D points using CovariancePlaneFitImpl.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns).