Template Class EigenSVDPointAlign

Class Documentation

template<typename T, typename PointT = float>
class EigenSVDPointAlign

Public Types

using Vec3 = Vector3<T>
using Mat4 = Transform<T>
using Mat3 = Eigen::Matrix<T, 3, 3>
using Point3 = Vector3<PointT>
using PointPairVector = std::vector<std::pair<Point3, Point3>>

Public Functions

inline EigenSVDPointAlign()
T alignPoints(SLAMScanPtr scan, Point3 **neighbors, const Vec3 &centroid_m, const Vec3 &centroid_d, Mat4 &align) const

Calculates the estimated Transformation to match a Data Pointcloud to a Model Pointcloud.

Apply the resulting Transform to the Data Pointcloud.

Parameters:
  • scan – The Data Pointcloud

  • neighbors – An array containing a Pointer to a neighbor in the Model Pointcloud for each Point in scan, or nullptr if there is no neighbor for a Point

  • centroid_m – The center of the Model Pointcloud

  • centroid_d – The center of the Data Pointcloud

  • align – Will be set to the Transformation

Returns:

The average Point-to-Point error of the Scans

T alignPoints(PointPairVector &points, const Vec3 &centroid_m, const Vec3 &centroid_d, Mat4 &align) const

Calculates the estimated Transformation to match a Data Pointcloud to a Model Pointcloud.

Apply the resulting Transform to the Data Pointcloud.

Parameters:
  • points – A vector of pairs with (model, data) Points

  • centroid_m – The center of the Model Pointcloud

  • centroid_d – The center of the Data Pointcloud

  • align – Will be set to the Transformation

Returns:

The average Point-to-Point error of the Scans