Point Cloud Library (PCL)  1.8.1-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions
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 >
typedef boost::shared_ptr
< Filter< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const Filter< PointT > > 
ConstPtr
 
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
- Public Types inherited from pcl::PCLBase< PointT >
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr
< PointIndices
PointIndicesPtr
 
typedef boost::shared_ptr
< PointIndices const > 
PointIndicesConstPtr
 

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...
 
virtual ~Filter ()
 Empty destructor. More...
 
IndicesConstPtr const getRemovedIndices ()
 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 ()
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const 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 (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

void applyFilter (pcl::PointCloud< PointT > &)
 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 62 of file convolution.h.

Member Enumeration Documentation

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 100 of file convolution.h.

Constructor & Destructor Documentation

template<typename PointT>
pcl::Convolution< PointT >::Convolution ( )
inline

Definition at line 107 of file convolution.h.

Member Function Documentation

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

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

Definition at line 140 of file convolution.h.

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]outputOutput point cloud passed by reference

Definition at line 43 of file convolution.hpp.

template<typename PointT>
void pcl::Convolution< PointT >::setBoundaryOptions ( BOUNDARY_OPTIONS_ENUM  boundary_options)
inline
Parameters
[in]boundary_optionsenum indicating the boundary options to be used for convolution

Definition at line 125 of file convolution.h.

template<typename PointT>
void pcl::Convolution< PointT >::setKernel ( const pcl::PointCloud< PointT > &  kernel)
inline

Sets the kernel to be used for convolution.

Parameters
[in]kernelconvolution kernel passed by reference

Definition at line 116 of file convolution.h.


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