DGtal
1.5.beta
|
Aim: This functor estimates normal vector for a collection of surfels using spherical accumulator based Hough voting. More...
#include <DGtal/geometry/surfaces/estimation/estimationFunctors/SphericalHoughNormalVectorEstimator.h>
Public Types | |
typedef TSurfel | Surfel |
typedef TEmbedder | SCellEmbedder |
typedef SCellEmbedder::RealPoint | RealPoint |
typedef RealPoint | Quantity |
typedef SimpleMatrix< double, 3, 3 > | Matrix |
Public Member Functions | |
SphericalHoughNormalVectorEstimator (ConstAlias< SCellEmbedder > anEmbedder, const double h, const double minimalAspectRatio=0.001, const unsigned int nbTrials=100, const unsigned int accumulatorSize=10, const unsigned int nbAccumulators=5) | |
SphericalHoughNormalVectorEstimator ()=delete | |
void | pushSurfel (const Surfel &aSurf, const double aDistance) |
Quantity | eval () |
void | reset () |
Private Member Functions | |
Matrix | randomRotation () const |
Quantity | getNormal (const unsigned int i, const unsigned int j, const unsigned int k, double &aspect) const |
Private Attributes | |
const SCellEmbedder * | myEmbedder |
Alias of the geometrical embedder. More... | |
const double | myH |
Grid step. More... | |
const double | myAspectRatio |
Minimal aspect ratio (norm of the cross-product) to consider a given triangle. More... | |
const unsigned int | myNbTrials |
Number of trials in the neignborhood. More... | |
const unsigned int | mySize |
Size of the accumulator. More... | |
const unsigned int | myNbAccumulators |
Number of randomly shifted spherical accumulators to consider. More... | |
std::vector< RealPoint > | myPoints |
vector of embedded surfels More... | |
std::vector< SphericalAccumulator< RealPoint > > | myAccumulators |
Spherical Accumulators. More... | |
std::vector< Matrix > | myRotations |
Random rotations. More... | |
std::vector< Matrix > | myInverseRotations |
Random inverse rotations. More... | |
Aim: This functor estimates normal vector for a collection of surfels using spherical accumulator based Hough voting.
Description of template class 'SphericalHoughNormalVectorEstimator'
This functors implements [16] algorithm:
To avoid aliasing artefacts of the spherical accumulator, several randomly rotated accumulators are used.
Given a random triple of surfels, a threshold on the triangle aspect ratio can be specified to discard bad aspect triangles (e.g. thin ones).
This functor is a model of concepts::CLocalEstimatorFromSurfelFunctor
TSurfel | type of surfels |
TEmbedder | type of functors which embed surfel to \( \mathbb{R}^3\) |
Definition at line 84 of file SphericalHoughNormalVectorEstimator.h.
typedef SimpleMatrix<double,3,3> DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::Matrix |
Definition at line 92 of file SphericalHoughNormalVectorEstimator.h.
typedef RealPoint DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::Quantity |
Definition at line 91 of file SphericalHoughNormalVectorEstimator.h.
typedef SCellEmbedder::RealPoint DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::RealPoint |
Definition at line 90 of file SphericalHoughNormalVectorEstimator.h.
typedef TEmbedder DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SCellEmbedder |
Definition at line 89 of file SphericalHoughNormalVectorEstimator.h.
typedef TSurfel DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::Surfel |
Definition at line 88 of file SphericalHoughNormalVectorEstimator.h.
|
inline |
Constructor.
[in] | anEmbedder | embedder to map surfel to R^n. |
[in] | h | grid step |
[in] | minimalAspectRatio | the minimal aspect ratio of triangles to be considered in the accumulator (default=0.001). |
[in] | nbTrials | number of random triangles in the neighborhood to consider (default=100). |
[in] | accumulatorSize | size of the spherical accumulators (see SphericalAccumulator, default=10). |
[in] | nbAccumulators | number of randomly rotated spherical accumulators to consider in order to avoid aliasing artefacts. (default=5) |
Definition at line 104 of file SphericalHoughNormalVectorEstimator.h.
References DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myAccumulators, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myInverseRotations, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myNbAccumulators, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myRotations, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::mySize, and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::randomRotation().
|
delete |
Disable default constructor.
|
inline |
Estimate normal vector using spherical accumulator voting.
Definition at line 152 of file SphericalHoughNormalVectorEstimator.h.
References DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::getNormal(), DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myAccumulators, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myAspectRatio, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myInverseRotations, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myNbAccumulators, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myNbTrials, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myPoints, and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myRotations.
|
inlineprivate |
Computes the (unnormalized) normal vector of a triangle defined by triangle (i,j,k). The variable aspect returns the aspect ratio of the triangle.
[in] | i | a first vertex index. |
[in] | j | a second vertex index. |
[in] | k | a third vertex index. |
[out] | aspect | aspect ratio of the triangle. |
Definition at line 268 of file SphericalHoughNormalVectorEstimator.h.
References DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myPoints.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval().
|
inline |
Add the geometrical embedding of a surfel to the point list and update the normal spherical hough voting.
aSurf | a surfel to add |
aDistance | distance of aSurf to the neighborhood boundary (NOT USED HERE) |
Definition at line 138 of file SphericalHoughNormalVectorEstimator.h.
References DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myEmbedder, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myH, and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myPoints.
|
inlineprivate |
Definition at line 215 of file SphericalHoughNormalVectorEstimator.h.
References phi(), and DGtal::SimpleMatrix< TComponent, TM, TN >::setComponent().
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().
|
inline |
Reset the point list.
Definition at line 202 of file SphericalHoughNormalVectorEstimator.h.
References DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myAccumulators, DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myNbAccumulators, and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::myPoints.
|
private |
Spherical Accumulators.
Definition at line 316 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval(), DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::reset(), and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().
|
private |
Minimal aspect ratio (norm of the cross-product) to consider a given triangle.
Definition at line 301 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval().
|
private |
Alias of the geometrical embedder.
Definition at line 295 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::pushSurfel().
|
private |
Grid step.
Definition at line 298 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::pushSurfel().
|
private |
Random inverse rotations.
Definition at line 322 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval(), and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().
|
private |
Number of randomly shifted spherical accumulators to consider.
Definition at line 310 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval(), DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::reset(), and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().
|
private |
Number of trials in the neignborhood.
Definition at line 304 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval().
|
private |
vector of embedded surfels
Definition at line 313 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval(), DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::getNormal(), DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::pushSurfel(), and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::reset().
|
private |
Random rotations.
Definition at line 319 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::eval(), and DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().
|
private |
Size of the accumulator.
Definition at line 307 of file SphericalHoughNormalVectorEstimator.h.
Referenced by DGtal::functors::SphericalHoughNormalVectorEstimator< TSurfel, TEmbedder >::SphericalHoughNormalVectorEstimator().