Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

pcl::GreedyProjectionTriangulation< PointInT > Class Template Reference
[Module surface]

GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points based on local 2D projections. More...

#include <pcl/surface/gp3.h>

Inheritance diagram for pcl::GreedyProjectionTriangulation< PointInT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::GreedyProjectionTriangulation< PointInT >:
Collaboration graph
[legend]

List of all members.

Classes

struct  doubleEdge
 Struct for storing the edges starting from a fringe point.
struct  nnAngle
 Struct for storing the angles to nearest neighbors.

Public Types

enum  {
  NONE = -1, FREE = 0, FRINGE = 1, BOUNDARY = 2,
  COMPLETED = 3
}
typedef pcl::KdTree< PointInT > KdTree
typedef pcl::KdTree< PointInT >
::Ptr 
KdTreePtr
typedef pcl::PointCloud< PointInT > PointCloudIn
typedef PointCloudIn::Ptr PointCloudInPtr
typedef PointCloudIn::ConstPtr PointCloudInConstPtr

Public Member Functions

 GreedyProjectionTriangulation ()
 Empty constructor.
void setMu (double mu)
 Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point (this will make the algorithm adapt to different point densities in the cloud).
double getMu ()
 Get the nearest neighbor distance multiplier.
void setMaximumNearestNeighbors (int nnn)
 Set the maximum number of nearest neighbors to be searched for.
int getMaximumNearestNeighbors ()
 Get the maximum number of nearest neighbors to be searched for.
void setSearchRadius (double radius)
 Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating.
double getSearchRadius ()
 Get the sphere radius used for determining the k-nearest neighbors.
void setMinimumAngle (double minimum_angle)
 Set the minimum angle each triangle should have.
double getMinimumAngle ()
 Get the parameter for distance based weighting of neighbors.
void setMaximumAngle (double maximum_angle)
 Set the maximum angle each triangle can have.
double getMaximumAngle ()
 Get the parameter for distance based weighting of neighbors.
void setMaximumSurfaceAgle (double eps_angle)
 Don't consider points for triangulation if their normal deviates more than this value from the query point's normal.
double getMaximumSurfaceAngle ()
 Get the maximum surface angle.
void setNormalConsistency (bool consistent)
 Set the flag for consistently oriented normals.
bool getNormalConsistency ()
 Get the flag for consistently oriented normals.
std::vector< int > getPointStates ()
 Get the state of each point after reconstruction.
std::vector< int > getPartIDs ()
 Get the ID of each point after reconstruction.

Protected Member Functions

int searchForNeighbors (int index, std::vector< int > &indices, std::vector< float > &distances)
 Search for the nnn_ nearest neighbors of a given point.

Protected Attributes

int nnn_
 The maximum number of nearest neighbors accepted by searching.
double mu_
 The nearest neighbor distance multiplier to obtain the final search radius.
double search_radius_
 The nearest neighbors search radius for each point and the maximum edge length.
double minimum_angle_
 The preferred minimum angle for the triangles.
double maximum_angle_
 The maximum angle for the triangles.
double eps_angle_
 Maximum surface angle.
bool consistent_
 Set this to true if the normals of the input are consistently oriented.

Detailed Description

template<typename PointInT>
class pcl::GreedyProjectionTriangulation< PointInT >

GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points based on local 2D projections.

It assumes locally smooth surfaces and relatively smooth transitions between areas with different point densities.

Author:
Zoltan Csaba Marton

Definition at line 135 of file gp3.h.


Member Typedef Documentation

template<typename PointInT >
typedef pcl::KdTree<PointInT> pcl::GreedyProjectionTriangulation< PointInT >::KdTree

Reimplemented from pcl::SurfaceReconstruction< PointInT >.

Definition at line 143 of file gp3.h.

template<typename PointInT >
typedef pcl::KdTree<PointInT>::Ptr pcl::GreedyProjectionTriangulation< PointInT >::KdTreePtr

Reimplemented from pcl::SurfaceReconstruction< PointInT >.

Definition at line 144 of file gp3.h.

template<typename PointInT >
typedef pcl::PointCloud<PointInT> pcl::GreedyProjectionTriangulation< PointInT >::PointCloudIn

Definition at line 146 of file gp3.h.

template<typename PointInT >
typedef PointCloudIn::ConstPtr pcl::GreedyProjectionTriangulation< PointInT >::PointCloudInConstPtr

Definition at line 148 of file gp3.h.

template<typename PointInT >
typedef PointCloudIn::Ptr pcl::GreedyProjectionTriangulation< PointInT >::PointCloudInPtr

Definition at line 147 of file gp3.h.


Member Enumeration Documentation

template<typename PointInT >
anonymous enum
Enumerator:
NONE 
FREE 
FRINGE 
BOUNDARY 
COMPLETED 

Definition at line 152 of file gp3.h.


Constructor & Destructor Documentation

template<typename PointInT >
pcl::GreedyProjectionTriangulation< PointInT >::GreedyProjectionTriangulation (  )  [inline]

Empty constructor.

Definition at line 161 of file gp3.h.


Member Function Documentation

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::getMaximumAngle (  )  [inline]

Get the parameter for distance based weighting of neighbors.

Definition at line 218 of file gp3.h.

template<typename PointInT >
int pcl::GreedyProjectionTriangulation< PointInT >::getMaximumNearestNeighbors (  )  [inline]

Get the maximum number of nearest neighbors to be searched for.

Definition at line 185 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::getMaximumSurfaceAngle (  )  [inline]

Get the maximum surface angle.

Definition at line 230 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::getMinimumAngle (  )  [inline]

Get the parameter for distance based weighting of neighbors.

Definition at line 207 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::getMu (  )  [inline]

Get the nearest neighbor distance multiplier.

Definition at line 175 of file gp3.h.

template<typename PointInT >
bool pcl::GreedyProjectionTriangulation< PointInT >::getNormalConsistency (  )  [inline]

Get the flag for consistently oriented normals.

Definition at line 240 of file gp3.h.

template<typename PointInT >
std::vector<int> pcl::GreedyProjectionTriangulation< PointInT >::getPartIDs (  )  [inline]

Get the ID of each point after reconstruction.

Note:
parts are numbered from 0, a -1 denotes unconnected points

Definition at line 252 of file gp3.h.

template<typename PointInT >
std::vector<int> pcl::GreedyProjectionTriangulation< PointInT >::getPointStates (  )  [inline]

Get the state of each point after reconstruction.

Note:
Options are defined as constants: FREE, FRINGE, COMPLETED, BOUNDARY and NONE

Definition at line 246 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::getSearchRadius (  )  [inline]

Get the sphere radius used for determining the k-nearest neighbors.

Definition at line 196 of file gp3.h.

template<typename PointInT >
int pcl::GreedyProjectionTriangulation< PointInT >::searchForNeighbors ( int  index,
std::vector< int > &  indices,
std::vector< float > &  distances 
) [inline, protected]

Search for the nnn_ nearest neighbors of a given point.

Parameters:
index the index of the query point
indices the resultant vector of indices representing the k-nearest neighbors
distances the resultant distances from the query point to the k-nearest neighbors
Note:
The final neighborhood will be limited by the search radius, but we need the maximal set of neighbors for increasing the chance of determining the direction of the advancing front (see the "source" array) -- adds no overhead.

Definition at line 285 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setMaximumAngle ( double  maximum_angle  )  [inline]

Set the maximum angle each triangle can have.

Parameters:
maximum_angle the maximum angle each triangle can have
Note:
For best results, its value should be around 120 degrees

Definition at line 214 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setMaximumNearestNeighbors ( int  nnn  )  [inline]

Set the maximum number of nearest neighbors to be searched for.

Parameters:
nnn the maximum number of nearest neighbors

Definition at line 181 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setMaximumSurfaceAgle ( double  eps_angle  )  [inline]

Don't consider points for triangulation if their normal deviates more than this value from the query point's normal.

Parameters:
eps_angle maximum surface angle
Note:
As normal estimation methods usually give smooth transitions at sharp edges, this ensures correct triangulation by avoiding connecting points from one side to points from the other through forcing the use of the edge points.

Definition at line 226 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setMinimumAngle ( double  minimum_angle  )  [inline]

Set the minimum angle each triangle should have.

Parameters:
minimum_angle the minimum angle each triangle should have
Note:
As this is a greedy approach, this will have to be violated from time to time

Definition at line 203 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setMu ( double  mu  )  [inline]

Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point (this will make the algorithm adapt to different point densities in the cloud).

Parameters:
mu the multiplier

Definition at line 171 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setNormalConsistency ( bool  consistent  )  [inline]

Set the flag for consistently oriented normals.

Parameters:
consistent set it to true if the normals are consistently oriented

Definition at line 236 of file gp3.h.

template<typename PointInT >
void pcl::GreedyProjectionTriangulation< PointInT >::setSearchRadius ( double  radius  )  [inline]

Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating.

Parameters:
radius the sphere radius that is to contain all k-nearest neighbors
Note:
This distance limits the maximum edge length!

Definition at line 192 of file gp3.h.


Member Data Documentation

template<typename PointInT >
bool pcl::GreedyProjectionTriangulation< PointInT >::consistent_ [protected]

Set this to true if the normals of the input are consistently oriented.

Definition at line 274 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::eps_angle_ [protected]

Maximum surface angle.

Definition at line 271 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::maximum_angle_ [protected]

The maximum angle for the triangles.

Definition at line 268 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::minimum_angle_ [protected]

The preferred minimum angle for the triangles.

Definition at line 265 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::mu_ [protected]

The nearest neighbor distance multiplier to obtain the final search radius.

Definition at line 259 of file gp3.h.

template<typename PointInT >
int pcl::GreedyProjectionTriangulation< PointInT >::nnn_ [protected]

The maximum number of nearest neighbors accepted by searching.

Definition at line 256 of file gp3.h.

template<typename PointInT >
double pcl::GreedyProjectionTriangulation< PointInT >::search_radius_ [protected]

The nearest neighbors search radius for each point and the maximum edge length.

Definition at line 262 of file gp3.h.


The documentation for this class was generated from the following files: