Point Cloud Library (PCL)
1.10.1
|
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);
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.
void setNegative(bool negative)
Set whether the regular conditions for points filtering should apply, or the inverted conditions.
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).
shared_ptr< ::pcl::PointIndices > Ptr
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.
shared_ptr< ::pcl::ModelCoefficients > Ptr
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,...