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
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"
Aggregator class used to declare specialized structures using CRTP.
Procedure that compute and decompose the covariance matrix of the neighbors positions.
[CovariancePlaneFit Definition]
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
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()
Explicit conversion to CovariancePlaneFitImpl , to access methods potentially hidden by heritage.
CovariancePlaneFitImpl< DataPoint, _NFilter, T > & tangentPlaneBasis()
Explicit conversion to CovariancePlaneFitImpl , to access methods potentially hidden by heritage.
FIT_RESULT finalize()
Finalize the procedure.
VectorType tangentPlaneToWorld(const VectorType &_q, bool _isPositionVector=true) const
Transform a point from the tangent plane [h, u, v]^T to ambient space.
VectorType worldToTangentPlane(const VectorType &_q, bool _isPositionVector=true) const
Express a point in ambient space relatively to the tangent plane.
typename Base::VectorType VectorType
Alias to vector type.
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.
DiffType
Flags defining which derivatives need to be computed.
FIT_RESULT
Enum corresponding to the state of a fitting method (and what the finalize function returns)