Point Cloud Library (PCL)
1.14.1-dev
|
Convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions. More...
#include <pcl/filters/convolution.h>
Public Types | |
enum | BORDERS_POLICY { BORDERS_POLICY_IGNORE = -1 , BORDERS_POLICY_MIRROR = 0 , BORDERS_POLICY_DUPLICATE = 1 } |
The borders policy available. More... | |
using | PointCloudIn = pcl::PointCloud< PointIn > |
using | PointCloudInPtr = typename PointCloudIn::Ptr |
using | PointCloudInConstPtr = typename PointCloudIn::ConstPtr |
using | PointCloudOut = pcl::PointCloud< PointOut > |
using | Ptr = shared_ptr< Convolution< PointIn, PointOut > > |
using | ConstPtr = shared_ptr< const Convolution< PointIn, PointOut > > |
Public Member Functions | |
Convolution () | |
Constructor. More... | |
~Convolution ()=default | |
Empty destructor. More... | |
void | setInputCloud (const PointCloudInConstPtr &cloud) |
Provide a pointer to the input dataset. More... | |
void | setKernel (const Eigen::ArrayXf &kernel) |
Set convolving kernel. More... | |
void | setBordersPolicy (int policy) |
Set the borders policy. More... | |
int | getBordersPolicy () |
Get the borders policy. More... | |
void | setDistanceThreshold (const float &threshold) |
const float & | getDistanceThreshold () const |
void | setNumberOfThreads (unsigned int nr_threads=0) |
Initialize the scheduler and set the number of threads to use. More... | |
void | convolveRows (PointCloudOut &output) |
Convolve a float image rows by a given kernel. More... | |
void | convolveCols (PointCloudOut &output) |
Convolve a float image columns by a given kernel. More... | |
void | convolve (const Eigen::ArrayXf &h_kernel, const Eigen::ArrayXf &v_kernel, PointCloudOut &output) |
Convolve point cloud with an horizontal kernel along rows then vertical kernel along columns : convolve separately. More... | |
void | convolve (PointCloudOut &output) |
Convolve point cloud with same kernel along rows and columns separately. More... | |
Protected Member Functions | |
void | convolve_rows (PointCloudOut &output) |
convolve rows and ignore borders More... | |
void | convolve_cols (PointCloudOut &output) |
convolve cols and ignore borders More... | |
void | convolve_rows_mirror (PointCloudOut &output) |
convolve rows and mirror borders More... | |
void | convolve_cols_mirror (PointCloudOut &output) |
convolve cols and mirror borders More... | |
void | convolve_rows_duplicate (PointCloudOut &output) |
convolve rows and duplicate borders More... | |
void | convolve_cols_duplicate (PointCloudOut &output) |
convolve cols and duplicate borders More... | |
void | initCompute (PointCloudOut &output) |
init compute is an internal method called before computation More... | |
void | makeInfinite (PointOut &p) |
void | makeInfinite (pcl::RGB &p) |
Protected Attributes | |
unsigned int | threads_ {1} |
The number of threads the scheduler should use. More... | |
Convolution is a mathematical operation on two functions f and g, producing a third function that is typically viewed as a modified version of one of the original functions.
see https://en.wikipedia.org/wiki/Convolution.
The class provides rows, column and separate convolving operations of a point cloud. Columns and separate convolution is only allowed on organised point clouds.
When convolving, computing the rows and cols elements at 1/2 kernel width distance from the borders is not defined. We allow for 3 policies:
Definition at line 72 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::ConstPtr = shared_ptr< const Convolution<PointIn, PointOut> > |
Definition at line 80 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::PointCloudIn = pcl::PointCloud<PointIn> |
Definition at line 75 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::PointCloudInConstPtr = typename PointCloudIn::ConstPtr |
Definition at line 77 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::PointCloudInPtr = typename PointCloudIn::Ptr |
Definition at line 76 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::PointCloudOut = pcl::PointCloud<PointOut> |
Definition at line 78 of file convolution.h.
using pcl::filters::Convolution< PointIn, PointOut >::Ptr = shared_ptr< Convolution<PointIn, PointOut> > |
Definition at line 79 of file convolution.h.
enum pcl::filters::Convolution::BORDERS_POLICY |
The borders policy available.
Enumerator | |
---|---|
BORDERS_POLICY_IGNORE | |
BORDERS_POLICY_MIRROR | |
BORDERS_POLICY_DUPLICATE |
Definition at line 84 of file convolution.h.
pcl::filters::Convolution< PointIn, PointOut >::Convolution |
Constructor.
Definition at line 54 of file convolution.hpp.
|
default |
Empty destructor.
|
inline |
Convolve point cloud with an horizontal kernel along rows then vertical kernel along columns : convolve separately.
[in] | h_kernel | kernel for convolving rows |
[in] | v_kernel | kernel for convolving columns |
[out] | output | the convolved cloud |
Definition at line 132 of file convolution.hpp.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
|
inline |
Convolve point cloud with same kernel along rows and columns separately.
[out] | output | the convolved cloud |
Definition at line 153 of file convolution.hpp.
|
protected |
convolve cols and ignore borders
Definition at line 418 of file convolution.hpp.
|
protected |
convolve cols and duplicate borders
Definition at line 464 of file convolution.hpp.
|
protected |
convolve cols and mirror borders
Definition at line 511 of file convolution.hpp.
|
protected |
convolve rows and ignore borders
Definition at line 278 of file convolution.hpp.
|
protected |
convolve rows and duplicate borders
Definition at line 324 of file convolution.hpp.
|
protected |
convolve rows and mirror borders
Definition at line 371 of file convolution.hpp.
|
inline |
Convolve a float image columns by a given kernel.
[out] | output | the convolved image |
Definition at line 112 of file convolution.hpp.
|
inline |
Convolve a float image rows by a given kernel.
[out] | output | the convolved cloud |
Definition at line 92 of file convolution.hpp.
|
inline |
Get the borders policy.
Definition at line 110 of file convolution.h.
|
inline |
Definition at line 122 of file convolution.h.
|
protected |
init compute is an internal method called before computation
[in] | output |
pcl::InitFailedException |
Definition at line 61 of file convolution.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
|
inlineprotected |
Definition at line 272 of file convolution.hpp.
|
inlineprotected |
Definition at line 224 of file convolution.h.
|
inline |
Set the borders policy.
Definition at line 107 of file convolution.h.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
|
inline |
[in] | threshold | maximum allowed distance between 2 juxtaposed points |
Definition at line 119 of file convolution.h.
|
inline |
Provide a pointer to the input dataset.
cloud | the const boost shared pointer to a PointCloud message |
Definition at line 99 of file convolution.h.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
|
inline |
Set convolving kernel.
[in] | kernel | convolving element |
Definition at line 104 of file convolution.h.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
|
inline |
Initialize the scheduler and set the number of threads to use.
nr_threads | the number of hardware threads to use (0 sets the value back to automatic) |
Definition at line 127 of file convolution.h.
References pcl::filters::Convolution< PointIn, PointOut >::threads_.
|
protected |
The number of threads the scheduler should use.
Definition at line 221 of file convolution.h.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::setNumberOfThreads().