64 throw InvalidField(
"OrientNormalsDataPointsFilter: Error, cannot find normals in descriptors.");
66 throw InvalidField(
"OrientNormalsDataPointsFilter: Error, cannot find observation directions in descriptors.");
70 assert(normals.rows() == observationDirections.rows());
71 const int featDim(cloud.
features.cols());
72 for (
int i = 0; i < featDim; ++i)
75 const Vector vecP = observationDirections.col(i);
76 const Vector vecN = normals.col(i);
77 const double scalar = vecP.dot(vecN);
83 normals.col(i) = -vecN;
88 normals.col(i) = -vecN;
ConstView getDescriptorViewByName(const std::string &name) const
Get a const view on a descriptor by name, throw an exception if it does not exist.
Parametrizable::Parameters Parameters
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
PointMatcher< T >::Vector Vector
OrientNormalsDataPointsFilter(const Parameters ¶ms=Parameters())
Functions and classes that are dependant on scalar type are defined in this templatized class...
bool descriptorExists(const std::string &name) const
Look if a descriptor with a given name exist.
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...
PointMatcher< T >::DataPoints::InvalidField InvalidField
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy...
Matrix features
features of points in the cloud
PM::DataPointsFilter DataPointsFilter
Reorientation of normals.