class mp2p_icp_filters::FilterDecimateAdaptive

Overview

Accepts as input a point cloud layer, voxelizes it, and generates a new point cloud layer with an adaptive sampling.

More than one output layer can be requested (see Parameters::outputs), each one with its own target point count. All of them are then generated from one single voxelization pass over the input, which is the dominant cost, instead of chaining several instances of this filter.

Which point represents each voxel is selected with decimate_method, as in FilterDecimateVoxels. Note though that this filter walks the voxels in several rounds until the desired point count is reached, so:

The voxel walk uses a stride of nVoxels/desired_output_point_count and stops as soon as the requested count is reached, so a stride above 1 means that only one in every stride occupied cells is ever sampled: coverage is a fixed fraction of the scene, and which fraction depends on how many occupied cells the input happens to have. An absolute point count therefore expresses very different sampling densities on a small room and on an open road. Set OutputTarget::maximum_voxel_stride to bound that ratio instead, leaving the absolute count as a floor for sparse inputs.

When built with TBB the input is binned in parallel, but the resulting per-thread grids are merged by voxel key before sampling, so the output does not depend on the number of threads or on how the work was split.

Not compatible with calling from different threads simultaneously for different input point clouds. Use independent instances for each thread if needed.

#include <FilterDecimateAdaptive.h>

class FilterDecimateAdaptive: public mp2p_icp_filters::FilterBase
{
public:
    // structs

    struct Impl;
    struct OutputTarget;
    struct Parameters;

    // fields

    Parameters params;

    // methods

    virtual void filter(mp2p_icp::metric_map_t& inOut) const;
};

Inherited Members

public:
    // methods

    Parameterizable& operator = (const Parameterizable&);
    Parameterizable& operator = (Parameterizable&&);
    virtual void filter(mp2p_icp::metric_map_t& inOut) const = 0;
    FilterBase& operator = (const FilterBase&);
    FilterBase& operator = (FilterBase&&);

Fields

Parameters params

Algorithm parameters

Methods

virtual void filter(mp2p_icp::metric_map_t& inOut) const

See docs above for FilterBase.