42 #include <pcl/point_cloud.h>
61 static const unsigned MAX_KERNEL_WIDTH = 71;
72 unsigned kernel_width = MAX_KERNEL_WIDTH)
const;
85 Eigen::VectorXf &derivative,
86 unsigned kernel_width = MAX_KERNEL_WIDTH)
const;
97 const Eigen::VectorXf &
kernel,
108 template <
typename Po
intT>
void
110 std::function <
float (
const PointT& p)> field_accessor,
111 const Eigen::VectorXf &
kernel,
123 const Eigen::VectorXf &
kernel,
134 template <
typename Po
intT>
void
136 std::function <
float (
const PointT& p)> field_accessor,
137 const Eigen::VectorXf &
kernel,
150 const Eigen::VectorXf &horiz_kernel,
151 const Eigen::VectorXf &vert_kernel,
154 std::cout <<
">>> convolve cpp" << std::endl;
156 convolveRows (input, horiz_kernel, tmp);
157 convolveCols (tmp, vert_kernel, output);
158 std::cout <<
"<<< convolve cpp" << std::endl;
170 template <
typename Po
intT>
inline void
172 std::function <
float (
const PointT& p)> field_accessor,
173 const Eigen::VectorXf &horiz_kernel,
174 const Eigen::VectorXf &vert_kernel,
177 std::cout <<
">>> convolve hpp" << std::endl;
179 convolveRows<PointT>(input, field_accessor, horiz_kernel, tmp);
180 convolveCols(tmp, vert_kernel, output);
181 std::cout <<
"<<< convolve hpp" << std::endl;
196 const Eigen::VectorXf &gaussian_kernel,
197 const Eigen::VectorXf &gaussian_kernel_derivative,
201 convolve (input, gaussian_kernel_derivative, gaussian_kernel, grad_x);
202 convolve (input, gaussian_kernel, gaussian_kernel_derivative, grad_y);
216 template <
typename Po
intT>
inline void
218 std::function <
float (
const PointT& p)> field_accessor,
219 const Eigen::VectorXf &gaussian_kernel,
220 const Eigen::VectorXf &gaussian_kernel_derivative,
224 convolve<PointT> (input, field_accessor, gaussian_kernel_derivative, gaussian_kernel, grad_x);
225 convolve<PointT> (input, field_accessor, gaussian_kernel, gaussian_kernel_derivative, grad_y);
237 const Eigen::VectorXf &gaussian_kernel,
240 convolve (input, gaussian_kernel, gaussian_kernel, output);
251 template <
typename Po
intT>
inline void
253 std::function <
float (
const PointT& p)> field_accessor,
254 const Eigen::VectorXf &gaussian_kernel,
257 convolve<PointT> (input, field_accessor, gaussian_kernel, gaussian_kernel, output);
262 #include <pcl/common/impl/gaussian.hpp>
Class GaussianKernel assembles all the method for computing, convolving, smoothing,...
void computeGradients(const pcl::PointCloud< PointT > &input, std::function< float(const PointT &p)> field_accessor, const Eigen::VectorXf &gaussian_kernel, const Eigen::VectorXf &gaussian_kernel_derivative, pcl::PointCloud< float > &grad_x, pcl::PointCloud< float > &grad_y) const
Computes float image gradients using a gaussian kernel and gaussian kernel derivative.
void convolveCols(const pcl::PointCloud< float > &input, const Eigen::VectorXf &kernel, pcl::PointCloud< float > &output) const
Convolve a float image columns by a given kernel.
void compute(float sigma, Eigen::VectorXf &kernel, unsigned kernel_width=MAX_KERNEL_WIDTH) const
Computes the gaussian kernel and dervative associated to sigma.
void smooth(const pcl::PointCloud< PointT > &input, std::function< float(const PointT &p)> field_accessor, const Eigen::VectorXf &gaussian_kernel, pcl::PointCloud< float > &output) const
Smooth image using a gaussian kernel.
void convolve(const pcl::PointCloud< float > &input, const Eigen::VectorXf &horiz_kernel, const Eigen::VectorXf &vert_kernel, pcl::PointCloud< float > &output) const
Convolve a float image in the 2 directions.
void compute(float sigma, Eigen::VectorXf &kernel, Eigen::VectorXf &derivative, unsigned kernel_width=MAX_KERNEL_WIDTH) const
Computes the gaussian kernel and dervative associated to sigma.
void convolve(const pcl::PointCloud< PointT > &input, std::function< float(const PointT &p)> field_accessor, const Eigen::VectorXf &horiz_kernel, const Eigen::VectorXf &vert_kernel, pcl::PointCloud< float > &output) const
Convolve a float image in the 2 directions.
void smooth(const pcl::PointCloud< float > &input, const Eigen::VectorXf &gaussian_kernel, pcl::PointCloud< float > &output) const
Smooth image using a gaussian kernel.
void convolveRows(const pcl::PointCloud< float > &input, const Eigen::VectorXf &kernel, pcl::PointCloud< float > &output) const
Convolve a float image rows by a given kernel.
void computeGradients(const pcl::PointCloud< float > &input, const Eigen::VectorXf &gaussian_kernel, const Eigen::VectorXf &gaussian_kernel_derivative, pcl::PointCloud< float > &grad_x, pcl::PointCloud< float > &grad_y) const
Computes float image gradients using a gaussian kernel and gaussian kernel derivative.
std::uint32_t width
The point cloud width (if organized as an image-structure).
std::uint32_t height
The point cloud height (if organized as an image-structure).
A point structure representing Euclidean xyz coordinates, and the RGB color.