procrustes_align — SHAPESTAT procrustes op

• 数据种类:points × points → points

• 调用: import fullseye as fs; fs.ledger.procrustes_align(source, target, scaling: 'bool' = True, reflection: 'bool' = False)(要直接调用实现,import shapestats; shapestats.procrustes_align(source, target, scaling: 'bool' = True, reflection: 'bool' = False);从台账取用则 opsshapestat.get("procrustes_align"))

用法

将 *source* 叠合到 *target* 上之后的点。→ (N, 3)(应用 procrustes_fit)。

求出 M = procrustes_fit(source, target, scaling, reflection), 返回 source @ M[:3, :3].T + M[:3, 3]。变换是质心对齐 + 基于 SVD 的旋转(+ 可选的缩放)的相似变换,前提是第 i 个点彼此对应。传入无对应关系的点集也不会抛出异常,而是返回无意义的配置(这种情况下请使用 ICP 系的配准)。

• source, target: (N, 3),相同的 N,有限值。N = 1 也能通过(仅平移)。

• scaling=True: 也吸收大小的差异。False 则为刚体变换。source 所有点相同(展布为 0)时,尺度保持为 1。

• reflection=False(默认): 强制 det(R) = +1。设为 True 则也允许镜像 —— 在测量左右不对称性的用途中它会因此消失,所以通常保持默认。

• 返回值: (N, 3) float64。想要残差的数值用 procrustes_distance, 想要变换矩阵本身用 procrustes_fit。

• 失败: ValueError(形状不是 (N, 3)、N 不一致、非有限值)。

若要同时对齐多个形状,用 generalized_procrustes。

详细使用指南

• shape_statistics 族使用指南

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• shapestat_landmark_tour — py -3.11 examples/shapestat_landmark_tour.py

类型可衔接的下一个算子(可接受 points 作为输入)

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

同类别(procrustes)

procrustes_fit · procrustes_distance · generalized_procrustes · shape_mean


*Provenance: shapestats.py — SHAPESTAT 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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