Loading...
Searching...
No Matches
pcl::SamplingSurfaceNormal< PointT > Class Template Reference
Module filters

SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N points, and samples points randomly within each grid. More...

`#include <pcl/filters/sampling_surface_normal.h>`

Inheritance diagram for pcl::SamplingSurfaceNormal< PointT >:

## Public Types

using | Ptr = shared_ptr<SamplingSurfaceNormal<PointT> >
using | ConstPtr = shared_ptr<const SamplingSurfaceNormal<PointT> >
Public Types inherited from pcl::Filter< PointT >
using | Ptr = shared_ptr<Filter<PointT> >
using | ConstPtr = shared_ptr<const Filter<PointT> >
using | PointCloud = pcl::PointCloud<PointT>
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
Public Types inherited from pcl::PCLBase< PointT >
using | PointCloud = pcl::PointCloud<PointT>
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
using | PointIndicesPtr = PointIndices::Ptr
using | PointIndicesConstPtr = PointIndices::ConstPtr

## Public Member Functions

| SamplingSurfaceNormal ()
| Empty constructor.
void | setSample (unsigned int sample)
| Set maximum number of samples in each grid.
unsigned int | getSample () const
| Get the value of the internal sample parameter.
void | setSeed (unsigned int seed)
| Set seed of random function.
unsigned int | getSeed () const
| Get the value of the internal seed parameter.
void | setRatio (float ratio)
| Set ratio of points to be sampled in each grid.
float | getRatio () const
| Get the value of the internal ratio parameter.
Public Member Functions inherited from pcl::Filter< PointT >
| Filter (bool extract_removed_indices=false)
| Empty constructor.
IndicesConstPtr const | getRemovedIndices () const
| Get the point indices being removed.
void | getRemovedIndices (PointIndices &pi)
| Get the point indices being removed.
void | filter (PointCloud &output)
| Calls the filtering method and returns the filtered dataset in output.
Public Member Functions inherited from pcl::PCLBase< PointT >
| 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 PointT & | operator[] (std::size_t pos) const
| Override PointCloud operator[] to shorten code.

## Protected Member Functions

void | applyFilter (PointCloud &output) override
| Sample of point indices into a separate PointCloud.
Protected Member Functions inherited from pcl::Filter< PointT >
const std::string & | getClassName () const
| Get a string representation of the name of this class.
Protected Member Functions inherited from pcl::PCLBase< PointT >
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

unsigned int | sample_ {10}
| Maximum number of samples in each grid.
unsigned int | seed_ {static_cast<unsigned int> (time (nullptr))}
| Random number seed.
float | ratio_ {0.0f}
| Ratio of points to be sampled in each grid.
Protected Attributes inherited from pcl::Filter< PointT >
IndicesPtr | removed_indices_
| Indices of the points that are removed.
std::string | filter_name_
| The filter name.
bool | extract_removed_indices_
| Set to true if we want to return the indices of the removed points.
Protected Attributes inherited from pcl::PCLBase< PointT >
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 PointT>
class pcl::SamplingSurfaceNormal< PointT >

SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N points, and samples points randomly within each grid.

Normal is computed using the N points of each grid. All points sampled within a grid are assigned the same normal.

Author
  Aravindhan K Krishnan. This code is ported from libpointmatcher (https://github.com/ethz-asl/libpointmatcher)

Definition at line 53 of file sampling_surface_normal.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT>

using pcl::SamplingSurfaceNormal< PointT >::ConstPtr = shared_ptr<const SamplingSurfaceNormal<PointT> >

Definition at line 69 of file sampling_surface_normal.h.

## Ptr

template<typename PointT>

using pcl::SamplingSurfaceNormal< PointT >::Ptr = shared_ptr<SamplingSurfaceNormal<PointT> >

Definition at line 68 of file sampling_surface_normal.h.

## Constructor & Destructor Documentation

## SamplingSurfaceNormal()

template<typename PointT>

pcl::SamplingSurfaceNormal< PointT >::SamplingSurfaceNormal | ( |  | ) |

inline

Empty constructor.

Definition at line 72 of file sampling_surface_normal.h.

References pcl::Filter< PointT >::filter_name_, and seed_.

## Member Function Documentation

## applyFilter()

template<typename PointT>

void pcl::SamplingSurfaceNormal< PointT >::applyFilter | ( | PointCloud & | output | ) |

override protected virtual

Sample of point indices into a separate PointCloud.

Parameters

  [out] | output | the resultant point cloud

Implements pcl::Filter< PointT >.

Definition at line 49 of file sampling_surface_normal.hpp.

References pcl::PCLBase< PointT >::input_, ratio_, and sample_.

## getRatio()

template<typename PointT>

float pcl::SamplingSurfaceNormal< PointT >::getRatio | ( |  | ) | const

inline

Get the value of the internal ratio parameter.

Definition at line 122 of file sampling_surface_normal.h.

References ratio_.

## getSample()

template<typename PointT>

unsigned int pcl::SamplingSurfaceNormal< PointT >::getSample | ( |  | ) | const

inline

Get the value of the internal sample parameter.

Definition at line 89 of file sampling_surface_normal.h.

References sample_.

## getSeed()

template<typename PointT>

unsigned int pcl::SamplingSurfaceNormal< PointT >::getSeed | ( |  | ) | const

inline

Get the value of the internal seed parameter.

Definition at line 106 of file sampling_surface_normal.h.

References seed_.

## setRatio()

template<typename PointT>

void pcl::SamplingSurfaceNormal< PointT >::setRatio | ( | float | ratio | ) |

inline

Set ratio of points to be sampled in each grid.

Parameters

  [in] | ratio | sample the ratio of points to be sampled in each grid

Definition at line 115 of file sampling_surface_normal.h.

References ratio_.

## setSample()

template<typename PointT>

void pcl::SamplingSurfaceNormal< PointT >::setSample | ( | unsigned int | sample | ) |

inline

Set maximum number of samples in each grid.

Parameters

  [in] | sample | maximum number of samples in each grid

Definition at line 82 of file sampling_surface_normal.h.

References sample_.

## setSeed()

template<typename PointT>

void pcl::SamplingSurfaceNormal< PointT >::setSeed | ( | unsigned int | seed | ) |

inline

Set seed of random function.

Parameters

  [in] | seed | the input seed

Definition at line 98 of file sampling_surface_normal.h.

References seed_.

## Member Data Documentation

## ratio_

template<typename PointT>

float pcl::SamplingSurfaceNormal< PointT >::ratio_ {0.0f}

protected

Ratio of points to be sampled in each grid.

Definition at line 134 of file sampling_surface_normal.h.

Referenced by applyFilter(), getRatio(), and setRatio().

## sample_

template<typename PointT>

unsigned int pcl::SamplingSurfaceNormal< PointT >::sample_ {10}

protected

Maximum number of samples in each grid.

Definition at line 130 of file sampling_surface_normal.h.

Referenced by applyFilter(), getSample(), and setSample().

## seed_

template<typename PointT>

unsigned int pcl::SamplingSurfaceNormal< PointT >::seed_ {static_cast<unsigned int> (time (nullptr))}

protected

Random number seed.

Definition at line 132 of file sampling_surface_normal.h.

Referenced by getSeed(), SamplingSurfaceNormal(), and setSeed().

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

- pcl/filters/sampling_surface_normal.h
- pcl/filters/impl/sampling_surface_normal.hpp