Point Cloud Library (PCL)
1.6.0
Main Page
Modules
Namespaces
Classes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
doc
tutorials
content
sources
iros2011
include
segmentation.h
Go to the documentation of this file.
1
#ifndef SEGMENTATION_H
2
#define SEGMENTATION_H
3
4
#include "
typedefs.h
"
5
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
>
12
13
14
/* Use SACSegmentation to find the dominant plane in the scene
15
* Inputs:
16
* input
17
* The input point cloud
18
* max_iterations
19
* The maximum number of RANSAC iterations to run
20
* distance_threshold
21
* The inlier/outlier threshold. Points within this distance
22
* from the hypothesized plane are scored as inliers.
23
* Return: A pointer to the ModelCoefficients (i.e., the 4 coefficients of the plane,
24
* represented in c0*x + c1*y + c2*z + c3 = 0 form)
25
*/
26
pcl::ModelCoefficients::Ptr
27
fitPlane
(
const
PointCloudPtr
& input,
float
distance_threshold,
float
max_iterations)
28
{
29
pcl::ModelCoefficients::Ptr
coefficients;
30
return
(coefficients);
31
}
32
33
/* Use SACSegmentation and an ExtractIndices filter to find the dominant plane and subtract it
34
* Inputs:
35
* input
36
* The input point cloud
37
* max_iterations
38
* The maximum number of RANSAC iterations to run
39
* distance_threshold
40
* The inlier/outlier threshold. Points within this distance
41
* from the hypothesized plane are scored as inliers.
42
* Return: A pointer to a new point cloud which contains only the non-plane points
43
*/
44
PointCloudPtr
45
findAndSubtractPlane
(
const
PointCloudPtr
& input,
float
distance_threshold,
float
max_iterations)
46
{
47
PointCloudPtr
output;
48
return
(output);
49
}
50
51
/* Use EuclidieanClusterExtraction to group a cloud into contiguous clusters
52
* Inputs:
53
* input
54
* The input point cloud
55
* cluster_tolerance
56
* The maximum distance between neighboring points in a cluster
57
* min/max_cluster_size
58
* The minimum and maximum allowable cluster sizes
59
* Return (by reference): a vector of PointIndices containing the points indices in each cluster
60
*/
61
void
62
clusterObjects
(
const
PointCloudPtr
& input,
63
float
cluster_tolerance,
int
min_cluster_size,
int
max_cluster_size,
64
std::vector<pcl::PointIndices> & cluster_indices_out)
65
{
66
}
67
68
#endif
Generated on Sat Aug 24 2013 17:28:28 for Point Cloud Library (PCL) by
1.8.4