Ponca  8e4373a7fc557bbfb1afb9210d70f03872388d04
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, 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, _NFilter, DiffType, T >:
+ Collaboration diagram for Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Alias to scalar type.
 
using VectorType = typename Base::VectorType
 Alias to vector type.
 
using NeighborFilter = typename Base::NeighborFilter
 Alias to the filter applied on the neighbors.
 
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, _NFilter, DiffType, T > & projectedNormalCovarianceCurvature ()
 Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.
 
const ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T > & projectedNormalCovarianceCurvature () const
 Explicit conversion to ProjectedNormalCovarianceCurvatureEstimator , to access methods potentially hidden by heritage.
 
void init ()
 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 {Vector2::Zero()}
 Gravity center.
 
Mat22 m_cov {Mat22::Zero()}
 Covariance matrix.
 
PASS m_pass {FIRST_PASS}
 Current pass.
 
Mat32 m_tframe {Mat32::Zero()}
 Tangent frame.
 
Solver m_solver
 Solver used to analyse the covariance matrix.
 

Detailed Description

template<class DataPoint, class _NFilter, int DiffType, typename T>
class Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, 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 124 of file curvatureEstimation.h.

Member Typedef Documentation

◆ Base

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

Base class of the procedure.

Definition at line 129 of file curvatureEstimation.h.

◆ Index

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

Definition at line 153 of file curvatureEstimation.h.

◆ Mat22

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

Definition at line 150 of file curvatureEstimation.h.

◆ Mat32

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

Definition at line 151 of file curvatureEstimation.h.

◆ MatrixType

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

Alias to matrix type.

Definition at line 130 of file curvatureEstimation.h.

◆ NeighborFilter

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

Alias to the filter applied on the neighbors.

Definition at line 129 of file curvatureEstimation.h.

◆ Scalar

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

Alias to scalar type.

Definition at line 129 of file curvatureEstimation.h.

◆ ScalarArray

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

Alias to scalar derivatives array.

Definition at line 131 of file curvatureEstimation.h.

◆ Solver

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

Solver used to analyse the covariance matrix.

Definition at line 155 of file curvatureEstimation.h.

◆ Vector2

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

Definition at line 152 of file curvatureEstimation.h.

◆ VectorArray

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

Alias to vector derivatives array.

Definition at line 131 of file curvatureEstimation.h.

◆ VectorType

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

Alias to vector type.

Definition at line 129 of file curvatureEstimation.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 134 of file curvatureEstimation.h.

◆ PASS

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

Definition at line 141 of file curvatureEstimation.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _NFilter , 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 _NFilter , 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 _NFilter , int DiffType, typename T >
void ProjectedNormalCovarianceCurvatureEstimator::init ( )
inline

Set the evaluation position and reset the internal states.

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

Definition at line 186 of file curvatureEstimation.hpp.

◆ projectedNormalCovarianceCurvature() [1/2]

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

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

Definition at line 165 of file curvatureEstimation.h.

◆ projectedNormalCovarianceCurvature() [2/2]

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

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

Definition at line 165 of file curvatureEstimation.h.

Member Data Documentation

◆ m_cog

template<class DataPoint , class _NFilter , int DiffType, typename T >
Vector2 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T >::m_cog {Vector2::Zero()}
protected

Gravity center.

Definition at line 158 of file curvatureEstimation.h.

◆ m_cov

template<class DataPoint , class _NFilter , int DiffType, typename T >
Mat22 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T >::m_cov {Mat22::Zero()}
protected

Covariance matrix.

Definition at line 159 of file curvatureEstimation.h.

◆ m_pass

template<class DataPoint , class _NFilter , int DiffType, typename T >
PASS Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T >::m_pass {FIRST_PASS}
protected

Current pass.

Definition at line 160 of file curvatureEstimation.h.

◆ m_solver

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

Solver used to analyse the covariance matrix.

Definition at line 162 of file curvatureEstimation.h.

◆ m_tframe

template<class DataPoint , class _NFilter , int DiffType, typename T >
Mat32 Ponca::ProjectedNormalCovarianceCurvatureEstimator< DataPoint, _NFilter, DiffType, T >::m_tframe {Mat32::Zero()}
protected

Tangent frame.

Definition at line 161 of file curvatureEstimation.h.