4 #include <pcl/filters/passthrough.h>
5 #include <pcl/filters/voxel_grid.h>
6 #include <pcl/filters/radius_outlier_removal.h>
12 thresholdDepth (
const PointCloudPtr & input,
float min_depth,
float max_depth)
19 pass_through.
filter (*thresholded);
26 downsample (
const PointCloudPtr & input,
float leaf_size)
30 voxel_grid.
setLeafSize (leaf_size, leaf_size, leaf_size);
32 voxel_grid.
filter (*downsampled);
39 removeOutliers (
const PointCloudPtr & input,
float radius,
int min_neighbors)
46 radius_outlier_removal.
filter (*inliers);
53 applyFilters (
const PointCloudPtr & input,
float min_depth,
float max_depth,
float leaf_size,
float radius,
56 PointCloudPtr filtered;
57 filtered = thresholdDepth (input, min_depth, max_depth);
58 filtered = downsample (filtered, leaf_size);
59 filtered = removeOutliers (filtered, radius, min_neighbors);