Loading...
Searching...
No Matches
pcl::Convolution< PointT > Class Template Reference

A 2D convolution class. More...

`#include <pcl/2d/convolution.h>`

Inheritance diagram for pcl::Convolution< PointT >:

## Public Types

enum | BOUNDARY_OPTIONS_ENUM { BOUNDARY_OPTION_CLAMP , BOUNDARY_OPTION_MIRROR , BOUNDARY_OPTION_ZERO_PADDING }
| Extra pixels are added to the input image so that convolution can be performed over the entire image. More...
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

| Convolution ()
void | setKernel (const pcl::PointCloud< PointT > &kernel)
| Sets the kernel to be used for convolution.
void | setBoundaryOptions (BOUNDARY_OPTIONS_ENUM boundary_options)
void | filter (pcl::PointCloud< PointT > &output)
| Performs 2D convolution of the input point cloud with the kernel.
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 (pcl::PointCloud< PointT > &) override
| This is an over-ride function for the pcl::Filter interface.
Protected Member Functions inherited from pcl::Filter< PointT >
virtual void | applyFilter (PointCloud &output)=0
| Abstract filter method.
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.

## Additional Inherited Members

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::Convolution< PointT >

A 2D convolution class.

Definition at line 60 of file convolution.h.

## Member Enumeration Documentation

## BOUNDARY_OPTIONS_ENUM

template<typename PointT>

enum pcl::Convolution::BOUNDARY_OPTIONS_ENUM

Extra pixels are added to the input image so that convolution can be performed over the entire image.

(kernel_height/2) rows are added before the first row and after the last row (kernel_width/2) columns are added before the first column and after the last column border options define what values are set for these extra rows and columns

Assume that the three rows of right edge of the image looks like this: .. 3 2 1 .. 6 5 4 .. 9 8 7

BOUNDARY_OPTION_CLAMP : the extra pixels are set to the pixel value of the boundary pixel. This option makes it seem as if it were: .. 3 2 1| 1 1 1 .. .. 6 5 4| 4 4 4 .. .. 9 8 7| 7 7 7 ..

BOUNDARY_OPTION_MIRROR : the input image is mirrored at the boundary. This option makes it seem as if it were: .. 3 2 1| 1 2 3 .. .. 6 5 4| 4 5 6 .. .. 9 8 7| 7 8 9 ..

BOUNDARY_OPTION_ZERO_PADDING : the extra pixels are simply set to 0. This option makes it seem as if it were: .. 3 2 1| 0 0 0 .. .. 6 5 4| 0 0 0 .. .. 9 8 7| 0 0 0 ..

Note that the input image is not actually extended in size. Instead, based on these options, the convolution is performed differently at the border pixels.

Enumerator
BOUNDARY_OPTION_CLAMP |
BOUNDARY_OPTION_MIRROR |
BOUNDARY_OPTION_ZERO_PADDING |

Definition at line 98 of file convolution.h.

## Constructor & Destructor Documentation

## Convolution()

template<typename PointT>

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

inline

Definition at line 104 of file convolution.h.

References BOUNDARY_OPTION_CLAMP.

## Member Function Documentation

## applyFilter()

template<typename PointT>

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

inline override protected

This is an over-ride function for the pcl::Filter interface.

Definition at line 135 of file convolution.h.

## filter()

template<typename PointT>

void pcl::Convolution< PointT >::filter | ( | pcl::PointCloud< PointT > & | output | ) |

Performs 2D convolution of the input point cloud with the kernel.

Uses clamp as the default boundary option.

Parameters

  [out] | output | Output point cloud passed by reference

Definition at line 46 of file convolution.hpp.

References BOUNDARY_OPTION_CLAMP, BOUNDARY_OPTION_MIRROR, BOUNDARY_OPTION_ZERO_PADDING, and pcl::PCLBase< PointT >::input_.

## setBoundaryOptions()

template<typename PointT>

void pcl::Convolution< PointT >::setBoundaryOptions | ( | BOUNDARY_OPTIONS_ENUM | boundary_options | ) |

inline

Parameters

  [in] | boundary_options | enum indicating the boundary options to be used for convolution

Definition at line 120 of file convolution.h.

## setKernel()

template<typename PointT>

void pcl::Convolution< PointT >::setKernel | ( | const pcl::PointCloud< PointT > & | kernel | ) |

inline

Sets the kernel to be used for convolution.

Parameters

  [in] | kernel | convolution kernel passed by reference

Definition at line 110 of file convolution.h.

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

- pcl/2d/convolution.h
- pcl/2d/impl/convolution.hpp