44 k{Parametrizable::get<std::size_t>(
"k")},
45 sigma{Parametrizable::get<T>(
"sigma")},
46 keepNormals{Parametrizable::get<bool>(
"keepNormals")},
47 keepLabels{Parametrizable::get<bool>(
"keepLabels")},
48 keepTensors{Parametrizable::get<bool>(
"keepTensors")}
72 tv.disableBallComponent();
73 tv.cfvote(cloud,
false);
77 Matrix labels = Matrix::Zero(1, nbPts);
78 for(std::size_t i = 0; i < nbPts; ++i)
80 const T lambda1 = tv.surfaceness(i);
81 const T lambda2 = tv.curveness(i);
82 const T lambda3 = tv.pointness(i);
85 Vector coeff = (
Vector(3) << lambda3, (lambda2 - lambda3), (lambda1 - lambda2)).finished();
86 coeff.maxCoeff(&index);
88 labels(i) = index + 1 ;
114 std::cerr <<
"SaliencyDataPointsFilter<T>::inPlaceFilter: Cannot add descriptors to pointcloud" << std::endl;
SaliencyDataPointsFilter(const Parameters ¶ms=Parameters())
unsigned getNbPoints() const
Return the number of points contained in the point cloud.
Parametrizable::Parameters Parameters
Functions and classes that are dependant on scalar type are defined in this templatized class...
A data filter takes a point cloud as input, transforms it, and produces another point cloud as output...
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.
void addDescriptor(const std::string &name, const Matrix &newDescriptor)
Add a descriptor by name, remove first if already exists.