41 PointMatcher<T>::DataPointsFilter(
"MaxPointCountDataPointsFilter",
47 seed = this->
template get<size_t>(
"seed");
51 seed =
static_cast<size_t>(1);
69 const size_t N =
static_cast<size_t> (cloud.
features.cols() - 1);
79 const size_t idx = j +
static_cast<size_t>((N-j)*(static_cast<float>(std::rand()/static_cast<float>(RAND_MAX))));
82 const auto feat = cloud.
features.col(j);
92 if (cloud.
times.cols() > 0)
94 const auto time = cloud.
times.col(j);
96 cloud.
times.col(idx) = time;
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy...
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
Matrix descriptors
descriptors of points in the cloud, might be empty
MaxPointCountDataPointsFilter(const Parameters ¶ms=Parameters())
Maximum number of points.
Parametrizable::Parameters Parameters
Functions and classes that are dependant on scalar type are defined in this templatized class...
const M::mapped_type & get(const M &m, const typename M::key_type &k)
The superclass of classes that are constructed using generic parameters. This class provides the para...
An exception thrown when one tries to fetch the value of an unexisting parameter. ...
void conservativeResize(Index pointCount)
Resize the cloud to pointCount points, conserving existing ones.
Int64Matrix times
time associated to each points, might be empty
Matrix features
features of points in the cloud