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