43 #include <pcl/PCLPointField.h>
45 #include <pcl/register_point_struct.h>
47 #include <boost/mpl/and.hpp>
48 #include <boost/mpl/bool.hpp>
49 #include <boost/mpl/contains.hpp>
50 #include <boost/mpl/fold.hpp>
51 #include <boost/mpl/or.hpp>
52 #include <boost/mpl/placeholders.hpp>
53 #include <boost/mpl/vector.hpp>
60 #include <type_traits>
63 #define PCL_POINT_TYPES \
74 (pcl::InterestPoint) \
78 (pcl::PointXYZRGBNormal) \
79 (pcl::PointXYZINormal) \
80 (pcl::PointXYZLNormal) \
81 (pcl::PointWithRange) \
82 (pcl::PointWithViewpoint) \
83 (pcl::MomentInvariants) \
84 (pcl::PrincipalRadiiRSD) \
86 (pcl::PrincipalCurvatures) \
87 (pcl::PFHSignature125) \
88 (pcl::PFHRGBSignature250) \
90 (pcl::CPPFSignature) \
91 (pcl::PPFRGBSignature) \
92 (pcl::NormalBasedSignature12) \
93 (pcl::FPFHSignature33) \
94 (pcl::VFHSignature308) \
95 (pcl::GASDSignature512) \
96 (pcl::GASDSignature984) \
97 (pcl::GASDSignature7992) \
98 (pcl::GRSDSignature21) \
99 (pcl::ESFSignature640) \
100 (pcl::BRISKSignature512) \
102 (pcl::IntensityGradient) \
103 (pcl::PointWithScale) \
105 (pcl::ShapeContext1980) \
106 (pcl::UniqueShapeContext1960) \
110 (pcl::ReferenceFrame) \
114 #define PCL_RGB_POINT_TYPES \
115 (pcl::PointXYZRGBA) \
117 (pcl::PointXYZRGBL) \
118 (pcl::PointXYZRGBNormal) \
122 #define PCL_XYZ_POINT_TYPES \
126 (pcl::PointXYZRGBA) \
128 (pcl::PointXYZRGBL) \
131 (pcl::InterestPoint) \
133 (pcl::PointXYZRGBNormal) \
134 (pcl::PointXYZINormal) \
135 (pcl::PointXYZLNormal) \
136 (pcl::PointWithRange) \
137 (pcl::PointWithViewpoint) \
138 (pcl::PointWithScale) \
143 #define PCL_XYZL_POINT_TYPES \
145 (pcl::PointXYZRGBL) \
146 (pcl::PointXYZLNormal)
149 #define PCL_NORMAL_POINT_TYPES \
152 (pcl::PointXYZRGBNormal) \
153 (pcl::PointXYZINormal) \
154 (pcl::PointXYZLNormal) \
158 #define PCL_FEATURE_POINT_TYPES \
159 (pcl::PFHSignature125) \
160 (pcl::PFHRGBSignature250) \
161 (pcl::PPFSignature) \
162 (pcl::CPPFSignature) \
163 (pcl::PPFRGBSignature) \
164 (pcl::NormalBasedSignature12) \
165 (pcl::FPFHSignature33) \
166 (pcl::VFHSignature308) \
167 (pcl::GASDSignature512) \
168 (pcl::GASDSignature984) \
169 (pcl::GASDSignature7992) \
170 (pcl::GRSDSignature21) \
171 (pcl::ESFSignature640) \
172 (pcl::BRISKSignature512) \
176 #define PCL_DESCRIPTOR_FEATURE_POINT_TYPES \
177 (pcl::PFHSignature125) \
178 (pcl::PFHRGBSignature250) \
179 (pcl::FPFHSignature33) \
180 (pcl::VFHSignature308) \
181 (pcl::GASDSignature512) \
182 (pcl::GASDSignature984) \
183 (pcl::GASDSignature7992) \
184 (pcl::GRSDSignature21) \
185 (pcl::ESFSignature640) \
186 (pcl::BRISKSignature512) \
217 template<
typename FeaturePo
intT>
224 using Array4fMap = Eigen::Map<Eigen::Array4f, Eigen::Aligned>;
231 using Vector3c = Eigen::Matrix<std::uint8_t, 3, 1>;
234 using Vector4c = Eigen::Matrix<std::uint8_t, 4, 1>;
238 #define PCL_ADD_UNION_POINT4D \
239 union EIGEN_ALIGN16 { \
248 #define PCL_ADD_EIGEN_MAPS_POINT4D \
249 inline pcl::Vector3fMap getVector3fMap () { return (pcl::Vector3fMap (data)); } \
250 inline pcl::Vector3fMapConst getVector3fMap () const { return (pcl::Vector3fMapConst (data)); } \
251 inline pcl::Vector4fMap getVector4fMap () { return (pcl::Vector4fMap (data)); } \
252 inline pcl::Vector4fMapConst getVector4fMap () const { return (pcl::Vector4fMapConst (data)); } \
253 inline pcl::Array3fMap getArray3fMap () { return (pcl::Array3fMap (data)); } \
254 inline pcl::Array3fMapConst getArray3fMap () const { return (pcl::Array3fMapConst (data)); } \
255 inline pcl::Array4fMap getArray4fMap () { return (pcl::Array4fMap (data)); } \
256 inline pcl::Array4fMapConst getArray4fMap () const { return (pcl::Array4fMapConst (data)); }
258 #define PCL_ADD_POINT4D \
259 PCL_ADD_UNION_POINT4D \
260 PCL_ADD_EIGEN_MAPS_POINT4D
262 #define PCL_ADD_UNION_NORMAL4D \
263 union EIGEN_ALIGN16 { \
273 #define PCL_ADD_EIGEN_MAPS_NORMAL4D \
274 inline pcl::Vector3fMap getNormalVector3fMap () { return (pcl::Vector3fMap (data_n)); } \
275 inline pcl::Vector3fMapConst getNormalVector3fMap () const { return (pcl::Vector3fMapConst (data_n)); } \
276 inline pcl::Vector4fMap getNormalVector4fMap () { return (pcl::Vector4fMap (data_n)); } \
277 inline pcl::Vector4fMapConst getNormalVector4fMap () const { return (pcl::Vector4fMapConst (data_n)); }
279 #define PCL_ADD_NORMAL4D \
280 PCL_ADD_UNION_NORMAL4D \
281 PCL_ADD_EIGEN_MAPS_NORMAL4D
283 #define PCL_ADD_UNION_RGB \
297 std::uint32_t rgba; \
300 #define PCL_ADD_EIGEN_MAPS_RGB \
301 inline Eigen::Vector3i getRGBVector3i () { return (Eigen::Vector3i (r, g, b)); } \
302 inline const Eigen::Vector3i getRGBVector3i () const { return (Eigen::Vector3i (r, g, b)); } \
303 inline Eigen::Vector4i getRGBVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
304 inline const Eigen::Vector4i getRGBVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
305 inline Eigen::Vector4i getRGBAVector4i () { return (Eigen::Vector4i (r, g, b, a)); } \
306 inline const Eigen::Vector4i getRGBAVector4i () const { return (Eigen::Vector4i (r, g, b, a)); } \
307 inline pcl::Vector3cMap getBGRVector3cMap () { return (pcl::Vector3cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
308 inline pcl::Vector3cMapConst getBGRVector3cMap () const { return (pcl::Vector3cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); } \
309 inline pcl::Vector4cMap getBGRAVector4cMap () { return (pcl::Vector4cMap (reinterpret_cast<std::uint8_t*> (&rgba))); } \
310 inline pcl::Vector4cMapConst getBGRAVector4cMap () const { return (pcl::Vector4cMapConst (reinterpret_cast<const std::uint8_t*> (&rgba))); }
312 #define PCL_ADD_RGB \
314 PCL_ADD_EIGEN_MAPS_RGB
316 #define PCL_ADD_INTENSITY \
322 #define PCL_ADD_INTENSITY_8U \
325 std::uint8_t intensity; \
328 #define PCL_ADD_INTENSITY_32U \
331 std::uint32_t intensity; \
354 x = _x; y = _y; z = _z;
400 inline RGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
402 r = _r; g = _g; b = _b;
423 intensity = p.intensity;
428 intensity = _intensity;
449 intensity = p.intensity;
454 intensity = _intensity;
457 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
458 operator unsigned char()
const
481 intensity = p.intensity;
486 intensity = _intensity;
514 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
520 inline PointXYZI (
float _x,
float _y,
float _z,
float _intensity = 0.f)
522 x = _x; y = _y; z = _z;
543 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
549 inline PointXYZL (
float _x,
float _y,
float _z, std::uint32_t _label = 0)
551 x = _x; y = _y; z = _z;
603 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
609 inline PointXYZRGBA (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a):
616 std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
618 x = _x; y = _y; z = _z;
620 r = _r; g = _g; b = _b; a = _a;
678 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
684 inline PointXYZRGB (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
691 std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
693 x = _x; y = _y; z = _z;
695 r = _r; g = _g; b = _b;
709 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
717 inline PointXYZRGBL (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
724 std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
725 std::uint32_t _label = 0)
727 x = _x; y = _y; z = _z;
729 r = _r; g = _g; b = _b;
763 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
764 L = p.
L;
a = p.
a;
b = p.
b;
801 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
802 h = p.
h; s = p.
s; v = p.
v;
813 float _h,
float _s,
float _v)
815 x = _x; y = _y; z = _z;
817 h = _h; s = _s; v = _v;
903 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
908 inline Normal (
float _curvature = 0.f):
Normal (0.f, 0.f, 0.f, _curvature) {}
910 inline Normal (
float n_x,
float n_y,
float n_z,
float _curvature = 0.f)
912 normal_x = n_x; normal_y = n_y; normal_z = n_z;
936 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z;
942 inline Axis (
float n_x,
float n_y,
float n_z)
944 normal_x = n_x; normal_y = n_y; normal_z = n_z;
976 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
977 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
986 inline PointNormal (
float _x,
float _y,
float _z,
float n_x,
float n_y,
float n_z,
float _curvature = 0.f)
988 x = _x; y = _y; z = _z;
990 normal_x = n_x; normal_y = n_y; normal_z = n_z;
1050 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1051 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
1065 inline PointXYZRGBNormal (
float _x,
float _y,
float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
1068 inline PointXYZRGBNormal (
float _x,
float _y,
float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b,
1069 float n_x,
float n_y,
float n_z,
float _curvature = 0.f)
1071 x = _x; y = _y; z = _z;
1073 r = _r; g = _g; b = _b;
1075 normal_x = n_x; normal_y = n_y; normal_z = n_z;
1107 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1108 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
1119 float n_x,
float n_y,
float n_z,
float _curvature = 0.f)
1121 x = _x; y = _y; z = _z;
1124 normal_x = n_x; normal_y = n_y; normal_z = n_z;
1157 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1158 normal_x = p.normal_x; normal_y = p.normal_y; normal_z = p.normal_z; data_n[3] = 0.0f;
1169 float n_x,
float n_y,
float n_z,
float _curvature = 0.f)
1171 x = _x; y = _y; z = _z;
1174 normal_x = n_x; normal_y = n_y; normal_z = n_z;
1207 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1215 x = _x; y = _y; z = _z;
1248 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1258 x = _x; y = _y; z = _z;
1260 vp_x = _vp_x; vp_y = _vp_y; vp_z = _vp_z;
1304 #if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
1305 operator unsigned char()
const
1354 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<PFHSignature125>; }
1369 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<PFHRGBSignature250>; }
1387 inline PPFSignature (
float _f1,
float _f2,
float _f3,
float _f4,
float _alpha = 0.f):
1403 CPPFSignature (0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, _alpha) {}
1405 inline CPPFSignature (
float _f1,
float _f2,
float _f3,
float _f4,
float _f5,
float _f6,
1406 float _f7,
float _f8,
float _f9,
float _f10,
float _alpha = 0.f):
1407 f1 (_f1),
f2 (_f2),
f3 (_f3),
f4 (_f4),
f5 (_f5),
f6 (_f6),
1428 inline PPFRGBSignature (
float _f1,
float _f2,
float _f3,
float _f4,
float _alpha,
float _r,
float _g,
float _b):
1456 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<ShapeContext1980>; }
1471 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<UniqueShapeContext1960>; }
1486 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<SHOT352>; }
1502 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<SHOT1344>; }
1527 inline const Eigen::Map<const Eigen::Vector3f>
getXAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (x_axis)); }
1529 inline const Eigen::Map<const Eigen::Vector3f>
getYAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (y_axis)); }
1531 inline const Eigen::Map<const Eigen::Vector3f>
getZAxisVector3fMap ()
const {
return (Eigen::Vector3f::Map (z_axis)); }
1532 inline Eigen::Map<Eigen::Matrix3f>
getMatrix3fMap () {
return (Eigen::Matrix3f::Map (rf)); }
1533 inline const Eigen::Map<const Eigen::Matrix3f>
getMatrix3fMap ()
const {
return (Eigen::Matrix3f::Map (rf)); }
1543 std::copy_n(p.
rf, 9, rf);
1548 std::fill_n(x_axis, 3, 0.f);
1549 std::fill_n(y_axis, 3, 0.f);
1550 std::fill_n(z_axis, 3, 0.f);
1567 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<FPFHSignature33>; }
1581 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<VFHSignature308>; }
1595 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<GRSDSignature21>; }
1611 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<BRISKSignature512>; }
1627 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<ESFSignature640>; }
1641 static constexpr
int descriptorSize() {
return detail::traits::descriptorSize_v<GASDSignature512>; }
1655 static constexpr
int descriptorSize() {
return detail::traits::descriptorSize_v<GASDSignature984>; }
1669 static constexpr
int descriptorSize() {
return detail::traits::descriptorSize_v<GASDSignature7992>; }
1683 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<GFPFHSignature16>; }
1698 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<Narf36>; }
1702 inline Narf36 (
float _x,
float _y,
float _z):
Narf36 (_x, _y, _z, 0.f, 0.f, 0.f) {}
1704 inline Narf36 (
float _x,
float _y,
float _z,
float _roll,
float _pitch,
float _yaw):
1760 static constexpr
int descriptorSize () {
return detail::traits::descriptorSize_v<Histogram<N>>; }
1792 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1802 float _angle = -1.f,
float _response = 0.f,
int _octave = 0)
1804 x = _x; y = _y; z = _z;
1843 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1854 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
1882 x = p.x; y = p.y; z = p.z; data[3] = 1.0f;
1892 inline PointDEM (
float _x,
float _y,
float _z,
float _intensity,
1893 float _intensity_variance,
float _height_variance)
1895 x = _x; y = _y; z = _z;
1905 template <
int N> std::ostream&
1913 [&os](
const auto& hist) { os <<
", " << hist; });
1921 POINT_CLOUD_REGISTER_POINT_STRUCT (
pcl::_RGB,
1922 (std::uint32_t, rgba, rgba)
1927 (
float, intensity, intensity)
1932 (std::uint8_t, intensity, intensity)
1937 (std::uint32_t, intensity, intensity)
1952 (std::uint32_t, rgba, rgba)
1968 (std::uint32_t, rgba, rgba)
1969 (std::uint32_t, label, label)
2007 (
float, strength, strength)
2014 (
float, intensity, intensity)
2022 (std::uint32_t, label, label)
2025 POINT_CLOUD_REGISTER_POINT_STRUCT (
pcl::Label,
2026 (std::uint32_t, label, label)
2030 (
float, normal_x, normal_x)
2031 (
float, normal_y, normal_y)
2032 (
float, normal_z, normal_z)
2033 (
float, curvature, curvature)
2037 POINT_CLOUD_REGISTER_POINT_STRUCT (
pcl::_Axis,
2038 (
float, normal_x, normal_x)
2039 (
float, normal_y, normal_y)
2040 (
float, normal_z, normal_z)
2048 (
float, normal_x, normal_x)
2049 (
float, normal_y, normal_y)
2050 (
float, normal_z, normal_z)
2051 (
float, curvature, curvature)
2058 (
float, normal_x, normal_x)
2059 (
float, normal_y, normal_y)
2060 (
float, normal_z, normal_z)
2061 (
float, curvature, curvature)
2068 (
float, intensity, intensity)
2069 (
float, normal_x, normal_x)
2070 (
float, normal_y, normal_y)
2071 (
float, normal_z, normal_z)
2072 (
float, curvature, curvature)
2078 (std::uint32_t, label, label)
2079 (
float, normal_x, normal_x)
2080 (
float, normal_y, normal_y)
2081 (
float, normal_z, normal_z)
2082 (
float, curvature, curvature)
2088 (
float, range, range)
2108 (
float, r_min, r_min)
2109 (
float, r_max, r_max)
2113 (std::uint8_t, boundary_point, boundary_point)
2117 (
float, principal_curvature_x, principal_curvature_x)
2118 (
float, principal_curvature_y, principal_curvature_y)
2119 (
float, principal_curvature_z, principal_curvature_z)
2125 (
float[125], histogram, pfh)
2129 (
float[250], histogram, pfhrgb)
2137 (
float, alpha_m, alpha_m)
2151 (
float, alpha_m, alpha_m)
2159 (
float, r_ratio, r_ratio)
2160 (
float, g_ratio, g_ratio)
2161 (
float, b_ratio, b_ratio)
2162 (
float, alpha_m, alpha_m)
2166 (
float[12], values, values)
2170 (
float[1980], descriptor, shape_context)
2175 (
float[1960], descriptor, shape_context)
2180 (
float[352], descriptor, shot)
2185 (
float[1344], descriptor, shot)
2190 (
float[33], histogram, fpfh)
2194 (
float, scale, brisk_scale)
2195 (
float, orientation, brisk_orientation)
2196 (
unsigned char[64], descriptor, brisk_descriptor512)
2200 (
float[308], histogram, vfh)
2204 (
float[21], histogram, grsd)
2208 (
float[640], histogram, esf)
2212 (
float[512], histogram, gasd)
2216 (
float[984], histogram, gasd)
2220 (
float[7992], histogram, gasd)
2224 (
float[36], descriptor, descriptor)
2228 (
float[16], histogram, gfpfh)
2232 (
float, gradient_x, gradient_x)
2233 (
float, gradient_y, gradient_y)
2234 (
float, gradient_z, gradient_z)
2241 (
float, scale, scale)
2248 (
float, normal_x, normal_x)
2249 (
float, normal_y, normal_y)
2250 (
float, normal_z, normal_z)
2251 (std::uint32_t, rgba, rgba)
2252 (
float, radius, radius)
2253 (
float, confidence, confidence)
2254 (
float, curvature, curvature)
2258 (
float[3], x_axis, x_axis)
2259 (
float[3], y_axis, y_axis)
2260 (
float[3], z_axis, z_axis)
2268 (
float, intensity, intensity)
2269 (
float, intensity_variance, intensity_variance)
2270 (
float, height_variance, height_variance)
2279 template<
typename Po
intT>
2280 struct FieldMatches<
PointT, ::pcl::fields::rgba>
2284 if (field.
name ==
"rgb")
2294 return (field.
name == traits::name<PointT, fields::rgba>::value &&
2295 field.
datatype == traits::datatype<PointT, fields::rgba>::value &&
2296 field.
count == traits::datatype<PointT, fields::rgba>::size);
2300 template<
typename Po
intT>
2301 struct FieldMatches<
PointT, fields::rgb>
2305 if (field.
name ==
"rgba")
2313 return (field.
name == traits::name<PointT, fields::rgb>::value &&
2314 (field.
datatype == traits::datatype<PointT, fields::rgb>::value ||
2316 field.
count == traits::datatype<PointT, fields::rgb>::size);
2324 #if defined _MSC_VER
2325 #pragma warning(disable: 4201)
2347 template <
typename Po
intT,
typename Field>
2348 struct has_field : boost::mpl::contains<typename pcl::traits::fieldList<PointT>::type, Field>::type
2352 template <
typename Po
intT,
typename Field>
2353 struct has_all_fields : boost::mpl::fold<Field,
2354 boost::mpl::bool_<true>,
2355 boost::mpl::and_<boost::mpl::_1,
2356 has_field<PointT, boost::mpl::_2> > >::type
2360 template <
typename Po
intT,
typename Field>
2361 struct has_any_field : boost::mpl::fold<Field,
2362 boost::mpl::bool_<false>,
2363 boost::mpl::or_<boost::mpl::_1,
2364 has_field<PointT, boost::mpl::_2> > >::type
2375 template <
typename Po
intT>
2376 struct has_xy : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
2380 template <
typename Po
intT>
2381 constexpr
auto has_xy_v = has_xy<PointT>::value;
2383 template <
typename Po
intT>
2384 using HasXY = std::enable_if_t<has_xy_v<PointT>,
bool>;
2386 template <
typename Po
intT>
2387 using HasNoXY = std::enable_if_t<!has_xy_v<PointT>,
bool>;
2390 template <
typename Po
intT>
2391 struct has_xyz : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
2396 template <
typename Po
intT>
2397 constexpr
auto has_xyz_v = has_xyz<PointT>::value;
2399 template <
typename Po
intT>
2400 using HasXYZ = std::enable_if_t<has_xyz_v<PointT>,
bool>;
2402 template <
typename Po
intT>
2403 using HasNoXYZ = std::enable_if_t<!has_xyz_v<PointT>,
bool>;
2407 template <
typename Po
intT>
2408 struct has_normal : has_all_fields<PointT, boost::mpl::vector<pcl::fields::normal_x,
2409 pcl::fields::normal_y,
2410 pcl::fields::normal_z> >
2413 template <
typename Po
intT>
2414 constexpr
auto has_normal_v = has_normal<PointT>::value;
2416 template <
typename Po
intT>
2417 using HasNormal = std::enable_if_t<has_normal_v<PointT>,
bool>;
2419 template <
typename Po
intT>
2420 using HasNoNormal = std::enable_if_t<!has_normal_v<PointT>,
bool>;
2423 template <
typename Po
intT>
2424 struct has_curvature : has_field<PointT, pcl::fields::curvature>
2427 template <
typename Po
intT>
2428 constexpr
auto has_curvature_v = has_curvature<PointT>::value;
2430 template <
typename Po
intT>
2431 using HasCurvature = std::enable_if_t<has_curvature_v<PointT>,
bool>;
2433 template <
typename Po
intT>
2434 using HasNoCurvature = std::enable_if_t<!has_curvature_v<PointT>,
bool>;
2437 template <
typename Po
intT>
2438 struct has_intensity : has_field<PointT, pcl::fields::intensity>
2441 template <
typename Po
intT>
2442 constexpr
auto has_intensity_v = has_intensity<PointT>::value;
2444 template <
typename Po
intT>
2445 using HasIntensity = std::enable_if_t<has_intensity_v<PointT>,
bool>;
2447 template <
typename Po
intT>
2448 using HasNoIntensity = std::enable_if_t<!has_intensity_v<PointT>,
bool>;
2451 template <
typename Po
intT>
2452 struct has_color : has_any_field<PointT, boost::mpl::vector<pcl::fields::rgb,
2453 pcl::fields::rgba> >
2456 template <
typename Po
intT>
2457 constexpr
auto has_color_v = has_color<PointT>::value;
2459 template <
typename Po
intT>
2460 using HasColor = std::enable_if_t<has_color_v<PointT>,
bool>;
2462 template <
typename Po
intT>
2463 using HasNoColor = std::enable_if_t<!has_color_v<PointT>,
bool>;
2466 template <
typename Po
intT>
2467 struct has_label : has_field<PointT, pcl::fields::label>
2470 template <
typename Po
intT>
2471 constexpr
auto has_label_v = has_label<PointT>::value;
2473 template <
typename Po
intT>
2474 using HasLabel = std::enable_if_t<has_label_v<PointT>,
bool>;
2476 template <
typename Po
intT>
2477 using HasNoLabel = std::enable_if_t<!has_label_v<PointT>,
bool>;
2480 #if defined _MSC_VER
2481 #pragma warning(default: 4201)
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
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::Vector4f, Eigen::Aligned > Vector4fMap
const Eigen::Map< const Vector4c, Eigen::Aligned > Vector4cMapConst
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)
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.
A structure representing the Local Reference Frame of a point.
const Eigen::Map< const Eigen::Matrix3f > getMatrix3fMap() const
const Eigen::Map< const Eigen::Vector3f > getYAxisVector3fMap() const
Eigen::Map< Eigen::Vector3f > getXAxisVector3fMap()
Eigen::Map< Eigen::Vector3f > getYAxisVector3fMap()
const Eigen::Map< const Eigen::Vector3f > getZAxisVector3fMap() const
Eigen::Map< Eigen::Vector3f > getZAxisVector3fMap()
const Eigen::Map< const Eigen::Vector3f > getXAxisVector3fMap() const
Eigen::Map< Eigen::Matrix3f > getMatrix3fMap()
A point structure representing an Axis using its normal coordinates.
Axis(float n_x, float n_y, float n_z)
A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
BRISKSignature512()=default
static constexpr int descriptorSize()
BRISKSignature512(float _scale, float _orientation)
friend std::ostream & operator<<(std::ostream &os, const BRISKSignature512 &p)
unsigned char descriptor[64]
A structure to store if a point in a range image lies on a border between an obstacle and the backgro...
friend std::ostream & operator<<(std::ostream &os, const BorderDescription &p)
BorderDescription()=default
A point structure representing a description of whether a point is lying on a surface boundary or not...
Boundary(std::uint8_t _boundary=0)
std::uint8_t boundary_point
friend std::ostream & operator<<(std::ostream &os, const Boundary &p)
A point structure for storing the Point Pair Feature (CPPF) values.
friend std::ostream & operator<<(std::ostream &os, const CPPFSignature &p)
CPPFSignature(float _alpha=0.f)
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()
friend std::ostream & operator<<(std::ostream &os, const ESFSignature640 &p)
ESFSignature640()=default
A point structure representing the Fast Point Feature Histogram (FPFH).
FPFHSignature33()=default
static constexpr int descriptorSize()
friend std::ostream & operator<<(std::ostream &os, const FPFHSignature33 &p)
bool operator()(const PCLPointField &field)
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
GASDSignature512()=default
friend std::ostream & operator<<(std::ostream &os, const GASDSignature512 &p)
static constexpr int descriptorSize()
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
static constexpr int descriptorSize()
GASDSignature7992()=default
friend std::ostream & operator<<(std::ostream &os, const GASDSignature7992 &p)
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
friend std::ostream & operator<<(std::ostream &os, const GASDSignature984 &p)
GASDSignature984()=default
static constexpr int descriptorSize()
A point structure representing the GFPFH descriptor with 16 bins.
friend std::ostream & operator<<(std::ostream &os, const GFPFHSignature16 &p)
GFPFHSignature16()=default
static constexpr int descriptorSize()
A point structure representing the Global Radius-based Surface Descriptor (GRSD).
static constexpr int descriptorSize()
GRSDSignature21()=default
friend std::ostream & operator<<(std::ostream &os, const GRSDSignature21 &p)
A point structure representing an N-D histogram.
static constexpr int descriptorSize()
A point structure representing the grayscale intensity in single-channel images.
friend std::ostream & operator<<(std::ostream &os, const Intensity32u &p)
Intensity32u(std::uint32_t _intensity=0)
Intensity32u(const _Intensity32u &p)
A point structure representing the grayscale intensity in single-channel images.
friend std::ostream & operator<<(std::ostream &os, const Intensity8u &p)
Intensity8u(const _Intensity8u &p)
Intensity8u(std::uint8_t _intensity=0)
A point structure representing the intensity gradient of an XYZI point cloud.
friend std::ostream & operator<<(std::ostream &os, const IntensityGradient &p)
IntensityGradient(float _x, float _y, float _z)
A point structure representing the grayscale intensity in single-channel images.
friend std::ostream & operator<<(std::ostream &os, const Intensity &p)
Intensity(float _intensity=0.f)
Intensity(const _Intensity &p)
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
friend std::ostream & operator<<(std::ostream &os, const Label &p)
Label(std::uint32_t _label=0)
A point structure representing the three moment invariants.
MomentInvariants(float _j1, float _j2, float _j3)
friend std::ostream & operator<<(std::ostream &os, const MomentInvariants &p)
MomentInvariants()=default
A point structure representing the Narf descriptor.
friend std::ostream & operator<<(std::ostream &os, const Narf36 &p)
Narf36(float _x, float _y, float _z)
static constexpr int descriptorSize()
Narf36(float _x, float _y, float _z, float _roll, float _pitch, float _yaw)
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3.
NormalBasedSignature12()=default
friend std::ostream & operator<<(std::ostream &os, const NormalBasedSignature12 &p)
A point structure representing normal coordinates and the surface curvature estimate.
Normal(float _curvature=0.f)
friend std::ostream & operator<<(std::ostream &os, const Normal &p)
Normal(float n_x, float n_y, float n_z, float _curvature=0.f)
A point structure representing the Point Feature Histogram with colors (PFHRGB).
PFHRGBSignature250()=default
friend std::ostream & operator<<(std::ostream &os, const PFHRGBSignature250 &p)
static constexpr int descriptorSize()
A point structure representing the Point Feature Histogram (PFH).
PFHSignature125()=default
static constexpr int descriptorSize()
friend std::ostream & operator<<(std::ostream &os, const PFHSignature125 &p)
A point structure for storing the Point Pair Color Feature (PPFRGB) values.
PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha, float _r, float _g, float _b)
PPFRGBSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
friend std::ostream & operator<<(std::ostream &os, const PPFRGBSignature &p)
PPFRGBSignature(float _alpha=0.f)
A point structure for storing the Point Pair Feature (PPF) values.
friend std::ostream & operator<<(std::ostream &os, const PPFSignature &p)
PPFSignature(float _f1, float _f2, float _f3, float _f4, float _alpha=0.f)
PPFSignature(float _alpha=0.f)
A point structure representing Digital Elevation Map.
friend std::ostream & operator<<(std::ostream &os, const PointDEM &p)
PointDEM(const _PointDEM &p)
PointDEM(float _x, float _y, float _z, float _intensity, float _intensity_variance, float _height_variance)
PointDEM(float _x, float _y, float _z)
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
PointNormal(float _x, float _y, float _z)
PointNormal(float _curvature=0.f)
PointNormal(const _PointNormal &p)
friend std::ostream & operator<<(std::ostream &os, const PointNormal &p)
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...
friend std::ostream & operator<<(std::ostream &os, const PointSurfel &p)
PointSurfel(const _PointSurfel &p)
A 2D point structure representing pixel image coordinates.
friend std::ostream & operator<<(std::ostream &os, const PointUV &p)
PointUV(float _u, float _v)
A point structure representing Euclidean xyz coordinates, padded with an extra range float.
PointWithRange(const _PointWithRange &p)
PointWithRange(float _x, float _y, float _z, float _range=0.f)
friend std::ostream & operator<<(std::ostream &os, const PointWithRange &p)
PointWithRange(float _range=0.f)
A point structure representing a 3-D position and scale.
PointWithScale(float _x, float _y, float _z, float _scale=1.f, float _angle=-1.f, float _response=0.f, int _octave=0)
friend std::ostream & operator<<(std::ostream &os, const PointWithScale &p)
PointWithScale(const _PointWithScale &p)
A point structure representing Euclidean xyz coordinates together with the viewpoint from which it wa...
PointWithViewpoint(float _x, float _y, float _z, float _vp_x, float _vp_y, float _vp_z)
PointWithViewpoint(float _x, float _y, float _z)
PointWithViewpoint(const _PointWithViewpoint &p)
A 2D point structure representing Euclidean xy coordinates.
friend std::ostream & operator<<(std::ostream &os, const PointXY &p)
PointXY(float _x, float _y)
PointXYZHSV(const _PointXYZHSV &p)
PointXYZHSV(float _x, float _y, float _z, float _h, float _s, float _v)
PointXYZHSV(float _h, float _s, float _v)
A point structure representing Euclidean xyz coordinates.
PointXYZ(const _PointXYZ &p)
PointXYZ(float _x, float _y, float _z)
PointXYZI(float _x, float _y, float _z, float _intensity=0.f)
friend std::ostream & operator<<(std::ostream &os, const PointXYZI &p)
PointXYZI(const _PointXYZI &p)
PointXYZI(float _intensity=0.f)
A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates...
PointXYZINormal(float _x, float _y, float _z, float _intensity=0.f)
friend std::ostream & operator<<(std::ostream &os, const PointXYZINormal &p)
PointXYZINormal(float _x, float _y, float _z, float _intensity, float n_x, float n_y, float n_z, float _curvature=0.f)
PointXYZINormal(const _PointXYZINormal &p)
PointXYZINormal(float _intensity=0.f)
A point structure representing Euclidean xyz coordinates, and the CIELAB color.
friend std::ostream & operator<<(std::ostream &os, const PointXYZLAB &p)
PointXYZLAB(const _PointXYZLAB &p)
PointXYZL(float _x, float _y, float _z, std::uint32_t _label=0)
friend std::ostream & operator<<(std::ostream &os, const PointXYZL &p)
PointXYZL(const _PointXYZL &p)
PointXYZL(std::uint32_t _label=0)
A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates a...
PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label=0.f)
PointXYZLNormal(float _x, float _y, float _z, std::uint32_t _label, float n_x, float n_y, float n_z, float _curvature=0.f)
PointXYZLNormal(const _PointXYZLNormal &p)
friend std::ostream & operator<<(std::ostream &os, const PointXYZLNormal &p)
PointXYZLNormal(std::uint32_t _label=0)
A point structure representing Euclidean xyz coordinates, and the RGBA color.
PointXYZRGBA(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint8_t _a)
PointXYZRGBA(const _PointXYZRGBA &p)
PointXYZRGBA(float _x, float _y, float _z)
PointXYZRGBA(float _x, float _y, float _z, 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.
PointXYZRGB(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointXYZRGB(const _PointXYZRGB &p)
PointXYZRGB(float _x, float _y, float _z)
PointXYZRGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointXYZRGBL(std::uint32_t _label=0)
PointXYZRGBL(const _PointXYZRGBL &p)
PointXYZRGBL(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b, std::uint32_t _label=0)
PointXYZRGBL(float _x, float _y, float _z)
PointXYZRGBL(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coo...
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)
PointXYZRGBNormal(float _x, float _y, float _z)
PointXYZRGBNormal(float _x, float _y, float _z, std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
PointXYZRGBNormal(float _curvature=0.f)
PointXYZRGBNormal(const _PointXYZRGBNormal &p)
friend std::ostream & operator<<(std::ostream &os, const PointXYZRGBNormal &p)
PointXYZRGBNormal(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
A point structure representing the principal curvatures and their magnitudes.
friend std::ostream & operator<<(std::ostream &os, const PrincipalCurvatures &p)
PrincipalCurvatures(float _x, float _y, float _z, float _pc1, float _pc2)
PrincipalCurvatures(float _pc1, float _pc2)
PrincipalCurvatures(float _x, float _y, float _z)
float principal_curvature_x
float principal_curvature_z
float principal_curvature_y
float principal_curvature[3]
A point structure representing the minimum and maximum surface radii (in meters) computed using RSD.
PrincipalRadiiRSD()=default
PrincipalRadiiRSD(float _r_min, float _r_max)
friend std::ostream & operator<<(std::ostream &os, const PrincipalRadiiRSD &p)
A structure representing RGB color information.
friend std::ostream & operator<<(std::ostream &os, const RGB &p)
RGB(std::uint8_t _r, std::uint8_t _g, std::uint8_t _b)
ReferenceFrame(const _ReferenceFrame &p)
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
friend std::ostream & operator<<(std::ostream &os, const SHOT1344 &p)
static constexpr int descriptorSize()
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
friend std::ostream & operator<<(std::ostream &os, const SHOT352 &p)
static constexpr int descriptorSize()
A point structure representing a Shape Context.
friend std::ostream & operator<<(std::ostream &os, const ShapeContext1980 &p)
static constexpr int descriptorSize()
ShapeContext1980()=default
A point structure representing a Unique Shape Context.
static constexpr int descriptorSize()
friend std::ostream & operator<<(std::ostream &os, const UniqueShapeContext1960 &p)
UniqueShapeContext1960()=default
A point structure representing the Viewpoint Feature Histogram (VFH).
static constexpr int descriptorSize()
friend std::ostream & operator<<(std::ostream &os, const VFHSignature308 &p)
VFHSignature308()=default