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);
void setModelType(int model)
The type of model to use (user given parameter).
EuclideanClusterExtraction represents a segmentation class for cluster extraction in an Euclidean sen...
void setNegative(bool negative)
Set whether the regular conditions for points filtering should apply, or the inverted conditions...
void extract(std::vector< PointIndices > &clusters)
Cluster extraction in a PointCloud given by
void filter(PointCloud &output)
void setMaxClusterSize(int max_cluster_size)
Set the maximum number of points that a cluster needs to contain in order to be considered valid...
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
void setMaxIterations(int max_iterations)
Set the maximum number of iterations before giving up.
static const int SAC_RANSAC
void setOptimizeCoefficients(bool optimize)
Set to true if a coefficient refinement is required.
SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models...
void setClusterTolerance(double tolerance)
Set the spatial cluster tolerance as a measure in the L2 Euclidean space.
boost::shared_ptr< ::pcl::ModelCoefficients > Ptr
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.
virtual void segment(PointIndices &inliers, ModelCoefficients &model_coefficients)
Base method for segmentation of a model in a PointCloud given by
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void setDistanceThreshold(double threshold)
Distance to the model threshold (user given parameter).
void setMinClusterSize(int min_cluster_size)
Set the minimum number of points that a cluster needs to contain in order to be considered valid...
ExtractIndices extracts a set of indices from a point cloud.