41 #include <pcl/memory.h>
42 #include <pcl/pcl_macros.h>
43 #include <pcl/point_types.h>
44 #include <pcl/point_cloud.h>
45 #include <pcl/point_representation.h>
46 #include <pcl/kdtree/impl/kdtree_flann.hpp>
47 #include <pcl/registration/gicp.h>
72 x = y = z = 0.0f; data[3] = 1.0f;
87 POINT_CLOUD_REGISTER_POINT_WRAPPER(
pcl::PointXYZLAB,
pcl::_PointXYZLAB)
106 class PCL_EXPORTS GeneralizedIterativeClosestPoint6D :
public GeneralizedIterativeClosestPoint<PointXYZRGBA, PointXYZRGBA>
108 using PointSource = PointXYZRGBA;
109 using PointTarget = PointXYZRGBA;
117 GeneralizedIterativeClosestPoint6D (
float lab_weight = 0.032f);
125 setInputSource (
const PointCloudSourceConstPtr& cloud)
override;
133 setInputTarget (
const PointCloudTargetConstPtr& target)
override;
142 computeTransformation (PointCloudSource& output,
143 const Eigen::Matrix4f& guess)
override;
151 searchForNeighbors (
const PointXYZLAB& query, std::vector<int>& index, std::vector<float>& distance);
161 KdTreeFLANN<PointXYZLAB> target_tree_lab_;
167 class MyPointRepresentation :
public PointRepresentation<PointXYZLAB>
169 using PointRepresentation<PointXYZLAB>::nr_dimensions_;
170 using PointRepresentation<PointXYZLAB>::trivial_;
173 using Ptr = shared_ptr<MyPointRepresentation>;
174 using ConstPtr = shared_ptr<const MyPointRepresentation>;
176 MyPointRepresentation ()
183 ~MyPointRepresentation ()
190 return Ptr (
new MyPointRepresentation (*
this));
194 copyToFloatArray (
const PointXYZLAB &p,
float * out)
const override
207 MyPointRepresentation point_rep_;
shared_ptr< PointCloud< PointT > > Ptr
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
A custom point type for position and CIELAB color value.
POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::_PointXYZLAB,(float, x, x)(float, y, y)(float, z, z)(float, L, L)(float, a, a)(float, b, b)) namespace pcl