procrustes_align — SHAPESTAT procrustes op

• Data kinds: points × points → points

• Call: import fullseye as fs; fs.ledger.procrustes_align(source, target, scaling: 'bool' = True, reflection: 'bool' = False) (to call the implementation directly, import shapestats; shapestats.procrustes_align(source, target, scaling: 'bool' = True, reflection: 'bool' = False); from the registry, opsshapestat.get("procrustes_align"))

Usage

Points of *source* superimposed onto *target*. → (N, 3) (applies procrustes_fit).

Computes M = procrustes_fit(source, target, scaling, reflection) and returns source @ M[:3, :3].T + M[:3, 3]. The transform is a similarity transform of centroid matching + rotation by SVD (+ optional scale), and it assumes the i-th points correspond to each other. Passing point sets without correspondence raises no exception and returns a meaningless placement (in that case use ICP-style registration).

• source, target: (N, 3), same N, finite. Even N = 1 passes (translation only).

• scaling=True: size differences are also absorbed. False gives a rigid-body transform. When all points of source are identical (spread 0), the scale stays at 1.

• reflection=False (default): enforces det(R) = +1. True also allows mirror images -- for measuring left-right asymmetry that would make it vanish, so normally keep the default.

• Returns: (N, 3) float64. For the residual as a number, procrustes_distance; for the transform matrix itself, procrustes_fit.

• Failure: ValueError (shape not (N, 3), N mismatch, non-finite).

To align many shapes at once, generalized_procrustes.

Detailed usage guide

• shape_statistics family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• shapestat_landmark_tour — py -3.11 examples/shapestat_landmark_tour.py

Ops the type connects to (they accept points as input)

shape_perturb · procrustes_fit · procrustes_distance · shape_project · shape_mahalanobis · mirror_plane_from_pairs · landmark_asymmetry · signed_surface_distance

Same category (procrustes)

procrustes_fit · procrustes_distance · generalized_procrustes · shape_mean


*Provenance: shapestats.py — SHAPESTAT operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.