43 #include <pcl/filters/filter.h>
55 template<
typename Po
intT>
64 using Ptr = shared_ptr<FastBilateralFilter<PointT> >;
65 using ConstPtr = shared_ptr<const FastBilateralFilter<PointT> >;
118 Array3D (
const std::size_t width,
const std::size_t height,
const std::size_t depth)
119 : v_({(width*height*depth), Eigen::Vector2f (0.0f, 0.0f), Eigen::aligned_allocator<Eigen::Vector2f>()})
126 inline Eigen::Vector2f&
127 operator () (
const std::size_t x,
const std::size_t y,
const std::size_t z)
128 {
return v_[(x * y_dim_ + y) * z_dim_ + z]; }
130 inline const Eigen::Vector2f&
131 operator () (
const std::size_t x,
const std::size_t y,
const std::size_t z)
const
132 {
return v_[(x * y_dim_ + y) * z_dim_ + z]; }
135 resize (
const std::size_t width,
const std::size_t height,
const std::size_t depth)
140 v_.resize (x_dim_ * y_dim_ * z_dim_);
148 static inline std::size_t
149 clamp (
const std::size_t min_value,
150 const std::size_t max_value,
151 const std::size_t x);
165 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::iterator
167 {
return v_.begin (); }
169 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::iterator
171 {
return v_.end (); }
173 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::const_iterator
175 {
return v_.begin (); }
177 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::const_iterator
179 {
return v_.end (); }
182 std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > v_;
183 std::size_t x_dim_, y_dim_, z_dim_;
190 #ifdef PCL_NO_PRECOMPILE
191 #include <pcl/filters/impl/fast_bilateral.hpp>
193 #define PCL_INSTANTIATE_FastBilateralFilter(T) template class PCL_EXPORTS pcl::FastBilateralFilter<T>;
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::const_iterator end() const
std::size_t y_size() const
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::const_iterator begin() const
std::size_t z_size() const
Array3D(const std::size_t width, const std::size_t height, const std::size_t depth)
static std::size_t clamp(const std::size_t min_value, const std::size_t max_value, const std::size_t x)
std::size_t x_size() const
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::iterator end()
Eigen::Vector2f trilinear_interpolation(const float x, const float y, const float z)
Eigen::Vector2f & operator()(const std::size_t x, const std::size_t y, const std::size_t z)
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::iterator begin()
void resize(const std::size_t width, const std::size_t height, const std::size_t depth)
Implementation of a fast bilateral filter for smoothing depth information in organized point clouds B...
void applyFilter(PointCloud &output) override
Filter the input data and store the results into output.
shared_ptr< FastBilateralFilter< PointT > > Ptr
void setSigmaS(float sigma_s)
Set the standard deviation of the Gaussian used by the bilateral filter for the spatial neighborhood/...
~FastBilateralFilter() override=default
Empty destructor.
FastBilateralFilter()
Empty constructor.
float getSigmaR() const
Get the standard deviation of the Gaussian for the intensity difference.
void setSigmaR(float sigma_r)
Set the standard deviation of the Gaussian used to control how much an adjacent pixel is downweighted...
float getSigmaS() const
Get the size of the Gaussian bilateral filter window as set by the user.
shared_ptr< const FastBilateralFilter< PointT > > ConstPtr
Filter represents the base filter class.
PointCloud represents the base class in PCL for storing collections of 3D points.