Point Cloud Library (PCL)  1.9.1
color_gradient_dot_modality.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2011, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
38 #ifndef PCL_FEATURES_COLOR_GRADIENT_DOT_MODALITY
39 #define PCL_FEATURES_COLOR_GRADIENT_DOT_MODALITY
40 
41 #include <pcl/pcl_base.h>
42 #include <pcl/point_cloud.h>
43 #include <pcl/point_types.h>
44 
45 #include <pcl/recognition/dot_modality.h>
46 #include <pcl/recognition/point_types.h>
47 #include <pcl/recognition/quantized_map.h>
48 
49 
50 namespace pcl
51 {
52  template <typename PointInT>
54  : public DOTModality, public PCLBase<PointInT>
55  {
56  protected:
58 
59  struct Candidate
60  {
62 
63  int x;
64  int y;
65 
66  bool operator< (const Candidate & rhs)
67  {
68  return (gradient.magnitude > rhs.gradient.magnitude);
69  }
70  };
71 
72  public:
74 
75  ColorGradientDOTModality (size_t bin_size);
76 
77  virtual ~ColorGradientDOTModality ();
78 
79  inline void
80  setGradientMagnitudeThreshold (const float threshold)
81  {
82  gradient_magnitude_threshold_ = threshold;
83  }
84 
85  //inline QuantizedMap &
86  //getDominantQuantizedMap ()
87  //{
88  // return (dominant_quantized_color_gradients_);
89  //}
90 
91  inline QuantizedMap &
93  {
94  return (dominant_quantized_color_gradients_);
95  }
96 
99  const RegionXY & region);
100 
101  /** \brief Provide a pointer to the input dataset (overwrites the PCLBase::setInputCloud method)
102  * \param cloud the const boost shared pointer to a PointCloud message
103  */
104  virtual void
105  setInputCloud (const typename PointCloudIn::ConstPtr & cloud)
106  {
107  input_ = cloud;
108  //processInputData ();
109  }
110 
111  virtual void
112  processInputData ();
113 
114  protected:
115 
116  void
118 
119  void
121 
122  //void
123  //computeInvariantQuantizedGradients ();
124 
125  private:
126  size_t bin_size_;
127 
128  float gradient_magnitude_threshold_;
129  pcl::PointCloud<pcl::GradientXY> color_gradients_;
130 
131  pcl::QuantizedMap dominant_quantized_color_gradients_;
132  //pcl::QuantizedMap invariant_quantized_color_gradients_;
133 
134  };
135 
136 }
137 
138 //////////////////////////////////////////////////////////////////////////////////////////////
139 template <typename PointInT>
141 ColorGradientDOTModality (const size_t bin_size)
142  : bin_size_ (bin_size), gradient_magnitude_threshold_ (80.0f), color_gradients_ (), dominant_quantized_color_gradients_ ()
143 {
144 }
145 
146 //////////////////////////////////////////////////////////////////////////////////////////////
147 template <typename PointInT>
150 {
151 }
152 
153 //////////////////////////////////////////////////////////////////////////////////////////////
154 template <typename PointInT>
155 void
158 {
159  // extract color gradients
160  computeMaxColorGradients ();
161 
162  // compute dominant quantized gradient map
163  computeDominantQuantizedGradients ();
164 
165  // compute invariant quantized gradient map
166  //computeInvariantQuantizedGradients ();
167 }
168 
169 //////////////////////////////////////////////////////////////////////////////////////////////
170 template <typename PointInT>
171 void
174 {
175  const int width = input_->width;
176  const int height = input_->height;
177 
178  color_gradients_.points.resize (width*height);
179  color_gradients_.width = width;
180  color_gradients_.height = height;
181 
182  const float pi = tan(1.0f)*4;
183  for (int row_index = 0; row_index < height-2; ++row_index)
184  {
185  for (int col_index = 0; col_index < width-2; ++col_index)
186  {
187  const int index0 = row_index*width+col_index;
188  const int index_c = row_index*width+col_index+2;
189  const int index_r = (row_index+2)*width+col_index;
190 
191  //const int index_d = (row_index+1)*width+col_index+1;
192 
193  const unsigned char r0 = input_->points[index0].r;
194  const unsigned char g0 = input_->points[index0].g;
195  const unsigned char b0 = input_->points[index0].b;
196 
197  const unsigned char r_c = input_->points[index_c].r;
198  const unsigned char g_c = input_->points[index_c].g;
199  const unsigned char b_c = input_->points[index_c].b;
200 
201  const unsigned char r_r = input_->points[index_r].r;
202  const unsigned char g_r = input_->points[index_r].g;
203  const unsigned char b_r = input_->points[index_r].b;
204 
205  const float r_dx = static_cast<float> (r_c) - static_cast<float> (r0);
206  const float g_dx = static_cast<float> (g_c) - static_cast<float> (g0);
207  const float b_dx = static_cast<float> (b_c) - static_cast<float> (b0);
208 
209  const float r_dy = static_cast<float> (r_r) - static_cast<float> (r0);
210  const float g_dy = static_cast<float> (g_r) - static_cast<float> (g0);
211  const float b_dy = static_cast<float> (b_r) - static_cast<float> (b0);
212 
213  const float sqr_mag_r = r_dx*r_dx + r_dy*r_dy;
214  const float sqr_mag_g = g_dx*g_dx + g_dy*g_dy;
215  const float sqr_mag_b = b_dx*b_dx + b_dy*b_dy;
216 
217  GradientXY gradient;
218  gradient.x = col_index;
219  gradient.y = row_index;
220  if (sqr_mag_r > sqr_mag_g && sqr_mag_r > sqr_mag_b)
221  {
222  gradient.magnitude = sqrt (sqr_mag_r);
223  gradient.angle = atan2 (r_dy, r_dx) * 180.0f / pi;
224  }
225  else if (sqr_mag_g > sqr_mag_b)
226  {
227  //GradientXY gradient;
228  gradient.magnitude = sqrt (sqr_mag_g);
229  gradient.angle = atan2 (g_dy, g_dx) * 180.0f / pi;
230  //gradient.x = col_index;
231  //gradient.y = row_index;
232 
233  //color_gradients_ (col_index+1, row_index+1) = gradient;
234  }
235  else
236  {
237  //GradientXY gradient;
238  gradient.magnitude = sqrt (sqr_mag_b);
239  gradient.angle = atan2 (b_dy, b_dx) * 180.0f / pi;
240  //gradient.x = col_index;
241  //gradient.y = row_index;
242 
243  //color_gradients_ (col_index+1, row_index+1) = gradient;
244  }
245 
246  assert (color_gradients_ (col_index+1, row_index+1).angle >= -180 &&
247  color_gradients_ (col_index+1, row_index+1).angle <= 180);
248 
249  color_gradients_ (col_index+1, row_index+1) = gradient;
250  }
251  }
252 
253  return;
254 }
255 
256 //////////////////////////////////////////////////////////////////////////////////////////////
257 //template <typename PointInT>
258 //void
259 //pcl::ColorGradientDOTModality<PointInT>::
260 //computeInvariantQuantizedGradients ()
261 //{
262 // const size_t input_width = input_->width;
263 // const size_t input_height = input_->height;
264 //
265 // const size_t output_width = input_width / bin_size;
266 // const size_t output_height = input_height / bin_size;
267 //
268 // invariant_quantized_color_gradients_.resize (output_width, output_height);
269 //
270 // size_t offset_x = 0;
271 // size_t offset_y = 0;
272 //
273 // const size_t num_gradient_bins = 7;
274 // const size_t max_num_of_gradients = 7;
275 //
276 // const float divisor = 180.0f / (num_gradient_bins - 1.0f);
277 //
278 // float global_max_gradient = 0.0f;
279 // float local_max_gradient = 0.0f;
280 //
281 // unsigned char * peak_pointer = dominant_quantized_color_gradients_.getData ();
282 //
283 // //int tmpCounter = 0;
284 // for (size_t row_bin_index = 0; row_bin_index < output_height; ++row_bin_index)
285 // {
286 // for (size_t col_bin_index = 0; col_bin_index < output_width; ++col_bin_index)
287 // {
288 // std::vector<int> x_coordinates;
289 // std::vector<int> y_coordinates;
290 // std::vector<float> values;
291 //
292 // for (int row_pixel_index = -static_cast<int> (bin_size)/2;
293 // row_pixel_index <= static_cast<int> (bin_size)/2;
294 // row_pixel_index += static_cast<int> (bin_size)/2)
295 // {
296 // const size_t y_position = offset_y + row_pixel_index;
297 //
298 // if (y_position < 0 || y_position >= input_height) continue;
299 //
300 // for (int col_pixel_index = -static_cast<int> (bin_size)/2;
301 // col_pixel_index <= static_cast<int> (bin_size)/2;
302 // col_pixel_index += static_cast<int> (bin_size)/2)
303 // {
304 // const size_t x_position = offset_x + col_pixel_index;
305 // size_t counter = 0;
306 //
307 // if (x_position < 0 || x_position >= input_width) continue;
308 //
309 // // find maximum gradient magnitude in current bin
310 // {
311 // local_max_gradient = 0.0f;
312 // for (size_t row_sub_index = 0; row_sub_index < bin_size; ++row_sub_index)
313 // {
314 // for (size_t col_sub_index = 0; col_sub_index < bin_size; ++col_sub_index)
315 // {
316 // const float magnitude = color_gradients_ (col_sub_index + x_position, row_sub_index + y_position).magnitude;
317 //
318 // if (magnitude > local_max_gradient)
319 // local_max_gradient = magnitude;
320 // }
321 // }
322 // }
323 //
324 // //*stringPointer += localMaxGradient;
325 //
326 // if (local_max_gradient > global_max_gradient)
327 // {
328 // global_max_gradient = local_max_gradient;
329 // }
330 //
331 // // iteratively search for the largest gradients, set it to -1, search the next largest ... etc.
332 // while (true)
333 // {
334 // float max_gradient;
335 // size_t max_gradient_pos_x;
336 // size_t max_gradient_pos_y;
337 //
338 // // find next location and value of maximum gradient magnitude in current region
339 // {
340 // max_gradient = 0.0f;
341 // for (size_t row_sub_index = 0; row_sub_index < bin_size; ++row_sub_index)
342 // {
343 // for (size_t col_sub_index = 0; col_sub_index < bin_size; ++col_sub_index)
344 // {
345 // const float magnitude = color_gradients_ (col_sub_index + x_position, row_sub_index + y_position).magnitude;
346 //
347 // if (magnitude > max_gradient)
348 // {
349 // max_gradient = magnitude;
350 // max_gradient_pos_x = col_sub_index;
351 // max_gradient_pos_y = row_sub_index;
352 // }
353 // }
354 // }
355 // }
356 //
357 // // TODO: really localMaxGradient and not maxGradient???
358 // if (local_max_gradient < gradient_magnitude_threshold_)
359 // {
360 // //*peakPointer |= 1 << (numOfGradientBins-1);
361 // break;
362 // }
363 //
364 // // TODO: replace gradient_magnitude_threshold_ here by a fixed ratio?
365 // if (max_gradient < (local_max_gradient * gradient_magnitude_threshold_) ||
366 // counter >= max_num_of_gradients)
367 // {
368 // break;
369 // }
370 //
371 // ++counter;
372 //
373 // const size_t angle = static_cast<size_t> (180 + color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).angle + 0.5f);
374 // const size_t bin_index = static_cast<size_t> ((angle >= 180 ? angle-180 : angle)/divisor);
375 //
376 // *peak_pointer |= 1 << bin_index;
377 //
378 // x_coordinates.push_back (max_gradient_pos_x + x_position);
379 // y_coordinates.push_back (max_gradient_pos_y + y_position);
380 // values.push_back (max_gradient);
381 //
382 // color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).magnitude = -1.0f;
383 // }
384 //
385 // // reset values which have been set to -1
386 // for (size_t value_index = 0; value_index < values.size (); ++value_index)
387 // {
388 // color_gradients_ (x_coordinates[value_index], y_coordinates[value_index]).magnitude = values[value_index];
389 // }
390 //
391 // x_coordinates.clear ();
392 // y_coordinates.clear ();
393 // values.clear ();
394 // }
395 // }
396 //
397 // if (*peak_pointer == 0)
398 // {
399 // *peak_pointer |= 1 << 7;
400 // }
401 //
402 // //if (*peakPointer != 0)
403 // //{
404 // // ++tmpCounter;
405 // //}
406 //
407 // //++stringPointer;
408 // ++peak_pointer;
409 //
410 // offset_x += bin_size;
411 // }
412 //
413 // offset_y += bin_size;
414 // offset_x = bin_size/2+1;
415 // }
416 //}
417 
418 //////////////////////////////////////////////////////////////////////////////////////////////
419 template <typename PointInT>
420 void
423 {
424  const size_t input_width = input_->width;
425  const size_t input_height = input_->height;
426 
427  const size_t output_width = input_width / bin_size_;
428  const size_t output_height = input_height / bin_size_;
429 
430  dominant_quantized_color_gradients_.resize (output_width, output_height);
431 
432  //size_t offset_x = 0;
433  //size_t offset_y = 0;
434 
435  const size_t num_gradient_bins = 7;
436  const size_t max_num_of_gradients = 1;
437 
438  const float divisor = 180.0f / (num_gradient_bins - 1.0f);
439 
440  float global_max_gradient = 0.0f;
441  float local_max_gradient = 0.0f;
442 
443  unsigned char * peak_pointer = dominant_quantized_color_gradients_.getData ();
444  memset (peak_pointer, 0, output_width*output_height);
445 
446  //int tmpCounter = 0;
447  for (size_t row_bin_index = 0; row_bin_index < output_height; ++row_bin_index)
448  {
449  for (size_t col_bin_index = 0; col_bin_index < output_width; ++col_bin_index)
450  {
451  const size_t x_position = col_bin_index * bin_size_;
452  const size_t y_position = row_bin_index * bin_size_;
453 
454  //std::vector<int> x_coordinates;
455  //std::vector<int> y_coordinates;
456  //std::vector<float> values;
457 
458  // iteratively search for the largest gradients, set it to -1, search the next largest ... etc.
459  //while (counter < max_num_of_gradients)
460  {
461  float max_gradient;
462  size_t max_gradient_pos_x;
463  size_t max_gradient_pos_y;
464 
465  // find next location and value of maximum gradient magnitude in current region
466  {
467  max_gradient = 0.0f;
468  for (size_t row_sub_index = 0; row_sub_index < bin_size_; ++row_sub_index)
469  {
470  for (size_t col_sub_index = 0; col_sub_index < bin_size_; ++col_sub_index)
471  {
472  const float magnitude = color_gradients_ (col_sub_index + x_position, row_sub_index + y_position).magnitude;
473 
474  if (magnitude > max_gradient)
475  {
476  max_gradient = magnitude;
477  max_gradient_pos_x = col_sub_index;
478  max_gradient_pos_y = row_sub_index;
479  }
480  }
481  }
482  }
483 
484  if (max_gradient >= gradient_magnitude_threshold_)
485  {
486  const size_t angle = static_cast<size_t> (180 + color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).angle + 0.5f);
487  const size_t bin_index = static_cast<size_t> ((angle >= 180 ? angle-180 : angle)/divisor);
488 
489  *peak_pointer |= 1 << bin_index;
490  }
491 
492  //++counter;
493 
494  //x_coordinates.push_back (max_gradient_pos_x + x_position);
495  //y_coordinates.push_back (max_gradient_pos_y + y_position);
496  //values.push_back (max_gradient);
497 
498  //color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).magnitude = -1.0f;
499  }
500 
501  //// reset values which have been set to -1
502  //for (size_t value_index = 0; value_index < values.size (); ++value_index)
503  //{
504  // color_gradients_ (x_coordinates[value_index], y_coordinates[value_index]).magnitude = values[value_index];
505  //}
506 
507 
508  if (*peak_pointer == 0)
509  {
510  *peak_pointer |= 1 << 7;
511  }
512 
513  //if (*peakPointer != 0)
514  //{
515  // ++tmpCounter;
516  //}
517 
518  //++stringPointer;
519  ++peak_pointer;
520 
521  //offset_x += bin_size;
522  }
523 
524  //offset_y += bin_size;
525  //offset_x = bin_size/2+1;
526  }
527 }
528 
529 //////////////////////////////////////////////////////////////////////////////////////////////
530 template <typename PointInT>
534  const RegionXY & region)
535 {
536  const size_t input_width = input_->width;
537  const size_t input_height = input_->height;
538 
539  const size_t output_width = input_width / bin_size_;
540  const size_t output_height = input_height / bin_size_;
541 
542  const size_t sub_start_x = region.x / bin_size_;
543  const size_t sub_start_y = region.y / bin_size_;
544  const size_t sub_width = region.width / bin_size_;
545  const size_t sub_height = region.height / bin_size_;
546 
547  QuantizedMap map;
548  map.resize (sub_width, sub_height);
549 
550  //size_t offset_x = 0;
551  //size_t offset_y = 0;
552 
553  const size_t num_gradient_bins = 7;
554  const size_t max_num_of_gradients = 7;
555 
556  const float divisor = 180.0f / (num_gradient_bins - 1.0f);
557 
558  float global_max_gradient = 0.0f;
559  float local_max_gradient = 0.0f;
560 
561  unsigned char * peak_pointer = map.getData ();
562 
563  //int tmpCounter = 0;
564  for (size_t row_bin_index = 0; row_bin_index < sub_height; ++row_bin_index)
565  {
566  for (size_t col_bin_index = 0; col_bin_index < sub_width; ++col_bin_index)
567  {
568  std::vector<size_t> x_coordinates;
569  std::vector<size_t> y_coordinates;
570  std::vector<float> values;
571 
572  for (int row_pixel_index = -static_cast<int> (bin_size_)/2;
573  row_pixel_index <= static_cast<int> (bin_size_)/2;
574  row_pixel_index += static_cast<int> (bin_size_)/2)
575  {
576  const size_t y_position = /*offset_y +*/ row_pixel_index + (sub_start_y + row_bin_index)*bin_size_;
577 
578  if (y_position < 0 || y_position >= input_height)
579  continue;
580 
581  for (int col_pixel_index = -static_cast<int> (bin_size_)/2;
582  col_pixel_index <= static_cast<int> (bin_size_)/2;
583  col_pixel_index += static_cast<int> (bin_size_)/2)
584  {
585  const size_t x_position = /*offset_x +*/ col_pixel_index + (sub_start_x + col_bin_index)*bin_size_;
586  size_t counter = 0;
587 
588  if (x_position < 0 || x_position >= input_width)
589  continue;
590 
591  // find maximum gradient magnitude in current bin
592  {
593  local_max_gradient = 0.0f;
594  for (size_t row_sub_index = 0; row_sub_index < bin_size_; ++row_sub_index)
595  {
596  for (size_t col_sub_index = 0; col_sub_index < bin_size_; ++col_sub_index)
597  {
598  const float magnitude = color_gradients_ (col_sub_index + x_position, row_sub_index + y_position).magnitude;
599 
600  if (magnitude > local_max_gradient)
601  local_max_gradient = magnitude;
602  }
603  }
604  }
605 
606  //*stringPointer += localMaxGradient;
607 
608  if (local_max_gradient > global_max_gradient)
609  {
610  global_max_gradient = local_max_gradient;
611  }
612 
613  // iteratively search for the largest gradients, set it to -1, search the next largest ... etc.
614  while (true)
615  {
616  float max_gradient;
617  size_t max_gradient_pos_x;
618  size_t max_gradient_pos_y;
619 
620  // find next location and value of maximum gradient magnitude in current region
621  {
622  max_gradient = 0.0f;
623  for (size_t row_sub_index = 0; row_sub_index < bin_size_; ++row_sub_index)
624  {
625  for (size_t col_sub_index = 0; col_sub_index < bin_size_; ++col_sub_index)
626  {
627  const float magnitude = color_gradients_ (col_sub_index + x_position, row_sub_index + y_position).magnitude;
628 
629  if (magnitude > max_gradient)
630  {
631  max_gradient = magnitude;
632  max_gradient_pos_x = col_sub_index;
633  max_gradient_pos_y = row_sub_index;
634  }
635  }
636  }
637  }
638 
639  // TODO: really localMaxGradient and not maxGradient???
640  if (local_max_gradient < gradient_magnitude_threshold_)
641  {
642  //*peakPointer |= 1 << (numOfGradientBins-1);
643  break;
644  }
645 
646  // TODO: replace gradient_magnitude_threshold_ here by a fixed ratio?
647  if (/*max_gradient < (local_max_gradient * gradient_magnitude_threshold_) ||*/
648  counter >= max_num_of_gradients)
649  {
650  break;
651  }
652 
653  ++counter;
654 
655  const size_t angle = static_cast<size_t> (180 + color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).angle + 0.5f);
656  const size_t bin_index = static_cast<size_t> ((angle >= 180 ? angle-180 : angle)/divisor);
657 
658  *peak_pointer |= 1 << bin_index;
659 
660  x_coordinates.push_back (max_gradient_pos_x + x_position);
661  y_coordinates.push_back (max_gradient_pos_y + y_position);
662  values.push_back (max_gradient);
663 
664  color_gradients_ (max_gradient_pos_x + x_position, max_gradient_pos_y + y_position).magnitude = -1.0f;
665  }
666 
667  // reset values which have been set to -1
668  for (size_t value_index = 0; value_index < values.size (); ++value_index)
669  {
670  color_gradients_ (x_coordinates[value_index], y_coordinates[value_index]).magnitude = values[value_index];
671  }
672 
673  x_coordinates.clear ();
674  y_coordinates.clear ();
675  values.clear ();
676  }
677  }
678 
679  if (*peak_pointer == 0)
680  {
681  *peak_pointer |= 1 << 7;
682  }
683 
684  //if (*peakPointer != 0)
685  //{
686  // ++tmpCounter;
687  //}
688 
689  //++stringPointer;
690  ++peak_pointer;
691 
692  //offset_x += bin_size;
693  }
694 
695  //offset_y += bin_size;
696  //offset_x = bin_size/2+1;
697  }
698 
699  return map;
700 }
701 
702 #endif
QuantizedMap computeInvariantQuantizedMap(const MaskMap &mask, const RegionXY &region)
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
Defines a region in XY-space.
Definition: region_xy.h:82
A point structure representing Euclidean xyz coordinates, and the intensity value.
Definition: point_types.h:51
int x
x-position of the region.
Definition: region_xy.h:88
int y
y-position of the region.
Definition: region_xy.h:90
void resize(size_t width, size_t height)
Defines all the PCL implemented PointT point type structures.
PCL base class.
Definition: pcl_base.h:68
int height
height of the region.
Definition: region_xy.h:94
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:429
void setGradientMagnitudeThreshold(const float threshold)
unsigned char * getData()
Definition: quantized_map.h:63
PointCloudConstPtr input_
The input point cloud dataset.
Definition: pcl_base.h:150
virtual void setInputCloud(const typename PointCloudIn::ConstPtr &cloud)
Provide a pointer to the input dataset (overwrites the PCLBase::setInputCloud method)
int width
width of the region.
Definition: region_xy.h:92
pcl::PointCloud< PointInT > PointCloudIn