Point Cloud Library (PCL)
1.10.1
|
3 #include <pcl/kdtree/kdtree_flann.h>
4 #include <pcl/surface/mls.h>
5 #include <pcl/surface/convex_hull.h>
6 #include <pcl/surface/concave_hull.h>
7 #include <pcl/surface/gp3.h>
8 #include <pcl/surface/marching_cubes_greedy.h>
18 std::vector<pcl::Vertices>
faces;
21 typedef boost::shared_ptr<Mesh> MeshPtr;
24 smoothPointCloud (
const PointCloudPtr & input,
float radius,
int polynomial_order)
36 mls.reconstruct (*output);
42 computeSurfaceElements (
const PointCloudPtr & input,
float radius,
int polynomial_order)
55 mls.setOutputNormals (normals);
56 mls.reconstruct (*points);
65 computeConvexHull (
const PointCloudPtr & input)
70 MeshPtr output (
new Mesh);
71 convex_hull.
reconstruct (*(output->points), output->faces);
78 computeConcaveHull (
const PointCloudPtr & input,
float alpha)
84 MeshPtr output (
new Mesh);
85 concave_hull.
reconstruct (*(output->points), output->faces);
91 greedyTriangulation (
const SurfaceElementsPtr & surfels,
float radius,
float mu,
int max_nearest_neighbors,
92 float max_surface_angle,
float min_angle,
float max_angle)
101 gpt.setMaximumSurfaceAgle (max_surface_angle);
115 marchingCubesTriangulation (
const SurfaceElementsPtr & surfels,
float leaf_size,
float iso_level)
117 pcl::MarchingCubesGreedy<SurfelT> marching_cubes;
119 marching_cubes.setLeafSize (leaf_size);
120 marching_cubes.setIsoLevel (iso_level);
122 marching_cubes.setInputCloud (surfels);
124 marching_cubes.reconstruct (*output);
void setNormalConsistency(bool consistent)
Set the flag if the input normals are oriented consistently.
void setMinimumAngle(double minimum_angle)
Set the minimum angle each triangle should have.
void setPolynomialOrder(int order)
Set the order of the polynomial to be fit.
MovingLeastSquares represent an implementation of the MLS (Moving Least Squares) algorithm for data s...
void reconstruct(PointCloud &points, std::vector< pcl::Vertices > &polygons)
Compute a concave hull for all points given.
void setMu(double mu)
Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point ...
void setAlpha(double alpha)
Set the alpha value, which limits the size of the resultant hull segments (the smaller the more detai...
void reconstruct(pcl::PolygonMesh &output) override
Base method for surface reconstruction for all points given in <setInputCloud (), setIndices ()>
void setSearchRadius(double radius)
Set the sphere radius that is to be used for determining the k-nearest neighbors used for fitting.
void reconstruct(PointCloud &points, std::vector< pcl::Vertices > &polygons)
Compute a convex hull for all points given.
void setMaximumAngle(double maximum_angle)
Set the maximum angle each triangle can have.
shared_ptr< ::pcl::PolygonMesh > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
void setSearchRadius(double radius)
Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulati...
void setPolynomialFit(bool polynomial_fit)
Sets whether the surface and normal are approximated using a polynomial, or only via tangent estimati...
GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points ...
std::vector< pcl::Vertices > faces
shared_ptr< KdTree< PointT > > Ptr
PCL_DEPRECATED("use pcl::concatenate() instead, but beware of subtle difference in behavior (see documentation)") PCL_EXPORTS bool concatenatePointCloud(const pcl PCL_EXPORTS void copyPointCloud(const pcl::PCLPointCloud2 &cloud_in, const std::vector< int > &indices, pcl::PCLPointCloud2 &cloud_out)
Concatenate two pcl::PCLPointCloud2.
void setSqrGaussParam(double sqr_gauss_param)
Set the parameter used for distance based weighting of neighbors (the square of the search radius wor...
ConvexHull using libqhull library.
void setSearchMethod(const KdTreePtr &tree)
Provide an optional pointer to a search object.
void setSearchMethod(const KdTreePtr &tree)
Provide a pointer to the search object.
ConcaveHull (alpha shapes) using libqhull library.
shared_ptr< KdTreeFLANN< PointT, Dist > > Ptr
void setMaximumNearestNeighbors(int nnn)
Set the maximum number of nearest neighbors to be searched for.