tps_fit — 3D deform op

Data kinds: points × pointsdeformation

Call: import fullseye as fs; fs.ledger.tps_fit(src_ctrl, dst_ctrl, lam=0.0) (to call the implementation directly, import deform3d; deform3d.tps_fit(src_ctrl, dst_ctrl, lam=0.0); from the registry, ops3d.get("tps_fit"))

Usage

Fit a 3-D thin-plate spline from control-point correspondences.

> The detailed description below is the original text — the summary and the headings are translated.

移動側の制御点 `src_ctrl を固定側 dst_ctrl` へ写す TPS 係数を、鞍点系

を最小二乗(`numpy.linalg.lstsq`)で解いて求める。λ=0 なら制御点上で厳密に

内挿(`tps_warp(model, src_ctrl) == dst_ctrl`)、λ>0 で平滑化する。

引数:

src_ctrl: (K,3) 制御点(変形の始点、TPS のカーネル中心 p_i)。

dst_ctrl: (K,3) 対応する目標点(変形の終点 v_i)。

lam: 正則化係数 λ≥0。カーネル行列 K の対角へ λ を加える。大きいほど

変形は滑らか(制御点への当てはめは緩む)。

返り値:

model: dict。キーは

"ctrl" (K,3) カーネル中心 p_i、

"w" (K,3) 非線形(曲げ)係数、

"a" (4,3) アフィン係数([平行移動; 線形部]、a[0]=c, a[1:4]=Aᵀ)、

"lam" 使用した λ。

例外:

ValueError: 形状不一致、制御点数不足、非有限値、または制御点数が

`TPS_MAX_CTRL`(10,000)超(密な (K+4)² 系は O(K³) のため。

対応点を間引いてから渡す — TPS は疎な制御点で滑らかな変形を

表現するのが本来の使い方)。

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.

Runnable examples (verified samples that actually call this op)

nonrigid_deformpy -3.11 examples_3d/nonrigid_deform.py

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

fuse_to_voxel · tps_warp

Same category (deform)

tps_warp · register_nonrigid · register_cpd_rigid


*Provenance: deform3d.py — 3D 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.