tps_fit — 3D deform op

• Data kinds: points × points → deformation

• Call: import fullseye as fs; fs.ledger.tps_fit(src_ctrl, dst_ctrl, lam=0.0) (implementation को सीधे call करना हो तो import deform3d; deform3d.tps_fit(src_ctrl, dst_ctrl, lam=0.0), registry से लेना हो तो ops3d.get("tps_fit"))

उपयोग

control point correspondences से 3D Thin-Plate-Spline fit करता है।

moving control points src_ctrl को fixed dst_ctrl पर ले जाने वाले TPS coefficients, saddle-point system को least squares (numpy.linalg.lstsq) से हल करके निकालता है। λ=0 पर control points पर बिल्कुल सटीक interpolation होता है (tps_warp(model, src_ctrl) == dst_ctrl), λ>0 पर smoothing होती है।

Arguments:

src_ctrl: (K,3) control points (deformation के शुरुआती points, TPS kernel centers p_i)।

dst_ctrl: (K,3) संबंधित target points (deformation के अंतिम points v_i)।

lam: regularisation coefficient λ≥0। kernel matrix K के diagonal में λ जोड़ा जाता है। जितना बड़ा,

deformation उतना smooth (control points पर fit उतना ढीला)।

return value:

model: dict। keys हैं

"ctrl" (K,3) kernel centers p_i,

"w" (K,3) non-linear (bending) coefficients,

"a" (4,3) affine coefficients ([translation; linear part], a[0]=c, a[1:4]=Aᵀ),

"lam" इस्तेमाल किया गया λ।

Exceptions:

ValueError: shape mismatch, बहुत कम control points, non-finite values, या control points की संख्या

TPS_MAX_CTRL (10,000) से ज़्यादा (dense (K+4)² system O(K³) है।

correspondences को पहले thin करके दें — TPS का असली उपयोग sparse control points से smooth deformation

दर्शाना है)।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• nonrigid_deform — py -3.11 examples_3d/nonrigid_deform.py

वे अगले ops जिनसे type जुड़ता है (deformation को input के रूप में लेते हैं)

fuse_to_voxel · tps_warp

इसी category के (deform)

tps_warp · register_nonrigid · register_cpd_rigid


*Provenance: deform3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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