42 #include <pcl/common/gaussian.h>
43 #include <pcl/exceptions.h>
48 template <
typename Po
intT>
void
50 std::function <
float (
const PointT& p)> field_accessor,
51 const Eigen::VectorXf&
kernel,
54 assert(
kernel.size () % 2 == 1);
55 int kernel_width =
kernel.size () -1;
56 int radius =
kernel.size () / 2.0;
65 for(
int j = 0; j < input.
height; j++)
67 for (i = 0 ; i < radius ; i++)
70 for ( ; i < input.
width - radius ; i++) {
72 for (
int k = kernel_width, l = i - radius; k >= 0 ; k--, l++)
73 output (i,j) += field_accessor (input (l,j)) *
kernel[k];
76 for ( ; i < input.
width ; i++)
81 template <
typename Po
intT>
void
83 std::function <
float (
const PointT& p)> field_accessor,
84 const Eigen::VectorXf&
kernel,
87 assert(
kernel.size () % 2 == 1);
88 int kernel_width =
kernel.size () -1;
89 int radius =
kernel.size () / 2.0;
98 for(
int i = 0; i < input.
width; i++)
100 for (j = 0 ; j < radius ; j++)
103 for ( ; j < input.
height - radius ; j++) {
105 for (
int k = kernel_width, l = j - radius ; k >= 0 ; k--, l++)
107 output (i,j) += field_accessor (input (i,l)) *
kernel[k];
111 for ( ; j < input.
height ; j++)