ConcaveHull (alpha shapes) using libqhull library. More...
#include <pcl/surface/concave_hull.h>
Public Types | |
using | PointCloud = pcl::PointCloud< PointInT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | PointCloudConstPtr = typename PointCloud::ConstPtr |
Public Types inherited from pcl::MeshConstruction< PointInT > | |
using | Ptr = shared_ptr< MeshConstruction< PointInT > > |
using | ConstPtr = shared_ptr< const MeshConstruction< PointInT > > |
Public Types inherited from pcl::PCLSurfaceBase< PointInT > | |
using | Ptr = shared_ptr< PCLSurfaceBase< PointInT > > |
using | ConstPtr = shared_ptr< const PCLSurfaceBase< PointInT > > |
using | KdTree = pcl::search::Search< PointInT > |
using | KdTreePtr = typename KdTree::Ptr |
Public Types inherited from pcl::PCLBase< PointInT > | |
using | PointCloud = pcl::PointCloud< PointInT > |
using | PointCloudPtr = typename PointCloud::Ptr |
using | PointCloudConstPtr = typename PointCloud::ConstPtr |
using | PointIndicesPtr = PointIndices::Ptr |
using | PointIndicesConstPtr = PointIndices::ConstPtr |
Public Member Functions | |
ConcaveHull () | |
Empty constructor. More... |
|
~ConcaveHull () | |
Empty destructor. More... |
|
void | reconstruct (PointCloud &points, std::vector< pcl::Vertices > &polygons) |
Compute a concave hull for all points given. More... |
|
void | reconstruct (PointCloud &output) |
Compute a concave hull for all points given. More... |
|
void | setAlpha (double alpha) |
Set the alpha value, which limits the size of the resultant hull segments (the smaller the more detailed the hull). More... |
|
double | getAlpha () |
Returns the alpha parameter, see setAlpha(). More... |
|
void | setVoronoiCenters (PointCloudPtr voronoi_centers) |
If set, the voronoi cells center will be saved in voronoi_centers More... |
|
void | setKeepInformation (bool value) |
If keep_information_is set to true the convex hull points keep other information like rgb, normals, ... More... |
|
int | getDimension () const |
Returns the dimensionality (2 or 3) of the calculated hull. More... |
|
void | setDimension (int dimension) |
Sets the dimension on the input data, 2D or 3D. More... |
|
void | getHullPointIndices (pcl::PointIndices &hull_point_indices) const |
Retrieve the indices of the input point cloud that for the convex hull. More... |
|
Public Member Functions inherited from pcl::MeshConstruction< PointInT > | |
MeshConstruction () | |
Constructor. More... |
|
~MeshConstruction () | |
Destructor. More... |
|
void | reconstruct (pcl::PolygonMesh &output) override |
Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()> More... |
|
virtual void | reconstruct (std::vector< pcl::Vertices > &polygons) |
Base method for mesh construction for all points given in <setInputCloud (), setIndices ()> More... |
|
Public Member Functions inherited from pcl::PCLSurfaceBase< PointInT > | |
PCLSurfaceBase () | |
Empty constructor. More... |
|
~PCLSurfaceBase () | |
Empty destructor. More... |
|
void | setSearchMethod (const KdTreePtr &tree) |
Provide an optional pointer to a search object. More... |
|
KdTreePtr | getSearchMethod () |
Get a pointer to the search method used. More... |
|
Public Member Functions inherited from pcl::PCLBase< PointInT > | |
PCLBase () | |
Empty constructor. More... |
|
PCLBase (const PCLBase &base) | |
Copy constructor. More... |
|
virtual | ~PCLBase ()=default |
Destructor. More... |
|
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... |
|
const PointCloudConstPtr | getInputCloud () const |
Get a pointer to the input point cloud dataset. More... |
|
virtual void | setIndices (const IndicesPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... |
|
virtual void | setIndices (const IndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... |
|
virtual void | setIndices (const PointIndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... |
|
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. More... |
|
IndicesPtr | getIndices () |
Get a pointer to the vector of indices used. More... |
|
const IndicesConstPtr | getIndices () const |
Get a pointer to the vector of indices used. More... |
|
const PointInT & | operator[] (std::size_t pos) const |
Override PointCloud operator[] to shorten code. More... |
|
Protected Types | |
using | Ptr = shared_ptr< ConcaveHull< PointInT > > |
using | ConstPtr = shared_ptr< const ConcaveHull< PointInT > > |
Protected Member Functions | |
std::string | getClassName () const override |
Class get name method. More... |
|
void | performReconstruction (PointCloud &points, std::vector< pcl::Vertices > &polygons) |
The actual reconstruction method. More... |
|
void | performReconstruction (PolygonMesh &output) override |
Abstract surface reconstruction method. More... |
|
void | performReconstruction (std::vector< pcl::Vertices > &polygons) override |
Abstract surface reconstruction method. More... |
|
Protected Member Functions inherited from pcl::PCLBase< PointInT > | |
bool | initCompute () |
This method should get called before starting the actual computation. More... |
|
bool | deinitCompute () |
This method should get called after finishing the actual computation. More... |
|
Protected Attributes | |
double | alpha_ |
The method accepts facets only if the distance from any vertex to the facet->center (center of the voronoi cell) is smaller than alpha. More... |
|
bool | keep_information_ |
If set to true, the reconstructed point cloud describing the hull is obtained from the original input cloud by performing a nearest neighbor search from Qhull output. More... |
|
PointCloudPtr | voronoi_centers_ |
the centers of the voronoi cells More... |
|
int | dim_ |
the dimensionality of the concave hull More... |
|
pcl::PointIndices | hull_indices_ |
vector containing the point cloud indices of the convex hull points. More... |
|
Protected Attributes inherited from pcl::MeshConstruction< PointInT > | |
bool | check_tree_ |
A flag specifying whether or not the derived reconstruction algorithm needs the search object tree. More... |
|
Protected Attributes inherited from pcl::PCLSurfaceBase< PointInT > | |
KdTreePtr | tree_ |
A pointer to the spatial search object. More... |
|
Protected Attributes inherited from pcl::PCLBase< PointInT > | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... |
|
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... |
|
bool | use_indices_ |
Set to true if point indices are used. More... |
|
bool | fake_indices_ |
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More... |
|
ConcaveHull (alpha shapes) using libqhull library.
Definition at line 55 of file concave_hull.h.
| protected |
Definition at line 59 of file concave_hull.h.
using pcl::ConcaveHull< PointInT >::PointCloud = pcl::PointCloud<PointInT> |
Definition at line 69 of file concave_hull.h.
using pcl::ConcaveHull< PointInT >::PointCloudConstPtr = typename PointCloud::ConstPtr |
Definition at line 71 of file concave_hull.h.
using pcl::ConcaveHull< PointInT >::PointCloudPtr = typename PointCloud::Ptr |
Definition at line 70 of file concave_hull.h.
| protected |
Definition at line 58 of file concave_hull.h.
| inline |
Empty constructor.
Definition at line 74 of file concave_hull.h.
| inline |
Empty destructor.
Definition at line 79 of file concave_hull.h.
| inline |
Returns the alpha parameter, see setAlpha().
Definition at line 111 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::alpha_.
| inlineoverrideprotectedvirtual |
Class get name method.
Reimplemented from pcl::PCLSurfaceBase< PointInT >.
Definition at line 167 of file concave_hull.h.
Referenced by pcl::ConcaveHull< PointInT >::setDimension().
| inline |
Returns the dimensionality (2 or 3) of the calculated hull.
Definition at line 137 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::dim_.
void pcl::ConcaveHull< PointInT >::getHullPointIndices | ( | pcl::PointIndices & | hull_point_indices | ) | const |
Retrieve the indices of the input point cloud that for the convex hull.
[out] | hull_point_indices | The indices of the points forming the point cloud |
Definition at line 618 of file concave_hull.hpp.
| protected |
The actual reconstruction method.
points | the resultant points lying on the concave hull |
polygons | the resultant concave hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
Definition at line 119 of file concave_hull.hpp.
References pcl::compute3DCentroid(), pcl::computeCovarianceMatrixNormalized(), pcl::copyPointCloud(), pcl::demeanPointCloud(), pcl::eigen33(), pcl::PointCloud< PointT >::erase(), pcl::getCircumcircleRadius(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::KdTreeFLANN< PointT, Dist >::nearestKSearch(), pcl::PointCloud< PointT >::points, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::resize(), pcl::KdTreeFLANN< PointT, Dist >::setInputCloud(), pcl::PointCloud< PointT >::size(), pcl::transformPointCloud(), pcl::Vertices::vertices, and pcl::PointCloud< PointT >::width.
| overrideprotectedvirtual |
Abstract surface reconstruction method.
[out] | output | the output polygonal mesh |
Implements pcl::MeshConstruction< PointInT >.
Definition at line 598 of file concave_hull.hpp.
References pcl::PolygonMesh::cloud, pcl::PolygonMesh::polygons, and pcl::toPCLPointCloud2().
| overrideprotectedvirtual |
Abstract surface reconstruction method.
[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 610 of file concave_hull.hpp.
void pcl::ConcaveHull< PointInT >::reconstruct | ( | PointCloud & | output | ) |
Compute a concave hull for all points given.
Software License Agreement (BSD License)
output | the resultant concave hull vertices |
Point Cloud Library (PCL) - www.pointclouds.org Copyright (c) 2010-2011, Willow Garage, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
$Id$
Definition at line 59 of file concave_hull.hpp.
References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
void pcl::ConcaveHull< PointInT >::reconstruct | ( | PointCloud & | points, |
std::vector< pcl::Vertices > & | polygons | ||
) |
Compute a concave hull for all points given.
points | the resultant points lying on the concave hull |
polygons | the resultant concave hull polygons, as a set of vertices. The Vertices structure contains an array of point indices. |
Definition at line 88 of file concave_hull.hpp.
References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
| inline |
Set the alpha value, which limits the size of the resultant hull segments (the smaller the more detailed the hull).
alpha | positive, non-zero value, defining the maximum length from a vertex to the facet center (center of the voronoi cell). |
Definition at line 104 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::alpha_.
| inline |
Sets the dimension on the input data, 2D or 3D.
[in] | dimension | The dimension of the input data. If not set, this will be determined automatically. |
Definition at line 146 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::dim_, and pcl::ConcaveHull< PointInT >::getClassName().
| inline |
If keep_information_is set to true the convex hull points keep other information like rgb, normals, ...
value | where to keep the information or not, default is false |
Definition at line 130 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::keep_information_.
| inline |
If set, the voronoi cells center will be saved in voronoi_centers
voronoi_centers |
Definition at line 120 of file concave_hull.h.
References pcl::ConcaveHull< PointInT >::voronoi_centers_.
| protected |
The method accepts facets only if the distance from any vertex to the facet->center (center of the voronoi cell) is smaller than alpha.
Definition at line 192 of file concave_hull.h.
Referenced by pcl::ConcaveHull< PointInT >::getAlpha(), and pcl::ConcaveHull< PointInT >::setAlpha().
| protected |
the dimensionality of the concave hull
Definition at line 203 of file concave_hull.h.
Referenced by pcl::ConcaveHull< PointInT >::getDimension(), and pcl::ConcaveHull< PointInT >::setDimension().
| protected |
vector containing the point cloud indices of the convex hull points.
Definition at line 206 of file concave_hull.h.
| protected |
If set to true, the reconstructed point cloud describing the hull is obtained from the original input cloud by performing a nearest neighbor search from Qhull output.
Definition at line 197 of file concave_hull.h.
Referenced by pcl::ConcaveHull< PointInT >::setKeepInformation().
| protected |
the centers of the voronoi cells
Definition at line 200 of file concave_hull.h.
Referenced by pcl::ConcaveHull< PointInT >::setVoronoiCenters().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_concave_hull.html