OverlapEstimation< MESH_TYPE > Class Template Reference

This class provides a strategy to estimate the overlap percentage of two range maps/point clouds. More...

#include <overlap_estimation.h>

List of all members.

Classes

class  Parameters
 Public class to hold parameters. Used to avoid endless list of parameters inside functions. More...
class  VertexPointerSampler

Public Types

typedef MeshType::CoordType CoordType
typedef MeshType::FaceType FaceType
typedef tri::VertTmark< MeshTypeMarkerVertex
typedef GridStaticPtr
< VertexType, ScalarType
MeshGrid
typedef MESH_TYPE MeshType
typedef MeshType::ScalarType ScalarType
typedef MeshType::VertexIterator VertexIterator
typedef MeshType::VertexPointer VertexPointer
typedef vector< VertexPointer >
::iterator 
VertexPointerIterator
typedef MeshType::VertexType VertexType

Public Member Functions

int Check (Parameters &param)
float Compute (Parameters &param)
bool Init (Parameters &param)
 OverlapEstimation ()
void Paint ()
void SetFix (MeshType &m)
void SetMove (MeshType &m)
 ~OverlapEstimation ()

Private Member Functions

vector< vector< int > > * BucketVertexNormal (typename MESH_TYPE::VertContainer &vert, int bucketDim=30)
bool SampleVertNormalEqualized (vector< typename MESH_TYPE::VertexPointer > &vert, int SampleNum)
void SampleVertUniform (MESH_TYPE &m, vector< typename MESH_TYPE::VertexPointer > &vert, int sampleNum)
void SetupGrid ()

Static Private Member Functions

static int LocRnd (int n)
static math::SubtractiveRingRNGLocRnd ()

Private Attributes

MeshGridgridFix
MarkerVertex markerFunctorFix
MeshTypemFix
MeshTypemMov
vector< vector< int > > * normBuckets

Detailed Description

template<class MESH_TYPE>
class OverlapEstimation< MESH_TYPE >

This class provides a strategy to estimate the overlap percentage of two range maps/point clouds.

This class can be used, for exemple, into an automatic alignment process to check the quality of the transformation found; the idea is that bad alignments should have a small overlap. Two points are considered 'overlapping in the righ way' if they are close (i.e distance is less then consensusDist) and at the same time points' normals match quite well (i.e the angle between them is less then consensusNormalsAngle). The test to compute the overlap is perfomed on a given number of points (2500 is the default) sampled in a normal equalized way (default) or uniformly.

Author:
Francesco Tonarelli

Definition at line 48 of file overlap_estimation.h.


Member Typedef Documentation

template<class MESH_TYPE >
typedef MeshType::CoordType OverlapEstimation< MESH_TYPE >::CoordType

Definition at line 54 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MeshType::FaceType OverlapEstimation< MESH_TYPE >::FaceType

Definition at line 56 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef tri::VertTmark<MeshType> OverlapEstimation< MESH_TYPE >::MarkerVertex

Definition at line 61 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef GridStaticPtr<VertexType, ScalarType > OverlapEstimation< MESH_TYPE >::MeshGrid

Definition at line 60 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MESH_TYPE OverlapEstimation< MESH_TYPE >::MeshType

Definition at line 52 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MeshType::ScalarType OverlapEstimation< MESH_TYPE >::ScalarType

Definition at line 53 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MeshType::VertexIterator OverlapEstimation< MESH_TYPE >::VertexIterator

Definition at line 58 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MeshType::VertexPointer OverlapEstimation< MESH_TYPE >::VertexPointer

Definition at line 57 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef vector<VertexPointer>::iterator OverlapEstimation< MESH_TYPE >::VertexPointerIterator

Definition at line 59 of file overlap_estimation.h.

template<class MESH_TYPE >
typedef MeshType::VertexType OverlapEstimation< MESH_TYPE >::VertexType

Definition at line 55 of file overlap_estimation.h.


Constructor & Destructor Documentation

template<class MESH_TYPE >
OverlapEstimation< MESH_TYPE >::OverlapEstimation (  )  [inline]

Default constructor.

Definition at line 119 of file overlap_estimation.h.

template<class MESH_TYPE >
OverlapEstimation< MESH_TYPE >::~OverlapEstimation (  )  [inline]

Default destructor. Deallocates structures.

Definition at line 121 of file overlap_estimation.h.


Member Function Documentation

template<class MESH_TYPE >
vector<vector<int> >* OverlapEstimation< MESH_TYPE >::BucketVertexNormal ( typename MESH_TYPE::VertContainer &  vert,
int  bucketDim = 30 
) [inline, private]

Buckets normals of the vertexes contained in vert .

Returns:
A vector of vectors containing indexes to vert .

Definition at line 261 of file overlap_estimation.h.

template<class MESH_TYPE >
int OverlapEstimation< MESH_TYPE >::Check ( Parameters param  )  [inline]

Compute the overlap estimation between mFix and mMov.

Parameters:
param A reference to a Parameter class containing all the desidered options to estimate overlap.
Returns:
The number of points that overlap correctly. This number is in the range [0..param.samples] .

Definition at line 178 of file overlap_estimation.h.

template<class MESH_TYPE >
float OverlapEstimation< MESH_TYPE >::Compute ( Parameters param  )  [inline]

Compute the overlap estimation between mFix and mMov.

Parameters:
param A reference to a Parameter class containing all the desidered options to estimate overlap.
Returns:
The percentage of overlap in the range [0..1] .

Definition at line 168 of file overlap_estimation.h.

template<class MESH_TYPE >
bool OverlapEstimation< MESH_TYPE >::Init ( Parameters param  )  [inline]

Initializes structures.

Parameters:
param A reference to a Parameter class containing all the desidered options to estimate overlap.
Returns:
true if everything goes right.

Definition at line 149 of file overlap_estimation.h.

template<class MESH_TYPE >
static int OverlapEstimation< MESH_TYPE >::LocRnd ( int  n  )  [inline, static, private]

Gets a random number in the interval [0..n] . Number is produced by a SubtractiveRingRNG object initialized once for all.

Returns:
A random number in the interval [0..n] .

Definition at line 316 of file overlap_estimation.h.

template<class MESH_TYPE >
static math::SubtractiveRingRNG& OverlapEstimation< MESH_TYPE >::LocRnd (  )  [inline, static, private]

Function to retrieve a static random number generator object.

Returns:
A SubtractiveRingRNG object.

Definition at line 308 of file overlap_estimation.h.

template<class MESH_TYPE >
void OverlapEstimation< MESH_TYPE >::Paint (  )  [inline]

Paint mMov according to the overlap estimation result. Works only if Compute() or Check() have been previously called with Parameters.paint=true .
Legend:

  • red: points overlaps correctly.
  • blue: points are too far to overlap.
  • yellow: points are close, but normals mismatch.

Definition at line 134 of file overlap_estimation.h.

template<class MESH_TYPE >
bool OverlapEstimation< MESH_TYPE >::SampleVertNormalEqualized ( vector< typename MESH_TYPE::VertexPointer > &  vert,
int  SampleNum 
) [inline, private]

Samples the vert vector in a normal equalized way.

Returns:
SampleNum pointers to vertexes sampled in a normal equalized way. Pointers are stored in the vert (i.e it is an in/out parameter).

Definition at line 280 of file overlap_estimation.h.

template<class MESH_TYPE >
void OverlapEstimation< MESH_TYPE >::SampleVertUniform ( MESH_TYPE &  m,
vector< typename MESH_TYPE::VertexPointer > &  vert,
int  sampleNum 
) [inline, private]

Fill the vector vert with sampleNum pointers to vertexes sampled uniformly from mesh m .

Parameters:
m Source mesh.
vert Destination vector.
sampleNum Requested number of vertexes.

Definition at line 252 of file overlap_estimation.h.

template<class MESH_TYPE >
void OverlapEstimation< MESH_TYPE >::SetFix ( MeshType m  )  [inline]

Set the fix mesh mFix.

Definition at line 126 of file overlap_estimation.h.

template<class MESH_TYPE >
void OverlapEstimation< MESH_TYPE >::SetMove ( MeshType m  )  [inline]

Set the move mesh mMov.

Definition at line 128 of file overlap_estimation.h.

template<class MESH_TYPE >
void OverlapEstimation< MESH_TYPE >::SetupGrid (  )  [inline, private]

Put mFix into a grid.

Definition at line 320 of file overlap_estimation.h.


Member Data Documentation

template<class MESH_TYPE >
MeshGrid* OverlapEstimation< MESH_TYPE >::gridFix [private]

Definition at line 114 of file overlap_estimation.h.

template<class MESH_TYPE >
MarkerVertex OverlapEstimation< MESH_TYPE >::markerFunctorFix [private]

Definition at line 115 of file overlap_estimation.h.

template<class MESH_TYPE >
MeshType* OverlapEstimation< MESH_TYPE >::mFix [private]

Definition at line 111 of file overlap_estimation.h.

template<class MESH_TYPE >
MeshType* OverlapEstimation< MESH_TYPE >::mMov [private]

Pointer to mesh mFix.

Definition at line 112 of file overlap_estimation.h.

template<class MESH_TYPE >
vector<vector<int> >* OverlapEstimation< MESH_TYPE >::normBuckets [private]

Pointer to mesh mMov.

Definition at line 113 of file overlap_estimation.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:17 2013