53 if (!input_->isOrganized ())
55 PCL_ERROR (
"[pcl::FastBilateralFilter] Input cloud needs to be organized.\n");
60 float base_max = -std::numeric_limits<float>::max (),
61 base_min = std::numeric_limits<float>::max ();
65 if (std::isfinite(
pt.z))
74 PCL_WARN (
"[pcl::FastBilateralFilter] Given an empty cloud. Doing nothing.\n");
80 if (!std::isfinite(
pt.z))
91 const std::size_t
small_width =
static_cast<std::size_t
> (
static_cast<float> (input_->width - 1) / sigma_s_) + 1 + 2 *
padding_xy;
92 const std::size_t
small_height =
static_cast<std::size_t
> (
static_cast<float> (input_->height - 1) / sigma_s_) + 1 + 2 *
padding_xy;
97 for (std::size_t x = 0; x < input_->width; ++x)
99 const std::size_t
small_x =
static_cast<std::size_t
> (
static_cast<float> (x) / sigma_s_ + 0.5f) +
padding_xy;
100 for (std::size_t y = 0; y < input_->height; ++y)
104 const std::size_t
small_y =
static_cast<std::size_t
> (
static_cast<float> (y) / sigma_s_ + 0.5f) +
padding_xy;
105 const std::size_t
small_z =
static_cast<std::size_t
> (
static_cast<float> (z) / sigma_r_ + 0.5f) +
padding_z;
114 std::vector<long int> offset (3);
115 offset[0] = &(data (1,0,0)) - &(data (0,0,0));
116 offset[1] = &(data (0,1,0)) - &(data (0,0,0));
117 offset[2] = &(data (0,0,1)) - &(data (0,0,0));
121 for (std::size_t dim = 0; dim < 3; ++dim)
123 const long int off = offset[dim];
130 Eigen::Vector2f*
d_ptr = &(data (x,y,1));
141 for (std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> >::iterator d = data.
begin (); d != data.
end (); ++d)
142 *d /= ((*d)[0] != 0) ? (*d)[1] : 1;
144 for (std::size_t x = 0; x < input_->width; x++)
145 for (std::size_t y = 0; y < input_->height; y++)
149 static_cast<float> (y) / sigma_s_ +
padding_xy,
156 for (std::size_t x = 0; x < input_->width; ++x)
157 for (std::size_t y = 0; y < input_->height; ++y)
161 static_cast<float> (y) / sigma_s_ +
padding_xy,
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.