Skip to contents

Aligns a source point cloud to a target. Auto-selects point-to-point or point-to-plane ICP based on whether the target has normals.

Usage

px_icp(
  source,
  target,
  max_correspondence_distance = 1,
  max_iterations = 50L,
  tolerance = 1e-06,
  init_transform = NULL
)

Arguments

source

A px_cloud — the cloud to be transformed.

target

A px_cloud — the fixed reference cloud.

max_correspondence_distance

Numeric — maximum distance for point correspondence (in coordinate units).

max_iterations

Integer — maximum iterations.

tolerance

Numeric — convergence tolerance on transformation change.

init_transform

4x4 numeric matrix, or NULL. Initial transformation guess. If NULL and both clouds are px_terrestrial with scan positions, computes an initial guess from the scan geometry. Otherwise uses identity.

Value

An icp_result object with components:

transformation

4x4 rigid transformation matrix

fitness

Fraction of source points with correspondences

inlier_rmse

RMSE of inlier correspondences

converged

Logical — whether the algorithm converged

iterations

Number of iterations performed