point_cloud_library / 1.12.1 / classpcl_1_1_convolution.html /

A 2D convolution class. More...

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

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. More...
void setBoundaryOptions (BOUNDARY_OPTIONS_ENUM boundary_options)
void filter (pcl::PointCloud< PointT > &output)
Performs 2D convolution of the input point cloud with the kernel. More...
- Public Member Functions inherited from pcl::Filter< PointT >
Filter (bool extract_removed_indices=false)
Empty constructor. More...
const IndicesConstPtr getRemovedIndices () const
Get the point indices being removed. More...
void getRemovedIndices (PointIndices &pi)
Get the point indices being removed. More...
void filter (PointCloud &output)
Calls the filtering method and returns the filtered dataset in output. More...
- Public Member Functions inherited from pcl::PCLBase< PointT >
PCLBase ()
Empty constructor. More...
PCLBase (const PCLBase &base)
Copy constructor. More...
virtual ~PCLBase ()=default
Destructor. More...
virtual void setInputCloud (const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset. More...
const PointCloudConstPtr getInputCloud () const
Get a pointer to the input point cloud dataset. More...
virtual void setIndices (const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const IndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const PointIndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
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. More...
IndicesPtr getIndices ()
Get a pointer to the vector of indices used. More...
const IndicesConstPtr getIndices () const
Get a pointer to the vector of indices used. More...
const PointT & operator[] (std::size_t pos) const
Override PointCloud operator[] to shorten code. More...

Protected Member Functions

void applyFilter (pcl::PointCloud< PointT > &) override
This is an over-ride function for the pcl::Filter interface. More...
- Protected Member Functions inherited from pcl::Filter< PointT >
virtual void applyFilter (PointCloud &output)=0
Abstract filter method. More...
const std::string & getClassName () const
Get a string representation of the name of this class. More...
- Protected Member Functions inherited from pcl::PCLBase< PointT >
bool initCompute ()
This method should get called before starting the actual computation. More...
bool deinitCompute ()
This method should get called after finishing the actual computation. More...

Additional Inherited Members

- Protected Attributes inherited from pcl::Filter< PointT >
IndicesPtr removed_indices_
Indices of the points that are removed. More...
std::string filter_name_
The filter name. More...
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points. More...
- Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr input_
The input point cloud dataset. More...
IndicesPtr indices_
A pointer to the vector of point indices to use. More...
bool use_indices_
Set to true if point indices are used. More...
bool fake_indices_
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...

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.

Member Function Documentation

applyFilter()

template<typename PointT >
void pcl::Convolution< PointT >::applyFilter ( pcl::PointCloud< PointT > & )
inlineoverrideprotected

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.

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:

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_convolution.html