Point Cloud Library (PCL) 1.14.0
|
GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points based on local 2D projections. More...
#include <pcl/surface/gp3.h>
Public Member Functions | |
GreedyProjectionTriangulation ()=default | |
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 () const |
Get the nearest neighbor distance multiplier. | |
void | setMaximumNearestNeighbors (int nnn) |
Set the maximum number of nearest neighbors to be searched for. | |
int | getMaximumNearestNeighbors () const |
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 () const |
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 () const |
Get the parameter for distance based weighting of neighbors. | |
void | setMaximumAngle (double maximum_angle) |
Set the maximum angle each triangle can have. | |
double | getMaximumAngle () const |
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 () const |
Get the maximum surface angle. | |
void | setNormalConsistency (bool consistent) |
Set the flag if the input normals are oriented consistently. | |
bool | getNormalConsistency () const |
Get the flag for consistently oriented normals. | |
void | setConsistentVertexOrdering (bool consistent_ordering) |
Set the flag to order the resulting triangle vertices consistently (positive direction around normal). | |
bool | getConsistentVertexOrdering () const |
Get the flag signaling consistently ordered triangle vertices. | |
std::vector< int > | getPointStates () const |
Get the state of each point after reconstruction. | |
std::vector< int > | getPartIDs () const |
Get the ID of each point after reconstruction. | |
pcl::Indices | getSFN () const |
Get the sfn list. | |
pcl::Indices | getFFN () const |
Get the ffn list. | |
![]() | |
MeshConstruction ()=default | |
Constructor. | |
~MeshConstruction () override=default | |
Destructor. | |
void | reconstruct (pcl::PolygonMesh &output) override |
Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> | |
virtual void | reconstruct (std::vector< pcl::Vertices > &polygons) |
Base method for mesh construction for all points given in <setInputCloud (), setIndices ()> | |
![]() | |
PCLSurfaceBase () | |
Empty constructor. | |
~PCLSurfaceBase () override=default | |
Empty destructor. | |
void | setSearchMethod (const KdTreePtr &tree) |
Provide an optional pointer to a search object. | |
KdTreePtr | getSearchMethod () |
Get a pointer to the search method used. | |
![]() | |
PCLBase () | |
Empty constructor. | |
PCLBase (const PCLBase &base) | |
Copy constructor. | |
virtual | ~PCLBase ()=default |
Destructor. | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. | |
PointCloudConstPtr const | getInputCloud () const |
Get a pointer to the input point cloud dataset. | |
virtual void | setIndices (const IndicesPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. | |
virtual void | setIndices (const IndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. | |
virtual void | setIndices (const PointIndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. | |
virtual void | setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols) |
Set the indices for the points laying within an interest region of the point cloud. | |
IndicesPtr | getIndices () |
Get a pointer to the vector of indices used. | |
IndicesConstPtr const | getIndices () const |
Get a pointer to the vector of indices used. | |
const PointInT & | operator[] (std::size_t pos) const |
Override PointCloud operator[] to shorten code. | |
Protected Attributes | |
double | mu_ {0.0} |
The nearest neighbor distance multiplier to obtain the final search radius. | |
double | search_radius_ {0.0} |
The nearest neighbors search radius for each point and the maximum edge length. | |
int | nnn_ {100} |
The maximum number of nearest neighbors accepted by searching. | |
double | minimum_angle_ {M_PI/18} |
The preferred minimum angle for the triangles. | |
double | maximum_angle_ {2*M_PI/3} |
The maximum angle for the triangles. | |
double | eps_angle_ {M_PI/4} |
Maximum surface angle. | |
bool | consistent_ {false} |
Set this to true if the normals of the input are consistently oriented. | |
bool | consistent_ordering_ {false} |
Set this to true if the output triangle vertices should be consistently oriented. | |
![]() | |
bool | check_tree_ {true} |
A flag specifying whether or not the derived reconstruction algorithm needs the search object tree. | |
![]() | |
KdTreePtr | tree_ |
A pointer to the spatial search object. | |
![]() | |
PointCloudConstPtr | input_ |
The input point cloud dataset. | |
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. | |
bool | use_indices_ |
Set to true if point indices are used. | |
bool | fake_indices_ |
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. | |
Additional Inherited Members | |
![]() | |
bool | initCompute () |
This method should get called before starting the actual computation. | |
bool | deinitCompute () |
This method should get called after finishing the actual computation. | |
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.
PointInT | Point type must have XYZ and normal information, for example pcl::PointNormal or pcl::PointXYZRGBNormal or pcl::PointXYZINormal |
using pcl::GreedyProjectionTriangulation< PointInT >::ConstPtr = shared_ptr<const GreedyProjectionTriangulation<PointInT> > |
using pcl::GreedyProjectionTriangulation< PointInT >::KdTree = pcl::KdTree<PointInT> |
using pcl::GreedyProjectionTriangulation< PointInT >::KdTreePtr = typename KdTree::Ptr |
using pcl::GreedyProjectionTriangulation< PointInT >::PointCloudIn = pcl::PointCloud<PointInT> |
using pcl::GreedyProjectionTriangulation< PointInT >::PointCloudInConstPtr = typename PointCloudIn::ConstPtr |
using pcl::GreedyProjectionTriangulation< PointInT >::PointCloudInPtr = typename PointCloudIn::Ptr |
using pcl::GreedyProjectionTriangulation< PointInT >::Ptr = shared_ptr<GreedyProjectionTriangulation<PointInT> > |
enum pcl::GreedyProjectionTriangulation::GP3Type |
|
default |
Empty constructor.
|
inline |
Get the flag signaling consistently ordered triangle vertices.
Definition at line 245 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::consistent_ordering_.
|
inline |
|
inline |
Get the parameter for distance based weighting of neighbors.
Definition at line 212 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::maximum_angle_.
|
inline |
Get the maximum number of nearest neighbors to be searched for.
Definition at line 179 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::nnn_.
|
inline |
Get the maximum surface angle.
Definition at line 224 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::eps_angle_.
|
inline |
Get the parameter for distance based weighting of neighbors.
Definition at line 201 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::minimum_angle_.
|
inline |
Get the nearest neighbor distance multiplier.
Definition at line 169 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::mu_.
|
inline |
Get the flag for consistently oriented normals.
Definition at line 234 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::consistent_.
|
inline |
|
inline |
|
inline |
Get the sphere radius used for determining the k-nearest neighbors.
Definition at line 190 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::search_radius_.
|
inline |
|
inline |
Set the flag to order the resulting triangle vertices consistently (positive direction around normal).
[in] | consistent_ordering | set it to true if triangle vertices should be ordered consistently |
Definition at line 241 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::consistent_ordering_.
|
inline |
Set the maximum angle each triangle can have.
[in] | maximum_angle | the maximum angle each triangle can have |
Definition at line 208 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::maximum_angle_.
|
inline |
Set the maximum number of nearest neighbors to be searched for.
[in] | nnn | the maximum number of nearest neighbors |
Definition at line 175 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::nnn_.
|
inline |
Don't consider points for triangulation if their normal deviates more than this value from the query point's normal.
[in] | eps_angle | maximum surface angle |
Definition at line 220 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::eps_angle_.
|
inline |
Set the minimum angle each triangle should have.
[in] | minimum_angle | the minimum angle each triangle should have |
Definition at line 197 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::minimum_angle_.
|
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).
[in] | mu | the multiplier |
Definition at line 165 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::mu_.
|
inline |
Set the flag if the input normals are oriented consistently.
[in] | consistent | set it to true if the normals are consistently oriented |
Definition at line 230 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::consistent_.
|
inline |
Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating.
[in] | radius | the sphere radius that is to contain all k-nearest neighbors |
Definition at line 186 of file gp3.h.
References pcl::GreedyProjectionTriangulation< PointInT >::search_radius_.
|
protected |
Set this to true if the normals of the input are consistently oriented.
Definition at line 288 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getNormalConsistency(), and pcl::GreedyProjectionTriangulation< PointInT >::setNormalConsistency().
|
protected |
Set this to true if the output triangle vertices should be consistently oriented.
Definition at line 291 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getConsistentVertexOrdering(), and pcl::GreedyProjectionTriangulation< PointInT >::setConsistentVertexOrdering().
|
protected |
Maximum surface angle.
Definition at line 285 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getMaximumSurfaceAngle(), and pcl::GreedyProjectionTriangulation< PointInT >::setMaximumSurfaceAngle().
|
protected |
The maximum angle for the triangles.
Definition at line 282 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getMaximumAngle(), and pcl::GreedyProjectionTriangulation< PointInT >::setMaximumAngle().
|
protected |
The preferred minimum angle for the triangles.
Definition at line 279 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getMinimumAngle(), and pcl::GreedyProjectionTriangulation< PointInT >::setMinimumAngle().
|
protected |
The nearest neighbor distance multiplier to obtain the final search radius.
Definition at line 270 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getMu(), and pcl::GreedyProjectionTriangulation< PointInT >::setMu().
|
protected |
The maximum number of nearest neighbors accepted by searching.
Definition at line 276 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getMaximumNearestNeighbors(), and pcl::GreedyProjectionTriangulation< PointInT >::setMaximumNearestNeighbors().
|
protected |
The nearest neighbors search radius for each point and the maximum edge length.
Definition at line 273 of file gp3.h.
Referenced by pcl::GreedyProjectionTriangulation< PointInT >::getSearchRadius(), and pcl::GreedyProjectionTriangulation< PointInT >::setSearchRadius().