|
Point Cloud Library (PCL) 1.15.1
|
ShapeContext3DEstimation implements the 3D shape context descriptor as described in: More...
#include <pcl/features/3dsc.h>
Public Types | |
| using | Ptr = shared_ptr<ShapeContext3DEstimation<PointInT, PointNT, PointOutT> > |
| using | ConstPtr = shared_ptr<const ShapeContext3DEstimation<PointInT, PointNT, PointOutT> > |
| using | PointCloudOut = typename Feature<PointInT, PointOutT>::PointCloudOut |
| using | PointCloudIn = typename Feature<PointInT, PointOutT>::PointCloudIn |
| Public Types inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::ShapeContext1980 > | |
| using | PointCloudN |
| using | PointCloudNPtr |
| using | PointCloudNConstPtr |
| using | Ptr |
| using | ConstPtr |
| Public Types inherited from pcl::Feature< PointInT, pcl::ShapeContext1980 > | |
| 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 | |
| ShapeContext3DEstimation (bool random=false) | |
| Constructor. | |
| ~ShapeContext3DEstimation () override=default | |
| std::size_t | getAzimuthBins () |
| std::size_t | getElevationBins () |
| std::size_t | getRadiusBins () |
| void | setMinimalRadius (double radius) |
| The minimal radius value for the search sphere (rmin) in the original paper. | |
| double | getMinimalRadius () |
| void | setPointDensityRadius (double radius) |
| This radius is used to compute local point density density = number of points within this radius. | |
| double | getPointDensityRadius () |
| Public Member Functions inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::ShapeContext1980 > | |
| 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::ShapeContext1980 > | |
| 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 |
| Initialize computation by allocating all the intervals and the volume lookup table. | |
| bool | computePoint (std::size_t index, const pcl::PointCloud< PointNT > &normals, float rf[9], std::vector< float > &desc) |
| Estimate a descriptor for a given point. | |
| void | computeFeature (PointCloudOut &output) override |
| Estimate the actual feature. | |
| float | rnd () |
| Boost-based random number generator. | |
| Protected Member Functions inherited from pcl::Feature< PointInT, pcl::ShapeContext1980 > | |
| 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::vector< float > | radii_interval_ |
| Values of the radii interval. | |
| std::vector< float > | theta_divisions_ |
| Theta divisions interval. | |
| std::vector< float > | phi_divisions_ |
| Phi divisions interval. | |
| std::vector< float > | volume_lut_ |
| Volumes look up table. | |
| std::size_t | azimuth_bins_ {12} |
| Bins along the azimuth dimension. | |
| std::size_t | elevation_bins_ {11} |
| Bins along the elevation dimension. | |
| std::size_t | radius_bins_ {15} |
| Bins along the radius dimension. | |
| double | min_radius_ {0.1} |
| Minimal radius value. | |
| double | point_density_radius_ {0.2} |
| Point density radius. | |
| std::size_t | descriptor_length_ {} |
| Descriptor length. | |
| std::mt19937 | rng_ |
| Random number generator algorithm. | |
| std::uniform_real_distribution< float > | rng_dist_ |
| Random number generator distribution. | |
| Protected Attributes inherited from pcl::FeatureFromNormals< PointInT, PointNT, pcl::ShapeContext1980 > | |
| 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::ShapeContext1980 > | |
| 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. | |
ShapeContext3DEstimation implements the 3D shape context descriptor as described in:
The suggested PointOutT is pcl::ShapeContext1980
| using pcl::ShapeContext3DEstimation< PointInT, PointNT, PointOutT >::ConstPtr = shared_ptr<const ShapeContext3DEstimation<PointInT, PointNT, PointOutT> > |
| using pcl::ShapeContext3DEstimation< PointInT, PointNT, PointOutT >::PointCloudIn = typename Feature<PointInT, PointOutT>::PointCloudIn |
| using pcl::ShapeContext3DEstimation< PointInT, PointNT, PointOutT >::PointCloudOut = typename Feature<PointInT, PointOutT>::PointCloudOut |
| using pcl::ShapeContext3DEstimation< PointInT, PointNT, PointOutT >::Ptr = shared_ptr<ShapeContext3DEstimation<PointInT, PointNT, PointOutT> > |
|
inline |
Constructor.
| [in] | random | If true the random seed is set to current time, else it is set to 12345 prior to computing the descriptor (used to select X axis) |
Definition at line 95 of file 3dsc.h.
References pcl::Feature< PointInT, pcl::ShapeContext1980 >::feature_name_, phi_divisions_, radii_interval_, rng_, rng_dist_, pcl::Feature< PointInT, pcl::ShapeContext1980 >::search_radius_, theta_divisions_, and volume_lut_.
|
overridedefault |
|
overrideprotected |
Estimate the actual feature.
| [out] | output | the resultant feature |
Definition at line 255 of file 3dsc.hpp.
References computePoint(), descriptor_length_, pcl::PCLBase< PointInT >::indices_, pcl::PCLBase< PointInT >::input_, pcl::isFinite(), and pcl::FeatureFromNormals< PointInT, PointNT, pcl::ShapeContext1980 >::normals_.
|
protected |
Estimate a descriptor for a given point.
| [in] | index | the index of the point to estimate a descriptor for |
| [in] | normals | a pointer to the set of normals |
| [out] | rf | the reference frame |
| [out] | desc | the resultant estimated descriptor |
--— Compute current neighbour polar coordinates --— Get distance between the neighbour and the origin
Project point into the tangent plane
Normalize to compute the dot product
Compute the angle between the projection and the x axis in the interval [0,360]
Compute the angle between the neighbour and the z axis (normal) in the interval [0, 180]
Accumulate w into correspondent Bin(j,k,l)
Definition at line 133 of file 3dsc.hpp.
References elevation_bins_, pcl::utils::equal(), pcl::PCLBase< PointInT >::indices_, pcl::isNormalFinite(), phi_divisions_, point_density_radius_, pcl::geometry::project(), pcl::rad2deg(), radii_interval_, radius_bins_, rnd(), pcl::Feature< PointInT, pcl::ShapeContext1980 >::search_radius_, pcl::Feature< PointInT, pcl::ShapeContext1980 >::searchForNeighbors(), pcl::Feature< PointInT, pcl::ShapeContext1980 >::surface_, theta_divisions_, and volume_lut_.
Referenced by computeFeature().
|
inline |
Definition at line 123 of file 3dsc.h.
References azimuth_bins_.
|
inline |
Definition at line 130 of file 3dsc.h.
References elevation_bins_.
|
inline |
|
inline |
Definition at line 158 of file 3dsc.h.
References point_density_radius_.
|
inline |
Definition at line 137 of file 3dsc.h.
References radius_bins_.
|
overrideprotectedvirtual |
Initialize computation by allocating all the intervals and the volume lookup table.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, pcl::ShapeContext1980 >.
Definition at line 53 of file 3dsc.hpp.
References azimuth_bins_, pcl::deg2rad(), descriptor_length_, elevation_bins_, pcl::Feature< PointInT, pcl::ShapeContext1980 >::getClassName(), pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >::initCompute(), min_radius_, phi_divisions_, radii_interval_, radius_bins_, pcl::Feature< PointInT, pcl::ShapeContext1980 >::search_radius_, theta_divisions_, and volume_lut_.
|
inlineprotected |
Boost-based random number generator.
Definition at line 228 of file 3dsc.h.
References rng_, and rng_dist_.
Referenced by computePoint().
|
inline |
The minimal radius value for the search sphere (rmin) in the original paper.
| [in] | radius | the desired minimal radius |
Definition at line 143 of file 3dsc.h.
References min_radius_.
|
inline |
This radius is used to compute local point density density = number of points within this radius.
| [in] | radius | value of the point density search radius |
Definition at line 154 of file 3dsc.h.
References point_density_radius_.
|
protected |
Bins along the azimuth dimension.
Definition at line 195 of file 3dsc.h.
Referenced by getAzimuthBins(), and initCompute().
|
protected |
Descriptor length.
Definition at line 210 of file 3dsc.h.
Referenced by computeFeature(), and initCompute().
|
protected |
Bins along the elevation dimension.
Definition at line 198 of file 3dsc.h.
Referenced by computePoint(), getElevationBins(), and initCompute().
|
protected |
Minimal radius value.
Definition at line 204 of file 3dsc.h.
Referenced by getMinimalRadius(), initCompute(), and setMinimalRadius().
|
protected |
Phi divisions interval.
Definition at line 189 of file 3dsc.h.
Referenced by computePoint(), initCompute(), and ShapeContext3DEstimation().
|
protected |
Point density radius.
Definition at line 207 of file 3dsc.h.
Referenced by computePoint(), getPointDensityRadius(), and setPointDensityRadius().
|
protected |
Values of the radii interval.
Definition at line 183 of file 3dsc.h.
Referenced by computePoint(), initCompute(), and ShapeContext3DEstimation().
|
protected |
Bins along the radius dimension.
Definition at line 201 of file 3dsc.h.
Referenced by computePoint(), getRadiusBins(), and initCompute().
|
protected |
Random number generator algorithm.
Definition at line 213 of file 3dsc.h.
Referenced by rnd(), and ShapeContext3DEstimation().
|
protected |
Random number generator distribution.
Definition at line 216 of file 3dsc.h.
Referenced by rnd(), and ShapeContext3DEstimation().
|
protected |
Theta divisions interval.
Definition at line 186 of file 3dsc.h.
Referenced by computePoint(), initCompute(), and ShapeContext3DEstimation().
|
protected |
Volumes look up table.
Definition at line 192 of file 3dsc.h.
Referenced by computePoint(), initCompute(), and ShapeContext3DEstimation().