5 #include <pcl/ModelCoefficients.h>
6 #include <pcl/sample_consensus/method_types.h>
7 #include <pcl/sample_consensus/model_types.h>
8 #include <pcl/segmentation/sac_segmentation.h>
9 #include <pcl/filters/extract_indices.h>
10 #include <pcl/segmentation/extract_clusters.h>
26 fitPlane (
const PointCloudPtr & input,
float distance_threshold,
float max_iterations)
39 seg.
segment (*inliers, *coefficients);
41 return (coefficients);
56 findAndSubtractPlane (
const PointCloudPtr & input,
float distance_threshold,
float max_iterations)
68 seg.
segment (*inliers, *coefficients);
92 clusterObjects (
const PointCloudPtr & input,
93 float cluster_tolerance,
int min_cluster_size,
int max_cluster_size,
94 std::vector<pcl::PointIndices> & cluster_indices_out)
102 ec.
extract (cluster_indices_out);
void filter(Indices &indices)
Calls the filtering method and returns the filtered point cloud indices.
void setNegative(bool negative)
Set whether the regular conditions for points filtering should apply, or the inverted conditions.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
virtual void setIndices(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data.
PointCloud represents the base class in PCL for storing collections of 3D points.
SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models,...
void setMethodType(int method)
The type of sample consensus method to use (user given parameter).
void setMaxIterations(int max_iterations)
Set the maximum number of iterations before giving up.
virtual void segment(PointIndices &inliers, ModelCoefficients &model_coefficients)
Base method for segmentation of a model in a PointCloud given by <setInputCloud (),...
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).
void setOptimizeCoefficients(bool optimize)
Set to true if a coefficient refinement is required.
shared_ptr< ::pcl::ModelCoefficients > Ptr
shared_ptr< ::pcl::PointIndices > Ptr