gicp — 3D gicp op

• Data kinds: points × points → pose

• Call: import fullseye as fs; fs.ledger.gicp(source, target, max_iter: 'int' = 30, k: 'int' = 20, epsilon: 'float' = 0.001, tol: 'float' = 1e-08, init=None, reproducible: 'bool' = False) -> 'dict' (implementation को सीधे call करना हो तो import gicp; gicp.gicp(source, target, max_iter: 'int' = 30, k: 'int' = 20, epsilon: 'float' = 0.001, tol: 'float' = 1e-08, init=None, reproducible: 'bool' = False) -> 'dict', registry से लेना हो तो ops3d.get("gicp"))

• Ledger के ज़रिए return value: fullseye.ledger.gicp(...) केवल घोषित out type pose का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.gicp.raw(...) का उपयोग करें, या gicp.gicp को सीधे call करें।

उपयोग

Generalized-ICP (covariance-weighted Mahalanobis ICP) से rigid transform (R,t) का अनुमान लगाता है।

हर iteration में source→target के nearest neighbour correspondence बनाता है, और residual d_i = R·s_i + t - q_i को weight W_i = (C_target[q_i] + R·C_source[s_i]·Rᵀ)⁻¹ से मापने वाली Mahalanobis cost Σ d_iᵀ W_i d_i को small-angle linearisation R ← (I+[ω]×)R वाले Gauss-Newton से minimise करता है। हर correspondence के Jacobian J_i = [-[R·s_i+t]× | I] (3×6) से normal equations (Σ J_iᵀ W_i J_i) x = -(Σ J_iᵀ W_i d_i) (6×6) हल करके increment x=[ω|τ] पाता है, Rodrigues से उसे rotation में वापस बदलता है और जोड़ता जाता है।

Covariance plane-to-plane है (estimate_covariances)। point-to-plane जहाँ residual को target की normal दिशा पर project करता है (rank-1), वहीं GICP source और target दोनों की full 3×3 covariance को मिलाकर बना weight इस्तेमाल करता है, इसलिए समतल जैसे और noise वाले point cloud पर robust है।

ICP एक local optimisation है, इसलिए पास के initialisation को मानकर चलता है (coarse match या init दें)।

Arguments:

source (N,3): हिलाया जाने वाला point cloud।

target (M,3): reference (स्थिर) point cloud।

max_iter: iterations की अधिकतम संख्या।

k: covariance estimation के लिए neighbours की संख्या।

epsilon: plane-to-plane के लिए normal दिशा में छोटा variance (0<ε<1)।

tol: convergence threshold। जब incremental translation ‖τ‖ tol×(target की RMS त्रिज्या) से कम हो और

incremental rotation ‖ω‖ (rad) tol से कम हो तब रुकता है (scale-relative)।

init: (R0(3,3), t0(3,)) की initial pose tuple, या None (identity)।

reproducible: True होने पर N points के sum Σ J_iᵀ W_i J_i और Σ J_iᵀ W_i d_i को ozakimm (Ozaki scheme) reduction से,

pose लगाने को element-wise operations से, और RMSE को math.fsum से करता है। source के points के क्रम और BLAS threads की संख्या से स्वतंत्र,

R, t और rmse bit-for-bit समान रहते हैं (अगर covariance के neighbourhood में बिल्कुल बराबर दूरी वाले points हों तो neighbours का चुनाव बदल सकता है)।

Default False पहले जैसा व्यवहार करता है।

Return value:

dict:

"R" (3,3) ndarray — target ≈ R·source + t को संतुष्ट करने वाला rotation।

"t" (3,) ndarray — translation।

"rmse" float — अंतिम correspondences पर Euclidean RMSE (स्वीकार किए गए points)।

"iterations" int — वास्तविक iterations की संख्या।

Exceptions:

ValueError: गलत input shape / बहुत कम points / numerical divergence (non-finite) = fail-closed।

संदर्भ (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 करते हैं)

• gicp_register — py -3.11 examples_3d/gicp_register.py

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

fuse_to_voxel · pose_error · bundle_adjust · mean_reprojection_error · optimize_pose_graph · relative_pose · mean_edge_error · rotation_translation_error

इसी category के (gicp)

estimate_covariances


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

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