iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::DuplicateRemovalFilter Class Reference

#include <nrt/PointCloud2/Filter/DuplicateRemovalFilter.H>

A filter that removes all points which are considered to be "duplicates".

Often when combining point clouds, such as during registration, there will be several copies of the "same" point since one cloud has been aligned to another.

Keeping all of these points around can complicate algorithms and increase the size of a cloud, so removing them can be useful. This filter removes points excess points which are too close to each other, leaving only a single point behind in some given geometric radius.

The larger the radius, the longer this filter will take to run.

TODO: make this much faster, it's very slow right now

Examples:
tests/test-PointCloud2Filter.C.

Definition at line 58 of file DuplicateRemovalFilter.H.

Inheritance diagram for nrt::DuplicateRemovalFilter:
nrt::FilterBase

Public Member Functions

 DuplicateRemovalFilter (double radius)
 Create a duplicate removal filter that removes duplicates within a radius. More...
 
PointCloud2 filter (PointCloud2 const input)
 Filter the input. More...
 
PointCloud2 filter (PointCloud2 const input, Indices const indices)
 Filter a subset of the input. More...
 
- Public Member Functions inherited from nrt::FilterBase
virtual ~FilterBase ()
 Virtual destruction.
 
template<class Field >
PointCloud2 filter (PointCloud2 const input)
 Force the filter to operate on a specific field, if supported. More...
 
template<class Field >
PointCloud2 filter (PointCloud2 const input, Indices const indices)
 Force the filter to operate on a specific field of a subset, if supported. More...
 

Protected Member Functions

Indices filterImpl (size_t const inputSize, Search &&search, PointCloud2::ConstIterator<> endIter)
 

Constructor & Destructor Documentation

nrt::DuplicateRemovalFilter::DuplicateRemovalFilter ( double  radius)

Create a duplicate removal filter that removes duplicates within a radius.

Parameters
radiusRadius in which to search for duplicate points

Member Function Documentation

PointCloud2 nrt::DuplicateRemovalFilter::filter ( PointCloud2 const  input)
virtual

Filter the input.

Parameters
inputThe cloud to filter
Returns
The filtered point cloud

Implements nrt::FilterBase.

PointCloud2 nrt::DuplicateRemovalFilter::filter ( PointCloud2 const  input,
Indices const  indices 
)
virtual

Filter a subset of the input.

Parameters
inputThe cloud to filter
indicesThe subset to operate on
Returns
The filtered point cloud

Implements nrt::FilterBase.

Indices nrt::DuplicateRemovalFilter::filterImpl ( size_t const  inputSize,
Search &&  search,
PointCloud2::ConstIterator<>  endIter 
)
protected
Parameters
inputSizethe size of the input
searchThe search object
endIterIterator to one past the end of the point cloud
Returns
The indices to remove

The documentation for this class was generated from the following file: