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