41 #ifndef PCL_FEATURES_VFH_H_
42 #define PCL_FEATURES_VFH_H_
44 #include <pcl/point_types.h>
45 #include <pcl/features/feature.h>
70 template<
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT = pcl::VFHSignature308>
84 typedef typename boost::shared_ptr<VFHEstimation<PointInT, PointNT, PointOutT> >
Ptr;
85 typedef typename boost::shared_ptr<const VFHEstimation<PointInT, PointNT, PointOutT> >
ConstPtr;
90 nr_bins_f1_ (45), nr_bins_f2_ (45), nr_bins_f3_ (45), nr_bins_f4_ (45), nr_bins_vp_ (128),
91 vpx_ (0), vpy_ (0), vpz_ (0),
95 d_pi_ (1.0f / (2.0f * static_cast<float> (M_PI)))
117 const std::vector<int> &indices);
157 normal_to_use_ = Eigen::Vector4f (normal[0], normal[1], normal[2], 0);
176 centroid_to_use_ = Eigen::Vector4f (centroid[0], centroid[1], centroid[2], 0);
217 int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_, nr_bins_f4_, nr_bins_vp_;
222 float vpx_, vpy_, vpz_;
272 #ifdef PCL_NO_PRECOMPILE
273 #include <pcl/features/impl/vfh.hpp>
276 #endif //#ifndef PCL_FEATURES_VFH_H_
std::string feature_name_
The feature name.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
bool normalize_bins_
Normalize bins by the number the total number of points.
Feature represents the base feature class.
bool initCompute()
This method should get called before starting the actual computation.
void setNormalizeDistance(bool normalize)
set normalize_distances_
bool size_component_
Activate or deactivate the size component of VFH.
void computePointSPFHSignature(const Eigen::Vector4f ¢roid_p, const Eigen::Vector4f ¢roid_n, const pcl::PointCloud< PointInT > &cloud, const pcl::PointCloud< PointNT > &normals, const std::vector< int > &indices)
Estimate the SPFH (Simple Point Feature Histograms) signatures of the angular (f1, f2, f3) and distance (f4) features for a given point from its neighborhood.
void setFillSizeComponent(bool fill_size)
set size_component_
Eigen::VectorXf hist_f2_
Placeholder for the f2 histogram.
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
boost::shared_ptr< VFHEstimation< PointInT, PointNT, PointOutT > > Ptr
void setNormalizeBins(bool normalize)
set normalize_bins_
void setUseGivenNormal(bool use)
Set use_given_normal_.
void setUseGivenCentroid(bool use)
Set use_given_centroid_.
Eigen::VectorXf hist_f3_
Placeholder for the f3 histogram.
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
bool use_given_normal_
Use the normal_to_use_.
bool normalize_distances_
Normalize the shape distribution component of VFH.
void getViewPoint(float &vpx, float &vpy, float &vpz)
Get the viewpoint.
Eigen::Vector4f centroid_to_use_
Centroid to be used to computed VFH.
VFHEstimation estimates the Viewpoint Feature Histogram (VFH) descriptor for a given point cloud data...
bool use_given_centroid_
Use the centroid_to_use_.
int k_
The number of K nearest neighbors to use for each point.
double search_radius_
The nearest neighbors search radius for each point.
boost::shared_ptr< const VFHEstimation< PointInT, PointNT, PointOutT > > ConstPtr
Eigen::Vector4f normal_to_use_
Normal to be used to computed VFH.
Eigen::VectorXf hist_f1_
Placeholder for the f1 histogram.
Eigen::VectorXf hist_f4_
Placeholder for the f4 histogram.
void setViewPoint(float vpx, float vpy, float vpz)
Set the viewpoint.
VFHEstimation()
Empty constructor.
void setCentroidToUse(const Eigen::Vector3f ¢roid)
Set centroid_to_use_.
void setNormalToUse(const Eigen::Vector3f &normal)
Set the normal to use.
Eigen::VectorXf hist_vp_
Placeholder for the vp histogram.