Function ouster::sdk::algorithm::point_to_plane_align

Function Documentation

core::Matrix4dR ouster::sdk::algorithm::point_to_plane_align(Eigen::Ref<const core::ArrayX3dR> source_points, Eigen::Ref<const core::ArrayX3dR> target_points, Eigen::Ref<const core::ArrayX3dR> source_normals, Eigen::Ref<const core::ArrayX3dR> target_normals, const core::Matrix4dR &initial_guess = core::Matrix4dR::Identity(), double max_corr_dist = 0.25, double max_normal_angle_deg = 20.0)

Align two point clouds using point-to-plane ICP.

Returns source_to_target_transform: source_points are transformed by the returned pose and target_points stay fixed as the reference cloud.

Iteratively matches each transformed source point to its nearest target point, rejects correspondences whose normals differ by more than max_normal_angle_deg, and minimizes point-to-plane residuals with robust Huber weighting. Non-finite points and normals are ignored, and usable normals are normalized internally.

Parameters:
  • source_points[in] Source points transformed by the returned pose as N x 3 XYZ rows.

  • target_points[in] Reference target points as M x 3 XYZ rows.

  • source_normals[in] Normals aligned with the source source_points.

  • target_normals[in] Normals aligned with the reference target_points.

  • initial_guess[in] Initial estimate of source_to_target_transform.

  • max_corr_dist[in] Maximum correspondence distance in meters. Must be finite and greater than zero.

  • max_normal_angle_deg[in] Maximum angle between corresponding normals in degrees. Must be finite and in [0, 180].

Throws:

std::invalid_argument – If point and normal row counts differ, or an ICP threshold is outside its valid range.

Returns:

Estimated source_to_target_transform. Returns initial_guess if there are fewer than 20 usable points or correspondences.