88 if ((detecting_edge_types_ & EDGELABEL_NAN_BOUNDARY) || (detecting_edge_types_ & EDGELABEL_OCCLUDING) || (detecting_edge_types_ & EDGELABEL_OCCLUDED))
106 if (!std::isfinite ((*input_)[
curr_idx].z))
119 if (!std::isfinite ((*input_)[
nghr_idx].z))
140 if (detecting_edge_types_ & EDGELABEL_OCCLUDED)
141 labels[
curr_idx].label |= EDGELABEL_OCCLUDED;
145 if (detecting_edge_types_ & EDGELABEL_OCCLUDING)
146 labels[
curr_idx].label |= EDGELABEL_OCCLUDING;
162 if (!std::isfinite ((*input_)[
nghr_idx].z))
176 float corr_depth = std::numeric_limits<float>::quiet_NaN ();
179 int s_row =
row +
static_cast<int> (std::floor (
f_dy*
static_cast<float> (
s_idx)));
180 int s_col =
col +
static_cast<int> (std::floor (
f_dx*
static_cast<float> (
s_idx)));
185 if (std::isfinite ((*input_)[
s_row*
int(input_->width)+
s_col].z))
201 if (detecting_edge_types_ & EDGELABEL_OCCLUDED)
202 labels[
curr_idx].label |= EDGELABEL_OCCLUDED;
206 if (detecting_edge_types_ & EDGELABEL_OCCLUDING)
207 labels[
curr_idx].label |= EDGELABEL_OCCLUDING;
214 if (detecting_edge_types_ & EDGELABEL_NAN_BOUNDARY)
215 labels[
curr_idx].label |= EDGELABEL_NAN_BOUNDARY;
244 if ((detecting_edge_types_ & EDGELABEL_RGB_CANNY))
247 gray->width = input_->width;
248 gray->height = input_->height;
249 gray->resize (input_->height*input_->width);
251 for (std::size_t i = 0; i < input_->size (); ++i)
252 (*
gray)[i].intensity =
float (((*input_)[i].r + (*input_)[i].g + (*input_)[i].b) / 3);
257 edge.setHysteresisThresholdLow (th_rgb_canny_low_);
258 edge.setHysteresisThresholdHigh (th_rgb_canny_high_);
261 for (std::uint32_t
row=0;
row<labels.height;
row++)
263 for (std::uint32_t
col=0;
col<labels.width;
col++)
266 labels[
row * labels.width +
col].label |= EDGELABEL_RGB_CANNY;
292 if ((detecting_edge_types_ & EDGELABEL_HIGH_CURVATURE))
296 nx.width = normals_->width;
297 nx.height = normals_->height;
298 nx.resize (normals_->height*normals_->width);
300 ny.width = normals_->width;
301 ny.height = normals_->height;
302 ny.resize (normals_->height*normals_->width);
304 for (std::uint32_t
row=0;
row<normals_->height;
row++)
306 for (std::uint32_t
col=0;
col<normals_->width;
col++)
308 nx (
col,
row).intensity = (*normals_)[
row*normals_->width +
col].normal_x;
309 ny (
col,
row).intensity = (*normals_)[
row*normals_->width +
col].normal_y;
315 edge.setHysteresisThresholdLow (th_hc_canny_low_);
316 edge.setHysteresisThresholdHigh (th_hc_canny_high_);
319 for (std::uint32_t
row=0;
row<labels.height;
row++)
321 for (std::uint32_t
col=0;
col<labels.width;
col++)
324 labels[
row * labels.width +
col].label |= EDGELABEL_HIGH_CURVATURE;
void compute(pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
Perform the 3D edge detection (edges from depth discontinuities, RGB Canny edge, and high curvature r...