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)
123 v_ = std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > (width*height*depth, Eigen::Vector2f (0.0f, 0.0f));
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>; ~FastBilateralFilter()
Empty destructor.
Eigen::Vector2f trilinear_interpolation(const float x, const float y, const float z)
FastBilateralFilter()
Empty constructor.
shared_ptr< const FastBilateralFilter< PointT > > ConstPtr
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::const_iterator begin() const
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::iterator end()
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::const_iterator end() const
Filter represents the base filter class.
std::size_t x_size() const
Eigen::Vector2f & operator()(const std::size_t x, const std::size_t y, const std::size_t z)
void setSigmaS(float sigma_s)
Set the standard deviation of the Gaussian used by the bilateral filter for the spatial neighborhood/...
PointCloud represents the base class in PCL for storing collections of 3D points. ...
std::size_t z_size() const
Array3D(const std::size_t width, const std::size_t height, const std::size_t depth)
float getSigmaR() const
Get the standard deviation of the Gaussian for the intensity difference.
std::vector< Eigen::Vector2f, Eigen::aligned_allocator< Eigen::Vector2f > >::iterator begin()
Implementation of a fast bilateral filter for smoothing depth information in organized point clouds B...
shared_ptr< FastBilateralFilter< PointT > > Ptr
void resize(const std::size_t width, const std::size_t height, const std::size_t depth)
void setSigmaR(float sigma_r)
Set the standard deviation of the Gaussian used to control how much an adjacent pixel is downweighted...
std::size_t y_size() const
void applyFilter(PointCloud &output) override
Filter the input data and store the results into output.
static std::size_t clamp(const std::size_t min_value, const std::size_t max_value, const std::size_t x)
float getSigmaS() const
Get the size of the Gaussian bilateral filter window as set by the user.