feature_register op• Data kinds: points × points → pose
• Call: import fullseye as fs; fs.ledger.register_spin(src, dst, device='cpu', n_keypoints=220, normal_k=18, support_radius=None, n_alpha=16, n_beta=16, support_angle_deg=60.0, lowe_ratio=0.85, ransac_iters=4000, inlier_thr=None, min_inliers=8, seed=0) (implementation को सीधे call करना हो तो import feat_spin; feat_spin.register_spin(src, dst, device='cpu', n_keypoints=220, normal_k=18, support_radius=None, n_alpha=16, n_beta=16, support_angle_deg=60.0, lowe_ratio=0.85, ransac_iters=4000, inlier_thr=None, min_inliers=8, seed=0), registry से लेना हो तो ops3d.get("register_spin"))
Spin Image descriptor + RANSAC से initial guess के बिना sparse-feature rigid alignment।
2 point cloud src (N,3), dst (M,3) को प्रारंभिक pose की किसी पूर्व जानकारी के बिना register करता है। हर point के normal (local PCA, sign को centroid से बाहर की ओर एक-सा किया गया = rigid transform में invariant) को axis मानकर पड़ोसी points को (α=axis से दूरी, β=axis की दिशा में ऊँचाई) के 2D histogram में "घुमाकर (spin)" जमा किया जाता है; इस तरह Spin Image descriptor (Johnson & Hebert 1997) हर keypoint के लिए बनता है, descriptor space में nearest neighbour से match किया जाता है (Lowe ratio test से छाँटकर), और RANSAC (3 point का न्यूनतम sample + Kabsch) से outlier के प्रति robust rigid transform का अनुमान लगाया जाता है। dense matching (NCC/phase correlation/Hough) या PCA principal axis alignment से अलग, यह बड़े rotation + आंशिक overlap में भी local feature के correspondence से pose वापस पा सकता है, इसलिए ICP के पहले चरण (coarse init देने) में उपयोगी है। लौटाया गया pose dst ~= src @ R.T + t (= R @ src_i + t) की convention का पालन करता है (icp_point2point_3d जैसा ही)।
Args:
src: (N,3) चलने वाला point cloud (numpy.ndarray या torch.Tensor)।
dst: (M,3) स्थिर (reference) point cloud।
device: torch device ("cpu" आदि)। SVD/अंतिम pose इसी पर हल होते हैं।
n_keypoints: हर point cloud से निकाले जाने वाले keypoint की संख्या (समान अंतराल पर subsampling)।
normal_k: normal estimation में उपयोग होने वाले पड़ोसी points की संख्या (local PCA)।
support_radius: Spin Image का support radius। None हो तो हर point cloud के अलग-अलग मापे गए bbox diagonal (बड़ा वाला)
का 0.30 गुना (अज्ञात translation से दूषित न हो, इसलिए union पर नहीं बल्कि अलग-अलग मापा जाता है)।
n_alpha, n_beta: Spin Image के (α, β) bin की संख्या (descriptor n_alpha*n_beta आयामी होता है)।
support_angle_deg: support angle का threshold (डिग्री)। केवल वे support points जमा होते हैं जिनका normal keypoint normal से
इस कोण के भीतर हो (occlusion और पिछली सतह के प्रति robust)। >=90 पर निष्क्रिय।
lowe_ratio: Lowe ratio test का threshold (केवल d1 < ratio*d2 वाले correspondence लिए जाते हैं)।
ransac_iters: RANSAC iterations की संख्या।
inlier_thr: RANSAC का inlier distance threshold। None हो तो bbox diagonal का 0.04 गुना।
min_inliers: किसी pose को वैध मानने के लिए न्यूनतम inlier संख्या (ok का निर्णय)।
seed: RANSAC का random seed।
Returns:
R: (3,3) torch.Tensor। dst ~= src @ R.T + t को संतुष्ट करने वाला rotation।
t: (3,) torch.Tensor। translation।
info: dict। "n_matches" (ratio test पास करने वाले correspondence), "inliers" (RANSAC अंतिम),
"inlier_ratio", "rmse" (inliers पर RMSE), "support_radius",
"inlier_thr", "ok" (क्या min_inliers या अधिक है)।
ध्यान दें:
• descriptor normal के sign पर निर्भर है। centroid से बाहर की ओर sign एक-सा करना उन आकृतियों में काम करता है जिनके normal लगभग radial हों और n·(p-centroid) का sign स्थिर हो (lumpy बंद सतह आदि)। पतली प्लेट या नली जैसी आकृतियों में, जहाँ n·(p-centroid)≈0 वाले क्षेत्र अधिक हों, 2 cloud के बीच sign उलट सकता है।
• plane या sphere जैसे हिस्से, जहाँ curvature स्थान में एक-सा हो, descriptor को degenerate कर देते हैं और ratio test में correspondence गायब हो जाते हैं (feature-रहित आकृतियों के लिए अनुपयुक्त)। overlap लगभग 60% से नीचे जाने पर सफलता दर तेजी से गिरती है, और विफलता पर RANSAC ज्यामितीय रूप से संगत पर गलत हल पर अटक सकता है, जिससे विनाशकारी त्रुटि होती है (ok / inlier_ratio gate साथ में उपयोग करने की सलाह है)।
• blas_threads_and_memory — Matrix decompositions धीमे क्यों हैं — BLAS threads, caches, memory layout
• 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 के स्रोत।
• feature_register — py -3.11 examples_3d/feature_register.py
pose को input के रूप में लेते हैं)fuse_to_voxel · pose_error · bundle_adjust · mean_reprojection_error · optimize_pose_graph · relative_pose · mean_edge_error · rotation_translation_error
feature_register)harris3d_keypoints · iss_keypoints · compute_fpfh · shot_descriptor · register_fpfh · register_shot
*Provenance: feat_spin.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.