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

Extension to compute the best fit quadric on 3d points expressed as \(f(u,v)=h\). More...

#include <mongePatch.h>

+ Inheritance diagram for Ponca::MongePatch< DataPoint, _WFunctor, T >:
+ Collaboration diagram for Ponca::MongePatch< DataPoint, _WFunctor, 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 SampleMatrix = Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic >
 
using Vector6 = Eigen::Matrix< Scalar, 6, 1 >
 

Public Member Functions

MongePatch< DataPoint, _WFunctor, T > & mongePatch ()
 Explicit conversion to MongePatch , to access methods potentially hidden by heritage.
 
const MongePatch< DataPoint, _WFunctor, T > & mongePatch () const
 Explicit conversion to MongePatch , 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)
 Add a neighbor to perform the fit.
 
FIT_RESULT finalize ()
 Finalize the procedure.
 
Scalar kMean () const
 Returns an estimate of the mean curvature.
 
Scalar GaussianCurvature () const
 Returns an estimate of the Gaussian curvature.
 
Scalar evalUV (Scalar u, Scalar v) const
 
Scalar potential (const VectorType &_q) const
 Value of the scalar field at the evaluation point.
 
VectorType project (const VectorType &_q) const
 Orthogonal projecting on the patch, such that h = f(u,v)
 
const Scalarh_uu () const
 
const Scalarh_vv () const
 
const Scalarh_uv () const
 
const Scalarh_u () const
 
const Scalarh_v () const
 
const Scalarh_c () const
 

Protected Types

enum  { Check = Base::PROVIDES_PLANE && Base::PROVIDES_TANGENT_PLANE_BASIS }
 
using Base = T
 Base class of the procedure.
 

Protected Attributes

SampleMatrix m_A
 Quadric input samples.
 
Vector6 m_x {Vector6::Zero()}
 Quadric parameters.
 
Vector6 m_b {Vector6::Zero()}
 Observations.
 
bool m_planeIsReady {false}
 

Detailed Description

template<class DataPoint, class _WFunctor, typename T>
class Ponca::MongePatch< DataPoint, _WFunctor, T >

Extension to compute the best fit quadric on 3d points expressed as \(f(u,v)=h\).

Note
This procedure requires at least two passes, the first one for plane fitting, the second one for quadric fitting.
Warning
This class is valid only in 3D.
Note
This class mixes the primitive (MongePatch) and its fitting procedure. Could makes sense to split the two

Definition at line 27 of file mongePatch.h.

Member Typedef Documentation

◆ Base

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::Base = T
protected

Base class of the procedure.

Definition at line 29 of file mongePatch.h.

◆ SampleMatrix

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::SampleMatrix = Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>

Definition at line 35 of file mongePatch.h.

◆ Scalar

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::Scalar = typename DataPoint::Scalar

Alias to scalar type.

Definition at line 29 of file mongePatch.h.

◆ Vector6

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::Vector6 = Eigen::Matrix<Scalar,6,1>

Definition at line 36 of file mongePatch.h.

◆ VectorType

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::VectorType = typename Base::VectorType

Alias to vector type.

Definition at line 29 of file mongePatch.h.

◆ WFunctor

template<class DataPoint , class _WFunctor , typename T >
using Ponca::MongePatch< DataPoint, _WFunctor, T >::WFunctor = typename Base::WFunctor

Alias to weight function.

Definition at line 29 of file mongePatch.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 32 of file mongePatch.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _WFunctor , typename T >
bool MongePatch::addLocalNeighbor ( Scalar  w,
const VectorType localQ,
const DataPoint &  attributes 
)
inline

Add a neighbor to perform the fit.

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

Definition at line 18 of file mongePatch.hpp.

◆ evalUV()

template<class DataPoint , class _WFunctor , typename T >
Scalar Ponca::MongePatch< DataPoint, _WFunctor, T >::evalUV ( Scalar  u,
Scalar  v 
) const
inline

Definition at line 54 of file mongePatch.h.

◆ finalize()

template<class DataPoint , class _WFunctor , typename T >
FIT_RESULT MongePatch::finalize ( )
inline

Finalize the procedure.

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

Definition at line 46 of file mongePatch.hpp.

◆ GaussianCurvature()

template<class DataPoint , class _WFunctor , typename T >
MongePatch< DataPoint, _WFunctor, T >::Scalar MongePatch::GaussianCurvature ( ) const
inline

Returns an estimate of the Gaussian curvature.

Definition at line 84 of file mongePatch.hpp.

◆ h_c()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_c ( ) const
inline

Definition at line 78 of file mongePatch.h.

◆ h_u()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_u ( ) const
inline

Definition at line 76 of file mongePatch.h.

◆ h_uu()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_uu ( ) const
inline

Definition at line 73 of file mongePatch.h.

◆ h_uv()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_uv ( ) const
inline

Definition at line 75 of file mongePatch.h.

◆ h_v()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_v ( ) const
inline

Definition at line 77 of file mongePatch.h.

◆ h_vv()

template<class DataPoint , class _WFunctor , typename T >
const Scalar & Ponca::MongePatch< DataPoint, _WFunctor, T >::h_vv ( ) const
inline

Definition at line 74 of file mongePatch.h.

◆ init()

template<class DataPoint , class _WFunctor , typename T >
void MongePatch::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 7 of file mongePatch.hpp.

◆ kMean()

template<class DataPoint , class _WFunctor , typename T >
MongePatch< DataPoint, _WFunctor, T >::Scalar MongePatch::kMean ( ) const
inline

Returns an estimate of the mean curvature.

Definition at line 73 of file mongePatch.hpp.

◆ mongePatch() [1/2]

template<class DataPoint , class _WFunctor , typename T >
MongePatch< DataPoint, _WFunctor, T > & Ponca::MongePatch< DataPoint, _WFunctor, T >::mongePatch ( )
inline

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

Definition at line 45 of file mongePatch.h.

◆ mongePatch() [2/2]

template<class DataPoint , class _WFunctor , typename T >
const MongePatch< DataPoint, _WFunctor, T > & Ponca::MongePatch< DataPoint, _WFunctor, T >::mongePatch ( ) const
inline

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

Definition at line 45 of file mongePatch.h.

◆ potential()

template<class DataPoint , class _WFunctor , typename T >
Scalar Ponca::MongePatch< DataPoint, _WFunctor, T >::potential ( const VectorType _q) const
inline

Value of the scalar field at the evaluation point.

See also
method #isSigned of the plane fit to check if the sign is reliable

Definition at line 60 of file mongePatch.h.

◆ project()

template<class DataPoint , class _WFunctor , typename T >
VectorType Ponca::MongePatch< DataPoint, _WFunctor, T >::project ( const VectorType _q) const
inline

Orthogonal projecting on the patch, such that h = f(u,v)

Definition at line 66 of file mongePatch.h.

Member Data Documentation

◆ m_A

template<class DataPoint , class _WFunctor , typename T >
SampleMatrix Ponca::MongePatch< DataPoint, _WFunctor, T >::m_A
protected

Quadric input samples.

Definition at line 39 of file mongePatch.h.

◆ m_b

template<class DataPoint , class _WFunctor , typename T >
Vector6 Ponca::MongePatch< DataPoint, _WFunctor, T >::m_b {Vector6::Zero()}
protected

Observations.

Definition at line 41 of file mongePatch.h.

◆ m_planeIsReady

template<class DataPoint , class _WFunctor , typename T >
bool Ponca::MongePatch< DataPoint, _WFunctor, T >::m_planeIsReady {false}
protected

Definition at line 43 of file mongePatch.h.

◆ m_x

template<class DataPoint , class _WFunctor , typename T >
Vector6 Ponca::MongePatch< DataPoint, _WFunctor, T >::m_x {Vector6::Zero()}
protected

Quadric parameters.

Definition at line 40 of file mongePatch.h.