44 # pragma GCC system_header
48 #include <pcl/memory.h>
49 #include <pcl/pcl_base.h>
50 #include <pcl/pcl_macros.h>
51 #include <pcl/search/search.h>
70 const Eigen::Vector4f &point,
71 Eigen::Vector4f &plane_parameters,
float &curvature);
87 float &nx,
float &ny,
float &nz,
float &curvature);
105 template <
typename Po
intInT,
typename Po
intOutT>
114 using Ptr = shared_ptr< Feature<PointInT, PointOutT> >;
115 using ConstPtr = shared_ptr< const Feature<PointInT, PointOutT> >;
126 using SearchMethod = std::function<int (std::size_t, double, pcl::Indices &, std::vector<float> &)>;
127 using SearchMethodSurface = std::function<int (const PointCloudIn &cloud, std::size_t index, double, pcl::Indices &, std::vector<float> &)>;
243 inline const std::string&
269 pcl::Indices &indices, std::vector<float> &distances)
const
271 return (search_method_surface_ (*
input_, index, parameter, indices, distances));
287 pcl::Indices &indices, std::vector<float> &distances)
const
289 return (search_method_surface_ (cloud, index, parameter, indices, distances));
307 template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
320 using Ptr = shared_ptr< FeatureFromNormals<PointInT, PointNT, PointOutT> >;
321 using ConstPtr = shared_ptr< const FeatureFromNormals<PointInT, PointNT, PointOutT> >;
362 template <
typename Po
intInT,
typename Po
intLT,
typename Po
intOutT>
376 using Ptr = shared_ptr< FeatureFromLabels<PointInT, PointLT, PointOutT> >;
377 using ConstPtr = shared_ptr< const FeatureFromLabels<PointInT, PointLT, PointOutT> >;
404 inline PointCloudLConstPtr
438 template <
typename Po
intInT,
typename Po
intRFT>
491 #include <pcl/features/impl/feature.hpp>
void setSearchSurface(const PointCloudInConstPtr &cloud)
Provide a pointer to a dataset to add additional information to estimate the features for every point...
typename Feature< PointInT, PointRFT >::Ptr LRFEstimationPtr
Check if frames_ has been correctly initialized and compute it if needed.
shared_ptr< PointCloud< PointInT > > Ptr
PointCloudLRFConstPtr frames_
A boost shared pointer to the local reference frames.
typename PointCloudLRF::ConstPtr PointCloudLRFConstPtr
PointCloudLConstPtr getInputLabels() const
Get a pointer to the labels of the input XYZ point cloud dataset.
FeatureFromNormals()
Empty constructor.
virtual bool initCompute()
This method should get called before starting the actual computation.
typename KdTree::Ptr KdTreePtr
std::string feature_name_
The feature name.
int k_
The number of K nearest neighbors to use for each point.
PointCloudNConstPtr getInputNormals() const
Get a pointer to the normals of the input XYZ point cloud dataset.
FeatureWithLocalReferenceFrames()
Empty constructor.
void solvePlaneParameters(const Eigen::Matrix3f &covariance_matrix, const Eigen::Vector4f &point, Eigen::Vector4f &plane_parameters, float &curvature)
Solve the eigenvalues and eigenvectors of a given 3x3 covariance matrix, and estimate the least-squar...
virtual bool deinitCompute()
This method should get called after ending the actual computation.
virtual bool initCompute()
This method should get called before starting the actual computation.
typename PointCloudIn::ConstPtr PointCloudInConstPtr
double getSearchParameter() const
Get the internal search parameter.
void setRadiusSearch(double radius)
Set the sphere radius that is to be used for determining the nearest neighbors used for the feature e...
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
const std::string & getClassName() const
Get a string representation of the name of this class.
KdTreePtr tree_
A pointer to the spatial search object.
shared_ptr< const Feature< PointWithRange, Narf36 > > ConstPtr
std::function< int(const PointCloudIn &cloud, std::size_t index, double, pcl::Indices &, std::vector< float > &)> SearchMethodSurface
PointCloudInConstPtr surface_
An input point cloud describing the surface that is to be used for nearest neighbors estimation...
PointCloudInConstPtr getSearchSurface() const
Get a pointer to the surface point cloud dataset.
pcl::PointCloud< PointOutT > PointCloudOut
std::function< int(std::size_t, double, pcl::Indices &, std::vector< float > &)> SearchMethod
int searchForNeighbors(std::size_t index, double parameter, pcl::Indices &indices, std::vector< float > &distances) const
Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface ...
int searchForNeighbors(const PointCloudIn &cloud, std::size_t index, double parameter, pcl::Indices &indices, std::vector< float > &distances) const
Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface ...
typename PointCloudLRF::Ptr PointCloudLRFPtr
bool fake_surface_
If no surface is given, we use the input PointCloud as the surface.
void setInputReferenceFrames(const PointCloudLRFConstPtr &frames)
Provide a pointer to the input dataset that contains the local reference frames of the XYZ dataset...
IndicesAllocator<> Indices
Type used for indices in PCL.
Feature()
Empty constructor.
double getRadiusSearch() const
Get the sphere radius used for determining the neighbors.
bool frames_never_defined_
The user has never set the frames.
virtual bool initCompute()
This method should get called before starting the actual computation.
void setSearchMethod(const KdTreePtr &tree)
Provide a pointer to the search object.
KdTreePtr getSearchMethod() const
Get a pointer to the search method used.
PointCloudNConstPtr normals_
A pointer to the input dataset that contains the point normals of the XYZ dataset.
PointCloudLConstPtr labels_
A pointer to the input dataset that contains the point labels of the XYZ dataset. ...
void setInputLabels(const PointCloudLConstPtr &labels)
Provide a pointer to the input dataset that contains the point labels of the XYZ dataset.
double search_parameter_
The actual search parameter (from either search_radius_ or k_).
shared_ptr< const PointCloud< PointInT > > ConstPtr
PointCloudConstPtr input_
The input point cloud dataset.
shared_ptr< pcl::search::Search< PointInT > > Ptr
Feature represents the base feature class.
FeatureWithLocalReferenceFrames provides a public interface for descriptor extractor classes which ne...
void compute(PointCloudOut &output)
Base method for feature estimation for all points given in using th...
virtual bool initLocalReferenceFrames(const std::size_t &indices_size, const LRFEstimationPtr &lrf_estimation=LRFEstimationPtr())
int getKSearch() const
get the number of k nearest neighbors used for the feature estimation.
typename PointCloudN::ConstPtr PointCloudNConstPtr
PointCloudLRFConstPtr getInputReferenceFrames() const
Get a pointer to the local reference frames.
void setKSearch(int k)
Set the number of k nearest neighbors to use for the feature estimation.
void setInputNormals(const PointCloudNConstPtr &normals)
Provide a pointer to the input dataset that contains the point normals of the XYZ dataset...
typename PointCloudN::Ptr PointCloudNPtr
virtual ~FeatureWithLocalReferenceFrames()=default
Default virtual destructor.
double search_radius_
The nearest neighbors search radius for each point.
SearchMethodSurface search_method_surface_
The search method template for points.
shared_ptr< Feature< PointWithRange, Narf36 > > Ptr
typename PointCloudIn::Ptr PointCloudInPtr
FeatureFromLabels()
Empty constructor.