Point Cloud Library (PCL)  1.3.1
Classes | Public Types | Public Member Functions
pcl::GreedyProjectionTriangulation Class Reference

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:
Inheritance graph
[legend]
Collaboration diagram for pcl::GreedyProjectionTriangulation:
Collaboration graph
[legend]

List of all members.

Classes

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

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 setMaximumSurfaceAngle (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.
std::vector< int > getSFN ()
 Get the sfn list.
std::vector< int > getFFN ()
 Get the sfn list.
void updateMesh (const PointCloudInConstPtr &update, pcl::PolygonMesh &output)
 update mesh when new point cloud is added without recreating mesh.
void updateMesh (const PointCloudInConstPtr &update, pcl::PolygonMesh &output, pcl::TextureMesh &tex_mesh)
 update texture mesh when new point cloud is added without recreating mesh.
void merge2Meshes (pcl::PolygonMesh &mesh1, pcl::PolygonMesh &mesh2, std::vector< int > state2, std::vector< int > sfn2, std::vector< int > ffn2)
 remove the triangles from the 1st mesh that have neighbors in the 2nd mesh
void removeOverlapTriangles (pcl::PolygonMesh &mesh1, pcl::PolygonMesh &mesh2)
 remove the triangles from the 1st mesh that have neighbors in the 2nd mesh
void reconstruct (pcl::PolygonMesh &output)
 Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
void setSearchMethod (const KdTreePtr &tree)
 Provide a pointer to the search object.
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used.

Detailed Description

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

Member Typedef Documentation

Reimplemented from pcl::SurfaceReconstruction< PointInT >.

Definition at line 153 of file gp3.h.

Reimplemented from pcl::SurfaceReconstruction< PointInT >.

Definition at line 154 of file gp3.h.

Definition at line 156 of file gp3.h.

Definition at line 158 of file gp3.h.

Definition at line 157 of file gp3.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NONE 
FREE 
FRINGE 
BOUNDARY 
COMPLETED 

Definition at line 162 of file gp3.h.


Constructor & Destructor Documentation

pcl::GreedyProjectionTriangulation::GreedyProjectionTriangulation ( ) [inline]

Empty constructor.

Definition at line 171 of file gp3.h.


Member Function Documentation

std::vector<int> pcl::GreedyProjectionTriangulation::getFFN ( ) [inline]

Get the sfn list.

Definition at line 274 of file gp3.h.

double pcl::GreedyProjectionTriangulation::getMaximumAngle ( ) [inline]

Get the parameter for distance based weighting of neighbors.

Definition at line 228 of file gp3.h.

int pcl::GreedyProjectionTriangulation::getMaximumNearestNeighbors ( ) [inline]

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

Definition at line 195 of file gp3.h.

double pcl::GreedyProjectionTriangulation::getMaximumSurfaceAngle ( ) [inline]

Get the maximum surface angle.

Definition at line 240 of file gp3.h.

double pcl::GreedyProjectionTriangulation::getMinimumAngle ( ) [inline]

Get the parameter for distance based weighting of neighbors.

Definition at line 217 of file gp3.h.

double pcl::GreedyProjectionTriangulation::getMu ( ) [inline]

Get the nearest neighbor distance multiplier.

Definition at line 185 of file gp3.h.

bool pcl::GreedyProjectionTriangulation::getNormalConsistency ( ) [inline]

Get the flag for consistently oriented normals.

Definition at line 250 of file gp3.h.

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

Get the ID of each point after reconstruction.

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

Definition at line 262 of file gp3.h.

std::vector<int> pcl::GreedyProjectionTriangulation::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 256 of file gp3.h.

KdTreePtr pcl::SurfaceReconstruction::getSearchMethod ( ) [inline, inherited]

Get a pointer to the search method used.

Definition at line 86 of file reconstruction.h.

double pcl::GreedyProjectionTriangulation::getSearchRadius ( ) [inline]

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

Definition at line 206 of file gp3.h.

std::vector<int> pcl::GreedyProjectionTriangulation::getSFN ( ) [inline]

Get the sfn list.

Definition at line 269 of file gp3.h.

void pcl::GreedyProjectionTriangulation::merge2Meshes ( pcl::PolygonMesh mesh1,
pcl::PolygonMesh mesh2,
std::vector< int >  state2,
std::vector< int >  sfn2,
std::vector< int >  ffn2 
)

remove the triangles from the 1st mesh that have neighbors in the 2nd mesh

Parameters:
polygonMesh1st and 2nd mesh.

Definition at line 1749 of file gp3.hpp.

void pcl::SurfaceReconstruction::reconstruct ( pcl::PolygonMesh output) [inherited]

Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>

Parameters:
outputthe resultant reconstructed surface model
void pcl::GreedyProjectionTriangulation::removeOverlapTriangles ( pcl::PolygonMesh mesh1,
pcl::PolygonMesh mesh2 
)

remove the triangles from the 1st mesh that have neighbors in the 2nd mesh

Parameters:
polygonMesh1st and 2nd mesh.

Definition at line 1631 of file gp3.hpp.

void pcl::GreedyProjectionTriangulation::setMaximumAngle ( double  maximum_angle) [inline]

Set the maximum angle each triangle can have.

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

Definition at line 224 of file gp3.h.

void pcl::GreedyProjectionTriangulation::setMaximumNearestNeighbors ( int  nnn) [inline]

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

Parameters:
nnnthe maximum number of nearest neighbors

Definition at line 191 of file gp3.h.

void pcl::GreedyProjectionTriangulation::setMaximumSurfaceAngle ( 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_anglemaximum 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 236 of file gp3.h.

void pcl::GreedyProjectionTriangulation::setMinimumAngle ( double  minimum_angle) [inline]

Set the minimum angle each triangle should have.

Parameters:
minimum_anglethe 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 213 of file gp3.h.

void pcl::GreedyProjectionTriangulation::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:
muthe multiplier

Definition at line 181 of file gp3.h.

void pcl::GreedyProjectionTriangulation::setNormalConsistency ( bool  consistent) [inline]

Set the flag for consistently oriented normals.

Parameters:
consistentset it to true if the normals are consistently oriented

Definition at line 246 of file gp3.h.

void pcl::SurfaceReconstruction::setSearchMethod ( const KdTreePtr tree) [inline, inherited]

Provide a pointer to the search object.

Parameters:
treea pointer to the spatial search object.

Definition at line 79 of file reconstruction.h.

void pcl::GreedyProjectionTriangulation::setSearchRadius ( double  radius) [inline]

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

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

Definition at line 202 of file gp3.h.

void pcl::GreedyProjectionTriangulation::updateMesh ( const PointCloudInConstPtr update,
pcl::PolygonMesh output 
)

update mesh when new point cloud is added without recreating mesh.

Parameters:
pointcloud update and update mesh output

Definition at line 2740 of file gp3.hpp.

void pcl::GreedyProjectionTriangulation::updateMesh ( const PointCloudInConstPtr update,
pcl::PolygonMesh output,
pcl::TextureMesh tex_mesh 
)

update texture mesh when new point cloud is added without recreating mesh.

Parameters:
pointcloud update and update texture mesh output

Definition at line 3723 of file gp3.hpp.


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