Point Cloud Library (PCL)
1.7.0
|
VFHEstimation estimates the Viewpoint Feature Histogram (VFH) descriptor for a given point cloud dataset containing points and normals. More...
#include <pcl/features/vfh.h>
Public Types | |
typedef Feature< PointInT, PointOutT >::PointCloudOut | PointCloudOut |
typedef boost::shared_ptr < VFHEstimation< PointInT, PointNT, PointOutT > > | Ptr |
typedef boost::shared_ptr < const VFHEstimation < PointInT, PointNT, PointOutT > > | ConstPtr |
Public Member Functions | |
VFHEstimation () | |
Empty constructor. | |
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 | setViewPoint (float vpx, float vpy, float vpz) |
Set the viewpoint. | |
void | getViewPoint (float &vpx, float &vpy, float &vpz) |
Get the viewpoint. | |
void | setUseGivenNormal (bool use) |
Set use_given_normal_. | |
void | setNormalToUse (const Eigen::Vector3f &normal) |
Set the normal to use. | |
void | setUseGivenCentroid (bool use) |
Set use_given_centroid_. | |
void | setCentroidToUse (const Eigen::Vector3f ¢roid) |
Set centroid_to_use_. | |
void | setNormalizeBins (bool normalize) |
set normalize_bins_ | |
void | setNormalizeDistance (bool normalize) |
set normalize_distances_ | |
void | setFillSizeComponent (bool fill_size) |
set size_component_ | |
void | compute (PointCloudOut &output) |
Overloaded computed method from pcl::Feature. | |
Protected Member Functions | |
bool | initCompute () |
This method should get called before starting the actual computation. | |
Protected Attributes | |
Eigen::VectorXf | hist_f1_ |
Placeholder for the f1 histogram. | |
Eigen::VectorXf | hist_f2_ |
Placeholder for the f2 histogram. | |
Eigen::VectorXf | hist_f3_ |
Placeholder for the f3 histogram. | |
Eigen::VectorXf | hist_f4_ |
Placeholder for the f4 histogram. | |
Eigen::VectorXf | hist_vp_ |
Placeholder for the vp histogram. | |
Eigen::Vector4f | normal_to_use_ |
Normal to be used to computed VFH. | |
Eigen::Vector4f | centroid_to_use_ |
Centroid to be used to computed VFH. | |
bool | use_given_normal_ |
Use the normal_to_use_. | |
bool | use_given_centroid_ |
Use the centroid_to_use_. | |
bool | normalize_bins_ |
Normalize bins by the number the total number of points. | |
bool | normalize_distances_ |
Normalize the shape distribution component of VFH. | |
bool | size_component_ |
Activate or deactivate the size component of VFH. |
VFHEstimation estimates the Viewpoint Feature Histogram (VFH) descriptor for a given point cloud dataset containing points and normals.
The default VFH implementation uses 45 binning subdivisions for each of the three extended FPFH values, plus another 45 binning subdivisions for the distances between each point and the centroid and 128 binning subdivisions for the viewpoint component, which results in a 308-byte array of float values. These are stored in a pcl::VFHSignature308 point type. A major difference between the PFH/FPFH descriptors and VFH, is that for a given point cloud dataset, only a single VFH descriptor will be estimated (vfhs->points.size() should be 1), while the resultant PFH/FPFH data will have the same number of entries as the number of points in the cloud.
typedef boost::shared_ptr<const VFHEstimation<PointInT, PointNT, PointOutT> > pcl::VFHEstimation< PointInT, PointNT, PointOutT >::ConstPtr |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
typedef Feature<PointInT, PointOutT>::PointCloudOut pcl::VFHEstimation< PointInT, PointNT, PointOutT >::PointCloudOut |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
typedef boost::shared_ptr<VFHEstimation<PointInT, PointNT, PointOutT> > pcl::VFHEstimation< PointInT, PointNT, PointOutT >::Ptr |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
pcl::VFHEstimation< PointInT, PointNT, PointOutT >::VFHEstimation | ( | ) | [inline] |
Empty constructor.
Definition at line 89 of file vfh.h.
References pcl::Feature< PointInT, PointOutT >::feature_name_, pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f1_, pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f2_, pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f3_, pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f4_, pcl::Feature< PointInT, PointOutT >::k_, and pcl::Feature< PointInT, PointOutT >::search_radius_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::compute | ( | PointCloudOut & | output | ) |
Overloaded computed method from pcl::Feature.
[out] | output | the resultant point cloud model dataset containing the estimated features |
Reimplemented from pcl::Feature< PointInT, PointOutT >.
Definition at line 65 of file vfh.hpp.
References pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::computePointSPFHSignature | ( | const Eigen::Vector4f & | centroid_p, |
const Eigen::Vector4f & | centroid_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.
[in] | centroid_p | the centroid point |
[in] | centroid_n | the centroid normal |
[in] | cloud | the dataset containing the XYZ Cartesian coordinates of the two points |
[in] | normals | the dataset containing the surface normals at each point in cloud |
[in] | indices | the k-neighborhood point indices in the dataset |
Definition at line 92 of file vfh.hpp.
References pcl::computePairFeatures(), pcl::getMaxDistance(), and pcl::PointCloud< PointT >::points.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::getViewPoint | ( | float & | vpx, |
float & | vpy, | ||
float & | vpz | ||
) | [inline] |
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::initCompute | ( | ) | [protected, virtual] |
This method should get called before starting the actual computation.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setCentroidToUse | ( | const Eigen::Vector3f & | centroid | ) | [inline] |
Set centroid_to_use_.
[in] | centroid | Centroid to be used in the VFH computation. It is used to compute the distances from all points to this centroid. |
Definition at line 174 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::centroid_to_use_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setFillSizeComponent | ( | bool | fill_size | ) | [inline] |
set size_component_
[in] | fill_size | True if the 4th component of VFH (shape distribution component) needs to be filled. Otherwise, it is set to zero. |
Definition at line 203 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::size_component_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalizeBins | ( | bool | normalize | ) | [inline] |
set normalize_bins_
[in] | normalize | If true, the VFH bins are normalized using the total number of points |
Definition at line 183 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normalize_bins_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalizeDistance | ( | bool | normalize | ) | [inline] |
set normalize_distances_
[in] | normalize | If true, the 4th component of VFH (shape distribution component) get normalized by the maximum size between the centroid and the point cloud |
Definition at line 193 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normalize_distances_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalToUse | ( | const Eigen::Vector3f & | normal | ) | [inline] |
Set the normal to use.
[in] | normal | Sets the normal to be used in the VFH computation. It is is used to build the Darboux Coordinate system. |
Definition at line 155 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normal_to_use_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setUseGivenCentroid | ( | bool | use | ) | [inline] |
Set use_given_centroid_.
[in] | use | Set to true if you want to use the centroid passed through setCentroidToUse(centroid) |
Definition at line 164 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::use_given_centroid_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setUseGivenNormal | ( | bool | use | ) | [inline] |
Set use_given_normal_.
[in] | use | Set to true if you want to use the normal passed to setNormalUse(normal) |
Definition at line 145 of file vfh.h.
References pcl::VFHEstimation< PointInT, PointNT, PointOutT >::use_given_normal_.
void pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setViewPoint | ( | float | vpx, |
float | vpy, | ||
float | vpz | ||
) | [inline] |
Eigen::Vector4f pcl::VFHEstimation< PointInT, PointNT, PointOutT >::centroid_to_use_ [protected] |
Centroid to be used to computed VFH.
Default, the centroid of the whole point cloud
Definition at line 251 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setCentroidToUse().
Eigen::VectorXf pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f1_ [protected] |
Placeholder for the f1 histogram.
Definition at line 238 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::VFHEstimation().
Eigen::VectorXf pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f2_ [protected] |
Placeholder for the f2 histogram.
Definition at line 240 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::VFHEstimation().
Eigen::VectorXf pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f3_ [protected] |
Placeholder for the f3 histogram.
Definition at line 242 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::VFHEstimation().
Eigen::VectorXf pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_f4_ [protected] |
Placeholder for the f4 histogram.
Definition at line 244 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::VFHEstimation().
Eigen::VectorXf pcl::VFHEstimation< PointInT, PointNT, PointOutT >::hist_vp_ [protected] |
Eigen::Vector4f pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normal_to_use_ [protected] |
Normal to be used to computed VFH.
Default, the average normal of the whole point cloud
Definition at line 249 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalToUse().
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normalize_bins_ [protected] |
Normalize bins by the number the total number of points.
Definition at line 260 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalizeBins().
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::normalize_distances_ [protected] |
Normalize the shape distribution component of VFH.
Definition at line 262 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setNormalizeDistance().
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::size_component_ [protected] |
Activate or deactivate the size component of VFH.
Definition at line 264 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setFillSizeComponent().
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::use_given_centroid_ [protected] |
Use the centroid_to_use_.
Definition at line 258 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setUseGivenCentroid().
bool pcl::VFHEstimation< PointInT, PointNT, PointOutT >::use_given_normal_ [protected] |
Use the normal_to_use_.
Definition at line 256 of file vfh.h.
Referenced by pcl::VFHEstimation< PointInT, PointNT, PointOutT >::setUseGivenNormal().