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