42 #include <pcl/point_cloud.h>
44 #include <pcl/common/eigen.h>
45 #include <pcl/PointIndices.h>
58 template <
typename Po
intT,
typename Scalar>
void
61 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
62 bool copy_all_fields =
true)
64 return (transformPointCloud<PointT, Scalar> (cloud_in, cloud_out, transform.matrix (), copy_all_fields));
67 template <
typename Po
intT>
void
70 const Eigen::Affine3f &transform,
71 bool copy_all_fields =
true)
73 return (transformPointCloud<PointT, float> (cloud_in, cloud_out, transform.matrix (), copy_all_fields));
85 template <
typename Po
intT,
typename Scalar>
void
89 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
90 bool copy_all_fields =
true)
92 return (transformPointCloud<PointT, Scalar> (cloud_in, indices, cloud_out, transform.matrix (), copy_all_fields));
95 template <
typename Po
intT>
void
99 const Eigen::Affine3f &transform,
100 bool copy_all_fields =
true)
102 return (transformPointCloud<PointT, float> (cloud_in, indices, cloud_out, transform.matrix (), copy_all_fields));
114 template <
typename Po
intT,
typename Scalar>
void
118 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
119 bool copy_all_fields =
true)
121 return (transformPointCloud<PointT, Scalar> (cloud_in, indices.
indices, cloud_out, transform.matrix (), copy_all_fields));
124 template <
typename Po
intT>
void
128 const Eigen::Affine3f &transform,
129 bool copy_all_fields =
true)
131 return (transformPointCloud<PointT, float> (cloud_in, indices.
indices, cloud_out, transform.matrix (), copy_all_fields));
143 template <
typename Po
intT,
typename Scalar>
void
146 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
147 bool copy_all_fields =
true)
149 return (transformPointCloudWithNormals<PointT, Scalar> (cloud_in, cloud_out, transform.matrix (), copy_all_fields));
152 template <
typename Po
intT>
void
155 const Eigen::Affine3f &transform,
156 bool copy_all_fields =
true)
158 return (transformPointCloudWithNormals<PointT, float> (cloud_in, cloud_out, transform.matrix (), copy_all_fields));
170 template <
typename Po
intT,
typename Scalar>
void
174 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
175 bool copy_all_fields =
true)
177 return (transformPointCloudWithNormals<PointT, Scalar> (cloud_in, indices, cloud_out, transform.matrix (), copy_all_fields));
180 template <
typename Po
intT>
void
184 const Eigen::Affine3f &transform,
185 bool copy_all_fields =
true)
187 return (transformPointCloudWithNormals<PointT, float> (cloud_in, indices, cloud_out, transform.matrix (), copy_all_fields));
199 template <
typename Po
intT,
typename Scalar>
void
203 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform,
204 bool copy_all_fields =
true)
206 return (transformPointCloudWithNormals<PointT, Scalar> (cloud_in, indices.
indices, cloud_out, transform.matrix (), copy_all_fields));
210 template <
typename Po
intT>
void
214 const Eigen::Affine3f &transform,
215 bool copy_all_fields =
true)
217 return (transformPointCloudWithNormals<PointT, float> (cloud_in, indices.
indices, cloud_out, transform.matrix (), copy_all_fields));
229 template <
typename Po
intT,
typename Scalar>
void
232 const Eigen::Matrix<Scalar, 4, 4> &transform,
233 bool copy_all_fields =
true);
235 template <
typename Po
intT>
void
238 const Eigen::Matrix4f &transform,
239 bool copy_all_fields =
true)
241 return (transformPointCloud<PointT, float> (cloud_in, cloud_out, transform, copy_all_fields));
253 template <
typename Po
intT,
typename Scalar>
void
257 const Eigen::Matrix<Scalar, 4, 4> &transform,
258 bool copy_all_fields =
true);
260 template <
typename Po
intT>
void
264 const Eigen::Matrix4f &transform,
265 bool copy_all_fields =
true)
267 return (transformPointCloud<PointT, float> (cloud_in, indices, cloud_out, transform, copy_all_fields));
279 template <
typename Po
intT,
typename Scalar>
void
283 const Eigen::Matrix<Scalar, 4, 4> &transform,
284 bool copy_all_fields =
true)
286 return (transformPointCloud<PointT, Scalar> (cloud_in, indices.
indices, cloud_out, transform, copy_all_fields));
289 template <
typename Po
intT>
void
293 const Eigen::Matrix4f &transform,
294 bool copy_all_fields =
true)
296 return (transformPointCloud<PointT, float> (cloud_in, indices, cloud_out, transform, copy_all_fields));
309 template <
typename Po
intT,
typename Scalar>
void
312 const Eigen::Matrix<Scalar, 4, 4> &transform,
313 bool copy_all_fields =
true);
316 template <
typename Po
intT>
void
319 const Eigen::Matrix4f &transform,
320 bool copy_all_fields =
true)
322 return (transformPointCloudWithNormals<PointT, float> (cloud_in, cloud_out, transform, copy_all_fields));
336 template <
typename Po
intT,
typename Scalar>
void
340 const Eigen::Matrix<Scalar, 4, 4> &transform,
341 bool copy_all_fields =
true);
344 template <
typename Po
intT>
void
348 const Eigen::Matrix4f &transform,
349 bool copy_all_fields =
true)
351 return (transformPointCloudWithNormals<PointT, float> (cloud_in, indices, cloud_out, transform, copy_all_fields));
365 template <
typename Po
intT,
typename Scalar>
void
369 const Eigen::Matrix<Scalar, 4, 4> &transform,
370 bool copy_all_fields =
true)
372 return (transformPointCloudWithNormals<PointT, Scalar> (cloud_in, indices.
indices, cloud_out, transform, copy_all_fields));
376 template <
typename Po
intT>
void
380 const Eigen::Matrix4f &transform,
381 bool copy_all_fields =
true)
383 return (transformPointCloudWithNormals<PointT, float> (cloud_in, indices.
indices, cloud_out, transform, copy_all_fields));
395 template <
typename Po
intT,
typename Scalar>
inline void
398 const Eigen::Matrix<Scalar, 3, 1> &offset,
399 const Eigen::Quaternion<Scalar> &rotation,
400 bool copy_all_fields =
true);
402 template <
typename Po
intT>
inline void
405 const Eigen::Vector3f &offset,
406 const Eigen::Quaternionf &rotation,
407 bool copy_all_fields =
true)
409 return (transformPointCloud<PointT, float> (cloud_in, cloud_out, offset, rotation, copy_all_fields));
422 template <
typename Po
intT,
typename Scalar>
inline void
425 const Eigen::Matrix<Scalar, 3, 1> &offset,
426 const Eigen::Quaternion<Scalar> &rotation,
427 bool copy_all_fields =
true);
429 template <
typename Po
intT>
void
432 const Eigen::Vector3f &offset,
433 const Eigen::Quaternionf &rotation,
434 bool copy_all_fields =
true)
436 return (transformPointCloudWithNormals<PointT, float> (cloud_in, cloud_out, offset, rotation, copy_all_fields));
450 const Eigen::Affine2f& transform,
451 bool copy_all_fields =
true);
459 template <
typename Po
intT,
typename Scalar>
inline PointT
461 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform);
463 template <
typename Po
intT>
inline PointT
465 const Eigen::Affine3f &transform)
467 return (transformPoint<PointT, float> (point, transform));
476 template <
typename Po
intT,
typename Scalar>
inline PointT
478 const Eigen::Transform<Scalar, 3, Eigen::Affine> &transform);
480 template <
typename Po
intT>
inline PointT
482 const Eigen::Affine3f &transform)
484 return (transformPointWithNormal<PointT, float> (point, transform));
494 template <
typename Po
intT,
typename Scalar>
inline double
496 Eigen::Transform<Scalar, 3, Eigen::Affine> &transform);
498 template <
typename Po
intT>
inline double
500 Eigen::Affine3f &transform)
502 return (getPrincipalTransformation<PointT, float> (cloud, transform));
506 #include <pcl/common/impl/transforms.hpp>
Define methods for centroid estimation and covariance matrix calculus.
PointCloud represents the base class in PCL for storing collections of 3D points.
void transformPointCloudWithNormals(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, const Eigen::Matrix< Scalar, 4, 4 > &transform, bool copy_all_fields)
Transform a point cloud and rotate its normals using an Eigen transform.
PointT transformPointWithNormal(const PointT &point, const Eigen::Transform< Scalar, 3, Eigen::Affine > &transform)
Transform a point with members x,y,z,normal_x,normal_y,normal_z.
void transformPointCloud(const pcl::PointCloud< PointT > &cloud_in, pcl::PointCloud< PointT > &cloud_out, const Eigen::Matrix< Scalar, 4, 4 > &transform, bool copy_all_fields)
Apply a rigid transform defined by a 4x4 matrix.
void transformPoint(const Eigen::Matrix< Scalar, 3, 1 > &point_in, Eigen::Matrix< Scalar, 3, 1 > &point_out, const Eigen::Transform< Scalar, 3, Eigen::Affine > &transformation)
Transform a point using an affine matrix.
double getPrincipalTransformation(const pcl::PointCloud< PointT > &cloud, Eigen::Transform< Scalar, 3, Eigen::Affine > &transform)
Calculates the principal (PCA-based) alignment of the point cloud.
IndicesAllocator<> Indices
Type used for indices in PCL.
A point structure representing Euclidean xyz coordinates, and the RGB color.