Point Cloud Library (PCL)
1.9.1
|
6 #include <pcl/ModelCoefficients.h>
7 #include <pcl/sample_consensus/method_types.h>
8 #include <pcl/sample_consensus/model_types.h>
9 #include <pcl/segmentation/sac_segmentation.h>
10 #include <pcl/filters/extract_indices.h>
11 #include <pcl/segmentation/extract_clusters.h>
27 fitPlane (
const PointCloudPtr & input,
float distance_threshold,
float max_iterations)
40 seg.
segment (*inliers, *coefficients);
42 return (coefficients);
57 findAndSubtractPlane (
const PointCloudPtr & input,
float distance_threshold,
float max_iterations)
69 seg.
segment (*inliers, *coefficients);
93 clusterObjects (
const PointCloudPtr & input,
94 float cluster_tolerance,
int min_cluster_size,
int max_cluster_size,
95 std::vector<pcl::PointIndices> & cluster_indices_out)
103 ec.
extract (cluster_indices_out);
const static int SAC_RANSAC
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.
boost::shared_ptr< ::pcl::ModelCoefficients > Ptr
void setNegative(bool negative)
Set whether the regular conditions for points filtering should apply, or the inverted conditions.
boost::shared_ptr< ::pcl::PointIndices > Ptr
void setMethodType(int method)
The type of sample consensus method to use (user given parameter).
virtual void setIndices(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data.
void setMaxIterations(int max_iterations)
Set the maximum number of iterations before giving up.
void setModelType(int model)
The type of model to use (user given parameter).
virtual void segment(PointIndices &inliers, ModelCoefficients &model_coefficients)
Base method for segmentation of a model in a PointCloud given by <setInputCloud (),...
void setOptimizeCoefficients(bool optimize)
Set to true if a coefficient refinement is required.
void filter(PointCloud &output)
void setDistanceThreshold(double threshold)
Distance to the model threshold (user given parameter).
SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models,...