Ponca  e26a0e88a45818354616c1a7180bcd203aecad3c
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T > Class Template Reference

Extension to compute curvature values based on a covariance analysis of normal vectors of neighbors projected onto the tangent plane. More...

#include <curvatureEstimation.h>

+ Inheritance diagram for Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >:
+ Collaboration diagram for Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Alias to scalar type.
 
using VectorType = typename Base::VectorType
 Alias to vector type.
 
using WFunctor = typename Base::WFunctor
 Alias to weight function.
 
using MatrixType = typename DataPoint::MatrixType
 Alias to matrix type.
 
using ScalarArray = typename Base::ScalarArray
 Alias to scalar derivatives array.
 
using VectorArray = typename Base::VectorArray
 Alias to vector derivatives array.
 
typedef Eigen::Matrix< Scalar, 2, 2 > Mat22
 
typedef Eigen::Matrix< Scalar, 3, 2 > Mat32
 
typedef Eigen::Matrix< Scalar, 2, 1 > Vector2
 
typedef VectorType::Index Index
 
typedef Eigen::SelfAdjointEigenSolver< Mat22 > Solver
 Solver used to analyse the covariance matrix.
 

Public Member Functions

ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T > & projectedNormalCovarianceCurvature ()
 Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.
 
const ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T > & projectedNormalCovarianceCurvature () const
 Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.
 
void init (const VectorType &_evalPos)
 Set the evaluation position and reset the internal states.
 
bool addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
 Add a neighbor to perform the fit.
 
FIT_RESULT finalize ()
 Finalize the procedure.
 

Protected Types

enum  { Check }
 
enum  PASS : int { FIRST_PASS = 0 , SECOND_PASS , PASS_COUNT }
 
using Base = T
 Base class of the procedure.
 

Protected Attributes

Vector2 m_cog
 Gravity center.
 
Mat22 m_cov
 Covariance matrix.
 
Solver m_solver
 Solver used to analyse the covariance matrix.
 
PASS m_pass
 Current pass.
 
Mat32 m_tframe
 Tangent frame.
 

Detailed Description

template<class DataPoint, class _WFunctor, int DiffType, typename T>
class Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >

Extension to compute curvature values based on a covariance analysis of normal vectors of neighbors projected onto the tangent plane.

A 2D covariance matrix is computed from the projections of normals of the neighbors and the two principal curvature values and directions are given by the eigenvalues and associated eigenvectors of the covariance matrix [3].

Note
This procedure requires two passes, the first one for plane fitting and local frame estimation, and the second one for covariance analysis.
Warning
This class is valid only in 3D.
Not it test suite, to be added !

Definition at line 122 of file curvatureEstimation.h.

Member Typedef Documentation

◆ Base

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Base = T
protected

Base class of the procedure.

Definition at line 127 of file curvatureEstimation.h.

◆ Index

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef VectorType::Index Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Index

Definition at line 151 of file curvatureEstimation.h.

◆ Mat22

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::Matrix<Scalar,2,2> Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Mat22

Definition at line 148 of file curvatureEstimation.h.

◆ Mat32

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::Matrix<Scalar,3,2> Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Mat32

Definition at line 149 of file curvatureEstimation.h.

◆ MatrixType

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::MatrixType = typename DataPoint::MatrixType

Alias to matrix type.

Definition at line 128 of file curvatureEstimation.h.

◆ Scalar

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Scalar = typename DataPoint::Scalar

Alias to scalar type.

Definition at line 127 of file curvatureEstimation.h.

◆ ScalarArray

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::ScalarArray = typename Base::ScalarArray

Alias to scalar derivatives array.

Definition at line 129 of file curvatureEstimation.h.

◆ Solver

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::SelfAdjointEigenSolver<Mat22> Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Solver

Solver used to analyse the covariance matrix.

Definition at line 153 of file curvatureEstimation.h.

◆ Vector2

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::Matrix<Scalar,2,1> Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::Vector2

Definition at line 150 of file curvatureEstimation.h.

◆ VectorArray

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::VectorArray = typename Base::VectorArray

Alias to vector derivatives array.

Definition at line 129 of file curvatureEstimation.h.

◆ VectorType

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::VectorType = typename Base::VectorType

Alias to vector type.

Definition at line 127 of file curvatureEstimation.h.

◆ WFunctor

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::WFunctor = typename Base::WFunctor

Alias to weight function.

Definition at line 127 of file curvatureEstimation.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DataPoint , class _WFunctor , int DiffType, typename T >
anonymous enum
protected

Definition at line 132 of file curvatureEstimation.h.

◆ PASS

template<class DataPoint , class _WFunctor , int DiffType, typename T >
enum Ponca::ProjectedNormalCovarianceCurvatureEstimator::PASS : int
protected

Definition at line 139 of file curvatureEstimation.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
bool ProjectedNormalCovarianceCurvatureEstimator::addLocalNeighbor ( Scalar  w,
const VectorType localQ,
const DataPoint &  attributes,
ScalarArray dw 
)
inline

Add a neighbor to perform the fit.

Returns
false if param nei is not a valid neighbour (weight = 0)

Definition at line 198 of file curvatureEstimation.hpp.

◆ finalize()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
FIT_RESULT ProjectedNormalCovarianceCurvatureEstimator::finalize ( )
inline

Finalize the procedure.

Returns
Fitting Status
Warning
Must be called be for any use of the fitting output

Definition at line 220 of file curvatureEstimation.hpp.

◆ init()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
void ProjectedNormalCovarianceCurvatureEstimator::init ( const VectorType _evalPos)
inline

Set the evaluation position and reset the internal states.

Warning
Must be called be for any computation (but after #setWeightFunc)

Definition at line 186 of file curvatureEstimation.hpp.

◆ projectedNormalCovarianceCurvature() [1/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T > & Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::projectedNormalCovarianceCurvature ( )
inline

Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.

Definition at line 163 of file curvatureEstimation.h.

◆ projectedNormalCovarianceCurvature() [2/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
const ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T > & Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::projectedNormalCovarianceCurvature ( ) const
inline

Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.

Definition at line 163 of file curvatureEstimation.h.

Member Data Documentation

◆ m_cog

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Vector2 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::m_cog
protected

Gravity center.

Definition at line 156 of file curvatureEstimation.h.

◆ m_cov

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Mat22 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::m_cov
protected

Covariance matrix.

Definition at line 157 of file curvatureEstimation.h.

◆ m_pass

template<class DataPoint , class _WFunctor , int DiffType, typename T >
PASS Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::m_pass
protected

Current pass.

Definition at line 159 of file curvatureEstimation.h.

◆ m_solver

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Solver Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::m_solver
protected

Solver used to analyse the covariance matrix.

Definition at line 158 of file curvatureEstimation.h.

◆ m_tframe

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Mat32 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _WFunctor, DiffType, T >::m_tframe
protected

Tangent frame.

Definition at line 160 of file curvatureEstimation.h.