Point Cloud Library (PCL)  1.15.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 #pragma once
40 
41 #include <pcl/memory.h> // for PCL_MAKE_ALIGNED_OPERATOR_NEW
42 #include <pcl/pcl_config.h> // for PCL_XYZ_POINT_TYPES, PCL_NORMAL_POINT_TYPES
43 #include <pcl/pcl_macros.h> // for PCL_EXPORTS
44 #include <pcl/PCLPointField.h> // for PCLPointField
45 #include <pcl/point_types.h> // implementee
46 #include <pcl/register_point_struct.h> // for POINT_CLOUD_REGISTER_POINT_STRUCT, POINT_CLOUD_REGISTER_POINT_WRAPPER
47 
48 #include <Eigen/Core> // for MatrixMap
49 
50 #include <algorithm> // for copy_n, fill_n
51 #include <cstdint> // for uint8_t, uint32_t
52 #include <ostream> // for ostream, operator<<
53 
54 // Define all PCL point types
55 #define PCL_POINT_TYPES \
56  (pcl::PointXYZ) \
57  (pcl::PointXYZI) \
58  (pcl::PointXYZL) \
59  (pcl::Label) \
60  (pcl::PointXYZRGBA) \
61  (pcl::PointXYZRGB) \
62  (pcl::PointXYZRGBL) \
63  (pcl::PointXYZLAB) \
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 with XYZ and label
114 #define PCL_XYZL_POINT_TYPES \
115  (pcl::PointXYZL) \
116  (pcl::PointXYZRGBL) \
117  (pcl::PointXYZLNormal)
118 
119 // Define all point types that represent features
120 #define PCL_FEATURE_POINT_TYPES \
121  (pcl::PFHSignature125) \
122  (pcl::PFHRGBSignature250) \
123  (pcl::PPFSignature) \
124  (pcl::CPPFSignature) \
125  (pcl::PPFRGBSignature) \
126  (pcl::NormalBasedSignature12) \
127  (pcl::FPFHSignature33) \
128  (pcl::VFHSignature308) \
129  (pcl::GASDSignature512) \
130  (pcl::GASDSignature984) \
131  (pcl::GASDSignature7992) \
132  (pcl::GRSDSignature21) \
133  (pcl::ESFSignature640) \
134  (pcl::BRISKSignature512) \
135  (pcl::Narf36)
136 
137 // Define all point types that have descriptorSize() member function
138 #define PCL_DESCRIPTOR_FEATURE_POINT_TYPES \
139  (pcl::PFHSignature125) \
140  (pcl::PFHRGBSignature250) \
141  (pcl::FPFHSignature33) \
142  (pcl::VFHSignature308) \
143  (pcl::GASDSignature512) \
144  (pcl::GASDSignature984) \
145  (pcl::GASDSignature7992) \
146  (pcl::GRSDSignature21) \
147  (pcl::ESFSignature640) \
148  (pcl::BRISKSignature512) \
149  (pcl::Narf36)
150 
151 
152 namespace pcl
153 {
154  namespace detail
155  {
156  namespace traits
157  {
158  template<typename FeaturePointT> struct descriptorSize {};
159 
160  template<> struct descriptorSize<PFHSignature125> { static constexpr const int value = 125; };
161  template<> struct descriptorSize<PFHRGBSignature250> { static constexpr const int value = 250; };
162  template<> struct descriptorSize<ShapeContext1980> { static constexpr const int value = 1980; };
163  template<> struct descriptorSize<UniqueShapeContext1960> { static constexpr const int value = 1960; };
164  template<> struct descriptorSize<SHOT352> { static constexpr const int value = 352; };
165  template<> struct descriptorSize<SHOT1344> { static constexpr const int value = 1344; };
166  template<> struct descriptorSize<FPFHSignature33> { static constexpr const int value = 33; };
167  template<> struct descriptorSize<VFHSignature308> { static constexpr const int value = 308; };
168  template<> struct descriptorSize<GRSDSignature21> { static constexpr const int value = 21; };
169  template<> struct descriptorSize<BRISKSignature512> { static constexpr const int value = 512; };
170  template<> struct descriptorSize<ESFSignature640> { static constexpr const int value = 640; };
171  template<> struct descriptorSize<GASDSignature512> { static constexpr const int value = 512; };
172  template<> struct descriptorSize<GASDSignature984> { static constexpr const int value = 984; };
173  template<> struct descriptorSize<GASDSignature7992> { static constexpr const int value = 7992; };
174  template<> struct descriptorSize<GFPFHSignature16> { static constexpr const int value = 16; };
175  template<> struct descriptorSize<Narf36> { static constexpr const int value = 36; };
176  template<int N> struct descriptorSize<Histogram<N>> { static constexpr const int value = N; };
177 
178 
179  template<typename FeaturePointT>
181  }
182  }
183 
184  using Vector2fMap = Eigen::Map<Eigen::Vector2f>;
185  using Vector2fMapConst = const Eigen::Map<const Eigen::Vector2f>;
186  using Array3fMap = Eigen::Map<Eigen::Array3f>;
187  using Array3fMapConst = const Eigen::Map<const Eigen::Array3f>;
188  using Array4fMap = Eigen::Map<Eigen::Array4f, Eigen::Aligned>;
189  using Array4fMapConst = const Eigen::Map<const Eigen::Array4f, Eigen::Aligned>;
190  using Vector3fMap = Eigen::Map<Eigen::Vector3f>;
191  using Vector3fMapConst = const Eigen::Map<const Eigen::Vector3f>;
192  using Vector4fMap = Eigen::Map<Eigen::Vector4f, Eigen::Aligned>;
193  using Vector4fMapConst = const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned>;
194 
195  using Vector3c = Eigen::Matrix<std::uint8_t, 3, 1>;
196  using Vector3cMap = Eigen::Map<Vector3c>;
197  using Vector3cMapConst = const Eigen::Map<const Vector3c>;
198  using Vector4c = Eigen::Matrix<std::uint8_t, 4, 1>;
199  using Vector4cMap = Eigen::Map<Vector4c, Eigen::Aligned>;
200  using Vector4cMapConst = const Eigen::Map<const Vector4c, Eigen::Aligned>;
201 
202 #define PCL_ADD_UNION_POINT4D \
203  union EIGEN_ALIGN16 { \
204  float data[4]; \
205  struct { \
206  float x; \
207  float y; \
208  float z; \
209  }; \
210  };
211 
212 #define PCL_ADD_EIGEN_MAPS_POINT4D \
213  inline pcl::Vector2fMap getVector2fMap () { return (pcl::Vector2fMap (data)); } \
214  inline pcl::Vector2fMapConst getVector2fMap () const { return (pcl::Vector2fMapConst (data)); } \
215  inline pcl::Vector3fMap getVector3fMap () { return (pcl::Vector3fMap (data)); } \
216  inline pcl::Vector3fMapConst getVector3fMap () const { return (pcl::Vector3fMapConst (data)); } \
217  inline pcl::Vector4fMap getVector4fMap () { return (pcl::Vector4fMap (data)); } \
218  inline pcl::Vector4fMapConst getVector4fMap () const { return (pcl::Vector4fMapConst (data)); } \
219  inline pcl::Array3fMap getArray3fMap () { return (pcl::Array3fMap (data)); } \
220  inline pcl::Array3fMapConst getArray3fMap () const { return (pcl::Array3fMapConst (data)); } \
221  inline pcl::Array4fMap getArray4fMap () { return (pcl::Array4fMap (data)); } \
222  inline pcl::Array4fMapConst getArray4fMap () const { return (pcl::Array4fMapConst (data)); }
223 
224 #define PCL_ADD_POINT4D \
225  PCL_ADD_UNION_POINT4D \
226  PCL_ADD_EIGEN_MAPS_POINT4D
227 
228 #define PCL_ADD_UNION_NORMAL4D \
229  union EIGEN_ALIGN16 { \
230  float data_n[4]; \
231  float normal[3]; \
232  struct { \
233  float normal_x; \
234  float normal_y; \
235  float normal_z; \
236  }; \
237  };
238 
239 #define PCL_ADD_EIGEN_MAPS_NORMAL4D \
240  inline pcl::Vector3fMap getNormalVector3fMap () { return (pcl::Vector3fMap (data_n)); } \
241  inline pcl::Vector3fMapConst getNormalVector3fMap () const { return (pcl::Vector3fMapConst (data_n)); } \
242  inline pcl::Vector4fMap getNormalVector4fMap () { return (pcl::Vector4fMap (data_n)); } \
243  inline pcl::Vector4fMapConst getNormalVector4fMap () const { return (pcl::Vector4fMapConst (data_n)); }
244 
245 #define PCL_ADD_NORMAL4D \
246  PCL_ADD_UNION_NORMAL4D \
247  PCL_ADD_EIGEN_MAPS_NORMAL4D
248 
249 #define PCL_ADD_UNION_RGB \
250  union \
251  { \
252  union \
253  { \
254  struct \
255  { \
256  std::uint8_t b; \
257  std::uint8_t g; \
258  std::uint8_t r; \
259  std::uint8_t a; \
260  }; \
261  float rgb; \
262  }; \
263  std::uint32_t rgba; \
264  };
265 
266 #define PCL_ADD_EIGEN_MAPS_RGB \
267  inline Eigen::Vector3i getRGBVector3i () { return (Eigen::Vector3i (r, g, b)); } \
268  inline const Eigen::Vector3i getRGBVector3i () const { return (Eigen::Vector3i (r, g, b)); } \
269  inline Eigen::Vector4i getRGBVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
270  inline const Eigen::Vector4i getRGBVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
271  inline Eigen::Vector4i getRGBAVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
272  inline const Eigen::Vector4i getRGBAVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
273  inline pcl::Vector3cMap getBGRVector3cMap () { return (pcl::Vector3cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
274  inline pcl::Vector3cMapConst getBGRVector3cMap () const { return (pcl::Vector3cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); } \
275  inline pcl::Vector4cMap getBGRAVector4cMap () { return (pcl::Vector4cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
276  inline pcl::Vector4cMapConst getBGRAVector4cMap () const { return (pcl::Vector4cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); }
277 
278 #define PCL_ADD_RGB \
279  PCL_ADD_UNION_RGB \
280  PCL_ADD_EIGEN_MAPS_RGB
281 
282 #define PCL_ADD_INTENSITY \
283  struct \
284  { \
285  float intensity; \
286  }; \
287 
288 #define PCL_ADD_INTENSITY_8U \
289  struct \
290  { \
291  std::uint8_t intensity; \
292  }; \
293 
294 #define PCL_ADD_INTENSITY_32U \
295  struct \
296  { \
297  std::uint32_t intensity; \
298  }; \
299 
300 
301  struct _PointXYZ
302  {
303  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
304 
306  };
307 
308  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZ& p);
309  /** \brief A point structure representing Euclidean xyz coordinates. (SSE friendly)
310  * \ingroup common
311  */
312  struct EIGEN_ALIGN16 PointXYZ : public _PointXYZ
313  {
314  inline constexpr PointXYZ (const _PointXYZ &p): PointXYZ(p.x, p.y, p.z) {}
315 
316  inline constexpr PointXYZ (): PointXYZ(0.f, 0.f, 0.f) {}
317 
318  inline constexpr PointXYZ (float _x, float _y, float _z) : _PointXYZ{{{_x, _y, _z, 1.f}}} {}
319 
320  friend std::ostream& operator << (std::ostream& os, const PointXYZ& p);
322  };
323 
324 
325 #ifdef RGB
326 #undef RGB
327 #endif
328  struct _RGB
329  {
330  PCL_ADD_RGB
331  };
332 
333  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const RGB& p);
334  /** \brief A structure representing RGB color information.
335  *
336  * The RGBA information is available either as separate r, g, b, or as a
337  * packed std::uint32_t rgba value. To pack it, use:
338  *
339  * \code
340  * int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);
341  * \endcode
342  *
343  * To unpack it use:
344  *
345  * \code
346  * int rgb = ...;
347  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
348  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
349  * std::uint8_t b = (rgb) & 0x0000ff;
350  * \endcode
351  *
352  */
353  struct RGB: public _RGB
354  {
355  inline constexpr RGB (const _RGB &p) : RGB{p.r, p.g, p.b, p.a} {}
356 
357  inline constexpr RGB (): RGB(0, 0, 0) {}
358 
359  inline constexpr RGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a = 255) : _RGB{{{{_b, _g, _r, _a}}}} {}
360 
361  friend std::ostream& operator << (std::ostream& os, const RGB& p);
362  };
363 
364  struct _Intensity
365  {
366  PCL_ADD_INTENSITY
367  };
368 
369  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity& p);
370  /** \brief A point structure representing the grayscale intensity in single-channel images.
371  * Intensity is represented as a float value.
372  * \ingroup common
373  */
374  struct Intensity: public _Intensity
375  {
376  inline constexpr Intensity (const _Intensity &p) : Intensity{p.intensity} {}
377 
378  inline constexpr Intensity (float _intensity = 0.f) : _Intensity{_intensity} {}
379 
380  friend std::ostream& operator << (std::ostream& os, const Intensity& p);
381  };
382 
383 
385  {
387  };
388 
389  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity8u& p);
390  /** \brief A point structure representing the grayscale intensity in single-channel images.
391  * Intensity is represented as a std::uint8_t value.
392  * \ingroup common
393  */
394  struct Intensity8u: public _Intensity8u
395  {
396  inline constexpr Intensity8u (const _Intensity8u &p) : Intensity8u{p.intensity} {}
397 
398  inline constexpr Intensity8u (std::uint8_t _intensity = 0) : _Intensity8u{_intensity} {}
399 
400 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
401  inline constexpr operator unsigned char() const
402  {
403  return intensity;
404  }
405 #endif
406 
407  friend std::ostream& operator << (std::ostream& os, const Intensity8u& p);
408  };
409 
411  {
413  };
414 
415  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Intensity32u& p);
416  /** \brief A point structure representing the grayscale intensity in single-channel images.
417  * Intensity is represented as a std::uint32_t value.
418  * \ingroup common
419  */
421  {
422  inline constexpr Intensity32u (const _Intensity32u &p) : Intensity32u{p.intensity} {}
423 
424  inline constexpr Intensity32u (std::uint32_t _intensity = 0) : _Intensity32u{_intensity} {}
425 
426  friend std::ostream& operator << (std::ostream& os, const Intensity32u& p);
427  };
428 
429  /** \brief A point structure representing Euclidean xyz coordinates, and the intensity value.
430  * \ingroup common
431  */
432  struct EIGEN_ALIGN16 _PointXYZI
433  {
434  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
435  union
436  {
437  struct
438  {
439  float intensity;
440  };
441  float data_c[4];
442  };
444  };
445 
446  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZI& p);
447  struct PointXYZI : public _PointXYZI
448  {
449  inline constexpr PointXYZI (const _PointXYZI &p) : PointXYZI{p.x, p.y, p.z, p.intensity} {}
450 
451  inline constexpr PointXYZI (float _intensity = 0.f) : PointXYZI(0.f, 0.f, 0.f, _intensity) {}
452 
453  inline constexpr PointXYZI (float _x, float _y, float _z, float _intensity = 0.f) : _PointXYZI{{{_x, _y, _z, 1.0f}}, {{_intensity}}} {}
454 
455  friend std::ostream& operator << (std::ostream& os, const PointXYZI& p);
456  };
457 
458 
459  struct EIGEN_ALIGN16 _PointXYZL
460  {
461  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
462  std::uint32_t label;
464  };
465 
466  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZL& p);
467  struct PointXYZL : public _PointXYZL
468  {
469  inline constexpr PointXYZL (const _PointXYZL &p) : PointXYZL{p.x, p.y, p.z, p.label} {}
470 
471  inline constexpr PointXYZL (std::uint32_t _label = 0) : PointXYZL(0.f, 0.f, 0.f, _label) {}
472 
473  inline constexpr PointXYZL (float _x, float _y, float _z, std::uint32_t _label = 0) : _PointXYZL{{{_x, _y, _z, 1.0f}}, _label} {}
474 
475  friend std::ostream& operator << (std::ostream& os, const PointXYZL& p);
476  };
477 
478 
479  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Label& p);
480  struct Label
481  {
482  std::uint32_t label = 0;
483 
484  inline constexpr Label (std::uint32_t _label = 0): label(_label) {}
485 
486  friend std::ostream& operator << (std::ostream& os, const Label& p);
487  };
488 
489 
490  struct EIGEN_ALIGN16 _PointXYZRGBA
491  {
492  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
493  PCL_ADD_RGB
495  };
496 
497  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBA& p);
498  /** \brief A point structure representing Euclidean xyz coordinates, and the RGBA color.
499  *
500  * The RGBA information is available either as separate r, g, b, or as a
501  * packed std::uint32_t rgba value. To pack it, use:
502  *
503  * \code
504  * int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);
505  * \endcode
506  *
507  * To unpack it use:
508  *
509  * \code
510  * int rgb = ...;
511  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
512  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
513  * std::uint8_t b = (rgb) & 0x0000ff;
514  * \endcode
515  *
516  * \ingroup common
517  */
518  struct EIGEN_ALIGN16 PointXYZRGBA : public _PointXYZRGBA
519  {
520  inline constexpr PointXYZRGBA (const _PointXYZRGBA &p) : PointXYZRGBA{p.x, p.y, p.z, p.r, p.g, p.b, p.a} {}
521 
522  inline constexpr PointXYZRGBA (): PointXYZRGBA (0, 0, 0, 255) {}
523 
524  inline constexpr PointXYZRGBA (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a):
525  PointXYZRGBA (0.f, 0.f, 0.f, _r, _g, _b, _a) {}
526 
527  inline constexpr PointXYZRGBA (float _x, float _y, float _z):
528  PointXYZRGBA (_x, _y, _z, 0, 0, 0, 255) {}
529 
530  inline constexpr PointXYZRGBA (float _x, float _y, float _z, std::uint8_t _r,
531  std::uint8_t _g, std::uint8_t _b, std::uint8_t _a) : _PointXYZRGBA{{{_x, _y, _z, 1.0f}}, {{{_b, _g, _r, _a}}}} {}
532 
533  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBA& p);
534  };
535 
536 
537  struct EIGEN_ALIGN16 _PointXYZRGB
538  {
539  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
540  PCL_ADD_RGB
542  };
543 
544  struct EIGEN_ALIGN16 _PointXYZRGBL
545  {
546  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
547  PCL_ADD_RGB
548  std::uint32_t label;
550  };
551 
552  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGB& p);
553  /** \brief A point structure representing Euclidean xyz coordinates, and the RGB color.
554  *
555  * Due to historical reasons (PCL was first developed as a ROS package), the
556  * RGB information is packed into an integer and casted to a float. This is
557  * something we wish to remove in the near future, but in the meantime, the
558  * following code snippet should help you pack and unpack RGB colors in your
559  * PointXYZRGB structure:
560  *
561  * \code
562  * // pack r/g/b into rgb
563  * std::uint8_t r = 255, g = 0, b = 0; // Example: Red color
564  * std::uint32_t rgb = ((std::uint32_t)r << 16 | (std::uint32_t)g << 8 | (std::uint32_t)b);
565  * p.rgb = *reinterpret_cast<float*>(&rgb);
566  * \endcode
567  *
568  * To unpack the data into separate values, use:
569  *
570  * \code
571  * PointXYZRGB p;
572  * // unpack rgb into r/g/b
573  * std::uint32_t rgb = *reinterpret_cast<int*>(&p.rgb);
574  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
575  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
576  * std::uint8_t b = (rgb) & 0x0000ff;
577  * \endcode
578  *
579  *
580  * Alternatively, from 1.1.0 onwards, you can use p.r, p.g, and p.b directly.
581  *
582  * \ingroup common
583  */
584  struct EIGEN_ALIGN16 PointXYZRGB : public _PointXYZRGB
585  {
586  inline constexpr PointXYZRGB (const _PointXYZRGB &p) : PointXYZRGB{p.x, p.y, p.z, p.r, p.g, p.b} {}
587 
588  inline constexpr PointXYZRGB (): PointXYZRGB (0.f, 0.f, 0.f) {}
589 
590  inline constexpr PointXYZRGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
591  PointXYZRGB (0.f, 0.f, 0.f, _r, _g, _b) {}
592 
593  inline constexpr PointXYZRGB (float _x, float _y, float _z):
594  PointXYZRGB (_x, _y, _z, 0, 0, 0) {}
595 
596  inline constexpr PointXYZRGB (float _x, float _y, float _z,
597  std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
598  _PointXYZRGB{{{_x, _y, _z, 1.0f}}, {{{_b, _g, _r, 255}}}} {}
599 
600  friend std::ostream& operator << (std::ostream& os, const PointXYZRGB& p);
602  };
603 
604 
605  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBL& p);
606  struct EIGEN_ALIGN16 PointXYZRGBL : public _PointXYZRGBL
607  {
608  inline constexpr PointXYZRGBL (const _PointXYZRGBL &p) : PointXYZRGBL{p.x, p.y, p.z, p.r, p.g, p.b, p.label, p.a} {}
609 
610  inline constexpr PointXYZRGBL (std::uint32_t _label = 0):
611  PointXYZRGBL (0.f, 0.f, 0.f, 0, 0, 0, _label) {}
612 
613  inline constexpr PointXYZRGBL (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
614  PointXYZRGBL (0.f, 0.f, 0.f, _r, _g, _b) {}
615 
616  inline constexpr PointXYZRGBL (float _x, float _y, float _z):
617  PointXYZRGBL (_x, _y, _z, 0, 0, 0) {}
618 
619  inline constexpr PointXYZRGBL (float _x, float _y, float _z,
620  std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
621  std::uint32_t _label = 0, std::uint8_t _a = 255) :
622  _PointXYZRGBL{{{_x, _y, _z, 1.0f}}, {{{_b, _g, _r, _a}}}, _label} {}
623 
624  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBL& p);
626  };
627 
628 
629  struct EIGEN_ALIGN16 _PointXYZLAB
630  {
631  PCL_ADD_POINT4D // this adds the members x,y,z
632  union
633  {
634  struct
635  {
636  float L;
637  float a;
638  float b;
639  };
640  float data_lab[4];
641  };
643  };
644 
645  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZLAB& p);
646  /** \brief A point structure representing Euclidean xyz coordinates, and the CIELAB color.
647  * \ingroup common
648  */
649  struct PointXYZLAB : public _PointXYZLAB
650  {
651  inline constexpr PointXYZLAB (const _PointXYZLAB &p) : PointXYZLAB{p.x, p.y, p.z, p.L, p.a, p.b} {}
652 
653  inline constexpr PointXYZLAB() : PointXYZLAB{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} {}
654 
655  inline constexpr PointXYZLAB (float _x, float _y, float _z,
656  float _l, float _a, float _b) :
657  _PointXYZLAB{ {{_x, _y, _z, 1.0f}}, {{_l, _a, _b}} } {}
658 
659  friend std::ostream& operator << (std::ostream& os, const PointXYZLAB& p);
661  };
662 
663 
664  struct EIGEN_ALIGN16 _PointXYZHSV
665  {
666  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
667  union
668  {
669  struct
670  {
671  float h;
672  float s;
673  float v;
674  };
675  float data_c[4];
676  };
678  };
679 
680  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZHSV& p);
681  struct EIGEN_ALIGN16 PointXYZHSV : public _PointXYZHSV
682  {
683  inline constexpr PointXYZHSV (const _PointXYZHSV &p) :
684  PointXYZHSV{p.x, p.y, p.z, p.h, p.s, p.v} {}
685 
686  inline constexpr PointXYZHSV (): PointXYZHSV (0.f, 0.f, 0.f) {}
687 
688  // @TODO: Use strong types??
689  // This is a dangerous type, doesn't behave like others
690  inline constexpr PointXYZHSV (float _h, float _s, float _v):
691  PointXYZHSV (0.f, 0.f, 0.f, _h, _s, _v) {}
692 
693  inline constexpr PointXYZHSV (float _x, float _y, float _z,
694  float _h, float _s, float _v) :
695  _PointXYZHSV{{{_x, _y, _z, 1.0f}}, {{_h, _s, _v}}} {}
696 
697  friend std::ostream& operator << (std::ostream& os, const PointXYZHSV& p);
699  };
700 
701  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXY& p);
702  /** \brief A 2D point structure representing Euclidean xy coordinates.
703  * \ingroup common
704  */
705  // NOLINTBEGIN(modernize-use-default-member-init)
706  struct PointXY
707  {
708  union
709  {
710  float data[2];
711  struct
712  {
713  float x;
714  float y;
715  };
716  };
717 
718  inline constexpr PointXY(float _x, float _y): x(_x), y(_y) {}
719  inline constexpr PointXY(): x(0.0f), y(0.0f) {}
720 
721  inline pcl::Vector2fMap getVector2fMap () { return (pcl::Vector2fMap (data)); }
722  inline pcl::Vector2fMapConst getVector2fMap () const { return (pcl::Vector2fMapConst (data)); }
723 
724  friend std::ostream& operator << (std::ostream& os, const PointXY& p);
725  };
726  // NOLINTEND(modernize-use-default-member-init)
727 
728  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointUV& p);
729  /** \brief A 2D point structure representing pixel image coordinates.
730  * \note We use float to be able to represent subpixels.
731  * \ingroup common
732  */
733  struct PointUV
734  {
735  float u = 0.f;
736  float v = 0.f;
737 
738  inline constexpr PointUV() = default;
739 
740  inline constexpr PointUV(float _u, float _v): u(_u), v(_v) {}
741 
742  friend std::ostream& operator << (std::ostream& os, const PointUV& p);
743  };
744 
745  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const InterestPoint& p);
746  /** \brief A point structure representing an interest point with Euclidean xyz coordinates, and an interest value.
747  * \ingroup common
748  */
749  // @TODO: inheritance trick like on other PointTypes
750  struct EIGEN_ALIGN16 InterestPoint
751  {
752  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
753  union
754  {
755  struct
756  {
757  float strength;
758  };
759  float data_c[4];
760  };
762 
763  friend std::ostream& operator << (std::ostream& os, const InterestPoint& p);
764  };
765 
766  struct EIGEN_ALIGN16 _Normal
767  {
768  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
769  union
770  {
771  struct
772  {
773  float curvature;
774  };
775  float data_c[4];
776  };
778  };
779 
780  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Normal& p);
781  /** \brief A point structure representing normal coordinates and the surface curvature estimate. (SSE friendly)
782  * \ingroup common
783  */
784  struct Normal : public _Normal
785  {
786  inline constexpr Normal (const _Normal &p) : Normal {p.normal_x, p.normal_y, p.normal_z, p.curvature} {}
787 
788  inline constexpr Normal (float _curvature = 0.f): Normal (0.f, 0.f, 0.f, _curvature) {}
789 
790  inline constexpr Normal (float n_x, float n_y, float n_z, float _curvature = 0.f) :
791  _Normal{{{n_x, n_y, n_z, 0.0f}}, {{_curvature}}} {}
792 
793  friend std::ostream& operator << (std::ostream& os, const Normal& p);
795  };
796 
797 
798  struct EIGEN_ALIGN16 _Axis
799  {
800  PCL_ADD_NORMAL4D
802  };
803 
804  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Axis& p);
805  /** \brief A point structure representing an Axis using its normal coordinates. (SSE friendly)
806  * \ingroup common
807  */
808  struct EIGEN_ALIGN16 Axis : public _Axis
809  {
810  inline constexpr Axis (const _Axis &p) : Axis{p.normal_x, p.normal_y, p.normal_z} {}
811 
812  inline constexpr Axis (): Axis (0.f, 0.f, 0.f) {}
813 
814  inline constexpr Axis (float n_x, float n_y, float n_z) : _Axis{{{n_x, n_y, n_z, 0.0f}}} {}
815 
816  friend std::ostream& operator << (std::ostream& os, const Axis& p);
818  };
819 
820 
821  struct EIGEN_ALIGN16 _PointNormal
822  {
823  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
824  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
825  union
826  {
827  struct
828  {
829  float curvature;
830  };
831  float data_c[4];
832  };
834  };
835 
836  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointNormal& p);
837  /** \brief A point structure representing Euclidean xyz coordinates, together with normal coordinates and the surface curvature estimate. (SSE friendly)
838  * \ingroup common
839  */
840  struct PointNormal : public _PointNormal
841  {
842  inline constexpr PointNormal (const _PointNormal &p) : PointNormal{p.x, p.y, p.z, p.normal_x, p.normal_y, p.normal_z, p.curvature} {}
843 
844  inline constexpr PointNormal (float _curvature = 0.f): PointNormal (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _curvature) {}
845 
846  inline constexpr PointNormal (float _x, float _y, float _z):
847  PointNormal (_x, _y, _z, 0.f, 0.f, 0.f, 0.f) {}
848 
849  inline constexpr PointNormal (float _x, float _y, float _z, float n_x, float n_y, float n_z, float _curvature = 0.f) :
850  _PointNormal{{{_x, _y, _z, 1.0f}}, {{n_x, n_y, n_z, 0.0f}}, {{_curvature}}} {}
851 
852  friend std::ostream& operator << (std::ostream& os, const PointNormal& p);
853  };
854 
855 
856  struct EIGEN_ALIGN16 _PointXYZRGBNormal
857  {
858  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
859  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
860  union
861  {
862  struct
863  {
864  PCL_ADD_UNION_RGB
865  float curvature;
866  };
867  float data_c[4];
868  };
869  PCL_ADD_EIGEN_MAPS_RGB
871  };
872 
873  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBNormal& p);
874  /** \brief A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coordinates and the surface curvature estimate.
875  * Due to historical reasons (PCL was first developed as a ROS package), the
876  * RGB information is packed into an integer and casted to a float. This is
877  * something we wish to remove in the near future, but in the meantime, the
878  * following code snippet should help you pack and unpack RGB colors in your
879  * PointXYZRGB structure:
880  *
881  * \code
882  * // pack r/g/b into rgb
883  * std::uint8_t r = 255, g = 0, b = 0; // Example: Red color
884  * std::uint32_t rgb = ((std::uint32_t)r << 16 | (std::uint32_t)g << 8 | (std::uint32_t)b);
885  * p.rgb = *reinterpret_cast<float*>(&rgb);
886  * \endcode
887  *
888  * To unpack the data into separate values, use:
889  *
890  * \code
891  * PointXYZRGB p;
892  * // unpack rgb into r/g/b
893  * std::uint32_t rgb = *reinterpret_cast<int*>(&p.rgb);
894  * std::uint8_t r = (rgb >> 16) & 0x0000ff;
895  * std::uint8_t g = (rgb >> 8) & 0x0000ff;
896  * std::uint8_t b = (rgb) & 0x0000ff;
897  * \endcode
898  *
899  *
900  * Alternatively, from 1.1.0 onwards, you can use p.r, p.g, and p.b directly.
901  * \ingroup common
902  */
904  {
905  inline constexpr PointXYZRGBNormal (const _PointXYZRGBNormal &p) :
906  PointXYZRGBNormal {p.x, p.y, p.z, p.r, p.g, p.b, p.a, p.normal_x, p.normal_y, p.normal_z, p.curvature} {}
907 
908  inline constexpr PointXYZRGBNormal (float _curvature = 0.f):
909  PointXYZRGBNormal (0.f, 0.f, 0.f, 0, 0, 0, 0.f, 0.f, 0.f, _curvature) {}
910 
911  inline constexpr PointXYZRGBNormal (float _x, float _y, float _z):
912  PointXYZRGBNormal (_x, _y, _z, 0, 0, 0) {}
913 
914  inline constexpr PointXYZRGBNormal (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
915  PointXYZRGBNormal (0.f, 0.f, 0.f, _r, _g, _b) {}
916 
917  inline constexpr PointXYZRGBNormal (float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
918  PointXYZRGBNormal (_x, _y, _z, _r, _g, _b, 0.f, 0.f, 0.f) {}
919 
920  inline constexpr PointXYZRGBNormal (float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
921  float n_x, float n_y, float n_z, float _curvature = 0.f) :
923  {{_x, _y, _z, 1.0f}},
924  {{n_x, n_y, n_z, 0.0f}},
925  {{ {{{_b, _g, _r, 255u}}}, _curvature }}
926  }
927  {}
928 
929  inline constexpr PointXYZRGBNormal (float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
930  std::uint8_t _a, float n_x, float n_y, float n_z, float _curvature = 0.f) :
932  {{_x, _y, _z, 1.0f}},
933  {{n_x, n_y, n_z, 0.0f}},
934  {{ {{{_b, _g, _r, _a}}}, _curvature }}
935  }
936  {}
937 
938 
939  friend std::ostream& operator << (std::ostream& os, const PointXYZRGBNormal& p);
940  };
941 
942  struct EIGEN_ALIGN16 _PointXYZINormal
943  {
944  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
945  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
946  union
947  {
948  struct
949  {
950  float intensity;
951  float curvature;
952  };
953  float data_c[4];
954  };
956  };
957 
958  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZINormal& p);
959  /** \brief A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates and the surface curvature estimate.
960  * \ingroup common
961  */
963  {
964  inline constexpr PointXYZINormal (const _PointXYZINormal &p) :
965  PointXYZINormal {p.x, p.y, p.z, p.intensity, p.normal_x, p.normal_y, p.normal_z, p.curvature} {}
966 
967  inline constexpr PointXYZINormal (float _intensity = 0.f): PointXYZINormal (0.f, 0.f, 0.f, _intensity) {}
968 
969  inline constexpr PointXYZINormal (float _x, float _y, float _z, float _intensity = 0.f):
970  PointXYZINormal (_x, _y, _z, _intensity, 0.f, 0.f, 0.f) {}
971 
972  inline constexpr PointXYZINormal (float _x, float _y, float _z, float _intensity,
973  float n_x, float n_y, float n_z, float _curvature = 0.f) :
975  {{_x, _y, _z, 1.0f}},
976  {{n_x, n_y, n_z, 0.0f}},
977  {{_intensity, _curvature}}
978  }
979  {}
980 
981  friend std::ostream& operator << (std::ostream& os, const PointXYZINormal& p);
982  };
983 
984 //----
985  struct EIGEN_ALIGN16 _PointXYZLNormal
986  {
987  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
988  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
989  union
990  {
991  struct
992  {
993  std::uint32_t label;
994  float curvature;
995  };
996  float data_c[4];
997  };
999  };
1000 
1001  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZLNormal& p);
1002  /** \brief A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates and the surface curvature estimate.
1003  * \ingroup common
1004  */
1006  {
1007  inline constexpr PointXYZLNormal (const _PointXYZLNormal &p) :
1008  PointXYZLNormal {p.x, p.y, p.z, p.label, p.normal_x, p.normal_y, p.normal_z, p.curvature} {}
1009 
1010  inline constexpr PointXYZLNormal (std::uint32_t _label = 0u): PointXYZLNormal (0.f, 0.f, 0.f, _label) {}
1011 
1012  inline constexpr PointXYZLNormal (float _x, float _y, float _z, std::uint32_t _label = 0u) :
1013  PointXYZLNormal (_x, _y, _z, _label, 0.f, 0.f, 0.f) {}
1014 
1015  inline constexpr PointXYZLNormal (float _x, float _y, float _z, std::uint32_t _label,
1016  float n_x, float n_y, float n_z, float _curvature = 0.f) :
1018  {{_x, _y, _z, 1.0f}},
1019  {{n_x, n_y, n_z, 0.0f}},
1020  {{_label, _curvature}}
1021  }
1022  {}
1023 
1024  friend std::ostream& operator << (std::ostream& os, const PointXYZLNormal& p);
1025  };
1026 
1027 // ---
1028 
1029 
1030  struct EIGEN_ALIGN16 _PointWithRange
1031  {
1032  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1033  union
1034  {
1035  struct
1036  {
1037  float range;
1038  };
1039  float data_c[4];
1040  };
1042  };
1043 
1044  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithRange& p);
1045  /** \brief A point structure representing Euclidean xyz coordinates, padded with an extra range float.
1046  * \ingroup common
1047  */
1049  {
1050  inline constexpr PointWithRange (const _PointWithRange &p) : PointWithRange{p.x, p.y, p.z, p.range} {}
1051 
1052  inline constexpr PointWithRange (float _range = 0.f): PointWithRange (0.f, 0.f, 0.f, _range) {}
1053 
1054  inline constexpr PointWithRange (float _x, float _y, float _z, float _range = 0.f) :
1055  _PointWithRange{{{_x, _y, _z, 1.0f}}, {{_range}}} {}
1056 
1057  friend std::ostream& operator << (std::ostream& os, const PointWithRange& p);
1058  };
1059 
1060 
1061  struct EIGEN_ALIGN16 _PointWithViewpoint
1062  {
1063  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1064  union
1065  {
1066  struct
1067  {
1068  float vp_x;
1069  float vp_y;
1070  float vp_z;
1071  };
1072  float data_c[4];
1073  };
1075  };
1076 
1077  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithViewpoint& p);
1078  /** \brief A point structure representing Euclidean xyz coordinates together with the viewpoint from which it was seen.
1079  * \ingroup common
1080  */
1081  struct EIGEN_ALIGN16 PointWithViewpoint : public _PointWithViewpoint
1082  {
1083  inline constexpr PointWithViewpoint (const _PointWithViewpoint &p) : PointWithViewpoint{p.x, p.y, p.z, p.vp_x, p.vp_y, p.vp_z} {}
1084 
1085  inline constexpr PointWithViewpoint (): PointWithViewpoint (0.f, 0.f, 0.f) {}
1086 
1087  inline constexpr PointWithViewpoint (float _x, float _y, float _z): PointWithViewpoint (_x, _y, _z, 0.f, 0.f, 0.f) {}
1088 
1089  inline constexpr PointWithViewpoint (float _x, float _y, float _z, float _vp_x, float _vp_y, float _vp_z) :
1090  _PointWithViewpoint{{{_x, _y, _z, 1.0f}}, {{_vp_x, _vp_y, _vp_z}}} {}
1091 
1092  friend std::ostream& operator << (std::ostream& os, const PointWithViewpoint& p);
1093  };
1094 
1095  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const MomentInvariants& p);
1096  /** \brief A point structure representing the three moment invariants.
1097  * \ingroup common
1098  */
1100  {
1101  float j1 = 0.f, j2 = 0.f, j3 = 0.f;
1102 
1103  inline constexpr MomentInvariants () = default;
1104 
1105  inline constexpr MomentInvariants (float _j1, float _j2, float _j3): j1 (_j1), j2 (_j2), j3 (_j3) {}
1106 
1107  friend std::ostream& operator << (std::ostream& os, const MomentInvariants& p);
1108  };
1109 
1110  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PrincipalRadiiRSD& p);
1111  /** \brief A point structure representing the minimum and maximum surface radii (in meters) computed using RSD.
1112  * \ingroup common
1113  */
1115  {
1116  float r_min = 0.f, r_max = 0.f;
1117 
1118  inline constexpr PrincipalRadiiRSD () = default;
1119 
1120  inline constexpr PrincipalRadiiRSD (float _r_min, float _r_max): r_min (_r_min), r_max (_r_max) {}
1121 
1122  friend std::ostream& operator << (std::ostream& os, const PrincipalRadiiRSD& p);
1123  };
1124 
1125  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Boundary& p);
1126  /** \brief A point structure representing a description of whether a point is lying on a surface boundary or not.
1127  * \ingroup common
1128  */
1129  struct Boundary
1130  {
1131  std::uint8_t boundary_point = 0;
1132 
1133 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
1134  constexpr operator unsigned char() const
1135  {
1136  return boundary_point;
1137  }
1138 #endif
1139 
1140  inline constexpr Boundary (std::uint8_t _boundary = 0): boundary_point (_boundary) {}
1141 
1142  friend std::ostream& operator << (std::ostream& os, const Boundary& p);
1143  };
1144 
1145  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PrincipalCurvatures& p);
1146  /** \brief A point structure representing the principal curvatures and their magnitudes.
1147  * \ingroup common
1148  */
1150  {
1151  union
1152  {
1153  float principal_curvature[3];
1154  struct
1155  {
1159  };
1160  };
1161  float pc1 = 0.f;
1162  float pc2 = 0.f;
1163 
1164  inline constexpr PrincipalCurvatures (): PrincipalCurvatures (0.f, 0.f) {}
1165 
1166  inline constexpr PrincipalCurvatures (float _pc1, float _pc2): PrincipalCurvatures (0.f, 0.f, 0.f, _pc1, _pc2) {}
1167 
1168  inline constexpr PrincipalCurvatures (float _x, float _y, float _z): PrincipalCurvatures (_x, _y, _z, 0.f, 0.f) {}
1169 
1170  inline constexpr PrincipalCurvatures (float _x, float _y, float _z, float _pc1, float _pc2):
1171  principal_curvature_x (_x), principal_curvature_y (_y), principal_curvature_z (_z), pc1 (_pc1), pc2 (_pc2) {}
1172 
1173  friend std::ostream& operator << (std::ostream& os, const PrincipalCurvatures& p);
1174  };
1175 
1176  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PFHSignature125& p);
1177  /** \brief A point structure representing the Point Feature Histogram (PFH).
1178  * \ingroup common
1179  */
1181  {
1182  float histogram[125] = {0.f};
1183  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<PFHSignature125>; }
1184 
1185  inline constexpr PFHSignature125 () = default;
1186 
1187  friend std::ostream& operator << (std::ostream& os, const PFHSignature125& p);
1188  };
1189 
1190 
1191  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PFHRGBSignature250& p);
1192  /** \brief A point structure representing the Point Feature Histogram with colors (PFHRGB).
1193  * \ingroup common
1194  */
1196  {
1197  float histogram[250] = {0.f};
1198  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<PFHRGBSignature250>; }
1199 
1200  inline constexpr PFHRGBSignature250 () = default;
1201 
1202  friend std::ostream& operator << (std::ostream& os, const PFHRGBSignature250& p);
1203  };
1204 
1205  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PPFSignature& p);
1206  /** \brief A point structure for storing the Point Pair Feature (PPF) values
1207  * \ingroup common
1208  */
1210  {
1211  float f1 = 0.f, f2 = 0.f, f3 = 0.f, f4 = 0.f;
1212  float alpha_m = 0.f;
1213 
1214  inline constexpr PPFSignature (float _alpha = 0.f): PPFSignature (0.f, 0.f, 0.f, 0.f, _alpha) {}
1215 
1216  inline constexpr PPFSignature (float _f1, float _f2, float _f3, float _f4, float _alpha = 0.f):
1217  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), alpha_m (_alpha) {}
1218 
1219  friend std::ostream& operator << (std::ostream& os, const PPFSignature& p);
1220  };
1221 
1222  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const CPPFSignature& p);
1223  /** \brief A point structure for storing the Point Pair Feature (CPPF) values
1224  * \ingroup common
1225  */
1227  {
1228  float f1, f2, f3, f4, f5, f6, f7, f8, f9, f10;
1229  float alpha_m;
1230 
1231  inline constexpr CPPFSignature (float _alpha = 0.f):
1232  CPPFSignature (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _alpha) {}
1233 
1234  inline constexpr CPPFSignature (float _f1, float _f2, float _f3, float _f4, float _f5, float _f6,
1235  float _f7, float _f8, float _f9, float _f10, float _alpha = 0.f):
1236  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), f5 (_f5), f6 (_f6),
1237  f7 (_f7), f8 (_f8), f9 (_f9), f10 (_f10), alpha_m (_alpha) {}
1238 
1239  friend std::ostream& operator << (std::ostream& os, const CPPFSignature& p);
1240  };
1241 
1242  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PPFRGBSignature& p);
1243  /** \brief A point structure for storing the Point Pair Color Feature (PPFRGB) values
1244  * \ingroup common
1245  */
1247  {
1248  float f1 = 0.f, f2 = 0.f, f3 = 0.f, f4 = 0.f;
1249  float r_ratio = 0.f, g_ratio = 0.f, b_ratio = 0.f;
1250  float alpha_m = 0.f;
1251 
1252  inline constexpr PPFRGBSignature (float _alpha = 0.f): PPFRGBSignature (0.f, 0.f, 0.f, 0.f, _alpha) {}
1253 
1254  inline constexpr PPFRGBSignature (float _f1, float _f2, float _f3, float _f4, float _alpha = 0.f):
1255  PPFRGBSignature (_f1, _f2, _f3, _f4, _alpha, 0.f, 0.f, 0.f) {}
1256 
1257  inline constexpr PPFRGBSignature (float _f1, float _f2, float _f3, float _f4, float _alpha, float _r, float _g, float _b):
1258  f1 (_f1), f2 (_f2), f3 (_f3), f4 (_f4), r_ratio (_r), g_ratio (_g), b_ratio (_b), alpha_m (_alpha) {}
1259 
1260  friend std::ostream& operator << (std::ostream& os, const PPFRGBSignature& p);
1261  };
1262 
1263  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const NormalBasedSignature12& p);
1264  /** \brief A point structure representing the Normal Based Signature for
1265  * a feature matrix of 4-by-3
1266  * \ingroup common
1267  */
1269  {
1270  float values[12] = {0.f};
1271 
1272  inline constexpr NormalBasedSignature12 () = default;
1273 
1274  friend std::ostream& operator << (std::ostream& os, const NormalBasedSignature12& p);
1275  };
1276 
1277  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ShapeContext1980& p);
1278  /** \brief A point structure representing a Shape Context.
1279  * \ingroup common
1280  */
1282  {
1283  float descriptor[1980] = {0.f};
1284  float rf[9] = {0.f};
1285  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<ShapeContext1980>; }
1286 
1287  inline constexpr ShapeContext1980 () = default;
1288 
1289  friend std::ostream& operator << (std::ostream& os, const ShapeContext1980& p);
1290  };
1291 
1292  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const UniqueShapeContext1960& p);
1293  /** \brief A point structure representing a Unique Shape Context.
1294  * \ingroup common
1295  */
1297  {
1298  float descriptor[1960] = {0.f};
1299  float rf[9] = {0.f};
1300  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<UniqueShapeContext1960>; }
1301 
1302  inline constexpr UniqueShapeContext1960 () = default;
1303 
1304  friend std::ostream& operator << (std::ostream& os, const UniqueShapeContext1960& p);
1305  };
1306 
1307  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const SHOT352& p);
1308  /** \brief A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape only.
1309  * \ingroup common
1310  */
1311  struct SHOT352
1312  {
1313  float descriptor[352] = {0.f};
1314  float rf[9] = {0.f};
1315  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<SHOT352>; }
1316 
1317  inline constexpr SHOT352 () = default;
1318 
1319  friend std::ostream& operator << (std::ostream& os, const SHOT352& p);
1320  };
1321 
1322 
1323  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const SHOT1344& p);
1324  /** \brief A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+color.
1325  * \ingroup common
1326  */
1327  struct SHOT1344
1328  {
1329  float descriptor[1344] = {0.f};
1330  float rf[9] = {0.f};
1331  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<SHOT1344>; }
1332 
1333  inline constexpr SHOT1344 () = default;
1334 
1335  friend std::ostream& operator << (std::ostream& os, const SHOT1344& p);
1336  };
1337 
1338 
1339  /** \brief A structure representing the Local Reference Frame of a point.
1340  * \ingroup common
1341  */
1342  struct EIGEN_ALIGN16 _ReferenceFrame
1343  {
1344  union
1345  {
1346  float rf[9];
1347  struct
1348  {
1349  float x_axis[3];
1350  float y_axis[3];
1351  float z_axis[3];
1352  };
1353  };
1354 
1355  inline Eigen::Map<Eigen::Vector3f> getXAxisVector3fMap () { return (Eigen::Vector3f::Map (x_axis)); }
1356  inline const Eigen::Map<const Eigen::Vector3f> getXAxisVector3fMap () const { return (Eigen::Vector3f::Map (x_axis)); }
1357  inline Eigen::Map<Eigen::Vector3f> getYAxisVector3fMap () { return (Eigen::Vector3f::Map (y_axis)); }
1358  inline const Eigen::Map<const Eigen::Vector3f> getYAxisVector3fMap () const { return (Eigen::Vector3f::Map (y_axis)); }
1359  inline Eigen::Map<Eigen::Vector3f> getZAxisVector3fMap () { return (Eigen::Vector3f::Map (z_axis)); }
1360  inline const Eigen::Map<const Eigen::Vector3f> getZAxisVector3fMap () const { return (Eigen::Vector3f::Map (z_axis)); }
1361  inline Eigen::Map<Eigen::Matrix3f> getMatrix3fMap () { return (Eigen::Matrix3f::Map (rf)); }
1362  inline const Eigen::Map<const Eigen::Matrix3f> getMatrix3fMap () const { return (Eigen::Matrix3f::Map (rf)); }
1363 
1365  };
1366 
1367  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ReferenceFrame& p);
1368  struct EIGEN_ALIGN16 ReferenceFrame : public _ReferenceFrame
1369  {
1370  inline constexpr ReferenceFrame (const _ReferenceFrame &p) :
1371  ReferenceFrame{p.rf}
1372  {
1373  //std::copy_n(p.rf, 9, rf); // this algorithm is constexpr starting from C++20
1374  }
1375 
1376  inline constexpr ReferenceFrame () :
1377  _ReferenceFrame{ {{0.0f}} }
1378  {
1379  // this algorithm is constexpr starting from C++20
1380  /*std::fill_n(x_axis, 3, 0.f);
1381  std::fill_n(y_axis, 3, 0.f);
1382  std::fill_n(z_axis, 3, 0.f);*/
1383  }
1384 
1385  inline constexpr ReferenceFrame (const float (&_rf)[9]) :
1386  _ReferenceFrame{ {{_rf[0], _rf[1], _rf[2], _rf[3], _rf[4], _rf[5], _rf[6], _rf[7], _rf[8]}} } {}
1387 
1388  friend std::ostream& operator << (std::ostream& os, const ReferenceFrame& p);
1390  };
1391 
1392 
1393  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const FPFHSignature33& p);
1394  /** \brief A point structure representing the Fast Point Feature Histogram (FPFH).
1395  * \ingroup common
1396  */
1398  {
1399  float histogram[33] = {0.f};
1400  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<FPFHSignature33>; }
1401 
1402  inline constexpr FPFHSignature33 () = default;
1403 
1404  friend std::ostream& operator << (std::ostream& os, const FPFHSignature33& p);
1405  };
1406 
1407  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const VFHSignature308& p);
1408  /** \brief A point structure representing the Viewpoint Feature Histogram (VFH).
1409  * \ingroup common
1410  */
1412  {
1413  float histogram[308] = {0.f};
1414  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<VFHSignature308>; }
1415 
1416  inline constexpr VFHSignature308 () = default;
1417 
1418  friend std::ostream& operator << (std::ostream& os, const VFHSignature308& p);
1419  };
1420 
1421  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GRSDSignature21& p);
1422  /** \brief A point structure representing the Global Radius-based Surface Descriptor (GRSD).
1423  * \ingroup common
1424  */
1426  {
1427  float histogram[21] = {0.f};
1428  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<GRSDSignature21>; }
1429 
1430  inline constexpr GRSDSignature21 () = default;
1431 
1432  friend std::ostream& operator << (std::ostream& os, const GRSDSignature21& p);
1433  };
1434 
1435  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const BRISKSignature512& p);
1436  /** \brief A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
1437  * \ingroup common
1438  */
1440  {
1441  float scale = 0.f;
1442  float orientation = 0.f;
1443  unsigned char descriptor[64] = {0};
1444  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<BRISKSignature512>; }
1445 
1446  inline constexpr BRISKSignature512 () = default;
1447 
1448  inline constexpr BRISKSignature512 (float _scale, float _orientation): scale (_scale), orientation (_orientation) {}
1449 
1450  friend std::ostream& operator << (std::ostream& os, const BRISKSignature512& p);
1451  };
1452 
1453  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const ESFSignature640& p);
1454  /** \brief A point structure representing the Ensemble of Shape Functions (ESF).
1455  * \ingroup common
1456  */
1458  {
1459  float histogram[640] = {0.f};
1460  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<ESFSignature640>; }
1461 
1462  inline constexpr ESFSignature640 () = default;
1463 
1464  friend std::ostream& operator << (std::ostream& os, const ESFSignature640& p);
1465  };
1466 
1467  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature512& p);
1468  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
1469  * \ingroup common
1470  */
1472  {
1473  float histogram[512] = {0.f};
1474  static constexpr int descriptorSize() { return detail::traits::descriptorSize_v<GASDSignature512>; }
1475 
1476  inline constexpr GASDSignature512 () = default;
1477 
1478  friend std::ostream& operator << (std::ostream& os, const GASDSignature512& p);
1479  };
1480 
1481  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature984& p);
1482  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descriptor.
1483  * \ingroup common
1484  */
1486  {
1487  float histogram[984] = {0.f};
1488  static constexpr int descriptorSize() { return detail::traits::descriptorSize_v<GASDSignature984>; }
1489 
1490  inline constexpr GASDSignature984 () = default;
1491 
1492  friend std::ostream& operator << (std::ostream& os, const GASDSignature984& p);
1493  };
1494 
1495  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GASDSignature7992& p);
1496  /** \brief A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descriptor.
1497  * \ingroup common
1498  */
1500  {
1501  float histogram[7992] = {0.f};
1502  static constexpr int descriptorSize() { return detail::traits::descriptorSize_v<GASDSignature7992>; }
1503 
1504  inline constexpr GASDSignature7992 () = default;
1505 
1506  friend std::ostream& operator << (std::ostream& os, const GASDSignature7992& p);
1507  };
1508 
1509  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const GFPFHSignature16& p);
1510  /** \brief A point structure representing the GFPFH descriptor with 16 bins.
1511  * \ingroup common
1512  */
1514  {
1515  float histogram[16] = {0.f};
1516  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<GFPFHSignature16>; }
1517 
1518  inline constexpr GFPFHSignature16 () = default;
1519 
1520  friend std::ostream& operator << (std::ostream& os, const GFPFHSignature16& p);
1521  };
1522 
1523  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const Narf36& p);
1524  /** \brief A point structure representing the Narf descriptor.
1525  * \ingroup common
1526  */
1527  struct Narf36
1528  {
1529  float x = 0.f, y = 0.f, z = 0.f, roll = 0.f, pitch = 0.f, yaw = 0.f;
1530  float descriptor[36] = {0.f};
1531  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<Narf36>; }
1532 
1533  inline constexpr Narf36 () = default;
1534 
1535  inline constexpr Narf36 (float _x, float _y, float _z): Narf36 (_x, _y, _z, 0.f, 0.f, 0.f) {}
1536 
1537  inline constexpr Narf36 (float _x, float _y, float _z, float _roll, float _pitch, float _yaw):
1538  x (_x), y (_y), z (_z), roll (_roll), pitch (_pitch), yaw (_yaw) {}
1539 
1540  friend std::ostream& operator << (std::ostream& os, const Narf36& p);
1541  };
1542 
1543  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const BorderDescription& p);
1544  /** \brief A structure to store if a point in a range image lies on a border between an obstacle and the background.
1545  * \ingroup common
1546  */
1548  {
1549  int x = 0, y = 0;
1551  //std::vector<const BorderDescription*> neighbors;
1552 
1553  inline constexpr BorderDescription () = default;
1554 
1555  inline constexpr BorderDescription (int _x, int _y) : x(_x), y(_y) {}
1556 
1557  friend std::ostream& operator << (std::ostream& os, const BorderDescription& p);
1558  };
1559 
1560 
1561  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const IntensityGradient& p);
1562  /** \brief A point structure representing the intensity gradient of an XYZI point cloud.
1563  * \ingroup common
1564  */
1566  {
1567  union
1568  {
1569  float gradient[3];
1570  struct
1571  {
1572  float gradient_x;
1573  float gradient_y;
1574  float gradient_z;
1575  };
1576  };
1577 
1578  inline constexpr IntensityGradient (): IntensityGradient (0.f, 0.f, 0.f) {}
1579 
1580  inline constexpr IntensityGradient (float _x, float _y, float _z): gradient_x (_x), gradient_y (_y), gradient_z (_z) {}
1581  friend std::ostream& operator << (std::ostream& os, const IntensityGradient& p);
1582  };
1583 
1584  // TODO: Maybe make other histogram based structs an alias for this
1585  /** \brief A point structure representing an N-D histogram.
1586  * \ingroup common
1587  */
1588  template <int N>
1589  struct Histogram
1590  {
1591  float histogram[N];
1592  static constexpr int descriptorSize () { return detail::traits::descriptorSize_v<Histogram<N>>; }
1593  };
1594 
1595  struct EIGEN_ALIGN16 _PointWithScale
1596  {
1597  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1598 
1599  union
1600  {
1601  /** \brief Diameter of the meaningful keypoint neighborhood. */
1602  float scale;
1603  float size;
1604  };
1605 
1606  /** \brief Computed orientation of the keypoint (-1 if not applicable). */
1607  float angle;
1608  /** \brief The response by which the most strong keypoints have been selected. */
1609  float response;
1610  /** \brief octave (pyramid layer) from which the keypoint has been extracted. */
1611  int octave;
1612 
1614  };
1615 
1616  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointWithScale& p);
1617  /** \brief A point structure representing a 3-D position and scale.
1618  * \ingroup common
1619  */
1621  {
1622  inline constexpr PointWithScale (const _PointWithScale &p) :
1623  PointWithScale{p.x, p.y, p.z, p.scale, p.angle, p.response, p.octave} {}
1624 
1625  inline constexpr PointWithScale (): PointWithScale (0.f, 0.f, 0.f) {}
1626 
1627  inline constexpr PointWithScale (float _x, float _y, float _z, float _scale = 1.f,
1628  float _angle = -1.f, float _response = 0.f, int _octave = 0) :
1629  _PointWithScale{{{_x, _y, _z, 1.0f}}, {_scale}, _angle, _response, _octave } {}
1630 
1631  friend std::ostream& operator << (std::ostream& os, const PointWithScale& p);
1632  };
1633 
1634 
1635  struct EIGEN_ALIGN16 _PointSurfel
1636  {
1637  PCL_ADD_POINT4D // This adds the members x,y,z which can also be accessed using the point (which is float[4])
1638  PCL_ADD_NORMAL4D // This adds the member normal[3] which can also be accessed using the point (which is float[4])
1639  union
1640  {
1641  struct
1642  {
1643  PCL_ADD_UNION_RGB
1644  float radius;
1645  float confidence;
1646  float curvature;
1647  };
1648  float data_c[4];
1649  };
1650  PCL_ADD_EIGEN_MAPS_RGB
1652  };
1653 
1654  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointSurfel& p);
1655  /** \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.
1656  * \ingroup common
1657  */
1658  struct PointSurfel : public _PointSurfel
1659  {
1660  inline constexpr PointSurfel (const _PointSurfel &p) :
1661  PointSurfel{p.x, p.y, p.z, p.normal_x, p.normal_y, p.normal_z, p.r, p.g, p.b, p.a, p.radius, p.confidence, p.curvature} {}
1662 
1663  inline constexpr PointSurfel () :
1664  PointSurfel{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0u, 0u, 0u, 0u, 0.0f, 0.0f, 0.0f} {}
1665 
1666  inline constexpr PointSurfel (float _x, float _y, float _z, float _nx,
1667  float _ny, float _nz, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a,
1668  float _radius, float _confidence, float _curvature) :
1669  _PointSurfel{
1670  {{_x, _y, _z, 1.0f}},
1671  {{_nx, _ny, _nz, 0.0f}},
1672  {{{{{_b, _g, _r, _a}}}, _radius, _confidence, _curvature}}
1673  } {}
1674 
1675 
1676  friend std::ostream& operator << (std::ostream& os, const PointSurfel& p);
1677  };
1678 
1679  struct EIGEN_ALIGN16 _PointDEM
1680  {
1681  PCL_ADD_POINT4D
1682  float intensity;
1686  };
1687 
1688  PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointDEM& p);
1689  /** \brief A point structure representing Digital Elevation Map.
1690  * \ingroup common
1691  */
1692  struct PointDEM : public _PointDEM
1693  {
1694  inline constexpr PointDEM (const _PointDEM &p) :
1695  PointDEM{p.x, p.y, p.z, p.intensity, p.intensity_variance, p.height_variance} {}
1696 
1697  inline constexpr PointDEM (): PointDEM (0.f, 0.f, 0.f) {}
1698 
1699  inline constexpr PointDEM (float _x, float _y, float _z): PointDEM (_x, _y, _z, 0.f, 0.f, 0.f) {}
1700 
1701  inline constexpr PointDEM (float _x, float _y, float _z, float _intensity,
1702  float _intensity_variance, float _height_variance) :
1703  _PointDEM{{{_x, _y, _z, 1.0f}}, _intensity, _intensity_variance, _height_variance} {}
1704 
1705  friend std::ostream& operator << (std::ostream& os, const PointDEM& p);
1706  };
1707 
1708  template <int N> std::ostream&
1709  operator << (std::ostream& os, const Histogram<N>& p)
1710  {
1711  // make constexpr
1712  PCL_IF_CONSTEXPR(N > 0)
1713  {
1714  os << "(" << p.histogram[0];
1715  std::for_each(p.histogram + 1, std::end(p.histogram),
1716  [&os](const auto& hist) { os << ", " << hist; });
1717  os << ")";
1718  }
1719  return (os);
1720  }
1721 } // namespace pcl
1722 
1723 // Register point structs and wrappers
1724 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_RGB,
1725  (std::uint32_t, rgba, rgba)
1726 )
1727 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::RGB, pcl::_RGB)
1728 
1729 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Intensity,
1730  (float, intensity, intensity)
1731 )
1732 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity, pcl::_Intensity)
1733 
1734 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Intensity8u,
1735  (std::uint8_t, intensity, intensity)
1736 )
1737 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity8u, pcl::_Intensity8u)
1738 
1739 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Intensity32u,
1740  (std::uint32_t, intensity, intensity)
1741 )
1742 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity32u, pcl::_Intensity32u)
1743 
1744 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZ,
1745  (float, x, x)
1746  (float, y, y)
1747  (float, z, z)
1748 )
1749 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZ, pcl::_PointXYZ)
1750 
1751 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBA,
1752  (float, x, x)
1753  (float, y, y)
1754  (float, z, z)
1755  (std::uint32_t, rgba, rgba)
1756 )
1757 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBA, pcl::_PointXYZRGBA)
1758 
1759 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGB,
1760  (float, x, x)
1761  (float, y, y)
1762  (float, z, z)
1763  (float, rgb, rgb)
1764 )
1765 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGB, pcl::_PointXYZRGB)
1766 
1767 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBL,
1768  (float, x, x)
1769  (float, y, y)
1770  (float, z, z)
1771  (std::uint32_t, rgba, rgba)
1772  (std::uint32_t, label, label)
1773 )
1774 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBL, pcl::_PointXYZRGBL)
1775 
1776 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZLAB,
1777  (float, x, x)
1778  (float, y, y)
1779  (float, z, z)
1780  (float, L, L)
1781  (float, a, a)
1782  (float, b, b)
1783 )
1784 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZLAB, pcl::_PointXYZLAB)
1785 
1786 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZHSV,
1787  (float, x, x)
1788  (float, y, y)
1789  (float, z, z)
1790  (float, h, h)
1791  (float, s, s)
1792  (float, v, v)
1793 )
1794 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZHSV, pcl::_PointXYZHSV)
1795 
1796 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXY,
1797  (float, x, x)
1798  (float, y, y)
1799 )
1800 
1801 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointUV,
1802  (float, u, u)
1803  (float, v, v)
1804 )
1805 
1806 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::InterestPoint,
1807  (float, x, x)
1808  (float, y, y)
1809  (float, z, z)
1810  (float, strength, strength)
1811 )
1812 
1813 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZI,
1814  (float, x, x)
1815  (float, y, y)
1816  (float, z, z)
1817  (float, intensity, intensity)
1818 )
1819 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZI, pcl::_PointXYZI)
1820 
1821 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZL,
1822  (float, x, x)
1823  (float, y, y)
1824  (float, z, z)
1825  (std::uint32_t, label, label)
1826 )
1827 
1828 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Label,
1829  (std::uint32_t, label, label)
1830 )
1831 
1832 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Normal,
1833  (float, normal_x, normal_x)
1834  (float, normal_y, normal_y)
1835  (float, normal_z, normal_z)
1836  (float, curvature, curvature)
1837 )
1838 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Normal, pcl::_Normal)
1839 
1840 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Axis,
1841  (float, normal_x, normal_x)
1842  (float, normal_y, normal_y)
1843  (float, normal_z, normal_z)
1844 )
1845 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Axis, pcl::_Axis)
1846 
1847 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointNormal,
1848  (float, x, x)
1849  (float, y, y)
1850  (float, z, z)
1851  (float, normal_x, normal_x)
1852  (float, normal_y, normal_y)
1853  (float, normal_z, normal_z)
1854  (float, curvature, curvature)
1855 )
1856 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBNormal,
1857  (float, x, x)
1858  (float, y, y)
1859  (float, z, z)
1860  (float, normal_x, normal_x)
1861  (float, normal_y, normal_y)
1862  (float, normal_z, normal_z)
1863  (float, rgb, rgb)
1864  (float, curvature, curvature)
1865 )
1866 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBNormal, pcl::_PointXYZRGBNormal)
1867 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZINormal,
1868  (float, x, x)
1869  (float, y, y)
1870  (float, z, z)
1871  (float, normal_x, normal_x)
1872  (float, normal_y, normal_y)
1873  (float, normal_z, normal_z)
1874  (float, intensity, intensity)
1875  (float, curvature, curvature)
1876 )
1877 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZLNormal,
1878  (float, x, x)
1879  (float, y, y)
1880  (float, z, z)
1881  (float, normal_x, normal_x)
1882  (float, normal_y, normal_y)
1883  (float, normal_z, normal_z)
1884  (std::uint32_t, label, label)
1885  (float, curvature, curvature)
1886 )
1887 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange,
1888  (float, x, x)
1889  (float, y, y)
1890  (float, z, z)
1891  (float, range, range)
1892 )
1893 
1894 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointWithViewpoint,
1895  (float, x, x)
1896  (float, y, y)
1897  (float, z, z)
1898  (float, vp_x, vp_x)
1899  (float, vp_y, vp_y)
1900  (float, vp_z, vp_z)
1901 )
1902 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointWithViewpoint, pcl::_PointWithViewpoint)
1903 
1904 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::MomentInvariants,
1905  (float, j1, j1)
1906  (float, j2, j2)
1907  (float, j3, j3)
1908 )
1909 
1910 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalRadiiRSD,
1911  (float, r_min, r_min)
1912  (float, r_max, r_max)
1913 )
1914 
1915 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Boundary,
1916  (std::uint8_t, boundary_point, boundary_point)
1917 )
1918 
1919 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalCurvatures,
1920  (float, principal_curvature_x, principal_curvature_x)
1921  (float, principal_curvature_y, principal_curvature_y)
1922  (float, principal_curvature_z, principal_curvature_z)
1923  (float, pc1, pc1)
1924  (float, pc2, pc2)
1925 )
1926 
1927 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHSignature125,
1928  (float[125], histogram, pfh)
1929 )
1930 
1931 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHRGBSignature250,
1932  (float[250], histogram, pfhrgb)
1933 )
1934 
1935 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFSignature,
1936  (float, f1, f1)
1937  (float, f2, f2)
1938  (float, f3, f3)
1939  (float, f4, f4)
1940  (float, alpha_m, alpha_m)
1941 )
1942 
1943 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::CPPFSignature,
1944  (float, f1, f1)
1945  (float, f2, f2)
1946  (float, f3, f3)
1947  (float, f4, f4)
1948  (float, f5, f5)
1949  (float, f6, f6)
1950  (float, f7, f7)
1951  (float, f8, f8)
1952  (float, f9, f9)
1953  (float, f10, f10)
1954  (float, alpha_m, alpha_m)
1955 )
1956 
1957 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
1958  (float, f1, f1)
1959  (float, f2, f2)
1960  (float, f3, f3)
1961  (float, f4, f4)
1962  (float, r_ratio, r_ratio)
1963  (float, g_ratio, g_ratio)
1964  (float, b_ratio, b_ratio)
1965  (float, alpha_m, alpha_m)
1966 )
1967 
1968 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::NormalBasedSignature12,
1969  (float[12], values, values)
1970 )
1971 
1972 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ShapeContext1980,
1973  (float[1980], descriptor, shape_context)
1974  (float[9], rf, rf)
1975 )
1976 
1977 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::UniqueShapeContext1960,
1978  (float[1960], descriptor, shape_context)
1979  (float[9], rf, rf)
1980 )
1981 
1982 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::SHOT352,
1983  (float[352], descriptor, shot)
1984  (float[9], rf, rf)
1985 )
1986 
1987 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::SHOT1344,
1988  (float[1344], descriptor, shot)
1989  (float[9], rf, rf)
1990 )
1991 
1992 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::FPFHSignature33,
1993  (float[33], histogram, fpfh)
1994 )
1995 
1996 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::BRISKSignature512,
1997  (float, scale, brisk_scale)
1998  (float, orientation, brisk_orientation)
1999  (unsigned char[64], descriptor, brisk_descriptor512)
2000 )
2001 
2002 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::VFHSignature308,
2003  (float[308], histogram, vfh)
2004 )
2005 
2006 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GRSDSignature21,
2007  (float[21], histogram, grsd)
2008 )
2009 
2010 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ESFSignature640,
2011  (float[640], histogram, esf)
2012 )
2013 
2014 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::GASDSignature512,
2015  (float[512], histogram, gasd)
2016 )
2017 
2018 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::GASDSignature984,
2019  (float[984], histogram, gasd)
2020 )
2021 
2022 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::GASDSignature7992,
2023  (float[7992], histogram, gasd)
2024 )
2025 
2026 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Narf36,
2027  (float[36], descriptor, descriptor)
2028 )
2029 
2030 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GFPFHSignature16,
2031  (float[16], histogram, gfpfh)
2032 )
2033 
2034 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::IntensityGradient,
2035  (float, gradient_x, gradient_x)
2036  (float, gradient_y, gradient_y)
2037  (float, gradient_z, gradient_z)
2038 )
2039 
2040 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithScale,
2041  (float, x, x)
2042  (float, y, y)
2043  (float, z, z)
2044  (float, scale, scale)
2045 )
2046 
2047 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::PointSurfel,
2048  (float, x, x)
2049  (float, y, y)
2050  (float, z, z)
2051  (float, normal_x, normal_x)
2052  (float, normal_y, normal_y)
2053  (float, normal_z, normal_z)
2054  (std::uint32_t, rgba, rgba)
2055  (float, radius, radius)
2056  (float, confidence, confidence)
2057  (float, curvature, curvature)
2058 )
2059 
2060 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_ReferenceFrame,
2061  (float[3], x_axis, x_axis)
2062  (float[3], y_axis, y_axis)
2063  (float[3], z_axis, z_axis)
2064 )
2065 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ReferenceFrame, pcl::_ReferenceFrame)
2066 
2067 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointDEM,
2068  (float, x, x)
2069  (float, y, y)
2070  (float, z, z)
2071  (float, intensity, intensity)
2072  (float, intensity_variance, intensity_variance)
2073  (float, height_variance, height_variance)
2074 )
2075 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointDEM, pcl::_PointDEM)
2076 
2077 namespace pcl
2078 {
2079 
2080 // Allow float 'rgb' data to match to the newer uint32 'rgba' tag. This is so
2081 // you can load old 'rgb' PCD files into e.g. a PointCloud<PointXYZRGBA>.
2082 template<typename PointT>
2083 struct FieldMatches<PointT, ::pcl::fields::rgba>
2084 {
2085  bool operator() (const pcl::PCLPointField& field)
2086  {
2087  if (field.name == "rgb")
2088  {
2089  // For fixing the alpha value bug #1141, the rgb field can also match
2090  // uint32.
2091  return ((field.datatype == pcl::PCLPointField::FLOAT32 ||
2093  field.count == 1);
2094  }
2095  else
2096  {
2097  return (field.name == traits::name<PointT, fields::rgba>::value &&
2098  field.datatype == traits::datatype<PointT, fields::rgba>::value &&
2099  field.count == traits::datatype<PointT, fields::rgba>::size);
2100  }
2101  }
2102 };
2103 template<typename PointT>
2104 struct FieldMatches<PointT, fields::rgb>
2105 {
2106  bool operator() (const pcl::PCLPointField& field)
2107  {
2108  if (field.name == "rgba")
2109  {
2110  return (field.datatype == pcl::PCLPointField::UINT32 &&
2111  field.count == 1);
2112  }
2113  else
2114  {
2115  // For fixing the alpha value bug #1141, rgb can also match uint32
2116  return (field.name == traits::name<PointT, fields::rgb>::value &&
2117  (field.datatype == traits::datatype<PointT, fields::rgb>::value ||
2119  field.count == traits::datatype<PointT, fields::rgb>::size);
2120  }
2121  }
2122 };
2123 
2124 } // namespace pcl
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition: memory.h:86
std::bitset< 32 > BorderTraits
Data type to store extended information about a transition from foreground to backgroundSpecification...
Definition: point_types.h:313
Defines functions, macros and traits for allocating and using memory.
static constexpr int descriptorSize_v
std::ostream & operator<<(std::ostream &ostream, int8 value)
Definition: io_operators.h:86
Eigen::Map< Eigen::Vector2f > Vector2fMap
Eigen::Map< Eigen::Vector4f, Eigen::Aligned > Vector4fMap
const Eigen::Map< const Vector4c, Eigen::Aligned > Vector4cMapConst
const Eigen::Map< const Eigen::Vector2f > Vector2fMapConst
Eigen::Map< Vector4c, Eigen::Aligned > Vector4cMap
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
const Eigen::Map< const Eigen::Vector3f > Vector3fMapConst
const Eigen::Map< const Vector3c > Vector3cMapConst
Eigen::Map< Eigen::Vector3f > Vector3fMap
Eigen::Matrix< std::uint8_t, 4, 1 > Vector4c
const Eigen::Map< const Eigen::Vector4f, Eigen::Aligned > Vector4fMapConst
const Eigen::Map< const Eigen::Array4f, Eigen::Aligned > Array4fMapConst
Eigen::Matrix< std::uint8_t, 3, 1 > Vector3c
Eigen::Map< Eigen::Array4f, Eigen::Aligned > Array4fMap
const Eigen::Map< const Eigen::Array3f > Array3fMapConst
Eigen::Map< Vector3c > Vector3cMap
Eigen::Map< Eigen::Array3f > Array3fMap
Defines all the PCL and non-PCL macros used.
#define PCL_EXPORTS
Definition: pcl_macros.h:322
#define PCL_IF_CONSTEXPR(x)
Definition: pcl_macros.h:452
float intensity_variance
PCL_ADD_POINT4D float intensity
PCL_ADD_UNION_RGB float radius
float angle
Computed orientation of the keypoint (-1 if not applicable).
float response
The response by which the most strong keypoints have been selected.
int octave
octave (pyramid layer) from which the keypoint has been extracted.
float scale
Diameter of the meaningful keypoint neighborhood.
A point structure representing Euclidean xyz coordinates, and the intensity value.
PCL_ADD_POINT4D std::uint32_t label
PCL_ADD_POINT4D PCL_ADD_RGB std::uint32_t label
PCL_ADD_UNION_RGB float curvature
A structure representing the Local Reference Frame of a point.
const Eigen::Map< const Eigen::Matrix3f > getMatrix3fMap() const
const Eigen::Map< const Eigen::Vector3f > getYAxisVector3fMap() const
Eigen::Map< Eigen::Vector3f > getXAxisVector3fMap()
Eigen::Map< Eigen::Vector3f > getYAxisVector3fMap()
const Eigen::Map< const Eigen::Vector3f > getZAxisVector3fMap() const
Eigen::Map< Eigen::Vector3f > getZAxisVector3fMap()
const Eigen::Map< const Eigen::Vector3f > getXAxisVector3fMap() const
Eigen::Map< Eigen::Matrix3f > getMatrix3fMap()
A point structure representing an Axis using its normal coordinates.
constexpr Axis(float n_x, float n_y, float n_z)
constexpr Axis()
constexpr Axis(const _Axis &p)
A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
constexpr BRISKSignature512()=default
static constexpr int descriptorSize()
constexpr BRISKSignature512(float _scale, float _orientation)
A structure to store if a point in a range image lies on a border between an obstacle and the backgro...
constexpr BorderDescription(int _x, int _y)
constexpr BorderDescription()=default
A point structure representing a description of whether a point is lying on a surface boundary or not...
constexpr Boundary(std::uint8_t _boundary=0)
A point structure for storing the Point Pair Feature (CPPF) values.
constexpr CPPFSignature(float _alpha=0.f)
constexpr 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 Ensemble of Shape Functions (ESF).
static constexpr int descriptorSize()
constexpr ESFSignature640()=default
A point structure representing the Fast Point Feature Histogram (FPFH).
static constexpr int descriptorSize()
constexpr FPFHSignature33()=default
bool operator()(const PCLPointField &field)
Definition: PCLPointField.h:71
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
static constexpr int descriptorSize()
constexpr GASDSignature512()=default
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
static constexpr int descriptorSize()
constexpr GASDSignature7992()=default
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
constexpr GASDSignature984()=default
static constexpr int descriptorSize()
A point structure representing the GFPFH descriptor with 16 bins.
constexpr GFPFHSignature16()=default
static constexpr int descriptorSize()
A point structure representing the Global Radius-based Surface Descriptor (GRSD).
static constexpr int descriptorSize()
constexpr GRSDSignature21()=default
A point structure representing an N-D histogram.
float histogram[N]
static constexpr int descriptorSize()
A point structure representing the grayscale intensity in single-channel images.
constexpr Intensity32u(const _Intensity32u &p)
constexpr Intensity32u(std::uint32_t _intensity=0)
A point structure representing the grayscale intensity in single-channel images.
constexpr Intensity8u(std::uint8_t _intensity=0)
constexpr Intensity8u(const _Intensity8u &p)
A point structure representing the intensity gradient of an XYZI point cloud.
constexpr IntensityGradient(float _x, float _y, float _z)
constexpr IntensityGradient()
A point structure representing the grayscale intensity in single-channel images.
constexpr Intensity(const _Intensity &p)
constexpr Intensity(float _intensity=0.f)
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
constexpr Label(std::uint32_t _label=0)
A point structure representing the three moment invariants.
constexpr MomentInvariants()=default
constexpr MomentInvariants(float _j1, float _j2, float _j3)
A point structure representing the Narf descriptor.
constexpr Narf36(float _x, float _y, float _z, float _roll, float _pitch, float _yaw)
static constexpr int descriptorSize()
constexpr Narf36(float _x, float _y, float _z)
constexpr Narf36()=default
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3.
constexpr NormalBasedSignature12()=default
A point structure representing normal coordinates and the surface curvature estimate.
constexpr Normal(const _Normal &p)
constexpr Normal(float _curvature=0.f)
constexpr Normal(float n_x, float n_y, float n_z, float _curvature=0.f)
std::string name
Definition: PCLPointField.h:14
std::uint8_t datatype
Definition: PCLPointField.h:17
A point structure representing the Point Feature Histogram with colors (PFHRGB).
constexpr PFHRGBSignature250()=default
static constexpr int descriptorSize()
A point structure representing the Point Feature Histogram (PFH).
constexpr PFHSignature125()=default
static constexpr int descriptorSize()
A point structure for storing the Point Pair Color Feature (PPFRGB) values.
constexpr PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha, float _r, float _g, float _b)
constexpr PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
constexpr PPFRGBSignature(float _alpha=0.f)
A point structure for storing the Point Pair Feature (PPF) values.
constexpr PPFSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
constexpr PPFSignature(float _alpha=0.f)
A point structure representing Digital Elevation Map.
constexpr PointDEM(const _PointDEM &p)
constexpr PointDEM(float _x, float _y, float _z, float _intensity, float _intensity_variance, float _height_variance)
constexpr PointDEM(float _x, float _y, float _z)
constexpr PointDEM()
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
constexpr PointNormal(float _curvature=0.f)
constexpr PointNormal(float _x, float _y, float _z)
constexpr PointNormal(const _PointNormal &p)
constexpr PointNormal(float _x, float _y, float _z, float n_x, float n_y, float n_z, float _curvature=0.f)
A surfel, that is, a point structure representing Euclidean xyz coordinates, together with normal coo...
constexpr PointSurfel(const _PointSurfel &p)
constexpr PointSurfel()
constexpr PointSurfel(float _x, float _y, float _z, float _nx, float _ny, float _nz, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a, float _radius, float _confidence, float _curvature)
A 2D point structure representing pixel image coordinates.
constexpr PointUV(float _u, float _v)
constexpr PointUV()=default
A point structure representing Euclidean xyz coordinates, padded with an extra range float.
constexpr PointWithRange(float _range=0.f)
constexpr PointWithRange(float _x, float _y, float _z, float _range=0.f)
constexpr PointWithRange(const _PointWithRange &p)
A point structure representing a 3-D position and scale.
constexpr PointWithScale()
constexpr PointWithScale(const _PointWithScale &p)
constexpr PointWithScale(float _x, float _y, float _z, float _scale=1.f, float _angle=-1.f, float _response=0.f, int _octave=0)
A point structure representing Euclidean xyz coordinates together with the viewpoint from which it wa...
constexpr PointWithViewpoint(float _x, float _y, float _z)
constexpr PointWithViewpoint(float _x, float _y, float _z, float _vp_x, float _vp_y, float _vp_z)
constexpr PointWithViewpoint(const _PointWithViewpoint &p)
constexpr PointWithViewpoint()
A 2D point structure representing Euclidean xy coordinates.
constexpr PointXY()
pcl::Vector2fMap getVector2fMap()
constexpr PointXY(float _x, float _y)
pcl::Vector2fMapConst getVector2fMap() const
constexpr PointXYZHSV()
constexpr PointXYZHSV(const _PointXYZHSV &p)
constexpr PointXYZHSV(float _h, float _s, float _v)
constexpr PointXYZHSV(float _x, float _y, float _z, float _h, float _s, float _v)
A point structure representing Euclidean xyz coordinates.
constexpr PointXYZ(float _x, float _y, float _z)
constexpr PointXYZ(const _PointXYZ &p)
constexpr PointXYZ()
constexpr PointXYZI(float _x, float _y, float _z, float _intensity=0.f)
constexpr PointXYZI(float _intensity=0.f)
constexpr PointXYZI(const _PointXYZI &p)
A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates...
constexpr PointXYZINormal(float _intensity=0.f)
constexpr PointXYZINormal(const _PointXYZINormal &p)
constexpr PointXYZINormal(float _x, float _y, float _z, float _intensity, float n_x, float n_y, float n_z, float _curvature=0.f)
constexpr PointXYZINormal(float _x, float _y, float _z, float _intensity=0.f)
A point structure representing Euclidean xyz coordinates, and the CIELAB color.
constexpr PointXYZLAB()
constexpr PointXYZLAB(float _x, float _y, float _z, float _l, float _a, float _b)
constexpr PointXYZLAB(const _PointXYZLAB &p)
constexpr PointXYZL(std::uint32_t _label=0)
constexpr PointXYZL(const _PointXYZL &p)
constexpr PointXYZL(float _x, float _y, float _z, std::uint32_t _label=0)
A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates a...
constexpr PointXYZLNormal(const _PointXYZLNormal &p)
constexpr PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label=0u)
constexpr PointXYZLNormal(std::uint32_t _label=0u)
constexpr PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label, float n_x, float n_y, float n_z, float _curvature=0.f)
A point structure representing Euclidean xyz coordinates, and the RGBA color.
constexpr PointXYZRGBA(const _PointXYZRGBA &p)
constexpr PointXYZRGBA()
constexpr PointXYZRGBA(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
constexpr PointXYZRGBA(float _x, float _y, float _z)
constexpr PointXYZRGBA(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
A point structure representing Euclidean xyz coordinates, and the RGB color.
constexpr PointXYZRGB(float _x, float _y, float _z)
constexpr PointXYZRGB()
constexpr PointXYZRGB(const _PointXYZRGB &p)
constexpr PointXYZRGB(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
constexpr PointXYZRGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
constexpr PointXYZRGBL(std::uint32_t _label=0)
constexpr PointXYZRGBL(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint32_t _label=0, std::uint8_t _a=255)
constexpr PointXYZRGBL(float _x, float _y, float _z)
constexpr PointXYZRGBL(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
constexpr PointXYZRGBL(const _PointXYZRGBL &p)
A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coo...
constexpr 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)
constexpr PointXYZRGBNormal(float _x, float _y, float _z)
constexpr PointXYZRGBNormal(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
constexpr PointXYZRGBNormal(float _curvature=0.f)
constexpr PointXYZRGBNormal(const _PointXYZRGBNormal &p)
constexpr PointXYZRGBNormal(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a, float n_x, float n_y, float n_z, float _curvature=0.f)
constexpr PointXYZRGBNormal(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
A point structure representing the principal curvatures and their magnitudes.
constexpr PrincipalCurvatures(float _pc1, float _pc2)
constexpr PrincipalCurvatures(float _x, float _y, float _z)
constexpr PrincipalCurvatures(float _x, float _y, float _z, float _pc1, float _pc2)
A point structure representing the minimum and maximum surface radii (in meters) computed using RSD.
constexpr PrincipalRadiiRSD(float _r_min, float _r_max)
constexpr PrincipalRadiiRSD()=default
A structure representing RGB color information.
constexpr RGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a=255)
constexpr RGB()
constexpr RGB(const _RGB &p)
constexpr ReferenceFrame()
constexpr ReferenceFrame(const float(&_rf)[9])
constexpr ReferenceFrame(const _ReferenceFrame &p)
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
static constexpr int descriptorSize()
constexpr SHOT1344()=default
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
constexpr SHOT352()=default
static constexpr int descriptorSize()
A point structure representing a Shape Context.
static constexpr int descriptorSize()
constexpr ShapeContext1980()=default
A point structure representing a Unique Shape Context.
static constexpr int descriptorSize()
constexpr UniqueShapeContext1960()=default
A point structure representing the Viewpoint Feature Histogram (VFH).
static constexpr int descriptorSize()
constexpr VFHSignature308()=default