Loading...
Searching...
No Matches
pcl::SurfaceNormalModality< PointInT > Class Template Reference
Module recognition

Modality based on surface normals. More...

`#include <pcl/recognition/surface_normal_modality.h>`

Inheritance diagram for pcl::SurfaceNormalModality< PointInT >:

## Classes

struct | Candidate
| Candidate for a feature (used in feature extraction methods). More...

## Public Types

using | PointCloudIn = pcl::PointCloud<PointInT>
Public Types inherited from pcl::PCLBase< PointInT >
using | PointCloud
using | PointCloudPtr
using | PointCloudConstPtr
using | PointIndicesPtr
using | PointIndicesConstPtr

## Public Member Functions

| SurfaceNormalModality ()
| Constructor.
| ~SurfaceNormalModality () override
| Destructor.
void | setSpreadingSize (const std::size_t spreading_size)
| Sets the spreading size.
void | setVariableFeatureNr (const bool enabled)
| Enables/disables the use of extracting a variable number of features.
pcl::PointCloud< pcl::Normal > & | getSurfaceNormals ()
| Returns the surface normals.
const pcl::PointCloud< pcl::Normal > & | getSurfaceNormals () const
| Returns the surface normals.
QuantizedMap & | getQuantizedMap () override
| Returns a reference to the internal quantized map.
QuantizedMap & | getSpreadedQuantizedMap () override
| Returns a reference to the internal spread quantized map.
LINEMOD_OrientationMap & | getOrientationMap ()
| Returns a reference to the orientation map.
void | extractFeatures (const MaskMap &mask, std::size_t nr_features, std::size_t modality_index, std::vector< QuantizedMultiModFeature > &features) const override
| Extracts features from this modality within the specified mask.
void | extractAllFeatures (const MaskMap &mask, std::size_t nr_features, std::size_t modality_index, std::vector< QuantizedMultiModFeature > &features) const override
| Extracts all possible features from the modality within the specified mask.
void | setInputCloud (const typename PointCloudIn::ConstPtr &cloud) override
| Provide a pointer to the input dataset (overwrites the PCLBase::setInputCloud method).
virtual void | processInputData ()
| Processes the input data (smoothing, computing gradients, quantizing, filtering, spreading).
virtual void | processInputDataFromFiltered ()
| Processes the input data assuming that everything up to filtering is already done/available (so only spreading is performed).
Public Member Functions inherited from pcl::QuantizableModality
| QuantizableModality ()
| Constructor.
virtual | ~QuantizableModality ()
| Destructor.
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

void | computeSurfaceNormals ()
| Computes the surface normals from the input cloud.
void | computeAndQuantizeSurfaceNormals ()
| Computes and quantizes the surface normals.
void | computeAndQuantizeSurfaceNormals2 ()
| Computes and quantizes the surface normals.
void | quantizeSurfaceNormals ()
| Quantizes the surface normals.
void | filterQuantizedSurfaceNormals ()
| Filters the quantized surface normals.
void | computeDistanceMap (const MaskMap &input, DistanceMap &output) const
| Computes a distance map from the supplied input mask.
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.

## Additional Inherited Members

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.

## Detailed Description

template<typename PointInT>
class pcl::SurfaceNormalModality< PointInT >

Modality based on surface normals.

Author
  Stefan Holzer

Definition at line 296 of file surface_normal_modality.h.

## Member Typedef Documentation

## PointCloudIn

template<typename PointInT>

using pcl::SurfaceNormalModality< PointInT >::PointCloudIn = pcl::PointCloud<PointInT>

Definition at line 331 of file surface_normal_modality.h.

## Constructor & Destructor Documentation

## SurfaceNormalModality()

template<typename PointInT>

pcl::SurfaceNormalModality< PointInT >::SurfaceNormalModality | ( |  | ) |

default

Constructor.

## ~SurfaceNormalModality()

template<typename PointInT>

pcl::SurfaceNormalModality< PointInT >::~SurfaceNormalModality | ( |  | ) |

override default

Destructor.

## Member Function Documentation

## computeAndQuantizeSurfaceNormals()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::computeAndQuantizeSurfaceNormals | ( |  | ) |

protected

Computes and quantizes the surface normals.

Definition at line 546 of file surface_normal_modality.h.

References pcl::PCLBase< PointInT >::input_.

## computeAndQuantizeSurfaceNormals2()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::computeAndQuantizeSurfaceNormals2 | ( |  | ) |

protected

Computes and quantizes the surface normals.

Compute quantized normal image from depth image.

Implements section 2.6 "Extension to Dense Depth Sensors."

Todo
  Should also need camera model, or at least focal lengths? Replace distance_threshold with mask?

Todo
  Magic number 1150 is focal length? This is something like f in SXGA mode, but in VGA is more like 530.

Definition at line 713 of file surface_normal_modality.h.

References pcl::PCLBase< PointInT >::input_.

Referenced by processInputData().

## computeDistanceMap()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::computeDistanceMap | ( | const MaskMap & | input,
|  | DistanceMap & | output ) const

protected

Computes a distance map from the supplied input mask.

Parameters

  [in] | input | the mask for which a distance map will be computed.
  [out] | output | the destination for the distance map.

Definition at line 1565 of file surface_normal_modality.h.

References pcl::DistanceMap::getData(), pcl::MaskMap::getData(), pcl::MaskMap::getHeight(), pcl::MaskMap::getWidth(), and pcl::DistanceMap::resize().

Referenced by extractAllFeatures(), and extractFeatures().

## computeSurfaceNormals()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::computeSurfaceNormals | ( |  | ) |

protected

Computes the surface normals from the input cloud.

Definition at line 533 of file surface_normal_modality.h.

References pcl::Feature< PointInT, PointOutT >::compute(), pcl::PCLBase< PointInT >::input_, pcl::LinearLeastSquaresNormalEstimation< PointInT, PointOutT >::setDepthDependentSmoothing(), pcl::LinearLeastSquaresNormalEstimation< PointInT, PointOutT >::setInputCloud(), pcl::LinearLeastSquaresNormalEstimation< PointInT, PointOutT >::setMaxDepthChangeFactor(), and pcl::LinearLeastSquaresNormalEstimation< PointInT, PointOutT >::setNormalSmoothingSize().

## extractAllFeatures()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::extractAllFeatures | ( | const MaskMap & | mask,
|  | std::size_t | nr_features,
|  | std::size_t | modality_index,
|  | std::vector< QuantizedMultiModFeature > & | features ) const

override virtual

Extracts all possible features from the modality within the specified mask.

Parameters

  [in] | mask | defines the areas where features are searched in.
  [in] | nr_features | IGNORED (TODO: remove this parameter).
  [in] | modality_index | the index which is stored in the extracted features.
  [out] | features | the destination for the extracted features.

Implements pcl::QuantizableModality.

Definition at line 1223 of file surface_normal_modality.h.

References pcl::SurfaceNormalModality< PointInT >::Candidate::bin_index, computeDistanceMap(), pcl::SurfaceNormalModality< PointInT >::Candidate::distance, pcl::MaskMap::getHeight(), pcl::MaskMap::getWidth(), pcl::QuantizedMultiModFeature::modality_index, pcl::QuantizedMultiModFeature::quantized_value, pcl::MaskMap::resize(), pcl::QuantizedMultiModFeature::x, pcl::SurfaceNormalModality< PointInT >::Candidate::x, pcl::QuantizedMultiModFeature::y, and pcl::SurfaceNormalModality< PointInT >::Candidate::y.

## extractFeatures()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::extractFeatures | ( | const MaskMap & | mask,
|  | std::size_t | nr_features,
|  | std::size_t | modality_index,
|  | std::vector< QuantizedMultiModFeature > & | features ) const

override virtual

Extracts features from this modality within the specified mask.

Parameters

  [in] | mask | defines the areas where features are searched in.
  [in] | nr_features | defines the number of features to be extracted (might be less if not sufficient information is present in the modality).
  [in] | modality_index | the index which is stored in the extracted features.
  [out] | features | the destination for the extracted features.

Implements pcl::QuantizableModality.

Definition at line 952 of file surface_normal_modality.h.

References pcl::SurfaceNormalModality< PointInT >::Candidate::bin_index, computeDistanceMap(), pcl::SurfaceNormalModality< PointInT >::Candidate::distance, pcl::MaskMap::getHeight(), pcl::MaskMap::getWidth(), pcl::QuantizedMultiModFeature::modality_index, pcl::QuantizedMultiModFeature::quantized_value, pcl::MaskMap::resize(), pcl::QuantizedMultiModFeature::x, pcl::SurfaceNormalModality< PointInT >::Candidate::x, pcl::QuantizedMultiModFeature::y, and pcl::SurfaceNormalModality< PointInT >::Candidate::y.

## filterQuantizedSurfaceNormals()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::filterQuantizedSurfaceNormals | ( |  | ) |

protected

Filters the quantized surface normals.

Definition at line 1393 of file surface_normal_modality.h.

References pcl::PCLBase< PointInT >::input_.

Referenced by processInputData().

## getOrientationMap()

template<typename PointInT>

LINEMOD_OrientationMap & pcl::SurfaceNormalModality< PointInT >::getOrientationMap | ( |  | ) |

inline

Returns a reference to the orientation map.

Definition at line 386 of file surface_normal_modality.h.

## getQuantizedMap()

template<typename PointInT>

QuantizedMap & pcl::SurfaceNormalModality< PointInT >::getQuantizedMap | ( |  | ) |

inline override virtual

Returns a reference to the internal quantized map.

Implements pcl::QuantizableModality.

Definition at line 372 of file surface_normal_modality.h.

## getSpreadedQuantizedMap()

template<typename PointInT>

QuantizedMap & pcl::SurfaceNormalModality< PointInT >::getSpreadedQuantizedMap | ( |  | ) |

inline override virtual

Returns a reference to the internal spread quantized map.

Implements pcl::QuantizableModality.

Definition at line 379 of file surface_normal_modality.h.

## getSurfaceNormals() [1/2]

template<typename PointInT>

pcl::PointCloud< pcl::Normal > & pcl::SurfaceNormalModality< PointInT >::getSurfaceNormals | ( |  | ) |

inline

Returns the surface normals.

Definition at line 358 of file surface_normal_modality.h.

## getSurfaceNormals() [2/2]

template<typename PointInT>

const pcl::PointCloud< pcl::Normal > & pcl::SurfaceNormalModality< PointInT >::getSurfaceNormals | ( |  | ) | const

inline

Returns the surface normals.

Definition at line 365 of file surface_normal_modality.h.

## processInputData()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::processInputData | ( |  | ) |

virtual

Processes the input data (smoothing, computing gradients, quantizing, filtering, spreading).

Definition at line 502 of file surface_normal_modality.h.

References computeAndQuantizeSurfaceNormals2(), filterQuantizedSurfaceNormals(), and pcl::QuantizedMap::spreadQuantizedMap().

## processInputDataFromFiltered()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::processInputDataFromFiltered | ( |  | ) |

virtual

Processes the input data assuming that everything up to filtering is already done/available (so only spreading is performed).

Definition at line 523 of file surface_normal_modality.h.

References pcl::QuantizedMap::spreadQuantizedMap().

## quantizeSurfaceNormals()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::quantizeSurfaceNormals | ( |  | ) |

protected

Quantizes the surface normals.

Definition at line 1351 of file surface_normal_modality.h.

References pcl::PCLBase< PointInT >::input_.

## setInputCloud()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::setInputCloud | ( | const typename PointCloudIn::ConstPtr & | cloud | ) |

inline override

Provide a pointer to the input dataset (overwrites the PCLBase::setInputCloud method).

Parameters

  [in] | cloud | the const boost shared pointer to a PointCloud message

Definition at line 416 of file surface_normal_modality.h.

References pcl::PCLBase< PointInT >::input_.

## setSpreadingSize()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::setSpreadingSize | ( | const std::size_t | spreading_size | ) |

inline

Sets the spreading size.

Parameters

  [in] | spreading_size | the spreading size.

Definition at line 342 of file surface_normal_modality.h.

## setVariableFeatureNr()

template<typename PointInT>

void pcl::SurfaceNormalModality< PointInT >::setVariableFeatureNr | ( | const bool | enabled | ) |

inline

Enables/disables the use of extracting a variable number of features.

Parameters

  [in] | enabled | specifies whether extraction of a variable number of features will be enabled/disabled.

Definition at line 351 of file surface_normal_modality.h.

The documentation for this class was generated from the following file:

- pcl/recognition/surface_normal_modality.h