41 #ifndef PCL_FEATURES_VFH_H_ 42 #define PCL_FEATURES_VFH_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);
212 compute (PointCloudOut &output);
217 int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_, nr_bins_f4_, nr_bins_vp_;
222 float vpx_, vpy_, vpz_;
230 computeFeature (PointCloudOut &output);
272 #ifdef PCL_NO_PRECOMPILE 273 #include <pcl/features/impl/vfh.hpp> 276 #endif //#ifndef PCL_FEATURES_VFH_H_ void getViewPoint(float &vpx, float &vpy, float &vpz)
Get the viewpoint.
Eigen::VectorXf hist_f1_
Placeholder for the f1 histogram.
void setUseGivenCentroid(bool use)
Set use_given_centroid_.
Eigen::VectorXf hist_f4_
Placeholder for the f4 histogram.
Eigen::Vector4f normal_to_use_
Normal to be used to computed VFH.
std::string feature_name_
The feature name.
int k_
The number of K nearest neighbors to use for each point.
Eigen::VectorXf hist_f2_
Placeholder for the f2 histogram.
Eigen::VectorXf hist_vp_
Placeholder for the vp histogram.
Eigen::VectorXf hist_f3_
Placeholder for the f3 histogram.
boost::shared_ptr< VFHEstimation< PointInT, PointNT, PointOutT > > Ptr
void setUseGivenNormal(bool use)
Set use_given_normal_.
boost::shared_ptr< const VFHEstimation< PointInT, PointNT, PointOutT > > ConstPtr
Eigen::Vector4f centroid_to_use_
Centroid to be used to computed VFH.
VFHEstimation()
Empty constructor.
bool normalize_distances_
Normalize the shape distribution component of VFH.
void setNormalToUse(const Eigen::Vector3f &normal)
Set the normal to use.
void setCentroidToUse(const Eigen::Vector3f ¢roid)
Set centroid_to_use_.
Defines all the PCL implemented PointT point type structures.
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.
bool normalize_bins_
Normalize bins by the number the total number of points.
VFHEstimation estimates the Viewpoint Feature Histogram (VFH) descriptor for a given point cloud data...
void setNormalizeBins(bool normalize)
set normalize_bins_
PointCloud represents the base class in PCL for storing collections of 3D points. ...
void setViewPoint(float vpx, float vpy, float vpz)
Set the viewpoint.
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
Feature represents the base feature class.
bool use_given_normal_
Use the normal_to_use_.
bool size_component_
Activate or deactivate the size component of VFH.
void setFillSizeComponent(bool fill_size)
set size_component_
bool initCompute()
This method should get called before starting the actual computation.
double search_radius_
The nearest neighbors search radius for each point.
bool use_given_centroid_
Use the centroid_to_use_.
void setNormalizeDistance(bool normalize)
set normalize_distances_