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... | |
| typedef pcl::PointCloud< PointIn > | PointCloudIn |
| typedef PointCloudIn::Ptr | PointCloudInPtr |
| typedef PointCloudIn::ConstPtr | PointCloudInConstPtr |
| typedef pcl::PointCloud< PointOut > | PointCloudOut |
| typedef boost::shared_ptr < Convolution< PointIn, PointOut > > | Ptr |
| typedef boost::shared_ptr < const Convolution< PointIn, PointOut > > | ConstPtr |
Public Member Functions | |
| Convolution () | |
| Constructor. | |
| ~Convolution () | |
| Empty destructor. | |
| void | setInputCloud (const PointCloudInConstPtr &cloud) |
| Provide a pointer to the input dataset. | |
| void | setKernel (const Eigen::ArrayXf &kernel) |
| Set convolving kernel. | |
| void | setBordersPolicy (int policy) |
| Set the borders policy. | |
| int | getBordersPolicy () |
| Get the borders policy. | |
| 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. | |
| void | convolveRows (PointCloudOut &output) |
| Convolve a float image rows by a given kernel. | |
| void | convolveCols (PointCloudOut &output) |
| Convolve a float image columns by a given kernel. | |
| 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. | |
| void | convolve (PointCloudOut &output) |
| Convolve point cloud with same kernel along rows and columns separately. | |
| template<> | |
| pcl::PointXYZRGB | convolveOneRowDense (int i, int j) |
| template<> | |
| pcl::PointXYZRGB | convolveOneColDense (int i, int j) |
| template<> | |
| pcl::PointXYZRGB | convolveOneRowNonDense (int i, int j) |
| template<> | |
| pcl::PointXYZRGB | convolveOneColNonDense (int i, int j) |
| template<> | |
| pcl::RGB | convolveOneRowDense (int i, int j) |
| template<> | |
| pcl::RGB | convolveOneColDense (int i, int j) |
| template<> | |
| pcl::RGB | convolveOneRowNonDense (int i, int j) |
| template<> | |
| pcl::RGB | convolveOneColNonDense (int i, int j) |
| template<> | |
| void | makeInfinite (pcl::RGB &p) |
Protected Member Functions | |
| void | convolve_rows (PointCloudOut &output) |
| convolve rows and ignore borders | |
| void | convolve_cols (PointCloudOut &output) |
| convolve cols and ignore borders | |
| void | convolve_rows_mirror (PointCloudOut &output) |
| convolve rows and mirror borders | |
| void | convolve_cols_mirror (PointCloudOut &output) |
| convolve cols and mirror borders | |
| void | convolve_rows_duplicate (PointCloudOut &output) |
| convolve rows and duplicate borders | |
| void | convolve_cols_duplicate (PointCloudOut &output) |
| convolve cols and duplicate borders | |
| void | initCompute (PointCloudOut &output) |
| init compute is an internal method called before computation | |
| void | makeInfinite (PointOut &p) |
Protected Attributes | |
| unsigned int | threads_ |
| The number of threads the scheduler should use. | |
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 http://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 77 of file convolution.h.
| typedef boost::shared_ptr< const Convolution<PointIn, PointOut> > pcl::filters::Convolution< PointIn, PointOut >::ConstPtr |
Definition at line 85 of file convolution.h.
| typedef pcl::PointCloud<PointIn> pcl::filters::Convolution< PointIn, PointOut >::PointCloudIn |
Definition at line 80 of file convolution.h.
| typedef PointCloudIn::ConstPtr pcl::filters::Convolution< PointIn, PointOut >::PointCloudInConstPtr |
Definition at line 82 of file convolution.h.
| typedef PointCloudIn::Ptr pcl::filters::Convolution< PointIn, PointOut >::PointCloudInPtr |
Definition at line 81 of file convolution.h.
| typedef pcl::PointCloud<PointOut> pcl::filters::Convolution< PointIn, PointOut >::PointCloudOut |
Definition at line 83 of file convolution.h.
| typedef boost::shared_ptr< Convolution<PointIn, PointOut> > pcl::filters::Convolution< PointIn, PointOut >::Ptr |
Definition at line 84 of file convolution.h.
| enum pcl::filters::Convolution::BORDERS_POLICY |
The borders policy available.
Definition at line 89 of file convolution.h.
| pcl::filters::Convolution< PointIn, PointOut >::Convolution | ( | ) | [inline] |
Constructor.
Definition at line 47 of file convolution.hpp.
| pcl::filters::Convolution< PointIn, PointOut >::~Convolution | ( | ) | [inline] |
Empty destructor.
Definition at line 98 of file convolution.h.
| void pcl::filters::Convolution< PointIn, PointOut >::convolve | ( | PointCloudOut & | output | ) | [inline] |
Convolve point cloud with same kernel along rows and columns separately.
| [out] | output | the convolved cloud |
| void pcl::filters::Convolution< PointIn, PointOut >::convolve | ( | const Eigen::ArrayXf & | h_kernel, | |
| const Eigen::ArrayXf & | v_kernel, | |||
| PointCloudOut & | output | |||
| ) | [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 |
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_cols | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve cols and ignore borders
Definition at line 539 of file convolution.hpp.
References pcl::filters::Convolution< PointIn, PointOut >::makeInfinite().
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveCols().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_cols_duplicate | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve cols and duplicate borders
Definition at line 583 of file convolution.hpp.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveCols().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_cols_mirror | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve cols and mirror borders
Definition at line 628 of file convolution.hpp.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveCols().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_rows | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve rows and ignore borders
Definition at line 405 of file convolution.hpp.
References pcl::filters::Convolution< PointIn, PointOut >::makeInfinite().
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveRows().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_rows_duplicate | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve rows and duplicate borders
Definition at line 449 of file convolution.hpp.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveRows().
| void pcl::filters::Convolution< PointIn, PointOut >::convolve_rows_mirror | ( | PointCloudOut & | output | ) | [inline, protected] |
convolve rows and mirror borders
Definition at line 494 of file convolution.hpp.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveRows().
| void pcl::filters::Convolution< PointIn, PointOut >::convolveCols | ( | PointCloudOut & | output | ) | [inline] |
Convolve a float image columns by a given kernel.
| [in] | kernel | convolution kernel |
| [out] | output | the convolved image |
Definition at line 109 of file convolution.hpp.
References pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_DUPLICATE, pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_IGNORE, pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_MIRROR, pcl::filters::Convolution< PointIn, PointOut >::convolve_cols(), pcl::filters::Convolution< PointIn, PointOut >::convolve_cols_duplicate(), pcl::filters::Convolution< PointIn, PointOut >::convolve_cols_mirror(), pcl::filters::Convolution< PointIn, PointOut >::initCompute(), and pcl::PCLException::what().
| pcl::RGB pcl::filters::Convolution< pcl::RGB, pcl::RGB >::convolveOneColDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 368 of file convolution.hpp.
| pcl::PointXYZRGB pcl::filters::Convolution< pcl::PointXYZRGB, pcl::PointXYZRGB >::convolveOneColDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 263 of file convolution.hpp.
| pcl::RGB pcl::filters::Convolution< pcl::RGB, pcl::RGB >::convolveOneColNonDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 391 of file convolution.hpp.
| pcl::PointXYZRGB pcl::filters::Convolution< pcl::PointXYZRGB, pcl::PointXYZRGB >::convolveOneColNonDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 317 of file convolution.hpp.
References pcl::isFinite(), and pcl::squaredEuclideanDistance().
| pcl::RGB pcl::filters::Convolution< pcl::RGB, pcl::RGB >::convolveOneRowDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 351 of file convolution.hpp.
| pcl::PointXYZRGB pcl::filters::Convolution< pcl::PointXYZRGB, pcl::PointXYZRGB >::convolveOneRowDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 243 of file convolution.hpp.
| pcl::RGB pcl::filters::Convolution< pcl::RGB, pcl::RGB >::convolveOneRowNonDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 385 of file convolution.hpp.
| pcl::PointXYZRGB pcl::filters::Convolution< pcl::PointXYZRGB, pcl::PointXYZRGB >::convolveOneRowNonDense | ( | int | i, | |
| int | j | |||
| ) | [inline] |
Definition at line 283 of file convolution.hpp.
References pcl::isFinite(), and pcl::squaredEuclideanDistance().
| void pcl::filters::Convolution< PointIn, PointOut >::convolveRows | ( | PointCloudOut & | output | ) | [inline] |
Convolve a float image rows by a given kernel.
| [in] | kernel | convolution kernel |
| [out] | output | the convolved cloud |
Definition at line 89 of file convolution.hpp.
References pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_DUPLICATE, pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_IGNORE, pcl::filters::Convolution< PointIn, PointOut >::BORDERS_POLICY_MIRROR, pcl::filters::Convolution< PointIn, PointOut >::convolve_rows(), pcl::filters::Convolution< PointIn, PointOut >::convolve_rows_duplicate(), pcl::filters::Convolution< PointIn, PointOut >::convolve_rows_mirror(), pcl::filters::Convolution< PointIn, PointOut >::initCompute(), and pcl::PCLException::what().
| int pcl::filters::Convolution< PointIn, PointOut >::getBordersPolicy | ( | ) | [inline] |
Get the borders policy.
Definition at line 115 of file convolution.h.
| const float& pcl::filters::Convolution< PointIn, PointOut >::getDistanceThreshold | ( | ) | const [inline] |
Definition at line 127 of file convolution.h.
| void pcl::filters::Convolution< PointIn, PointOut >::initCompute | ( | PointCloudOut & | output | ) | [protected] |
init compute is an internal method called before computation
| [in] | kernel | convolution kernel to be used |
| pcl::InitFailedException |
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolveCols(), and pcl::filters::Convolution< PointIn, PointOut >::convolveRows().
| void pcl::filters::Convolution< pcl::RGB, pcl::RGB >::makeInfinite | ( | pcl::RGB & | p | ) | [inline] |
Definition at line 397 of file convolution.hpp.
| void pcl::filters::Convolution< PointIn, PointOut >::makeInfinite | ( | PointOut & | p | ) | [inline, protected] |
Definition at line 231 of file convolution.h.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::convolve_cols(), and pcl::filters::Convolution< PointIn, PointOut >::convolve_rows().
| void pcl::filters::Convolution< PointIn, PointOut >::setBordersPolicy | ( | int | policy | ) | [inline] |
Set the borders policy.
Definition at line 112 of file convolution.h.
| void pcl::filters::Convolution< PointIn, PointOut >::setDistanceThreshold | ( | const float & | threshold | ) | [inline] |
| [in] | threshold | maximum allowed distance between 2 juxtaposed points |
Definition at line 124 of file convolution.h.
| void pcl::filters::Convolution< PointIn, PointOut >::setInputCloud | ( | const PointCloudInConstPtr & | cloud | ) | [inline] |
Provide a pointer to the input dataset.
| cloud | the const boost shared pointer to a PointCloud message |
Definition at line 104 of file convolution.h.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
| void pcl::filters::Convolution< PointIn, PointOut >::setKernel | ( | const Eigen::ArrayXf & | kernel | ) | [inline] |
Set convolving kernel.
| [in] | kernel | convolving element |
Definition at line 109 of file convolution.h.
Referenced by pcl::ColorGradientModality< PointInT >::processInputData().
| void pcl::filters::Convolution< PointIn, PointOut >::setNumberOfThreads | ( | unsigned int | nr_threads = 0 |
) | [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 132 of file convolution.h.
References pcl::filters::Convolution< PointIn, PointOut >::threads_.
unsigned int pcl::filters::Convolution< PointIn, PointOut >::threads_ [protected] |
The number of threads the scheduler should use.
Definition at line 228 of file convolution.h.
Referenced by pcl::filters::Convolution< PointIn, PointOut >::setNumberOfThreads().