46 #include <pcl/features/feature.h>
71 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = pcl::VFHSignature308>
85 using Ptr = shared_ptr<VFHEstimation<PointInT, PointNT, PointOutT> >;
86 using ConstPtr = shared_ptr<const VFHEstimation<PointInT, PointNT, PointOutT> >;
91 nr_bins_f_ ({45, 45, 45, 45}),
92 d_pi_ (1.0f / (2.0f *
static_cast<float> (
M_PI)))
94 for (
int i = 0; i < 4; ++i)
96 hist_f_[i].setZero (nr_bins_f_[i]);
154 normal_to_use_ = Eigen::Vector4f (normal[0], normal[1], normal[2], 0);
173 centroid_to_use_ = Eigen::Vector4f (centroid[0], centroid[1], centroid[2], 0);
214 std::array<int, 4> nr_bins_f_;
215 int nr_bins_vp_{128};
220 float vpx_{0.0f}, vpy_{0.0f}, vpz_{0.0f};
264 #ifdef PCL_NO_PRECOMPILE
265 #include <pcl/features/impl/vfh.hpp>
Feature represents the base feature class.
double search_radius_
The nearest neighbors search radius for each point.
int k_
The number of K nearest neighbors to use for each point.
shared_ptr< Feature< PointInT, PointOutT > > Ptr
std::string feature_name_
The feature name.
shared_ptr< const Feature< PointInT, PointOutT > > ConstPtr
VFHEstimation estimates the Viewpoint Feature Histogram (VFH) descriptor for a given point cloud data...
bool normalize_bins_
Normalize bins by the number the total number of points.
void setFillSizeComponent(bool fill_size)
set size_component_
Eigen::Vector4f normal_to_use_
Normal to be used to computed VFH.
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
bool use_given_normal_
Use the normal_to_use_.
VFHEstimation()
Empty constructor.
void setViewPoint(float vpx, float vpy, float vpz)
Set the viewpoint.
Eigen::VectorXf hist_vp_
Placeholder for the vp histogram.
void setNormalizeDistance(bool normalize)
set normalize_distances_
bool size_component_
Activate or deactivate the size component of VFH.
void setUseGivenNormal(bool use)
Set use_given_normal_.
void setCentroidToUse(const Eigen::Vector3f ¢roid)
Set centroid_to_use_.
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
bool initCompute() override
This method should get called before starting the actual computation.
void setNormalToUse(const Eigen::Vector3f &normal)
Set the normal to use.
bool normalize_distances_
Normalize the shape distribution component of VFH.
Eigen::Vector4f centroid_to_use_
Centroid to be used to computed VFH.
void computePointSPFHSignature(const Eigen::Vector4f ¢roid_p, const Eigen::Vector4f ¢roid_n, const pcl::PointCloud< PointInT > &cloud, const pcl::PointCloud< PointNT > &normals, const pcl::Indices &indices)
Estimate the SPFH (Simple Point Feature Histograms) signatures of the angular (f1,...
void setNormalizeBins(bool normalize)
set normalize_bins_
bool use_given_centroid_
Use the centroid_to_use_.
std::array< Eigen::VectorXf, 4 > hist_f_
Placeholder for the f1 histogram.
void getViewPoint(float &vpx, float &vpy, float &vpz)
Get the viewpoint.
void setUseGivenCentroid(bool use)
Set use_given_centroid_.
Defines all the PCL implemented PointT point type structures.
IndicesAllocator<> Indices
Type used for indices in PCL.