Point Cloud Library (PCL)  1.10.1-dev
point_types.hpp
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010, Willow Garage, Inc.
6  * Copyright (c) 2012-, Open Perception, Inc.
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * * Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  * * Neither the name of the copyright holder(s) nor the names of its
21  * contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  *
37  */
38 
39 #ifndef PCL_IMPL_POINT_TYPES_HPP_
40 #define PCL_IMPL_POINT_TYPES_HPP_
41 
42 #include <cstdint>
43 #if defined __GNUC__
44 # pragma GCC system_header
45 #endif
46 
47 #include <algorithm>
48 #include <ostream>
49 
50 #include <Eigen/Core>
51 
52 #include <pcl/memory.h>
53 #include <pcl/pcl_macros.h>
54 
55 // Define all PCL point types
56 #define PCL_POINT_TYPES \
57  (pcl::PointXYZ) \
58  (pcl::PointXYZI) \
59  (pcl::PointXYZL) \
60  (pcl::Label) \
61  (pcl::PointXYZRGBA) \
62  (pcl::PointXYZRGB) \
63  (pcl::PointXYZRGBL) \
64  (pcl::PointXYZHSV) \
65  (pcl::PointXY) \
66  (pcl::InterestPoint) \
67  (pcl::Axis) \
68  (pcl::Normal) \
69  (pcl::PointNormal) \
70  (pcl::PointXYZRGBNormal) \
71  (pcl::PointXYZINormal) \
72  (pcl::PointXYZLNormal) \
73  (pcl::PointWithRange) \
74  (pcl::PointWithViewpoint) \
75  (pcl::MomentInvariants) \
76  (pcl::PrincipalRadiiRSD) \
77  (pcl::Boundary) \
78  (pcl::PrincipalCurvatures) \
79  (pcl::PFHSignature125) \
80  (pcl::PFHRGBSignature250) \
81  (pcl::PPFSignature) \
82  (pcl::CPPFSignature) \
83  (pcl::PPFRGBSignature) \
84  (pcl::NormalBasedSignature12) \
85  (pcl::FPFHSignature33) \
86  (pcl::VFHSignature308) \
87  (pcl::GASDSignature512) \
88  (pcl::GASDSignature984) \
89  (pcl::GASDSignature7992) \
90  (pcl::GRSDSignature21) \
91  (pcl::ESFSignature640) \
92  (pcl::BRISKSignature512) \
93  (pcl::Narf36) \
94  (pcl::IntensityGradient) \
95  (pcl::PointWithScale) \
96  (pcl::PointSurfel) \
97  (pcl::ShapeContext1980) \
98  (pcl::UniqueShapeContext1960) \
99  (pcl::SHOT352) \
100  (pcl::SHOT1344) \
101  (pcl::PointUV) \
102  (pcl::ReferenceFrame) \
103  (pcl::PointDEM)
104 
105 // Define all point types that include RGB data
106 #define PCL_RGB_POINT_TYPES \
107  (pcl::PointXYZRGBA) \
108  (pcl::PointXYZRGB) \
109  (pcl::PointXYZRGBL) \
110  (pcl::PointXYZRGBNormal) \
111  (pcl::PointSurfel) \
112 
113 // Define all point types that include XYZ data
114 #define PCL_XYZ_POINT_TYPES \
115  (pcl::PointXYZ) \
116  (pcl::PointXYZI) \
117  (pcl::PointXYZL) \
118  (pcl::PointXYZRGBA) \
119  (pcl::PointXYZRGB) \
120  (pcl::PointXYZRGBL) \
121  (pcl::PointXYZHSV) \
122  (pcl::InterestPoint) \
123  (pcl::PointNormal) \
124  (pcl::PointXYZRGBNormal) \
125  (pcl::PointXYZINormal) \
126  (pcl::PointXYZLNormal) \
127  (pcl::PointWithRange) \
128  (pcl::PointWithViewpoint) \
129  (pcl::PointWithScale) \
130  (pcl::PointSurfel) \
131  (pcl::PointDEM)
132 
133 // Define all point types with XYZ and label
134 #define PCL_XYZL_POINT_TYPES \
135  (pcl::PointXYZL) \
136  (pcl::PointXYZRGBL) \
137  (pcl::PointXYZLNormal)
138 
139 // Define all point types that include normal[3] data
140 #define PCL_NORMAL_POINT_TYPES \
141  (pcl::Normal) \
142  (pcl::PointNormal) \
143  (pcl::PointXYZRGBNormal) \
144  (pcl::PointXYZINormal) \
145  (pcl::PointXYZLNormal) \
146  (pcl::PointSurfel)
147 
148 // Define all point types that represent features
149 #define PCL_FEATURE_POINT_TYPES \
150  (pcl::PFHSignature125) \
151  (pcl::PFHRGBSignature250) \
152  (pcl::PPFSignature) \
153  (pcl::CPPFSignature) \
154  (pcl::PPFRGBSignature) \
155  (pcl::NormalBasedSignature12) \
156  (pcl::FPFHSignature33) \
157  (pcl::VFHSignature308) \
158  (pcl::GASDSignature512) \
159  (pcl::GASDSignature984) \
160  (pcl::GASDSignature7992) \
161  (pcl::GRSDSignature21) \
162  (pcl::ESFSignature640) \
163  (pcl::BRISKSignature512) \
164  (pcl::Narf36)
165 
166 namespace pcl
167 {
168 
169  using Array3fMap = Eigen::Map<Eigen::Array3f>;
170  using Array3fMapConst = const Eigen::Map<const Eigen::Array3f>;
171  using Array4fMap = Eigen::Map<Eigen::Array4f, Eigen::Aligned>;
172  using Array4fMapConst = const Eigen::Map<const Eigen::Array4f, Eigen::Aligned>;
173  using Vector3fMap = Eigen::Map<Eigen::Vector3f>;
174  using Vector3fMapConst = const Eigen::Map<const Eigen::Vector3f>;
175  using Vector4fMap = Eigen::Map<Eigen::Vector4f, Eigen::Aligned>;
176  using Vector4fMapConst = const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned>;
177 
178  using Vector3c = Eigen::Matrix<std::uint8_t, 3, 1>;
179  using Vector3cMap = Eigen::Map<Vector3c>;
180  using Vector3cMapConst = const Eigen::Map<const Vector3c>;
181  using Vector4c = Eigen::Matrix<std::uint8_t, 4, 1>;
182  using Vector4cMap = Eigen::Map<Vector4c, Eigen::Aligned>;
183  using Vector4cMapConst = const Eigen::Map<const Vector4c, Eigen::Aligned>;
184 
185 #define PCL_ADD_UNION_POINT4D \
186  union EIGEN_ALIGN16 { \
187  float data[4]; \
188  struct { \
189  float x; \
190  float y; \
191  float z; \
192  }; \
193  };
194 
195 #define PCL_ADD_EIGEN_MAPS_POINT4D \
196  inline pcl::Vector3fMap getVector3fMap () { return (pcl::Vector3fMap (data)); } \
197  inline pcl::Vector3fMapConst getVector3fMap () const { return (pcl::Vector3fMapConst (data)); } \
198  inline pcl::Vector4fMap getVector4fMap () { return (pcl::Vector4fMap (data)); } \
199  inline pcl::Vector4fMapConst getVector4fMap () const { return (pcl::Vector4fMapConst (data)); } \
200  inline pcl::Array3fMap getArray3fMap () { return (pcl::Array3fMap (data)); } \
201  inline pcl::Array3fMapConst getArray3fMap () const { return (pcl::Array3fMapConst (data)); } \
202  inline pcl::Array4fMap getArray4fMap () { return (pcl::Array4fMap (data)); } \
203  inline pcl::Array4fMapConst getArray4fMap () const { return (pcl::Array4fMapConst (data)); }
204 
205 #define PCL_ADD_POINT4D \
206  PCL_ADD_UNION_POINT4D \
207  PCL_ADD_EIGEN_MAPS_POINT4D
208 
209 #define PCL_ADD_UNION_NORMAL4D \
210  union EIGEN_ALIGN16 { \
211  float data_n[4]; \
212  float normal[3]; \
213  struct { \
214  float normal_x; \
215  float normal_y; \
216  float normal_z; \
217  }; \
218  };
219 
220 #define PCL_ADD_EIGEN_MAPS_NORMAL4D \
221  inline pcl::Vector3fMap getNormalVector3fMap () { return (pcl::Vector3fMap (data_n)); } \
222  inline pcl::Vector3fMapConst getNormalVector3fMap () const { return (pcl::Vector3fMapConst (data_n)); } \
223  inline pcl::Vector4fMap getNormalVector4fMap () { return (pcl::Vector4fMap (data_n)); } \
224  inline pcl::Vector4fMapConst getNormalVector4fMap () const { return (pcl::Vector4fMapConst (data_n)); }
225 
226 #define PCL_ADD_NORMAL4D \
227  PCL_ADD_UNION_NORMAL4D \
228  PCL_ADD_EIGEN_MAPS_NORMAL4D
229 
230 #define PCL_ADD_UNION_RGB \
231  union \
232  { \
233  union \
234  { \
235  struct \
236  { \
237  std::uint8_t b; \
238  std::uint8_t g; \
239  std::uint8_t r; \
240  std::uint8_t a; \
241  }; \
242  float rgb; \
243  }; \
244  std::uint32_t rgba; \
245  };
246 
247 #define PCL_ADD_EIGEN_MAPS_RGB \
248  inline Eigen::Vector3i getRGBVector3i () { return (Eigen::Vector3i (r, g, b)); } \
249  inline const Eigen::Vector3i getRGBVector3i () const { return (Eigen::Vector3i (r, g, b)); } \
250  inline Eigen::Vector4i getRGBVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
251  inline const Eigen::Vector4i getRGBVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
252  inline Eigen::Vector4i getRGBAVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
253  inline const Eigen::Vector4i getRGBAVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
254  inline pcl::Vector3cMap getBGRVector3cMap () { return (pcl::Vector3cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
255  inline pcl::Vector3cMapConst getBGRVector3cMap () const { return (pcl::Vector3cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); } \
256  inline pcl::Vector4cMap getBGRAVector4cMap () { return (pcl::Vector4cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
257  inline pcl::Vector4cMapConst getBGRAVector4cMap () const { return (pcl::Vector4cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); }
258 
259 #define PCL_ADD_RGB \
260  PCL_ADD_UNION_RGB \
261  PCL_ADD_EIGEN_MAPS_RGB
262 
263 #define PCL_ADD_INTENSITY \
264  struct \
265  { \
266  float intensity; \
267  }; \
268 
269 #define PCL_ADD_INTENSITY_8U \
270  struct \
271  { \
272  std::uint8_t intensity; \
273  }; \
274 
275 #define PCL_ADD_INTENSITY_32U \
276  struct \
277  { \
278  std::uint32_t intensity; \
279  }; \
280 
281 
282  struct _PointXYZ
283  {
284  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
285 
287  };
288 
289  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZ& p);
290  /** \brief A point structure representing Euclidean xyz coordinates. (SSE friendly)
291  * \ingroup common
292  */
293  struct EIGEN_ALIGN16 PointXYZ : public _PointXYZ
294  {
295  inline PointXYZ (const _PointXYZ &p): PointXYZ(p.x, p.y, p.z) {}
296 
297  inline PointXYZ (): PointXYZ(0.f, 0.f, 0.f) {}
298 
299  inline PointXYZ (float _x, float _y, float _z)
300  {
301  x = _x; y = _y; z = _z;
302  data[3] = 1.0f;
303  }
304 
305  friend std::ostream& operator << (std::ostream& os, const PointXYZ& p);
307  };
308 
309 
310 #ifdef RGB
311 #undef RGB
312 #endif
313  struct _RGB
314  {
316  };
317 
318  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const RGB& p);
319  /** \brief A structure representing RGB color information.
320  *
321  * The RGBA information is available either as separate r, g, b, or as a
322  * packed std::uint32_t rgba value. To pack it, use:
323  *
324  * \code
325  * int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);
326  * \endcode
327  *
328  * To unpack it use:
329  *
330  * \code
331  * int rgb = ...;
332  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
333  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
334  * std::uint8_t b = (rgb) & 0x0000ff;
335  * \endcode
336  *
337  */
338  struct RGB: public _RGB
339  {
340  inline RGB (const _RGB &p)
341  {
342  rgba = p.rgba;
343  }
344 
345  inline RGB (): RGB(0, 0, 0) {}
346 
347  inline RGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
348  {
349  r = _r; g = _g; b = _b;
350  a = 255;
351  }
352 
353  friend std::ostream& operator << (std::ostream& os, const RGB& p);
354  };
355 
356  struct _Intensity
357  {
359  };
360 
361  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity& p);
362  /** \brief A point structure representing the grayscale intensity in single-channel images.
363  * Intensity is represented as a float value.
364  * \ingroup common
365  */
366  struct Intensity: public _Intensity
367  {
368  inline Intensity (const _Intensity &p)
369  {
370  intensity = p.intensity;
371  }
372 
373  inline Intensity (float _intensity = 0.f)
374  {
375  intensity = _intensity;
376  }
377 
378  friend std::ostream& operator << (std::ostream& os, const Intensity& p);
379  };
380 
381 
383  {
385  };
386 
387  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity8u& p);
388  /** \brief A point structure representing the grayscale intensity in single-channel images.
389  * Intensity is represented as a std::uint8_t value.
390  * \ingroup common
391  */
392  struct Intensity8u: public _Intensity8u
393  {
394  inline Intensity8u (const _Intensity8u &p)
395  {
396  intensity = p.intensity;
397  }
398 
399  inline Intensity8u (std::uint8_t _intensity = 0)
400  {
401  intensity = _intensity;
402  }
403 
404 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
405  operator unsigned char() const
406  {
407  return intensity;
408  }
409 #endif
410 
411  friend std::ostream& operator << (std::ostream& os, const Intensity8u& p);
412  };
413 
415  {
417  };
418 
419  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity32u& p);
420  /** \brief A point structure representing the grayscale intensity in single-channel images.
421  * Intensity is represented as a std::uint32_t value.
422  * \ingroup common
423  */
425  {
426  inline Intensity32u (const _Intensity32u &p)
427  {
428  intensity = p.intensity;
429  }
430 
431  inline Intensity32u (std::uint32_t _intensity = 0)
432  {
433  intensity = _intensity;
434  }
435 
436  friend std::ostream& operator << (std::ostream& os, const Intensity32u& p);
437  };
438 
439  /** \brief A point structure representing Euclidean xyz coordinates, and the intensity value.
440  * \ingroup common
441  */
442  struct EIGEN_ALIGN16 _PointXYZI
443  {
444  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
445  union
446  {
447  struct
448  {
449  float intensity;
450  };
451  float data_c[4];
452  };
454  };
455 
456  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZI& p);
457  struct PointXYZI : public _PointXYZI
458  {
459  inline PointXYZI (const _PointXYZI &p)
460  {
461  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
462  intensity = p.intensity;
463  }
464 
465  inline PointXYZI (float _intensity = 0.f): PointXYZI(0.f, 0.f, 0.f, _intensity) {}
466 
467  inline PointXYZI (float _x, float _y, float _z, float _intensity = 0.f)
468  {
469  x = _x; y = _y; z = _z;
470  data[3] = 1.0f;
471  intensity = _intensity;
472  }
473 
474  friend std::ostream& operator << (std::ostream& os, const PointXYZI& p);
475  };
476 
477 
478  struct EIGEN_ALIGN16 _PointXYZL
479  {
480  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
481  std::uint32_t label;
483  };
484 
485  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZL& p);
486  struct PointXYZL : public _PointXYZL
487  {
488  inline PointXYZL (const _PointXYZL &p)
489  {
490  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
491  label = p.label;
492  }
493 
494  inline PointXYZL (std::uint32_t _label = 0): PointXYZL(0.f, 0.f, 0.f, _label) {}
495 
496  inline PointXYZL (float _x, float _y, float _z, std::uint32_t _label = 0)
497  {
498  x = _x; y = _y; z = _z;
499  data[3] = 1.0f;
500  label = _label;
501  }
502 
503  friend std::ostream& operator << (std::ostream& os, const PointXYZL& p);
504  };
505 
506 
507  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Label& p);
508  struct Label
509  {
510  std::uint32_t label = 0;
511 
512  Label (std::uint32_t _label = 0): label(_label) {}
513 
514  friend std::ostream& operator << (std::ostream& os, const Label& p);
515  };
516 
517 
518  struct EIGEN_ALIGN16 _PointXYZRGBA
519  {
520  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
523  };
524 
525  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBA& p);
526  /** \brief A point structure representing Euclidean xyz coordinates, and the RGBA color.
527  *
528  * The RGBA information is available either as separate r, g, b, or as a
529  * packed std::uint32_t rgba value. To pack it, use:
530  *
531  * \code
532  * int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);
533  * \endcode
534  *
535  * To unpack it use:
536  *
537  * \code
538  * int rgb = ...;
539  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
540  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
541  * std::uint8_t b = (rgb) & 0x0000ff;
542  * \endcode
543  *
544  * \ingroup common
545  */
546  struct EIGEN_ALIGN16 PointXYZRGBA : public _PointXYZRGBA
547  {
548  inline PointXYZRGBA (const _PointXYZRGBA &p)
549  {
550  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
551  rgba = p.rgba;
552  }
553 
554  inline PointXYZRGBA (): PointXYZRGBA (0, 0, 0, 0) {}
555 
556  inline PointXYZRGBA (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a):
557  PointXYZRGBA (0.f, 0.f, 0.f, _r, _g, _b, _a) {}
558 
559  inline PointXYZRGBA (float _x, float _y, float _z):
560  PointXYZRGBA (_x, _y, _z, 0, 0, 0, 0) {}
561 
562  inline PointXYZRGBA (float _x, float _y, float _z, std::uint8_t _r,
563  std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
564  {
565  x = _x; y = _y; z = _z;
566  data[3] = 1.0f;
567  r = _r; g = _g; b = _b; a = _a;
568  }
569 
570  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBA& p);
571  };
572 
573 
574  struct EIGEN_ALIGN16 _PointXYZRGB
575  {
576  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
579  };
580 
581  struct EIGEN_ALIGN16 _PointXYZRGBL
582  {
583  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
585  std::uint32_t label;
587  };
588 
589  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGB& p);
590  /** \brief A point structure representing Euclidean xyz coordinates, and the RGB color.
591  *
592  * Due to historical reasons (PCL was first developed as a ROS package), the
593  * RGB information is packed into an integer and casted to a float. This is
594  * something we wish to remove in the near future, but in the meantime, the
595  * following code snippet should help you pack and unpack RGB colors in your
596  * PointXYZRGB structure:
597  *
598  * \code
599  * // pack r/g/b into rgb
600  * std::uint8_t r = 255, g = 0, b = 0; // Example: Red color
601  * std::uint32_t rgb = ((std::uint32_t)r << 16 | (std::uint32_t)g << 8 | (std::uint32_t)b);
602  * p.rgb = *reinterpret_cast<float*>(&rgb);
603  * \endcode
604  *
605  * To unpack the data into separate values, use:
606  *
607  * \code
608  * PointXYZRGB p;
609  * // unpack rgb into r/g/b
610  * std::uint32_t rgb = *reinterpret_cast<int*>(&p.rgb);
611  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
612  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
613  * std::uint8_t b = (rgb) & 0x0000ff;
614  * \endcode
615  *
616  *
617  * Alternatively, from 1.1.0 onwards, you can use p.r, p.g, and p.b directly.
618  *
619  * \ingroup common
620  */
621  struct EIGEN_ALIGN16 PointXYZRGB : public _PointXYZRGB
622  {
623  inline PointXYZRGB (const _PointXYZRGB &p)
624  {
625  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
626  rgb = p.rgb;
627  }
628 
629  inline PointXYZRGB (): PointXYZRGB (0.f, 0.f, 0.f) {}
630 
631  inline PointXYZRGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
632  PointXYZRGB (0.f, 0.f, 0.f, _r, _g, _b) {}
633 
634  inline PointXYZRGB (float _x, float _y, float _z):
635  PointXYZRGB (_x, _y, _z, 0, 0, 0) {}
636 
637  inline PointXYZRGB (float _x, float _y, float _z,
638  std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
639  {
640  x = _x; y = _y; z = _z;
641  data[3] = 1.0f;
642  r = _r; g = _g; b = _b;
643  a = 255;
644  }
645 
646  friend std::ostream& operator << (std::ostream& os, const PointXYZRGB& p);
648  };
649 
650 
651  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBL& p);
652  struct EIGEN_ALIGN16 PointXYZRGBL : public _PointXYZRGBL
653  {
654  inline PointXYZRGBL (const _PointXYZRGBL &p)
655  {
656  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
657  rgba = p.rgba;
658  label = p.label;
659  }
660 
661  inline PointXYZRGBL (std::uint32_t _label = 0):
662  PointXYZRGBL (0.f, 0.f, 0.f, 0, 0, 0, _label) {}
663 
664  inline PointXYZRGBL (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
665  PointXYZRGBL (0.f, 0.f, 0.f, _r, _g, _b) {}
666 
667  inline PointXYZRGBL (float _x, float _y, float _z):
668  PointXYZRGBL (_x, _y, _z, 0, 0, 0) {}
669 
670  inline PointXYZRGBL (float _x, float _y, float _z,
671  std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
672  std::uint32_t _label = 0)
673  {
674  x = _x; y = _y; z = _z;
675  data[3] = 1.0f;
676  r = _r; g = _g; b = _b;
677  a = 255;
678  label = _label;
679  }
680 
681  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBL& p);
683  };
684 
685 
686  struct EIGEN_ALIGN16 _PointXYZHSV
687  {
688  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
689  union
690  {
691  struct
692  {
693  float h;
694  float s;
695  float v;
696  };
697  float data_c[4];
698  };
700  };
701 
702  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZHSV& p);
703  struct EIGEN_ALIGN16 PointXYZHSV : public _PointXYZHSV
704  {
705  inline PointXYZHSV (const _PointXYZHSV &p)
706  {
707  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
708  h = p.h; s = p.s; v = p.v;
709  }
710 
711  inline PointXYZHSV (): PointXYZHSV (0.f, 0.f, 0.f) {}
712 
713  // @TODO: Use strong types??
714  // This is a dangerous type, doesn't behave like others
715  inline PointXYZHSV (float _h, float _s, float _v):
716  PointXYZHSV (0.f, 0.f, 0.f, _h, _s, _v) {}
717 
718  inline PointXYZHSV (float _x, float _y, float _z,
719  float _h, float _s, float _v)
720  {
721  x = _x; y = _y; z = _z;
722  data[3] = 1.0f;
723  h = _h; s = _s; v = _v;
724  data_c[3] = 0;
725  }
726 
727  friend std::ostream& operator << (std::ostream& os, const PointXYZHSV& p);
729  };
730 
731 
732 
733  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXY& p);
734  /** \brief A 2D point structure representing Euclidean xy coordinates.
735  * \ingroup common
736  */
737  struct PointXY
738  {
739  float x = 0.f;
740  float y = 0.f;
741 
742  inline PointXY() = default;
743 
744  inline PointXY(float _x, float _y): x(_x), y(_y) {}
745 
746  friend std::ostream& operator << (std::ostream& os, const PointXY& p);
747  };
748 
749  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointUV& p);
750  /** \brief A 2D point structure representing pixel image coordinates.
751  * \note We use float to be able to represent subpixels.
752  * \ingroup common
753  */
754  struct PointUV
755  {
756  float u = 0.f;
757  float v = 0.f;
758 
759  inline PointUV() = default;
760 
761  inline PointUV(float _u, float _v): u(_u), v(_v) {}
762 
763  friend std::ostream& operator << (std::ostream& os, const PointUV& p);
764  };
765 
766  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const InterestPoint& p);
767  /** \brief A point structure representing an interest point with Euclidean xyz coordinates, and an interest value.
768  * \ingroup common
769  */
770  // @TODO: inheritance trick like on other PointTypes
771  struct EIGEN_ALIGN16 InterestPoint
772  {
773  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
774  union
775  {
776  struct
777  {
778  float strength;
779  };
780  float data_c[4];
781  };
783 
784  friend std::ostream& operator << (std::ostream& os, const InterestPoint& p);
785  };
786 
787  struct EIGEN_ALIGN16 _Normal
788  {
789  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
790  union
791  {
792  struct
793  {
794  float curvature;
795  };
796  float data_c[4];
797  };
799  };
800 
801  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Normal& p);
802  /** \brief A point structure representing normal coordinates and the surface curvature estimate. (SSE friendly)
803  * \ingroup common
804  */
805  struct Normal : public _Normal
806  {
807  inline Normal (const _Normal &p)
808  {
809  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
810  data_n[3] = 0.0f;
811  curvature = p.curvature;
812  }
813 
814  inline Normal (float _curvature = 0.f): Normal (0.f, 0.f, 0.f, _curvature) {}
815 
816  inline Normal (float n_x, float n_y, float n_z, float _curvature = 0.f)
817  {
818  normal_x = n_x; normal_y = n_y; normal_z = n_z;
819  data_n[3] = 0.0f;
820  curvature = _curvature;
821  }
822 
823  friend std::ostream& operator << (std::ostream& os, const Normal& p);
825  };
826 
827 
828  struct EIGEN_ALIGN16 _Axis
829  {
832  };
833 
834  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Axis& p);
835  /** \brief A point structure representing an Axis using its normal coordinates. (SSE friendly)
836  * \ingroup common
837  */
838  struct EIGEN_ALIGN16 Axis : public _Axis
839  {
840  inline Axis (const _Axis &p)
841  {
842  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
843  data_n[3] = 0.0f;
844  }
845 
846  inline Axis (): Axis (0.f, 0.f, 0.f) {}
847 
848  inline Axis (float n_x, float n_y, float n_z)
849  {
850  normal_x = n_x; normal_y = n_y; normal_z = n_z;
851  data_n[3] = 0.0f;
852  }
853 
854  friend std::ostream& operator << (std::ostream& os, const Axis& p);
856  };
857 
858 
859  struct EIGEN_ALIGN16 _PointNormal
860  {
861  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
862  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
863  union
864  {
865  struct
866  {
867  float curvature;
868  };
869  float data_c[4];
870  };
872  };
873 
874  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointNormal& p);
875  /** \brief A point structure representing Euclidean xyz coordinates, together with normal coordinates and the surface curvature estimate. (SSE friendly)
876  * \ingroup common
877  */
878  struct PointNormal : public _PointNormal
879  {
880  inline PointNormal (const _PointNormal &p)
881  {
882  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
883  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
884  curvature = p.curvature;
885  }
886 
887  inline PointNormal (float _curvature = 0.f): PointNormal (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _curvature) {}
888 
889  inline PointNormal (float _x, float _y, float _z):
890  PointNormal (_x, _y, _z, 0.f, 0.f, 0.f, 0.f) {}
891 
892  inline PointNormal (float _x, float _y, float _z, float n_x, float n_y, float n_z, float _curvature = 0.f)
893  {
894  x = _x; y = _y; z = _z;
895  data[3] = 1.0f;
896  normal_x = n_x; normal_y = n_y; normal_z = n_z;
897  data_n[3] = 0.0f;
898  curvature = _curvature;
899  }
900 
901  friend std::ostream& operator << (std::ostream& os, const PointNormal& p);
902  };
903 
904 
905  struct EIGEN_ALIGN16 _PointXYZRGBNormal
906  {
907  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
908  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
909  union
910  {
911  struct
912  {
914  float curvature;
915  };
916  float data_c[4];
917  };
920  };
921 
922  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBNormal& p);
923  /** \brief A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coordinates and the surface curvature estimate.
924  * Due to historical reasons (PCL was first developed as a ROS package), the
925  * RGB information is packed into an integer and casted to a float. This is
926  * something we wish to remove in the near future, but in the meantime, the
927  * following code snippet should help you pack and unpack RGB colors in your
928  * PointXYZRGB structure:
929  *
930  * \code
931  * // pack r/g/b into rgb
932  * std::uint8_t r = 255, g = 0, b = 0; // Example: Red color
933  * std::uint32_t rgb = ((std::uint32_t)r << 16 | (std::uint32_t)g << 8 | (std::uint32_t)b);
934  * p.rgb = *reinterpret_cast<float*>(&rgb);
935  * \endcode
936  *
937  * To unpack the data into separate values, use:
938  *
939  * \code
940  * PointXYZRGB p;
941  * // unpack rgb into r/g/b
942  * std::uint32_t rgb = *reinterpret_cast<int*>(&p.rgb);
943  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
944  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
945  * std::uint8_t b = (rgb) & 0x0000ff;
946  * \endcode
947  *
948  *
949  * Alternatively, from 1.1.0 onwards, you can use p.r, p.g, and p.b directly.
950  * \ingroup common
951  */
953  {
955  {
956  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
957  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
958  curvature = p.curvature;
959  rgba = p.rgba;
960  }
961 
962  inline PointXYZRGBNormal (float _curvature = 0.f):
963  PointXYZRGBNormal (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _curvature) {}
964 
965  inline PointXYZRGBNormal (float _x, float _y, float _z):
966  PointXYZRGBNormal (_x, _y, _z, 0, 0, 0) {}
967 
968  inline PointXYZRGBNormal (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
969  PointXYZRGBNormal (0.f, 0.f, 0.f, _r, _g, _b) {}
970 
971  inline PointXYZRGBNormal (float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
972  PointXYZRGBNormal (_x, _y, _z, _r, _g, _b, 0.f, 0.f, 0.f) {}
973 
974  inline PointXYZRGBNormal (float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
975  float n_x, float n_y, float n_z, float _curvature = 0.f)
976  {
977  x = _x; y = _y; z = _z;
978  data[3] = 1.0f;
979  r = _r; g = _g; b = _b;
980  a = 255;
981  normal_x = n_x; normal_y = n_y; normal_z = n_z;
982  data_n[3] = 0.f;
983  curvature = _curvature;
984  }
985 
986  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBNormal& p);
987  };
988 
989  struct EIGEN_ALIGN16 _PointXYZINormal
990  {
991  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
992  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
993  union
994  {
995  struct
996  {
997  float intensity;
998  float curvature;
999  };
1000  float data_c[4];
1001  };
1003  };
1004 
1005  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZINormal& p);
1006  /** \brief A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates and the surface curvature estimate.
1007  * \ingroup common
1008  */
1010  {
1012  {
1013  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1014  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
1015  curvature = p.curvature;
1016  intensity = p.intensity;
1017  }
1018 
1019  inline PointXYZINormal (float _intensity = 0.f): PointXYZINormal (0.f, 0.f, 0.f, _intensity) {}
1020 
1021  inline PointXYZINormal (float _x, float _y, float _z, float _intensity = 0.f):
1022  PointXYZINormal (_x, _y, _z, _intensity, 0.f, 0.f, 0.f) {}
1023 
1024  inline PointXYZINormal (float _x, float _y, float _z, float _intensity,
1025  float n_x, float n_y, float n_z, float _curvature = 0.f)
1026  {
1027  x = _x; y = _y; z = _z;
1028  data[3] = 1.0f;
1029  intensity = _intensity;
1030  normal_x = n_x; normal_y = n_y; normal_z = n_z;
1031  data_n[3] = 0.f;
1032  curvature = _curvature;
1033  }
1034 
1035  friend std::ostream& operator << (std::ostream& os, const PointXYZINormal& p);
1036  };
1037 
1038 //----
1039  struct EIGEN_ALIGN16 _PointXYZLNormal
1040  {
1041  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1042  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
1043  union
1044  {
1045  struct
1046  {
1047  std::uint32_t label;
1048  float curvature;
1049  };
1050  float data_c[4];
1051  };
1053  };
1054 
1055  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZLNormal& p);
1056  /** \brief A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates and the surface curvature estimate.
1057  * \ingroup common
1058  */
1060  {
1062  {
1063  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1064  normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
1065  curvature = p.curvature;
1066  label = p.label;
1067  }
1068 
1069  inline PointXYZLNormal (std::uint32_t _label = 0): PointXYZLNormal (0.f, 0.f, 0.f, _label) {}
1070 
1071  inline PointXYZLNormal (float _x, float _y, float _z, std::uint32_t _label = 0.f):
1072  PointXYZLNormal (_x, _y, _z, _label, 0.f, 0.f, 0.f) {}
1073 
1074  inline PointXYZLNormal (float _x, float _y, float _z, std::uint32_t _label,
1075  float n_x, float n_y, float n_z, float _curvature = 0.f)
1076  {
1077  x = _x; y = _y; z = _z;
1078  data[3] = 1.0f;
1079  label = _label;
1080  normal_x = n_x; normal_y = n_y; normal_z = n_z;
1081  data_n[3] = 0.f;
1082  curvature = _curvature;
1083  }
1084 
1085  friend std::ostream& operator << (std::ostream& os, const PointXYZLNormal& p);
1086  };
1087 
1088 // ---
1089 
1090 
1091  struct EIGEN_ALIGN16 _PointWithRange
1092  {
1093  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1094  union
1095  {
1096  struct
1097  {
1098  float range;
1099  };
1100  float data_c[4];
1101  };
1103  };
1104 
1105  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithRange& p);
1106  /** \brief A point structure representing Euclidean xyz coordinates, padded with an extra range float.
1107  * \ingroup common
1108  */
1110  {
1112  {
1113  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1114  range = p.range;
1115  }
1116 
1117  inline PointWithRange (float _range = 0.f): PointWithRange (0.f, 0.f, 0.f, _range) {}
1118 
1119  inline PointWithRange (float _x, float _y, float _z, float _range = 0.f)
1120  {
1121  x = _x; y = _y; z = _z;
1122  data[3] = 1.0f;
1123  range = _range;
1124  }
1125 
1126  friend std::ostream& operator << (std::ostream& os, const PointWithRange& p);
1127  };
1128 
1129 
1130  struct EIGEN_ALIGN16 _PointWithViewpoint
1131  {
1132  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1133  union
1134  {
1135  struct
1136  {
1137  float vp_x;
1138  float vp_y;
1139  float vp_z;
1140  };
1141  float data_c[4];
1142  };
1144  };
1145 
1146  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithViewpoint& p);
1147  /** \brief A point structure representing Euclidean xyz coordinates together with the viewpoint from which it was seen.
1148  * \ingroup common
1149  */
1150  struct EIGEN_ALIGN16 PointWithViewpoint : public _PointWithViewpoint
1151  {
1153  {
1154  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1155  vp_x = p.vp_x; vp_y = p.vp_y; vp_z = p.vp_z;
1156  }
1157 
1158  inline PointWithViewpoint (): PointWithViewpoint (0.f, 0.f, 0.f) {}
1159 
1160  PCL_DEPRECATED(1, 12, "Use ctor accepting all position (x, y, z) data")
1161  inline PointWithViewpoint (float _x, float _y = 0.f):
1162  PointWithViewpoint (_x, _y, 0.f) {}
1163 
1164  PCL_DEPRECATED(1, 12, "Use ctor accepting all viewpoint (vp_x, vp_y, vp_z) data")
1165  inline PointWithViewpoint (float _x, float _y, float _z, float _vp_x, float _vp_y = 0.f):
1166  PointWithViewpoint (_x, _y, _z, _vp_x, _vp_y, 0.f) {}
1167 
1168  inline PointWithViewpoint (float _x, float _y, float _z): PointWithViewpoint (_x, _y, _z, 0.f, 0.f, 0.f) {}
1169 
1170  inline PointWithViewpoint (float _x, float _y, float _z, float _vp_x, float _vp_y, float _vp_z)
1171  {
1172  x = _x; y = _y; z = _z;
1173  data[3] = 1.0f;
1174  vp_x = _vp_x; vp_y = _vp_y; vp_z = _vp_z;
1175  }
1176 
1177  friend std::ostream& operator << (std::ostream& os, const PointWithViewpoint& p);
1178  };
1179 
1180  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const MomentInvariants& p);
1181  /** \brief A point structure representing the three moment invariants.
1182  * \ingroup common
1183  */
1185  {
1186  float j1 = 0.f, j2 = 0.f, j3 = 0.f;
1187 
1188  inline MomentInvariants () = default;
1189 
1190  inline MomentInvariants (float _j1, float _j2, float _j3): j1 (_j1), j2 (_j2), j3 (_j3) {}
1191 
1192  friend std::ostream& operator << (std::ostream& os, const MomentInvariants& p);
1193  };
1194 
1195  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PrincipalRadiiRSD& p);
1196  /** \brief A point structure representing the minimum and maximum surface radii (in meters) computed using RSD.
1197  * \ingroup common
1198  */
1200  {
1201  float r_min = 0.f, r_max = 0.f;
1202 
1203  inline PrincipalRadiiRSD () = default;
1204 
1205  inline PrincipalRadiiRSD (float _r_min, float _r_max): r_min (_r_min), r_max (_r_max) {}
1206 
1207  friend std::ostream& operator << (std::ostream& os, const PrincipalRadiiRSD& p);
1208  };
1209 
1210  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Boundary& p);
1211  /** \brief A point structure representing a description of whether a point is lying on a surface boundary or not.
1212  * \ingroup common
1213  */
1214  struct Boundary
1215  {
1216  std::uint8_t boundary_point = 0;
1217 
1218 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
1219  operator unsigned char() const
1220  {
1221  return boundary_point;
1222  }
1223 #endif
1224 
1225  inline Boundary (std::uint8_t _boundary = 0): boundary_point (_boundary) {}
1226 
1227  friend std::ostream& operator << (std::ostream& os, const Boundary& p);
1228  };
1229 
1230  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PrincipalCurvatures& p);
1231  /** \brief A point structure representing the principal curvatures and their magnitudes.
1232  * \ingroup common
1233  */
1235  {
1236  union
1237  {
1238  float principal_curvature[3];
1239  struct
1240  {
1244  };
1245  };
1246  float pc1 = 0.f;
1247  float pc2 = 0.f;
1248 
1249  inline PrincipalCurvatures (): PrincipalCurvatures (0.f, 0.f) {}
1250 
1251  inline PrincipalCurvatures (float _pc1, float _pc2): PrincipalCurvatures (0.f, 0.f, 0.f, _pc1, _pc2) {}
1252 
1253  inline PrincipalCurvatures (float _x, float _y, float _z): PrincipalCurvatures (_x, _y, _z, 0.f, 0.f) {}
1254 
1255  inline PrincipalCurvatures (float _x, float _y, float _z, float _pc1, float _pc2):
1256  principal_curvature_x (_x), principal_curvature_y (_y), principal_curvature_z (_z), pc1 (_pc1), pc2 (_pc2) {}
1257 
1258  friend std::ostream& operator << (std::ostream& os, const PrincipalCurvatures& p);
1259  };
1260 
1261  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PFHSignature125& p);
1262  /** \brief A point structure representing the Point Feature Histogram (PFH).
1263  * \ingroup common
1264  */
1266  {
1267  float histogram[125] = {0.f};
1268  static int descriptorSize () { return 125; }
1269 
1270  inline PFHSignature125 () = default;
1271 
1272  friend std::ostream& operator << (std::ostream& os, const PFHSignature125& p);
1273  };
1274 
1275  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PFHRGBSignature250& p);
1276  /** \brief A point structure representing the Point Feature Histogram with colors (PFHRGB).
1277  * \ingroup common
1278  */
1280  {
1281  float histogram[250] = {0.f};
1282  static int descriptorSize () { return 250; }
1283 
1284  inline PFHRGBSignature250 () = default;
1285 
1286  friend std::ostream& operator << (std::ostream& os, const PFHRGBSignature250& p);
1287  };
1288 
1289  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PPFSignature& p);
1290  /** \brief A point structure for storing the Point Pair Feature (PPF) values
1291  * \ingroup common
1292  */
1294  {
1295  float f1 = 0.f, f2 = 0.f, f3 = 0.f, f4 = 0.f;
1296  float alpha_m = 0.f;
1297 
1298  inline PPFSignature (float _alpha = 0.f): PPFSignature (0.f, 0.f, 0.f, 0.f, _alpha) {}
1299 
1300  inline PPFSignature (float _f1, float _f2, float _f3, float _f4, float _alpha = 0.f):
1301  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), alpha_m (_alpha) {}
1302 
1303  friend std::ostream& operator << (std::ostream& os, const PPFSignature& p);
1304  };
1305 
1306  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const CPPFSignature& p);
1307  /** \brief A point structure for storing the Point Pair Feature (CPPF) values
1308  * \ingroup common
1309  */
1311  {
1312  float f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
1313  float alpha_m;
1314 
1315  inline CPPFSignature (float _alpha = 0.f):
1316  CPPFSignature (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _alpha) {}
1317 
1318  inline CPPFSignature (float _f1, float _f2, float _f3, float _f4, float _f5, float _f6,
1319  float _f7, float _f8, float _f9, float _f10, float _alpha = 0.f):
1320  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), f5 (_f5), f6 (_f6),
1321  f7 (_f7), f8 (_f8), f9 (_f9), f10 (_f10), alpha_m (_alpha) {}
1322 
1323  friend std::ostream& operator << (std::ostream& os, const CPPFSignature& p);
1324  };
1325 
1326  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PPFRGBSignature& p);
1327  /** \brief A point structure for storing the Point Pair Color Feature (PPFRGB) values
1328  * \ingroup common
1329  */
1331  {
1332  float f1 = 0.f, f2 = 0.f, f3 = 0.f, f4 = 0.f;
1333  float r_ratio = 0.f, g_ratio = 0.f, b_ratio = 0.f;
1334  float alpha_m = 0.f;
1335 
1336  inline PPFRGBSignature (float _alpha = 0.f): PPFRGBSignature (0.f, 0.f, 0.f, 0.f, _alpha) {}
1337 
1338  inline PPFRGBSignature (float _f1, float _f2, float _f3, float _f4, float _alpha = 0.f):
1339  PPFRGBSignature (_f1, _f2, _f3, _f4, _alpha, 0.f, 0.f, 0.f) {}
1340 
1341  inline PPFRGBSignature (float _f1, float _f2, float _f3, float _f4, float _alpha, float _r, float _g, float _b):
1342  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), r_ratio (_r), g_ratio (_g), b_ratio (_b), alpha_m (_alpha) {}
1343 
1344  friend std::ostream& operator << (std::ostream& os, const PPFRGBSignature& p);
1345  };
1346 
1347  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const NormalBasedSignature12& p);
1348  /** \brief A point structure representing the Normal Based Signature for
1349  * a feature matrix of 4-by-3
1350  * \ingroup common
1351  */
1353  {
1354  float values[12] = {0.f};
1355 
1356  inline NormalBasedSignature12 () = default;
1357 
1358  friend std::ostream& operator << (std::ostream& os, const NormalBasedSignature12& p);
1359  };
1360 
1361  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ShapeContext1980& p);
1362  /** \brief A point structure representing a Shape Context.
1363  * \ingroup common
1364  */
1366  {
1367  float descriptor[1980] = {0.f};
1368  float rf[9] = {0.f};
1369  static int descriptorSize () { return 1980; }
1370 
1371  inline ShapeContext1980 () = default;
1372 
1373  friend std::ostream& operator << (std::ostream& os, const ShapeContext1980& p);
1374  };
1375 
1376  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const UniqueShapeContext1960& p);
1377  /** \brief A point structure representing a Unique Shape Context.
1378  * \ingroup common
1379  */
1381  {
1382  float descriptor[1960] = {0.f};
1383  float rf[9] = {0.f};
1384  static int descriptorSize () { return 1960; }
1385 
1386  inline UniqueShapeContext1960 () = default;
1387 
1388  friend std::ostream& operator << (std::ostream& os, const UniqueShapeContext1960& p);
1389  };
1390 
1391  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const SHOT352& p);
1392  /** \brief A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape only.
1393  * \ingroup common
1394  */
1395  struct SHOT352
1396  {
1397  float descriptor[352] = {0.f};
1398  float rf[9] = {0.f};
1399  static int descriptorSize () { return 352; }
1400 
1401  inline SHOT352 () = default;
1402 
1403  friend std::ostream& operator << (std::ostream& os, const SHOT352& p);
1404  };
1405 
1406 
1407  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const SHOT1344& p);
1408  /** \brief A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+color.
1409  * \ingroup common
1410  */
1411  struct SHOT1344
1412  {
1413  float descriptor[1344] = {0.f};
1414  float rf[9] = {0.f};
1415  static int descriptorSize () { return 1344; }
1416 
1417  inline SHOT1344 () = default;
1418 
1419  friend std::ostream& operator << (std::ostream& os, const SHOT1344& p);
1420  };
1421 
1422 
1423  /** \brief A structure representing the Local Reference Frame of a point.
1424  * \ingroup common
1425  */
1426  struct EIGEN_ALIGN16 _ReferenceFrame
1427  {
1428  union
1429  {
1430  float rf[9];
1431  struct
1432  {
1433  float x_axis[3];
1434  float y_axis[3];
1435  float z_axis[3];
1436  };
1437  };
1438 
1439  inline Eigen::Map<Eigen::Vector3f> getXAxisVector3fMap () { return (Eigen::Vector3f::Map (x_axis)); }
1440  inline const Eigen::Map<const Eigen::Vector3f> getXAxisVector3fMap () const { return (Eigen::Vector3f::Map (x_axis)); }
1441  inline Eigen::Map<Eigen::Vector3f> getYAxisVector3fMap () { return (Eigen::Vector3f::Map (y_axis)); }
1442  inline const Eigen::Map<const Eigen::Vector3f> getYAxisVector3fMap () const { return (Eigen::Vector3f::Map (y_axis)); }
1443  inline Eigen::Map<Eigen::Vector3f> getZAxisVector3fMap () { return (Eigen::Vector3f::Map (z_axis)); }
1444  inline const Eigen::Map<const Eigen::Vector3f> getZAxisVector3fMap () const { return (Eigen::Vector3f::Map (z_axis)); }
1445  inline Eigen::Map<Eigen::Matrix3f> getMatrix3fMap () { return (Eigen::Matrix3f::Map (rf)); }
1446  inline const Eigen::Map<const Eigen::Matrix3f> getMatrix3fMap () const { return (Eigen::Matrix3f::Map (rf)); }
1447 
1449  };
1450 
1451  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ReferenceFrame& p);
1452  struct EIGEN_ALIGN16 ReferenceFrame : public _ReferenceFrame
1453  {
1455  {
1456  std::copy_n(p.rf, 9, rf);
1457  }
1458 
1459  inline ReferenceFrame ()
1460  {
1461  std::fill_n(x_axis, 3, 0);
1462  std::fill_n(y_axis, 3, 0);
1463  std::fill_n(z_axis, 3, 0);
1464  }
1465 
1466  // @TODO: add other ctors
1467 
1468  friend std::ostream& operator << (std::ostream& os, const ReferenceFrame& p);
1470  };
1471 
1472 
1473  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const FPFHSignature33& p);
1474  /** \brief A point structure representing the Fast Point Feature Histogram (FPFH).
1475  * \ingroup common
1476  */
1478  {
1479  float histogram[33] = {0.f};
1480  static int descriptorSize () { return 33; }
1481 
1482  inline FPFHSignature33 () = default;
1483 
1484  friend std::ostream& operator << (std::ostream& os, const FPFHSignature33& p);
1485  };
1486 
1487  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const VFHSignature308& p);
1488  /** \brief A point structure representing the Viewpoint Feature Histogram (VFH).
1489  * \ingroup common
1490  */
1492  {
1493  float histogram[308] = {0.f};
1494  static int descriptorSize () { return 308; }
1495 
1496  inline VFHSignature308 () = default;
1497 
1498  friend std::ostream& operator << (std::ostream& os, const VFHSignature308& p);
1499  };
1500 
1501  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GRSDSignature21& p);
1502  /** \brief A point structure representing the Global Radius-based Surface Descriptor (GRSD).
1503  * \ingroup common
1504  */
1506  {
1507  float histogram[21] = {0.f};
1508  static int descriptorSize () { return 21; }
1509 
1510  inline GRSDSignature21 () = default;
1511 
1512  friend std::ostream& operator << (std::ostream& os, const GRSDSignature21& p);
1513  };
1514 
1515  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const BRISKSignature512& p);
1516  /** \brief A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
1517  * \ingroup common
1518  */
1520  {
1521  float scale = 0.f;
1522  float orientation = 0.f;
1523  unsigned char descriptor[64] = {0};
1524  static int descriptorSize () { return 64; }
1525 
1526  inline BRISKSignature512 () = default;
1527 
1528  inline BRISKSignature512 (float _scale, float _orientation): scale (_scale), orientation (_orientation) {}
1529 
1530  friend std::ostream& operator << (std::ostream& os, const BRISKSignature512& p);
1531  };
1532 
1533  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ESFSignature640& p);
1534  /** \brief A point structure representing the Ensemble of Shape Functions (ESF).
1535  * \ingroup common
1536  */
1538  {
1539  float histogram[640] = {0.f};
1540  static int descriptorSize () { return 640; }
1541 
1542  inline ESFSignature640 () = default;
1543 
1544  friend std::ostream& operator << (std::ostream& os, const ESFSignature640& p);
1545  };
1546 
1547  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature512& p);
1548  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
1549  * \ingroup common
1550  */
1552  {
1553  float histogram[512] = {0.f};
1554  static int descriptorSize() { return 512; }
1555 
1556  inline GASDSignature512 () = default;
1557 
1558  friend std::ostream& operator << (std::ostream& os, const GASDSignature512& p);
1559  };
1560 
1561  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature984& p);
1562  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descriptor.
1563  * \ingroup common
1564  */
1566  {
1567  float histogram[984] = {0.f};
1568  static int descriptorSize() { return 984; }
1569 
1570  inline GASDSignature984 () = default;
1571 
1572  friend std::ostream& operator << (std::ostream& os, const GASDSignature984& p);
1573  };
1574 
1575  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature7992& p);
1576  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descriptor.
1577  * \ingroup common
1578  */
1580  {
1581  float histogram[7992] = {0.f};
1582  static int descriptorSize() { return 7992; }
1583 
1584  inline GASDSignature7992 () = default;
1585 
1586  friend std::ostream& operator << (std::ostream& os, const GASDSignature7992& p);
1587  };
1588 
1589  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GFPFHSignature16& p);
1590  /** \brief A point structure representing the GFPFH descriptor with 16 bins.
1591  * \ingroup common
1592  */
1594  {
1595  float histogram[16] = {0.f};
1596  static int descriptorSize () { return 16; }
1597 
1598  inline GFPFHSignature16 () = default;
1599 
1600  friend std::ostream& operator << (std::ostream& os, const GFPFHSignature16& p);
1601  };
1602 
1603  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Narf36& p);
1604  /** \brief A point structure representing the Narf descriptor.
1605  * \ingroup common
1606  */
1607  struct Narf36
1608  {
1609  float x = 0.f, y = 0.f, z = 0.f, roll = 0.f, pitch = 0.f, yaw = 0.f;
1610  float descriptor[36] = {0.f};
1611  static int descriptorSize () { return 36; }
1612 
1613  inline Narf36 () = default;
1614 
1615  inline Narf36 (float _x, float _y, float _z): Narf36 (_x, _y, _z, 0.f, 0.f, 0.f) {}
1616 
1617  inline Narf36 (float _x, float _y, float _z, float _roll, float _pitch, float _yaw):
1618  x (_x), y (_y), z (_z), roll (_roll), pitch (_pitch), yaw (_yaw) {}
1619 
1620  friend std::ostream& operator << (std::ostream& os, const Narf36& p);
1621  };
1622 
1623  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const BorderDescription& p);
1624  /** \brief A structure to store if a point in a range image lies on a border between an obstacle and the background.
1625  * \ingroup common
1626  */
1628  {
1629  int x = 0.f, y = 0.f;
1631  //std::vector<const BorderDescription*> neighbors;
1632 
1633  inline BorderDescription () = default;
1634 
1635  // TODO: provide other ctors
1636 
1637  friend std::ostream& operator << (std::ostream& os, const BorderDescription& p);
1638  };
1639 
1640 
1641  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const IntensityGradient& p);
1642  /** \brief A point structure representing the intensity gradient of an XYZI point cloud.
1643  * \ingroup common
1644  */
1646  {
1647  union
1648  {
1649  float gradient[3];
1650  struct
1651  {
1652  float gradient_x;
1653  float gradient_y;
1654  float gradient_z;
1655  };
1656  };
1657 
1658  inline IntensityGradient (): IntensityGradient (0.f, 0.f, 0.f) {}
1659 
1660  inline IntensityGradient (float _x, float _y, float _z): gradient_x (_x), gradient_y (_y), gradient_z (_z) {}
1661 
1662  friend std::ostream& operator << (std::ostream& os, const IntensityGradient& p);
1663  };
1664 
1665  // TODO: Maybe make other histogram based structs an alias for this
1666  /** \brief A point structure representing an N-D histogram.
1667  * \ingroup common
1668  */
1669  template <int N>
1670  struct Histogram
1671  {
1672  float histogram[N];
1673  static int descriptorSize () { return N; }
1674  };
1675 
1676  struct EIGEN_ALIGN16 _PointWithScale
1677  {
1678  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1679 
1680  union
1681  {
1682  /** \brief Diameter of the meaningful keypoint neighborhood. */
1683  float scale;
1684  float size;
1685  };
1686 
1687  /** \brief Computed orientation of the keypoint (-1 if not applicable). */
1688  float angle;
1689  /** \brief The response by which the most strong keypoints have been selected. */
1690  float response;
1691  /** \brief octave (pyramid layer) from which the keypoint has been extracted. */
1692  int octave;
1693 
1695  };
1696 
1697  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithScale& p);
1698  /** \brief A point structure representing a 3-D position and scale.
1699  * \ingroup common
1700  */
1702  {
1704  {
1705  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1706  scale = p.scale;
1707  angle = p.angle;
1708  response = p.response;
1709  octave = p.octave;
1710  }
1711 
1712  inline PointWithScale (): PointWithScale (0.f, 0.f, 0.f) {}
1713 
1714  inline PointWithScale (float _x, float _y, float _z, float _scale = 1.f,
1715  float _angle = -1.f, float _response = 0.f, int _octave = 0)
1716  {
1717  x = _x; y = _y; z = _z;
1718  data[3] = 1.0f;
1719  scale = _scale;
1720  angle = _angle;
1721  response = _response;
1722  octave = _octave;
1723  }
1724 
1725  friend std::ostream& operator << (std::ostream& os, const PointWithScale& p);
1726  };
1727 
1728 
1729  struct EIGEN_ALIGN16 _PointSurfel
1730  {
1731  PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1732  PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4])
1733  union
1734  {
1735  struct
1736  {
1738  float radius;
1739  float confidence;
1740  float curvature;
1741  };
1742  float data_c[4];
1743  };
1746  };
1747 
1748  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointSurfel& p);
1749  /** \brief A surfel, that is, a point structure representing Euclidean xyz coordinates, together with normal coordinates, a RGBA color, a radius, a confidence value and the surface curvature estimate.
1750  * \ingroup common
1751  */
1752  struct PointSurfel : public _PointSurfel
1753  {
1754  inline PointSurfel (const _PointSurfel &p)
1755  {
1756  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1757  rgba = p.rgba;
1758  radius = p.radius;
1759  confidence = p.confidence;
1760  curvature = p.curvature;
1761  }
1762 
1763  inline PointSurfel ()
1764  {
1765  x = y = z = 0.0f;
1766  data[3] = 1.0f;
1767  normal_x = normal_y = normal_z = data_n[3] = 0.0f;
1768  r = g = b = 0;
1769  a = 255;
1770  radius = confidence = curvature = 0.0f;
1771  }
1772 
1773  // TODO: add other ctor to PointSurfel
1774 
1775  friend std::ostream& operator << (std::ostream& os, const PointSurfel& p);
1776  };
1777 
1778  struct EIGEN_ALIGN16 _PointDEM
1779  {
1781  float intensity;
1785  };
1786 
1787  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointDEM& p);
1788  /** \brief A point structure representing Digital Elevation Map.
1789  * \ingroup common
1790  */
1791  struct PointDEM : public _PointDEM
1792  {
1793  inline PointDEM (const _PointDEM &p)
1794  {
1795  x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1796  intensity = p.intensity;
1797  intensity_variance = p.intensity_variance;
1798  height_variance = p.height_variance;
1799  }
1800 
1801  inline PointDEM (): PointDEM (0.f, 0.f, 0.f) {}
1802 
1803  inline PointDEM (float _x, float _y, float _z): PointDEM (_x, _y, _z, 0.f, 0.f, 0.f) {}
1804 
1805  inline PointDEM (float _x, float _y, float _z, float _intensity,
1806  float _intensity_variance, float _height_variance)
1807  {
1808  x = _x; y = _y; z = _z;
1809  data[3] = 1.0f;
1810  intensity = _intensity;
1811  intensity_variance = _intensity_variance;
1812  height_variance = _height_variance;
1813  }
1814 
1815  friend std::ostream& operator << (std::ostream& os, const PointDEM& p);
1816  };
1817 
1818  template <int N> std::ostream&
1819  operator << (std::ostream& os, const Histogram<N>& p)
1820  {
1821  // make constexpr
1822  if (N > 0)
1823  {
1824  os << "(" << p.histogram[0];
1825  std::for_each(p.histogram + 1, std::end(p.histogram),
1826  [&os](const auto& hist) { os << ", " << hist; });
1827  os << ")";
1828  }
1829  return (os);
1830  }
1831 } // End namespace
1832 
1833 #endif
A point structure representing normal coordinates and the surface curvature estimate.
Eigen::Map< Eigen::Vector3f > Vector3fMap
A point structure representing the grayscale intensity in single-channel images.
A point structure representing a Shape Context.
PointXYZRGBNormal(float _x, float _y, float _z)
PrincipalRadiiRSD(float _r_min, float _r_max)
Eigen::Map< Eigen::Vector3f > getXAxisVector3fMap()
std::bitset< 32 > BorderTraits
Data type to store extended information about a transition from foreground to backgroundSpecification...
Definition: point_types.h:309
PointNormal(float _x, float _y, float _z)
Label(std::uint32_t _label=0)
Axis(const _Axis &p)
A point structure representing a description of whether a point is lying on a surface boundary or not...
PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha, float _r, float _g, float _b)
Defines functions, macros and traits for allocating and using memory.
A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates a...
A point structure representing Euclidean xyz coordinates, padded with an extra range float...
float intensity_variance
PointDEM(const _PointDEM &p)
PointXYZI(float _x, float _y, float _z, float _intensity=0.f)
const Eigen::Map< const Eigen::Vector4f, Eigen::Aligned > Vector4fMapConst
PrincipalCurvatures(float _pc1, float _pc2)
PointXYZRGBA(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
static int descriptorSize()
PointXYZRGBL(float _x, float _y, float _z)
const Eigen::Map< const Eigen::Vector3f > getXAxisVector3fMap() const
float scale
Diameter of the meaningful keypoint neighborhood.
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3...
A point structure representing a Unique Shape Context.
PointXYZL(float _x, float _y, float _z, std::uint32_t _label=0)
PointXYZI(float _intensity=0.f)
PointXYZRGB(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
Eigen::Map< Eigen::Vector3f > getZAxisVector3fMap()
A structure representing the Local Reference Frame of a point.
float angle
Computed orientation of the keypoint (-1 if not applicable).
PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
PPFSignature(float _alpha=0.f)
PointXYZRGBNormal(const _PointXYZRGBNormal &p)
static int descriptorSize()
PrincipalCurvatures(float _x, float _y, float _z, float _pc1, float _pc2)
PointXYZRGBL(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
A point structure representing Digital Elevation Map.
static int descriptorSize()
Intensity(float _intensity=0.f)
A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
PointXYZ(float _x, float _y, float _z)
PointXYZRGBA(const _PointXYZRGBA &p)
float response
The response by which the most strong keypoints have been selected.
Eigen::Map< Vector3c > Vector3cMap
static int descriptorSize()
Normal(float n_x, float n_y, float n_z, float _curvature=0.f)
A point structure representing an Axis using its normal coordinates.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition: memory.h:65
PointXYZRGB(float _x, float _y, float _z)
PointNormal(float _x, float _y, float _z, float n_x, float n_y, float n_z, float _curvature=0.f)
A point structure representing Euclidean xyz coordinates, and the RGBA color.
Intensity8u(const _Intensity8u &p)
PointXYZINormal(float _intensity=0.f)
A point structure representing the grayscale intensity in single-channel images.
PointXYZRGBA(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
A point structure representing the Fast Point Feature Histogram (FPFH).
PointWithRange(float _x, float _y, float _z, float _range=0.f)
A 2D point structure representing Euclidean xy coordinates.
PointXYZRGBNormal(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointWithScale(float _x, float _y, float _z, float _scale=1.f, float _angle=-1.f, float _response=0.f, int _octave=0)
Narf36(float _x, float _y, float _z)
PointXYZ(const _PointXYZ &p)
PointXYZRGBNormal(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointWithRange(float _range=0.f)
A structure representing RGB color information.
A point structure representing an N-D histogram.
A 2D point structure representing pixel image coordinates.
A point structure representing the GFPFH descriptor with 16 bins.
const Eigen::Map< const Eigen::Matrix3f > getMatrix3fMap() const
A point structure representing the Point Feature Histogram with colors (PFHRGB).
A point structure representing Euclidean xyz coordinates, and the intensity value.
Eigen::Map< Eigen::Array3f > Array3fMap
PointXYZINormal(float _x, float _y, float _z, float _intensity=0.f)
PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label=0.f)
static int descriptorSize()
PointXYZRGBL(const _PointXYZRGBL &p)
PointXYZHSV(float _h, float _s, float _v)
PointXYZRGBA(float _x, float _y, float _z)
A point structure representing Euclidean xyz coordinates.
A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates...
const Eigen::Map< const Eigen::Vector3f > getYAxisVector3fMap() const
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
static int descriptorSize()
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
PointXYZINormal(const _PointXYZINormal &p)
PointDEM(float _x, float _y, float _z, float _intensity, float _intensity_variance, float _height_variance)
const Eigen::Map< const Vector4c, Eigen::Aligned > Vector4cMapConst
A point structure representing the three moment invariants.
PointXYZLNormal(const _PointXYZLNormal &p)
const Eigen::Map< const Eigen::Vector3f > Vector3fMapConst
PointXYZL(std::uint32_t _label=0)
Eigen::Map< Eigen::Vector3f > getYAxisVector3fMap()
PointXYZI(const _PointXYZI &p)
static int descriptorSize()
MomentInvariants(float _j1, float _j2, float _j3)
A point structure representing the grayscale intensity in single-channel images.
PointUV(float _u, float _v)
CPPFSignature(float _alpha=0.f)
PointXYZHSV(const _PointXYZHSV &p)
static int descriptorSize()
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
static int descriptorSize()
PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label, float n_x, float n_y, float n_z, float _curvature=0.f)
Axis(float n_x, float n_y, float n_z)
PointSurfel(const _PointSurfel &p)
static int descriptorSize()
PointXYZRGBL(std::uint32_t _label=0)
int octave
octave (pyramid layer) from which the keypoint has been extracted.
A structure to store if a point in a range image lies on a border between an obstacle and the backgro...
ReferenceFrame(const _ReferenceFrame &p)
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
Eigen::Map< Eigen::Array4f, Eigen::Aligned > Array4fMap
PPFRGBSignature(float _alpha=0.f)
const Eigen::Map< const Eigen::Array4f, Eigen::Aligned > Array4fMapConst
Intensity32u(std::uint32_t _intensity=0)
Intensity32u(const _Intensity32u &p)
CPPFSignature(float _f1, float _f2, float _f3, float _f4, float _f5, float _f6, float _f7, float _f8, float _f9, float _f10, float _alpha=0.f)
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
A point structure for storing the Point Pair Feature (CPPF) values.
A point structure representing Euclidean xyz coordinates together with the viewpoint from which it wa...
PointDEM(float _x, float _y, float _z)
A point structure representing the intensity gradient of an XYZI point cloud.
const Eigen::Map< const Eigen::Vector3f > getZAxisVector3fMap() const
PointXYZRGBNormal(float _curvature=0.f)
PPFSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
static int descriptorSize()
Normal(float _curvature=0.f)
PointXYZRGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointXYZINormal(float _x, float _y, float _z, float _intensity, float n_x, float n_y, float n_z, float _curvature=0.f)
PointXYZRGBL(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint32_t _label=0)
BRISKSignature512(float _scale, float _orientation)
PointXYZRGBNormal(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, float n_x, float n_y, float n_z, float _curvature=0.f)
PointXYZRGB(const _PointXYZRGB &p)
RGB(const _RGB &p)
A point structure representing the Viewpoint Feature Histogram (VFH).
#define PCL_DEPRECATED(Major, Minor, Message)
macro for compatibility across compilers and help remove old deprecated items for the Major...
Definition: pcl_macros.h:120
A point structure representing a 3-D position and scale.
A point structure representing the minimum and maximum surface radii (in meters) computed using RSD...
Eigen::Matrix< std::uint8_t, 4, 1 > Vector4c
A point structure representing the Narf descriptor.
const Eigen::Map< const Vector3c > Vector3cMapConst
A point structure representing Euclidean xyz coordinates, and the RGB color.
A point structure representing the principal curvatures and their magnitudes.
PointWithRange(const _PointWithRange &p)
Eigen::Map< Vector4c, Eigen::Aligned > Vector4cMap
PointWithScale(const _PointWithScale &p)
PointXYZHSV(float _x, float _y, float _z, float _h, float _s, float _v)
A point structure representing the Point Feature Histogram (PFH).
static int descriptorSize()
std::uint32_t label
Narf36(float _x, float _y, float _z, float _roll, float _pitch, float _yaw)
PointWithViewpoint(const _PointWithViewpoint &p)
PointNormal(float _curvature=0.f)
Intensity8u(std::uint8_t _intensity=0)
A point structure representing the Ensemble of Shape Functions (ESF).
static int descriptorSize()
const Eigen::Map< const Eigen::Array3f > Array3fMapConst
PrincipalCurvatures(float _x, float _y, float _z)
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor...
Intensity(const _Intensity &p)
PointXYZLNormal(std::uint32_t _label=0)
std::uint32_t label
static int descriptorSize()
A point structure representing the Global Radius-based Surface Descriptor (GRSD). ...
Boundary(std::uint8_t _boundary=0)
PointXYZL(const _PointXYZL &p)
IntensityGradient(float _x, float _y, float _z)
RGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
A surfel, that is, a point structure representing Euclidean xyz coordinates, together with normal coo...
Eigen::Map< Eigen::Vector4f, Eigen::Aligned > Vector4fMap
#define PCL_EXPORTS
Definition: pcl_macros.h:276
Eigen::Matrix< std::uint8_t, 3, 1 > Vector3c
PointNormal(const _PointNormal &p)
Defines all the PCL and non-PCL macros used.
static int descriptorSize()
A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coo...
A point structure for storing the Point Pair Feature (PPF) values.
PointXY(float _x, float _y)
Normal(const _Normal &p)
Eigen::Map< Eigen::Matrix3f > getMatrix3fMap()
A point structure for storing the Point Pair Color Feature (PPFRGB) values.