Simple triangulation/surface reconstruction for organized point clouds. More...
#include <pcl/surface/organized_fast_mesh.h>


Public Types | |
| enum | TriangulationType { TRIANGLE_RIGHT_CUT, TRIANGLE_LEFT_CUT, TRIANGLE_ADAPTIVE_CUT, QUAD_MESH } |
| typedef boost::shared_ptr < OrganizedFastMesh< PointInT > > | Ptr |
| typedef boost::shared_ptr < const OrganizedFastMesh < PointInT > > | ConstPtr |
| typedef pcl::PointCloud < PointInT >::Ptr | PointCloudPtr |
| typedef std::vector < pcl::Vertices > | Polygons |
Public Member Functions | |
| OrganizedFastMesh () | |
| Constructor. | |
| virtual | ~OrganizedFastMesh () |
| Destructor. | |
| void | setMaxEdgeLength (float max_edge_length) |
| Set a maximum edge length. | |
| void | setTrianglePixelSize (int triangle_size) |
| Set the edge length (in pixels) used for constructing the fixed mesh. | |
| void | setTrianglePixelSizeRows (int triangle_size) |
| Set the edge length (in pixels) used for iterating over rows when constructing the fixed mesh. | |
| void | setTrianglePixelSizeColumns (int triangle_size) |
| Set the edge length (in pixels) used for iterating over columns when constructing the fixed mesh. | |
| void | setTriangulationType (TriangulationType type) |
| Set the triangulation type (see TriangulationType). | |
| void | storeShadowedFaces (bool enable) |
| Store shadowed faces or not. | |
Protected Member Functions | |
| void | reconstructPolygons (std::vector< pcl::Vertices > &polygons) |
| Perform the actual polygonal reconstruction. | |
| virtual void | performReconstruction (std::vector< pcl::Vertices > &polygons) |
| Create the surface. | |
| void | performReconstruction (pcl::PolygonMesh &output) |
| Create the surface. | |
| void | addTriangle (int a, int b, int c, int idx, std::vector< pcl::Vertices > &polygons) |
| Add a new triangle to the current polygon mesh. | |
| void | addQuad (int a, int b, int c, int d, int idx, std::vector< pcl::Vertices > &polygons) |
| Add a new quad to the current polygon mesh. | |
| void | resetPointData (const int &point_index, pcl::PolygonMesh &mesh, const float &value=0.0f, int field_x_idx=0, int field_y_idx=1, int field_z_idx=2) |
| Set (all) coordinates of a particular point to the specified value. | |
| bool | isShadowed (const PointInT &point_a, const PointInT &point_b) |
| Check if a point is shadowed by another point. | |
| bool | isValidTriangle (const int &a, const int &b, const int &c) |
| Check if a triangle is valid. | |
| bool | isShadowedTriangle (const int &a, const int &b, const int &c) |
| Check if a triangle is shadowed. | |
| bool | isValidQuad (const int &a, const int &b, const int &c, const int &d) |
| Check if a quad is valid. | |
| bool | isShadowedQuad (const int &a, const int &b, const int &c, const int &d) |
| Check if a triangle is shadowed. | |
| void | makeQuadMesh (std::vector< pcl::Vertices > &polygons) |
| Create a quad mesh. | |
| void | makeRightCutMesh (std::vector< pcl::Vertices > &polygons) |
| Create a right cut mesh. | |
| void | makeLeftCutMesh (std::vector< pcl::Vertices > &polygons) |
| Create a left cut mesh. | |
| void | makeAdaptiveCutMesh (std::vector< pcl::Vertices > &polygons) |
| Create an adaptive cut mesh. | |
Protected Attributes | |
| float | max_edge_length_squared_ |
| max (squared) length of edge | |
| int | triangle_pixel_size_rows_ |
| size of triangle edges (in pixels) for iterating over rows. | |
| int | triangle_pixel_size_columns_ |
| size of triangle edges (in pixels) for iterating over columns | |
| TriangulationType | triangulation_type_ |
| Type of meshing scheme (quads vs. | |
| bool | store_shadowed_faces_ |
| Whether or not shadowed faces are stored, e.g., for exploration. | |
| float | cos_angle_tolerance_ |
| (Cosine of the) angle tolerance used when checking whether or not an edge between two points is shadowed. | |
Simple triangulation/surface reconstruction for organized point clouds.
Neighboring points (pixels in image space) are connected to construct a triangular (or quad) mesh.
Definition at line 65 of file organized_fast_mesh.h.
| typedef boost::shared_ptr<const OrganizedFastMesh<PointInT> > pcl::OrganizedFastMesh< PointInT >::ConstPtr |
Reimplemented from pcl::MeshConstruction< PointInT >.
Definition at line 69 of file organized_fast_mesh.h.
| typedef pcl::PointCloud<PointInT>::Ptr pcl::OrganizedFastMesh< PointInT >::PointCloudPtr |
Reimplemented from pcl::PCLBase< PointInT >.
Definition at line 74 of file organized_fast_mesh.h.
| typedef std::vector<pcl::Vertices> pcl::OrganizedFastMesh< PointInT >::Polygons |
Definition at line 76 of file organized_fast_mesh.h.
| typedef boost::shared_ptr<OrganizedFastMesh<PointInT> > pcl::OrganizedFastMesh< PointInT >::Ptr |
Reimplemented from pcl::MeshConstruction< PointInT >.
Definition at line 68 of file organized_fast_mesh.h.
| enum pcl::OrganizedFastMesh::TriangulationType |
Definition at line 78 of file organized_fast_mesh.h.
| pcl::OrganizedFastMesh< PointInT >::OrganizedFastMesh | ( | ) | [inline] |
Constructor.
Triangulation type defaults to QUAD_MESH.
Definition at line 87 of file organized_fast_mesh.h.
References pcl::MeshConstruction< PointInT >::check_tree_.
| virtual pcl::OrganizedFastMesh< PointInT >::~OrganizedFastMesh | ( | ) | [inline, virtual] |
Destructor.
Definition at line 99 of file organized_fast_mesh.h.
| void pcl::OrganizedFastMesh< PointInT >::addQuad | ( | int | a, | |
| int | b, | |||
| int | c, | |||
| int | d, | |||
| int | idx, | |||
| std::vector< pcl::Vertices > & | polygons | |||
| ) | [inline, protected] |
Add a new quad to the current polygon mesh.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
| [in] | d | index of the fourth vertex |
| [in] | idx | the index in the set of polygon vertices (assumes idx is valid in polygons) |
| [out] | polygons | the polygon mesh to be updated |
Definition at line 227 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::makeQuadMesh().
| void pcl::OrganizedFastMesh< PointInT >::addTriangle | ( | int | a, | |
| int | b, | |||
| int | c, | |||
| int | idx, | |||
| std::vector< pcl::Vertices > & | polygons | |||
| ) | [inline, protected] |
Add a new triangle to the current polygon mesh.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
| [in] | idx | the index in the set of polygon vertices (assumes idx is valid in polygons) |
| [out] | polygons | the polygon mesh to be updated |
Definition at line 209 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), and pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh().
| bool pcl::OrganizedFastMesh< PointInT >::isShadowed | ( | const PointInT & | point_a, | |
| const PointInT & | point_b | |||
| ) | [inline, protected] |
Check if a point is shadowed by another point.
| [in] | point_a | the first point |
| [in] | point_b | the second point |
Definition at line 260 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::cos_angle_tolerance_.
Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowedQuad(), and pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle().
| bool pcl::OrganizedFastMesh< PointInT >::isShadowedQuad | ( | const int & | a, | |
| const int & | b, | |||
| const int & | c, | |||
| const int & | d | |||
| ) | [inline, protected] |
Check if a triangle is shadowed.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
| [in] | d | index of the fourth vertex |
Definition at line 325 of file organized_fast_mesh.h.
References pcl::PCLBase< PointInT >::input_, and pcl::OrganizedFastMesh< PointInT >::isShadowed().
Referenced by pcl::OrganizedFastMesh< PointInT >::makeQuadMesh().
| bool pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle | ( | const int & | a, | |
| const int & | b, | |||
| const int & | c | |||
| ) | [inline, protected] |
Check if a triangle is shadowed.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
Definition at line 294 of file organized_fast_mesh.h.
References pcl::PCLBase< PointInT >::input_, and pcl::OrganizedFastMesh< PointInT >::isShadowed().
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), and pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh().
| bool pcl::OrganizedFastMesh< PointInT >::isValidQuad | ( | const int & | a, | |
| const int & | b, | |||
| const int & | c, | |||
| const int & | d | |||
| ) | [inline, protected] |
Check if a quad is valid.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
| [in] | d | index of the fourth vertex |
Definition at line 309 of file organized_fast_mesh.h.
References pcl::PCLBase< PointInT >::input_, and pcl::isFinite().
Referenced by pcl::OrganizedFastMesh< PointInT >::makeQuadMesh().
| bool pcl::OrganizedFastMesh< PointInT >::isValidTriangle | ( | const int & | a, | |
| const int & | b, | |||
| const int & | c | |||
| ) | [inline, protected] |
Check if a triangle is valid.
| [in] | a | index of the first vertex |
| [in] | b | index of the second vertex |
| [in] | c | index of the third vertex |
Definition at line 280 of file organized_fast_mesh.h.
References pcl::PCLBase< PointInT >::input_, and pcl::isFinite().
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), and pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh().
| void pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected] |
Create an adaptive cut mesh.
| [out] | polygons | the resultant mesh |
Definition at line 209 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::addTriangle(), pcl::PCLBase< PointInT >::input_, pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle(), pcl::OrganizedFastMesh< PointInT >::isValidTriangle(), pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_, pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_, and pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.
Referenced by pcl::OrganizedFastMesh< PointInT >::reconstructPolygons().
| void pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected] |
Create a left cut mesh.
| [out] | polygons | the resultant mesh |
Definition at line 168 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::addTriangle(), pcl::PCLBase< PointInT >::input_, pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle(), pcl::OrganizedFastMesh< PointInT >::isValidTriangle(), pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_, pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_, and pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.
Referenced by pcl::OrganizedFastMesh< PointInT >::reconstructPolygons().
| void pcl::OrganizedFastMesh< PointInT >::makeQuadMesh | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected] |
Create a quad mesh.
| [out] | polygons | the resultant mesh |
Definition at line 90 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::addQuad(), pcl::PCLBase< PointInT >::input_, pcl::OrganizedFastMesh< PointInT >::isShadowedQuad(), pcl::OrganizedFastMesh< PointInT >::isValidQuad(), pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_, pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_, and pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.
Referenced by pcl::OrganizedFastMesh< PointInT >::reconstructPolygons().
| void pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected] |
Create a right cut mesh.
| [out] | polygons | the resultant mesh |
Definition at line 127 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::addTriangle(), pcl::PCLBase< PointInT >::input_, pcl::OrganizedFastMesh< PointInT >::isShadowedTriangle(), pcl::OrganizedFastMesh< PointInT >::isValidTriangle(), pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_, pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_, and pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.
Referenced by pcl::OrganizedFastMesh< PointInT >::reconstructPolygons().
| void pcl::OrganizedFastMesh< PointInT >::performReconstruction | ( | pcl::PolygonMesh & | output | ) | [inline, protected, virtual] |
Create the surface.
Simply uses image indices to create an initial polygonal mesh for organized point clouds. indices_ are ignored!
| [out] | output | the resultant polygonal mesh |
Implements pcl::MeshConstruction< PointInT >.
Definition at line 48 of file organized_fast_mesh.hpp.
References pcl::PolygonMesh::cloud, pcl::getFieldIndex(), pcl::PCLBase< PointInT >::input_, pcl::isFinite(), pcl::PolygonMesh::polygons, pcl::OrganizedFastMesh< PointInT >::reconstructPolygons(), and pcl::OrganizedFastMesh< PointInT >::resetPointData().
| void pcl::OrganizedFastMesh< PointInT >::performReconstruction | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected, virtual] |
Create the surface.
| [out] | polygons | the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
Implements pcl::MeshConstruction< PointInT >.
Definition at line 69 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::reconstructPolygons().
| void pcl::OrganizedFastMesh< PointInT >::reconstructPolygons | ( | std::vector< pcl::Vertices > & | polygons | ) | [inline, protected] |
Perform the actual polygonal reconstruction.
| [out] | polygons | the resultant polygons |
Definition at line 76 of file organized_fast_mesh.hpp.
References pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeQuadMesh(), pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh(), pcl::OrganizedFastMesh< PointInT >::QUAD_MESH, pcl::OrganizedFastMesh< PointInT >::TRIANGLE_ADAPTIVE_CUT, pcl::OrganizedFastMesh< PointInT >::TRIANGLE_LEFT_CUT, pcl::OrganizedFastMesh< PointInT >::TRIANGLE_RIGHT_CUT, and pcl::OrganizedFastMesh< PointInT >::triangulation_type_.
Referenced by pcl::OrganizedFastMesh< PointInT >::performReconstruction().
| void pcl::OrganizedFastMesh< PointInT >::resetPointData | ( | const int & | point_index, | |
| pcl::PolygonMesh & | mesh, | |||
| const float & | value = 0.0f, |
|||
| int | field_x_idx = 0, |
|||
| int | field_y_idx = 1, |
|||
| int | field_z_idx = 2 | |||
| ) | [inline, protected] |
Set (all) coordinates of a particular point to the specified value.
| [in] | point_index | index of point |
| [out] | mesh | to modify |
| [in] | value | value to use when re-setting |
| [in] | field_x_idx | the X coordinate of the point |
| [in] | field_y_idx | the Y coordinate of the point |
| [in] | field_z_idx | the Z coordinate of the point |
Definition at line 246 of file organized_fast_mesh.h.
References pcl::PolygonMesh::cloud, pcl::PCLPointCloud2::data, pcl::PCLPointCloud2::fields, and pcl::PCLPointCloud2::point_step.
Referenced by pcl::OrganizedFastMesh< PointInT >::performReconstruction().
| void pcl::OrganizedFastMesh< PointInT >::setMaxEdgeLength | ( | float | max_edge_length | ) | [inline] |
Set a maximum edge length.
TODO: Implement!
| [in] | max_edge_length | the maximum edge length |
Definition at line 105 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::max_edge_length_squared_.
| void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize | ( | int | triangle_size | ) | [inline] |
Set the edge length (in pixels) used for constructing the fixed mesh.
| [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected) |
Definition at line 115 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns(), and pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows().
| void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns | ( | int | triangle_size | ) | [inline] |
Set the edge length (in pixels) used for iterating over columns when constructing the fixed mesh.
| [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected) |
Definition at line 136 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_.
Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize().
| void pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows | ( | int | triangle_size | ) | [inline] |
Set the edge length (in pixels) used for iterating over rows when constructing the fixed mesh.
| [in] | triangle_size | edge length in pixels (Default: 1 = neighboring pixels are connected) |
Definition at line 126 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_.
Referenced by pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSize().
| void pcl::OrganizedFastMesh< PointInT >::setTriangulationType | ( | TriangulationType | type | ) | [inline] |
Set the triangulation type (see TriangulationType).
| [in] | type | quad mesh, triangle mesh with fixed left, right cut, or adaptive cut (splits a quad w.r.t. the depth (z) of the points) |
Definition at line 146 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::triangulation_type_.
| void pcl::OrganizedFastMesh< PointInT >::storeShadowedFaces | ( | bool | enable | ) | [inline] |
Store shadowed faces or not.
| [in] | enable | set to true to store shadowed faces |
Definition at line 155 of file organized_fast_mesh.h.
References pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_.
float pcl::OrganizedFastMesh< PointInT >::cos_angle_tolerance_ [protected] |
(Cosine of the) angle tolerance used when checking whether or not an edge between two points is shadowed.
Definition at line 177 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::isShadowed().
float pcl::OrganizedFastMesh< PointInT >::max_edge_length_squared_ [protected] |
max (squared) length of edge
Definition at line 162 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::setMaxEdgeLength().
bool pcl::OrganizedFastMesh< PointInT >::store_shadowed_faces_ [protected] |
Whether or not shadowed faces are stored, e.g., for exploration.
Definition at line 174 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeQuadMesh(), pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh(), and pcl::OrganizedFastMesh< PointInT >::storeShadowedFaces().
int pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_columns_ [protected] |
size of triangle edges (in pixels) for iterating over columns
Definition at line 168 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeQuadMesh(), pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh(), and pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeColumns().
int pcl::OrganizedFastMesh< PointInT >::triangle_pixel_size_rows_ [protected] |
size of triangle edges (in pixels) for iterating over rows.
Definition at line 165 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::makeAdaptiveCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeLeftCutMesh(), pcl::OrganizedFastMesh< PointInT >::makeQuadMesh(), pcl::OrganizedFastMesh< PointInT >::makeRightCutMesh(), and pcl::OrganizedFastMesh< PointInT >::setTrianglePixelSizeRows().
TriangulationType pcl::OrganizedFastMesh< PointInT >::triangulation_type_ [protected] |
Type of meshing scheme (quads vs.
triangles, left cut vs. right cut ...
Definition at line 171 of file organized_fast_mesh.h.
Referenced by pcl::OrganizedFastMesh< PointInT >::reconstructPolygons(), and pcl::OrganizedFastMesh< PointInT >::setTriangulationType().