|
Point Cloud Library (PCL) 1.15.1
|
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 | |
| using | PointCloudOut = typename Feature<PointInT, PointOutT>::PointCloudOut |
| using | Ptr = shared_ptr<VFHEstimation<PointInT, PointNT, PointOutT> > |
| using | ConstPtr = shared_ptr<const VFHEstimation<PointInT, PointNT, PointOutT> > |
| Public Types inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::VFHSignature308 > | |
| using | PointCloudN |
| using | PointCloudNPtr |
| using | PointCloudNConstPtr |
| using | Ptr |
| using | ConstPtr |
| Public Types inherited from pcl::Feature< PointInT, pcl::VFHSignature308 > | |
| using | BaseClass |
| using | Ptr |
| using | ConstPtr |
| using | KdTree |
| using | KdTreePtr |
| using | PointCloudIn |
| using | PointCloudInPtr |
| using | PointCloudInConstPtr |
| using | PointCloudOut |
| using | SearchMethod |
| using | SearchMethodSurface |
| Public Types inherited from pcl::PCLBase< PointInT > | |
| using | PointCloud |
| using | PointCloudPtr |
| using | PointCloudConstPtr |
| using | PointIndicesPtr |
| using | PointIndicesConstPtr |
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 pcl::Indices &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. | |
| Public Member Functions inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::VFHSignature308 > | |
| FeatureFromNormals () | |
| Empty constructor. | |
| void | setInputNormals (const PointCloudNConstPtr &normals) |
| Provide a pointer to the input dataset that contains the point normals of the XYZ dataset. | |
| PointCloudNConstPtr | getInputNormals () const |
| Get a pointer to the normals of the input XYZ point cloud dataset. | |
| Public Member Functions inherited from pcl::Feature< PointInT, pcl::VFHSignature308 > | |
| Feature () | |
| Empty constructor. | |
| void | setSearchSurface (const PointCloudInConstPtr &cloud) |
| Provide a pointer to a dataset to add additional information to estimate the features for every point in the input dataset. | |
| PointCloudInConstPtr | getSearchSurface () const |
| Get a pointer to the surface point cloud dataset. | |
| void | setSearchMethod (const KdTreePtr &tree) |
| Provide a pointer to the search object. | |
| KdTreePtr | getSearchMethod () const |
| Get a pointer to the search method used. | |
| double | getSearchParameter () const |
| Get the internal search parameter. | |
| void | setKSearch (int k) |
| Set the number of k nearest neighbors to use for the feature estimation. | |
| int | getKSearch () const |
| get the number of k nearest neighbors used for the feature estimation. | |
| void | setRadiusSearch (double radius) |
| Set the sphere radius that is to be used for determining the nearest neighbors used for the feature estimation. | |
| double | getRadiusSearch () const |
| Get the sphere radius used for determining the neighbors. | |
| void | compute (PointCloudOut &output) |
| Base method for feature estimation for all points given in <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in setSearchMethod (). | |
| Public Member Functions inherited from pcl::PCLBase< PointInT > | |
| PCLBase () | |
| Empty constructor. | |
| PCLBase (const PCLBase &base) | |
| Copy constructor. | |
| virtual | ~PCLBase ()=default |
| Destructor. | |
| virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
| Provide a pointer to the input dataset. | |
| PointCloudConstPtr const | getInputCloud () const |
| Get a pointer to the input point cloud dataset. | |
| virtual void | setIndices (const IndicesPtr &indices) |
| Provide a pointer to the vector of indices that represents the input data. | |
| virtual void | setIndices (const IndicesConstPtr &indices) |
| Provide a pointer to the vector of indices that represents the input data. | |
| virtual void | setIndices (const PointIndicesConstPtr &indices) |
| Provide a pointer to the vector of indices that represents the input data. | |
| virtual void | setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols) |
| Set the indices for the points laying within an interest region of the point cloud. | |
| IndicesPtr | getIndices () |
| Get a pointer to the vector of indices used. | |
| IndicesConstPtr const | getIndices () const |
| Get a pointer to the vector of indices used. | |
| const PointInT & | operator[] (std::size_t pos) const |
| Override PointCloud operator[] to shorten code. | |
Protected Member Functions | |
| bool | initCompute () override |
| This method should get called before starting the actual computation. | |
| Protected Member Functions inherited from pcl::Feature< PointInT, pcl::VFHSignature308 > | |
| const std::string & | getClassName () const |
| Get a string representation of the name of this class. | |
| virtual bool | deinitCompute () |
| This method should get called after ending the actual computation. | |
| 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 from setSearchSurface. | |
| Protected Member Functions inherited from pcl::PCLBase< PointInT > | |
| bool | initCompute () |
| This method should get called before starting the actual computation. | |
| bool | deinitCompute () |
| This method should get called after finishing the actual computation. | |
Protected Attributes | |
| std::array< Eigen::VectorXf, 4 > | hist_f_ |
| Placeholder for the f1 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_ {false} |
| Use the normal_to_use_. | |
| bool | use_given_centroid_ {false} |
| Use the centroid_to_use_. | |
| bool | normalize_bins_ {true} |
| Normalize bins by the number the total number of points. | |
| bool | normalize_distances_ {false} |
| Normalize the shape distribution component of VFH. | |
| bool | size_component_ {false} |
| Activate or deactivate the size component of VFH. | |
| Protected Attributes inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::VFHSignature308 > | |
| PointCloudNConstPtr | normals_ |
| A pointer to the input dataset that contains the point normals of the XYZ dataset. | |
| Protected Attributes inherited from pcl::Feature< PointInT, pcl::VFHSignature308 > | |
| std::string | feature_name_ |
| The feature name. | |
| SearchMethodSurface | search_method_surface_ |
| The search method template for points. | |
| PointCloudInConstPtr | surface_ |
| An input point cloud describing the surface that is to be used for nearest neighbors estimation. | |
| KdTreePtr | tree_ |
| A pointer to the spatial search object. | |
| double | search_parameter_ |
| The actual search parameter (from either search_radius_ or k_). | |
| double | search_radius_ |
| The nearest neighbors search radius for each point. | |
| int | k_ |
| The number of K nearest neighbors to use for each point. | |
| bool | fake_surface_ |
| If no surface is given, we use the input PointCloud as the surface. | |
| Protected Attributes inherited from pcl::PCLBase< PointInT > | |
| PointCloudConstPtr | input_ |
| The input point cloud dataset. | |
| IndicesPtr | indices_ |
| A pointer to the vector of point indices to use. | |
| bool | use_indices_ |
| Set to true if point indices are used. | |
| bool | fake_indices_ |
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. | |
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->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.
| using pcl::VFHEstimation< PointInT, PointNT, PointOutT >::ConstPtr = shared_ptr<const VFHEstimation<PointInT, PointNT, PointOutT> > |
| using pcl::VFHEstimation< PointInT, PointNT, PointOutT >::PointCloudOut = typename Feature<PointInT, PointOutT>::PointCloudOut |
| using pcl::VFHEstimation< PointInT, PointNT, PointOutT >::Ptr = shared_ptr<VFHEstimation<PointInT, PointNT, PointOutT> > |
|
inline |
| 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 |
Definition at line 65 of file vfh.hpp.
References pcl::Feature< PointInT, PointOutT >::deinitCompute(), initCompute(), and pcl::PCLBase< PointInT >::input_.
| 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 pcl::Indices & | 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(), hist_f_, M_PI, normalize_bins_, normalize_distances_, pcl_round(), and size_component_.
|
inline |
|
overrideprotectedvirtual |
This method should get called before starting the actual computation.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, pcl::VFHSignature308 >.
Definition at line 51 of file vfh.hpp.
References pcl::Feature< PointInT, PointOutT >::initCompute(), pcl::PCLBase< PointInT >::input_, pcl::Feature< PointInT, pcl::VFHSignature308 >::k_, pcl::Feature< PointInT, pcl::VFHSignature308 >::search_radius_, and pcl::Feature< PointInT, pcl::VFHSignature308 >::surface_.
Referenced by compute().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
Placeholder for the f1 histogram.
Definition at line 236 of file vfh.h.
Referenced by computePointSPFHSignature().
|
protected |
|
protected |
|
protected |
Normalize bins by the number the total number of points.
Definition at line 252 of file vfh.h.
Referenced by computePointSPFHSignature().
|
protected |
Normalize the shape distribution component of VFH.
Definition at line 254 of file vfh.h.
Referenced by computePointSPFHSignature().
|
protected |
Activate or deactivate the size component of VFH.
Definition at line 256 of file vfh.h.
Referenced by computePointSPFHSignature().
|
protected |
|
protected |