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> >;
114 Array3D (
const std::size_t width,
const std::size_t height,
const std::size_t depth)
115 : v_({(width*height*depth), Eigen::Vector2f (0.0f, 0.0f), Eigen::aligned_allocator<Eigen::Vector2f>()})
122 inline Eigen::Vector2f&
123 operator () (
const std::size_t x,
const std::size_t y,
const std::size_t z)
124 {
return v_[(x * y_dim_ + y) * z_dim_ + z]; }
126 inline const Eigen::Vector2f&
127 operator () (
const std::size_t x,
const std::size_t y,
const std::size_t z)
const
128 {
return v_[(x * y_dim_ + y) * z_dim_ + z]; }
131 resize (
const std::size_t width,
const std::size_t height,
const std::size_t depth)
136 v_.resize (x_dim_ * y_dim_ * z_dim_);
144 static inline std::size_t
145 clamp (
const std::size_t min_value,
146 const std::size_t max_value,
147 const std::size_t x);
161 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::iterator
163 {
return v_.begin (); }
165 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::iterator
167 {
return v_.end (); }
169 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::const_iterator
171 {
return v_.begin (); }
173 inline std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::const_iterator
175 {
return v_.end (); }
178 std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > v_;
179 std::size_t x_dim_, y_dim_, z_dim_;
186 #ifdef PCL_NO_PRECOMPILE
187 #include <pcl/filters/impl/fast_bilateral.hpp>
189 #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.
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
FastBilateralFilter()=default
Empty constructor.
Filter represents the base filter class.
PointCloud represents the base class in PCL for storing collections of 3D points.