DGtal
1.5.beta
|
Aim: This class implement an Integral Invariant estimator which computes for each surfel the covariance matrix of the intersection of the shape with a ball of given radius centered on the surfel. More...
#include <DGtal/geometry/surfaces/estimation/IntegralInvariantCovarianceEstimator.h>
Private Attributes | |
CovarianceMatrixFunctor | myFct |
The covariance matrix functor that transforms the II covariance matrix into a quantity. More... | |
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 (but may be non integer). More... | |
Aim: This class implement an Integral Invariant estimator which computes for each surfel the covariance matrix of the intersection of the shape with a ball of given radius centered on the surfel.
Description of template class 'IntegralInvariantCovarianceEstimator'
The algorithm we propose uses a kernel (2D: Ball2D, 3D: Ball3D) that is moved along the surface. The covariance matrix of this kernel intersected with the shape carries local geometric information. It can be used to compute normal and curvature directions, and curvature values also. 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 confirm the multigrid convergence.
Optimization is available when we give a range of 0-adjacent surfels to the estimator. Note that you should use IntegralInvariantVolumeEstimator instead when trying to estimate the 2D curvature or the mean curvature.
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. |
TCovarianceMatrixFunctor | a model of functor Matrix -> Quantity, that defines how the covariance matrix computed by the Integral Invariant estimator is transformed into e.g. a normal direction, a curvature, etc. Models include IIGeometricFunctors::IINormalDirectionFunctor, IIGeometricFunctors::IITangentDirectionFunctor, IIGeometricFunctors::IIFirstPrincipalDirectionFunctor, IIGeometricFunctors::IISecondPrincipalDirectionFunctor. |
Definition at line 115 of file IntegralInvariantCovarianceEstimator.h.
typedef Matrix::Component DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Component |
Definition at line 160 of file IntegralInvariantCovarianceEstimator.h.
typedef SurfelSet::const_iterator DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::ConstIteratorKernel |
Definition at line 135 of file IntegralInvariantCovarianceEstimator.h.
typedef DigitalSurfaceConvolver<ShapeSpelFunctor, KernelSpelFunctor, KSpace, DigitalShapeKernel> DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Convolver |
Definition at line 157 of file IntegralInvariantCovarianceEstimator.h.
typedef TCovarianceMatrixFunctor DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::CovarianceMatrixFunctor |
Definition at line 121 of file IntegralInvariantCovarianceEstimator.h.
typedef DigitalSetSelector<Domain, BIG_DS + HIGH_VAR_DS>::Type DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::DigitalSet |
Definition at line 131 of file IntegralInvariantCovarianceEstimator.h.
typedef GaussDigitizer< Space, EuclideanMinus > DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::DigitalShape |
Definition at line 154 of file IntegralInvariantCovarianceEstimator.h.
typedef GaussDigitizer< Space, KernelSupport > DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::DigitalShapeKernel |
Definition at line 153 of file IntegralInvariantCovarianceEstimator.h.
typedef HyperRectDomain<Space> DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Domain |
Definition at line 127 of file IntegralInvariantCovarianceEstimator.h.
typedef EuclideanShapesCSG< KernelSupport, KernelSupport > DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::EuclideanMinus |
Definition at line 152 of file IntegralInvariantCovarianceEstimator.h.
typedef functors::ConstValueCell<Value, Spel> DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::KernelSpelFunctor |
Definition at line 150 of file IntegralInvariantCovarianceEstimator.h.
typedef ImplicitBall<Space> DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::KernelSupport |
Definition at line 151 of file IntegralInvariantCovarianceEstimator.h.
typedef TKSpace DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::KSpace |
Definition at line 119 of file IntegralInvariantCovarianceEstimator.h.
typedef Convolver::CovarianceMatrix DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Matrix |
Definition at line 159 of file IntegralInvariantCovarianceEstimator.h.
typedef Convolver::PairIterators DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::PairIterators |
Definition at line 158 of file IntegralInvariantCovarianceEstimator.h.
typedef Space::Point DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Point |
Definition at line 128 of file IntegralInvariantCovarianceEstimator.h.
typedef TPointPredicate DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::PointPredicate |
Definition at line 120 of file IntegralInvariantCovarianceEstimator.h.
typedef CovarianceMatrixFunctor::Quantity DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Quantity |
The returned type of the estimator, depends on the functor.
Definition at line 138 of file IntegralInvariantCovarianceEstimator.h.
typedef Space::RealPoint DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::RealPoint |
Definition at line 129 of file IntegralInvariantCovarianceEstimator.h.
typedef Space::RealVector DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::RealVector |
Definition at line 130 of file IntegralInvariantCovarianceEstimator.h.
typedef double DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Scalar |
Definition at line 161 of file IntegralInvariantCovarianceEstimator.h.
typedef IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor> DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Self |
Definition at line 118 of file IntegralInvariantCovarianceEstimator.h.
typedef functors::PointFunctorFromPointPredicateAndDomain< PointPredicate, Domain, unsigned int > DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::ShapePointFunctor |
A wrapper around point predicate (functor Point -> bool) that transforms it into a functor Point -> unsigned int (0 or 1).
Definition at line 144 of file IntegralInvariantCovarianceEstimator.h.
typedef FunctorOnCells< ShapePointFunctor, KSpace > DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::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 147 of file IntegralInvariantCovarianceEstimator.h.
typedef KSpace::Space DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Space |
Definition at line 126 of file IntegralInvariantCovarianceEstimator.h.
typedef KSpace::SCell DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Spel |
Definition at line 132 of file IntegralInvariantCovarianceEstimator.h.
typedef KSpace::Surfel DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Surfel |
Definition at line 133 of file IntegralInvariantCovarianceEstimator.h.
typedef KSpace::SurfelSet DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::SurfelSet |
Definition at line 134 of file IntegralInvariantCovarianceEstimator.h.
typedef int DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::Value |
The type used for convolutions.
Definition at line 140 of file IntegralInvariantCovarianceEstimator.h.
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::IntegralInvariantCovarianceEstimator | ( | CovarianceMatrixFunctor | fct = CovarianceMatrixFunctor() | ) |
Default constructor. The object is invalid. The user needs to call setParams and attach.
fct | the functor for transforming the covariance matrix into some quantity. If not precised, a default object is instantiated. |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::IntegralInvariantCovarianceEstimator | ( | ConstAlias< KSpace > | K, |
ConstAlias< PointPredicate > | aPointPredicate, | ||
CovarianceMatrixFunctor | fct = CovarianceMatrixFunctor() |
||
) |
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. |
fct | the functor for transforming the covariance matrix into some quantity. If not precised, a default object is instantiated. |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::~IntegralInvariantCovarianceEstimator | ( | ) |
Destructor.
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::IntegralInvariantCovarianceEstimator | ( | const Self & | other | ) |
Copy constructor.
other | the object to clone. |
void DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::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::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellFunctor< ShapeSpelFunctor >) | ) |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellularGridSpaceND< KSpace >) | ) |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CPointPredicate< PointPredicate >) | ) |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< CovarianceMatrixFunctor, Matrix, Quantity >) | ) |
DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::BOOST_STATIC_ASSERT | ( | (concepts::ConceptUtils::SameType< typename Convolver::CovarianceMatrix, typename CovarianceMatrixFunctor::Argument >::value) | ) |
void DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::clear | ( | ) |
Clears the object. It is now invalid.
Quantity DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::eval | ( | SurfelConstIterator | it | ) | const |
– Estimation –
Compute the integral invariant covariance matrix at surfel *it of a shape, then apply the CovarianceMatrixFunctor to extract some geometric information.
SurfelConstIterator | type of Iterator on a Surfel |
[in] | it | iterator pointing on the surfel of the shape where we wish to evaluate some geometric information. |
OutputIterator DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::eval | ( | SurfelConstIterator | itb, |
SurfelConstIterator | ite, | ||
OutputIterator | result | ||
) | const |
– Estimation –
Compute the integral invariant covariance matrix for a range of surfels [itb,ite) on a shape, then apply the CovarianceMatrixFunctor to extract some geometric information. 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 we wish to compute some geometric information. |
[in] | ite | iterator defining the end of the range of surfels where we wish to compute some geometric information. |
[in] | result | output iterator of results of the computation. |
Scalar DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::h | ( | ) | const |
void DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::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. |
Referenced by laplace_sphere().
bool DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Self& DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::operator= | ( | const Self & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::IntegralInvariantCovarianceEstimator< TKSpace, TPointPredicate, TCovarianceMatrixFunctor >::setParams | ( | const double | dRadius | ) |
Set specific parameters: the radius of the ball.
[in] | dRadius | the "digital" radius of the kernel (but may be non integer). |
|
private |
Convolver.
Definition at line 318 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Digital kernel.
Definition at line 313 of file IntegralInvariantCovarianceEstimator.h.
|
private |
The covariance matrix functor that transforms the II covariance matrix into a quantity.
Definition at line 308 of file IntegralInvariantCovarianceEstimator.h.
|
private |
precision of the grid
Definition at line 319 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Euclidean kernel.
Definition at line 312 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Kernel functor (on Spel)
Definition at line 309 of file IntegralInvariantCovarianceEstimator.h.
|
private |
array of begin/end iterator of shifting masks.
Definition at line 310 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Array of shifting masks. Size = 9 for each shifting (0-adjacent and full kernel included)
Definition at line 311 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Smart pointer (if required) on a point predicate.
Definition at line 314 of file IntegralInvariantCovarianceEstimator.h.
|
private |
"digital" radius of the kernel (but may be non integer).
Definition at line 320 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Smart pointer on domain
Definition at line 315 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Smart pointer on functor point -> {0,1}.
Definition at line 316 of file IntegralInvariantCovarianceEstimator.h.
|
private |
Smart pointer on functor spel -> {0,1}.
Definition at line 317 of file IntegralInvariantCovarianceEstimator.h.