58 return "Subsampling, Normals. This filter decomposes the point-cloud space in boxes, by recursively splitting the cloud through axis-aligned hyperplanes such as to maximize the evenness of the aspect ratio of the box. When the number of points in a box reaches a value knn or lower, the filter computes the center of mass of these points and its normal by taking the eigenvector corresponding to the smallest eigenvalue of all points in the box.";
63 {
"ratio",
"ratio of points to keep with random subsampling. Matrix (normal, density, etc.) will be associated to all points in the same bin.",
"0.5",
"0.0000001",
"1.0", &P::Comp<T>},
64 {
"knn",
"determined how many points are used to compute the normals. Direct link with the rapidity of the computation (large = fast). Technically, limit over which a box is splitted in two",
"7",
"3",
"2147483647", &P::Comp<unsigned>},
65 {
"samplingMethod",
"if set to 0, random subsampling using the parameter ratio. If set to 1, bin subsampling with the resulting number of points being 1/knn.",
"0",
"0",
"1", &P::Comp<unsigned>},
66 {
"maxBoxDim",
"maximum length of a box above which the box is discarded",
"inf"},
67 {
"averageExistingDescriptors",
"whether the filter keep the existing point descriptors and average them or should it drop them",
"1"},
68 {
"keepNormals",
"whether the normals should be added as descriptors to the resulting cloud",
"1"},
69 {
"keepDensities",
"whether the point densities should be added as descriptors to the resulting cloud",
"0"},
70 {
"keepEigenValues",
"whether the eigen values should be added as descriptors to the resulting cloud",
"0"},
71 {
"keepEigenVectors",
"whether the eigen vectors should be added as descriptors to the resulting cloud",
"0"}
88 virtual DataPoints
filter(
const DataPoints& input);
110 descriptors(descriptors),
113 const int pointsCount(features.cols());
114 indices.reserve(pointsCount);
115 for (
int i = 0; i < pointsCount; ++i)
116 indices.push_back(i);
125 bool operator() (
const int& p0,
const int& p1)
127 return buildData.
features(dim, p0) <
133 void buildNew(
BuildData&
data,
const int first,
const int last, Vector&& minValues, Vector&& maxValues)
const;
Parametrizable::ParametersDoc ParametersDoc
void buildNew(BuildData &data, const int first, const int last, Vector &&minValues, Vector &&maxValues) const
CompareDim(const int dim, const BuildData &buildData)
const bool keepEigenValues
PointMatcher< T >::Vector Vector
boost::optional< View > eigenVectors
const bool keepEigenVectors
boost::optional< View > normals
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
PointMatcher< T >::DataPoints::InvalidField InvalidField
virtual ~SamplingSurfaceNormalDataPointsFilter()
Parametrizable::Parameters Parameters
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
const bool averageExistingDescriptors
Functions and classes that are dependant on scalar type are defined in this templatized class...
Sampling surface normals. First decimate the space until there is at most knn points, then find the center of mass and use the points to estimate nromal using eigen-decomposition.
boost::optional< View > eigenValues
boost::optional< View > densities
virtual DataPoints filter(const DataPoints &input)
Parametrizable::ParameterDoc ParameterDoc
std::vector< int > Indices
virtual void inPlaceFilter(DataPoints &cloud)
The documentation of a parameter.
static const std::string description()
BuildData(Matrix &features, Matrix &descriptors)
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. ...
std::vector< ParameterDoc > ParametersDoc
The documentation of all parameters.
Eigen::Block< Matrix > View
A view on a feature or descriptor.
An exception thrown when one tries to access features or descriptors unexisting or of wrong dimension...
PointMatcher< T >::DataPoints DataPoints
PointMatcherSupport::Parametrizable Parametrizable
Parametrizable::InvalidParameter InvalidParameter
const BuildData & buildData
static const ParametersDoc availableParameters()
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
PointMatcher< T >::Matrix Matrix
PM::DataPointsFilter DataPointsFilter
SamplingSurfaceNormalDataPointsFilter(const Parameters ¶ms=Parameters())
const unsigned samplingMethod
void fuseRange(BuildData &data, const int first, const int last) const
PointMatcherSupport::Parametrizable P