DGtal
1.5.beta
|
Aim: This class implement an Integral Invariant normal vector estimator. More...
#include <DGtal/geometry/surfaces/estimation/IntegralInvariantNormalVectorEstimator.h>
Data Structures | |
struct | CovarianceMatrix2NormalDirectionFunctor |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< PointPredicate >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CCellFunctor< ShapeSpelFunctor >)) | |
IntegralInvariantNormalVectorEstimator () | |
IntegralInvariantNormalVectorEstimator (ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate) | |
~IntegralInvariantNormalVectorEstimator () | |
IntegralInvariantNormalVectorEstimator (const Self &other) | |
Self & | operator= (const Self &other) |
void | clear () |
Scalar | h () const |
void | attach (ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate) |
void | setParams (const double dRadius) |
template<typename SurfelConstIterator > | |
void | init (const double _h, SurfelConstIterator itb, SurfelConstIterator ite) |
template<typename SurfelConstIterator > | |
Quantity | eval (SurfelConstIterator it) const |
template<typename OutputIterator , typename SurfelConstIterator > | |
OutputIterator | eval (SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator result) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Attributes | |
const KernelSpelFunctor | myKernelFunctor |
Kernel functor (on Spel) More... | |
std::vector< PairIterators > | myKernels |
array of begin/end iterator of shifting masks. More... | |
std::vector< DigitalSet * > | myKernelsSet |
Array of shifting masks. Size = 9 for each shifting (0-adjacent and full kernel included) More... | |
CountedPtr< KernelSupport > | myKernel |
Euclidean kernel. More... | |
CountedPtr< DigitalShapeKernel > | myDigKernel |
Digital kernel. More... | |
CountedConstPtrOrConstPtr< PointPredicate > | myPointPredicate |
Smart pointer (if required) on a point predicate. More... | |
CountedPtr< Domain > | myShapeDomain |
Smart pointer on domain More... | |
CountedPtr< ShapePointFunctor > | myShapePointFunctor |
Smart pointer on functor point -> {0,1}. More... | |
CountedPtr< ShapeSpelFunctor > | myShapeSpelFunctor |
Smart pointer on functor spel -> {0,1}. More... | |
CountedPtr< Convolver > | myConvolver |
Convolver. More... | |
Scalar | myH |
precision of the grid More... | |
Scalar | myRadius |
"digital" radius of the kernel (buy may be non integer). More... | |
Aim: This class implement an Integral Invariant normal vector estimator.
Description of template class 'IntegralInvariantNormalVectorEstimator'
The algorithm we propose uses volume of a kernel (2D: Ball2D, 3D: Ball3D) to approximate the normal vector. To compute the volume, we convolve a kernel around the surface and then count the number of cells belonging the shape. Theorical multigrid convergence is proved, with a convergence speed of O(h^1/3) with hypothesis about the shape geometry and the convolution kernel radius. Experimental results showed a multigrid convergence.
Optimization is available when we give a range of 0-adjacent surfels to the estimator.
TKSpace | a model of CCellularGridSpaceND, the cellular space in which the shape is defined. |
TPointPredicate | a model of concepts::CPointPredicate, a predicate Point -> bool that defines a digital shape as a characteristic function. |
Definition at line 104 of file IntegralInvariantNormalVectorEstimator.h.
typedef Matrix::Component DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Component |
Definition at line 148 of file IntegralInvariantNormalVectorEstimator.h.
typedef SurfelSet::const_iterator DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::ConstIteratorKernel |
Definition at line 123 of file IntegralInvariantNormalVectorEstimator.h.
typedef DigitalSurfaceConvolver<ShapeSpelFunctor, KernelSpelFunctor, KSpace, DigitalShapeKernel> DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Convolver |
Definition at line 145 of file IntegralInvariantNormalVectorEstimator.h.
typedef DigitalSetSelector<Domain, BIG_DS + HIGH_VAR_DS>::Type DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::DigitalSet |
Definition at line 119 of file IntegralInvariantNormalVectorEstimator.h.
typedef GaussDigitizer< Space, EuclideanMinus > DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::DigitalShape |
Definition at line 142 of file IntegralInvariantNormalVectorEstimator.h.
typedef GaussDigitizer< Space, KernelSupport > DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::DigitalShapeKernel |
Definition at line 141 of file IntegralInvariantNormalVectorEstimator.h.
typedef HyperRectDomain<Space> DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Domain |
Definition at line 115 of file IntegralInvariantNormalVectorEstimator.h.
typedef EuclideanShapesMinus< KernelSupport, KernelSupport > DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::EuclideanMinus |
Definition at line 140 of file IntegralInvariantNormalVectorEstimator.h.
typedef functors::ConstValueCell<Value, Spel> DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::KernelSpelFunctor |
Definition at line 138 of file IntegralInvariantNormalVectorEstimator.h.
typedef ImplicitBall<Space> DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::KernelSupport |
Definition at line 139 of file IntegralInvariantNormalVectorEstimator.h.
typedef TKSpace DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::KSpace |
Definition at line 108 of file IntegralInvariantNormalVectorEstimator.h.
typedef Convolver::CovarianceMatrix DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Matrix |
Definition at line 147 of file IntegralInvariantNormalVectorEstimator.h.
typedef Convolver::PairIterators DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::PairIterators |
Definition at line 146 of file IntegralInvariantNormalVectorEstimator.h.
typedef Space::Point DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Point |
Definition at line 116 of file IntegralInvariantNormalVectorEstimator.h.
typedef TPointPredicate DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::PointPredicate |
Definition at line 109 of file IntegralInvariantNormalVectorEstimator.h.
typedef RealVector DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Quantity |
The returned type of the estimator : a real-value vector.
Definition at line 126 of file IntegralInvariantNormalVectorEstimator.h.
typedef Space::RealPoint DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::RealPoint |
Definition at line 117 of file IntegralInvariantNormalVectorEstimator.h.
typedef Space::RealVector DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::RealVector |
Definition at line 118 of file IntegralInvariantNormalVectorEstimator.h.
typedef double DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Scalar |
Definition at line 149 of file IntegralInvariantNormalVectorEstimator.h.
typedef IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate> DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Self |
Definition at line 107 of file IntegralInvariantNormalVectorEstimator.h.
typedef PointFunctorFromPointPredicateAndDomain< PointPredicate, Domain, unsigned int > DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::ShapePointFunctor |
A wrapper around point predicate (functor Point -> bool) that transforms it into a functor Point -> unsigned int (0 or 1).
Definition at line 132 of file IntegralInvariantNormalVectorEstimator.h.
typedef FunctorOnCells< ShapePointFunctor, KSpace > DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::ShapeSpelFunctor |
Adapts the a functor Point -> unsigned int (0 or 1) to a functor Cell -> unsigned int (0 ot 1), where Cell is a spel. Needed by DigitalSurfaceConvolver.
Definition at line 135 of file IntegralInvariantNormalVectorEstimator.h.
typedef KSpace::Space DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Space |
Definition at line 114 of file IntegralInvariantNormalVectorEstimator.h.
typedef KSpace::SCell DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Spel |
Definition at line 120 of file IntegralInvariantNormalVectorEstimator.h.
typedef KSpace::Surfel DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Surfel |
Definition at line 121 of file IntegralInvariantNormalVectorEstimator.h.
typedef KSpace::SurfelSet DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::SurfelSet |
Definition at line 122 of file IntegralInvariantNormalVectorEstimator.h.
typedef int DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::Value |
The type used for convolutions.
Definition at line 128 of file IntegralInvariantNormalVectorEstimator.h.
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::IntegralInvariantNormalVectorEstimator | ( | ) |
Default constructor. The object is invalid. The user needs to call setParams and attach.
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::IntegralInvariantNormalVectorEstimator | ( | ConstAlias< KSpace > | K, |
ConstAlias< PointPredicate > | aPointPredicate | ||
) |
Constructor.
[in] | K | the cellular grid space in which the shape is defined. |
[in] | aPointPredicate | the shape of interest. The alias can be secured if a some counted pointer is handed. |
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::~IntegralInvariantNormalVectorEstimator | ( | ) |
Destructor.
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::IntegralInvariantNormalVectorEstimator | ( | const Self & | other | ) |
Copy constructor.
other | the object to clone. |
void DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::attach | ( | ConstAlias< KSpace > | K, |
ConstAlias< PointPredicate > | aPointPredicate | ||
) |
Attach a shape, defined as a functor spel -> boolean
[in] | K | the cellular grid space in which the shape is defined. |
aPointPredicate | the shape of interest. The alias can be secured if a some counted pointer is handed. |
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellFunctor< ShapeSpelFunctor >) | ) |
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellularGridSpaceND< KSpace >) | ) |
DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT | ( | (concepts::CPointPredicate< PointPredicate >) | ) |
void DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::clear | ( | ) |
Clears the object. It is now invalid.
Quantity DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::eval | ( | SurfelConstIterator | it | ) | const |
– Normal vector –
Compute the integral invariant normal vector at surfel *it of a shape. Not so easy, since II is a symmetric matrix, only directions of eigenvectors are pertinent. Another computation is necessary to obtain the orientation.
SurfelConstIterator | type of Iterator on a Surfel |
[in] | it | iterator pointing on the surfel of the shape where we wish to evaluate the normal vector. |
OutputIterator DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::eval | ( | SurfelConstIterator | itb, |
SurfelConstIterator | ite, | ||
OutputIterator | result | ||
) | const |
– Normal vector –
Compute the integral invariant normal vector from a range of surfels [itb,ite) of a shape. Not so easy, since II is a symmetric matrix, only directions of eigenvectors are pertinent. Another computation is necessary to obtain the orientation. Return the result on an OutputIterator (param).
OutputIterator | type of Iterator of an array of Quantity |
SurfelConstIterator | type of Iterator on a Surfel |
[in] | itb | iterator defining the start of the range of surfels where the normal vector is computed. |
[in] | ite | iterator defining the end of the range of surfels where the normal vector is computed. |
[in] | result | output iterator of results of the computation. |
Scalar DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::h | ( | ) | const |
void DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::init | ( | const double | _h, |
SurfelConstIterator | itb, | ||
SurfelConstIterator | ite | ||
) |
Model of CDigitalSurfaceLocalEstimator. Initialisation.
SurfelConstIterator | any model of forward readable iterator on Surfel. |
[in] | _h | grid size (must be >0). |
[in] | ite | iterator on the first surfel of the surface. |
[in] | itb | iterator after the last surfel of the surface. |
bool DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Self& DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::operator= | ( | const Self & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::deprecated::IntegralInvariantNormalVectorEstimator< TKSpace, TPointPredicate >::setParams | ( | const double | dRadius | ) |
Set specific parameters: the radius of the ball.
[in] | dRadius | the "digital" radius of the kernel (buy may be non integer). |
|
private |
Convolver.
Definition at line 313 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Digital kernel.
Definition at line 308 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
precision of the grid
Definition at line 314 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Euclidean kernel.
Definition at line 307 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Kernel functor (on Spel)
Definition at line 304 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
array of begin/end iterator of shifting masks.
Definition at line 305 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Array of shifting masks. Size = 9 for each shifting (0-adjacent and full kernel included)
Definition at line 306 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Smart pointer (if required) on a point predicate.
Definition at line 309 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
"digital" radius of the kernel (buy may be non integer).
Definition at line 315 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Smart pointer on domain
Definition at line 310 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Smart pointer on functor point -> {0,1}.
Definition at line 311 of file IntegralInvariantNormalVectorEstimator.h.
|
private |
Smart pointer on functor spel -> {0,1}.
Definition at line 312 of file IntegralInvariantNormalVectorEstimator.h.