Go to the documentation of this file.
41 PointMatcher<T>::DataPointsFilter(
"MaxDensityDataPointsFilter",
53 inPlaceFilter(output);
67 throw InvalidField(
"MaxDensityDataPointsFilter: Error, no densities found in descriptors.");
70 const int nbPointsIn = cloud.
features.cols();
72 const T lastDensity = densities.maxCoeff();
73 const int nbSaturatedPts = (densities.array() == lastDensity).count();
77 for (
int i = 0; i < nbPointsIn; ++i)
79 const T density(densities(0,i));
80 if (density > maxDensity)
82 const float r = (float)std::rand()/(float)RAND_MAX;
83 float acceptRatio = maxDensity/density;
86 if (density == lastDensity)
88 acceptRatio = acceptRatio * (1-nbSaturatedPts/nbPointsIn);
bool descriptorExists(const std::string &name) const
Look if a descriptor with a given name exist.
Functions and classes that are dependant on scalar type are defined in this templatized class.
MaxDensityDataPointsFilter(const Parameters ¶ms=Parameters())
Constructor, uses parameter interface.
An exception thrown when one tries to access features or descriptors unexisting or of wrong dimension...
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy.
Parametrizable::Parameters Parameters
void setColFrom(Index thisCol, const DataPoints &that, Index thatCol)
Set column thisCol equal to column thatCol of that, copy features and descriptors if any....
Matrix features
features of points in the cloud
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
The superclass of classes that are constructed using generic parameters. This class provides the para...
const M::mapped_type & get(const M &m, const typename M::key_type &k)
Subsampling. Reduce the points number by randomly removing points with a dentsity higher than a tresh...
Eigen::Block< Matrix > View
A view on a feature or descriptor.
void conservativeResize(Index pointCount)
Resize the cloud to pointCount points, conserving existing ones.
ConstView getDescriptorViewByName(const std::string &name) const
Get a const view on a descriptor by name, throw an exception if it does not exist.
mp2p_icp
Author(s):
autogenerated on Thu Dec 26 2024 03:48:12