PCL point cloud library (5) — Filters module base class and classification

Table of contents

5.1 Point cloud filtering scheme in PCL 

5.2 Filter base class correlation

(1) Class pcl::Filter< PointT >

(2) Class pcl::Clipper3D< PointT >

(3) Class pcl::FilterIndices< PointT >

5.3 Classification of PCL filtering algorithms

(1) Filter class

(2) Sampling class (mostly used for registration or other post-processing of point clouds)

(3) Space clipper

(4) Others


5.1 Point cloud filtering scheme in PCL 

Reference article: Introduction to concepts and algorithms related to PCL filter module_setleafsize_天天地 mango’s blog-CSDN blog

PCL summarizes several situations that require point cloud filtering. These situations are as follows:

(1) The point cloud data density is irregular and needs to be smoothed.

(2) Outliers need to be removed due to problems such as occlusion.

(3) A large amount of data requires downsampling.

(4) Noise data needs to be removed.

The corresponding method is as follows:

(1) Filter and remove points according to specific given rules.

(2) Modify some attributes of points through common filtering algorithms.

(3) Downsample the data.

5.2 Filter base class correlation

(1) Class pcl::Filter< PointT >

        pcl::Filter<PointT> is the interface for almost all filtering algorithms. In the pcl::Filter<PointT> base class, the most important function is void filter (PointCloud &output) . In our commonly used pcl statistical filtering, voxel Filtering, radius filtering, etc. will all call the filter function of the base class.

The implementation of the filter() function is as follows:

inline void
      filter (PointCloud &output)
      {
        if (!initCompute ())
          return;

        if (input_.get () == &output)  // cloud_in = cloud_out
        {
          PointCloud output_temp;
          applyFilter (output_temp);
          output_temp.header = input_->header;
          output_temp.sensor_origin_ = input_->sensor_origin_;
          output_temp.sensor_orientation_ = input_->sensor_orientation_;
          pcl::copyPointCloud (output_temp, output);
        }
        else
        {
          output.header = input_->header;
          output.sensor_origin_ = input_->sensor_origin_;
          output.sensor_orientation_ = input_->sensor_orientation_;
          applyFilter (output);
        }

        deinitCompute ();
      }

The applyFilter() function is called in filter. The applyFilter() function here is the specific implementation of each filtering algorithm. applyFilter() is a virtual function. It is a pure virtual function in the base class: virtual void applyFilter (PointCloud &output) = 0;, Specific methods are implemented in each filter derived class. Under normal circumstances, a derived class can call the member functions of the base class. It is worth noting here that the base class in turn calls the member functions of the derived class through pure virtual functions.

(2) Class pcl::Clipper3D< PointT >

   Class Clipper3D is the base class for 3D space clipping objects.

(3) Class pcl::FilterIndices< PointT >

   Class FilterIndices is a base class for eliminating point sets that meet certain limits.

5.3 Classification of PCL filtering algorithms

Reference article: pcl filter module architecture analysis and algorithm summary_pcl filter algorithm_xinxiangwangzhi_'s blog-CSDN blog

PCL filtering algorithms are mainly divided into three categories: filtering type, sampling type, spatial clipper, and others

(1) Filter class

◆ Bilateral filtering , fast bilateral filtering, omp accelerated fast bilateral filtering (bilateral filtering in pcl requires the use of intensity information)

bilateral.hpp
fast_bilateral.hpp
fast_bilateral_omp.hpp

◆ Radius filtering

radius_outlier_removal.hpp

◆ Median filter

median_filter.hpp

◆ Statistical filtering

statistical_outlier_removal.hpp

◆ Straight-through filtering, conditional filtering

These two principles are consistent, and they are filtered based on the attributes of points (filed) such as xyz normal line curvature histogram attributes, etc.

passthrough.hpp
conditional_removal.hpp

◆ Model filtering

Set a specific model as a filter and fit it according to the set model (such as line and surface) to extract the point cloud of the model.

model_outlier_removal.hpp

◆ Projection filtering

Set a specific geometric model as a filter and project the point cloud to the model

project_inliers.hpp

◆ Morphological filtering

Open and close point clouds

morphological_filter.hpp

◆ minimum z value sampling

Create a two-dimensional grid for the point cloud and select the point with the smallest z value in the grid, which can be used to analyze multi-echo information and extract the ground surface

grid_minimum.hpp

◆ Local maximum z value sampling

Search the point cloud for radius and delete the point with the largest z value among the nearest neighbors, which can be used to extract the ground

local_maximum.hpp


(2) Sampling class (mostly used for registration or other post-processing of point clouds)

◆ Voxel sampling

4 types of voxel filtering

approximate_voxel_grid.hpp
voxel_grid.hpp
voxel_grid_covariance.hpp ["The Three-Dimensional Normal-Distributions Transform an Efficient Representation for Registration"]
voxel_grid_label.cpp

◆ Uniform sampling

uniform_sampling.hpp

◆ Random sampling

random_sample.hpp

◆ Voxel normal sampling

Divide the input space into grids until each grid contains at most N points, and randomly sample points within each grid. A normal is calculated using N points of each grid. All points sampled within the raster have normals equal to this normal.

sampling_surface_normal.hpp

◆ Normal Space Uniform Sampling (NSS)

Arrange the point cloud in normal space and then uniformly sample the point cloud

normal_space.hpp[“Efficient variants of the ICP algorithm”]

◆ Point cloud sampling based on 6D covariance

The algorithm incrementally adds points to the generated point cloud while trying to keep all 6 eigenvalues ​​of the covariance matrix as close to each other as possible

covariance_sampling.hpp["Geometrically Stable Sampling for the ICP Algorithm"]

◆ Pyramid sampling

A multiscale representation of organized point clouds using an iterative smoothing downsampling algorithm.

pyramid.hpp

(3) Space clipper

◆ Cone cutter

Frustum culling filters points within a frustum given by the camera pose and field of view.

frustum_culling.hpp

◆ Affine transformation 3D bounding box cropper

It is necessary to give an affine transformation matrix, perform affine transformation on the unit bounding box of the origin, and obtain the point cloud in the bounding box after affine transformation.

box_clipper3D.hpp

◆ Flat cutter

plane_clipper3D.hpp

◆ Bounding box clipper

Get the point cloud within the specified bounding box

crop_box.hpp

◆ Convex Hull Cutter

First, build a convex hull to obtain a point cloud on or outside a 3D closed surface or a 2D closed polygon.

crop_hull.hpp

(4) Others

◆ Normal optimization

Each normal is updated with the (weighted) average of all normals in its neighborhood to optimize the estimated normals.

normal_refinement.hpp

◆ Point cloud convolution

convolution.hpp
convolution_3d.hpp

◆ Extract index point cloud

extract_indices.hpp

◆ Estimate the occluded area

voxel_grid_occlusion_estimation.hpp

◆ Remove ghost points that appear on edge discontinuities

shadowpoints.hpp

Guess you like

Origin blog.csdn.net/qq_41921826/article/details/130700603