match_localize op• Data kinds: voxel × voxel → position
• Call: import fullseye as fs; fs.ledger.match_chamfer_3d(scene, template, device='cpu', thr=0.3, edt='scipy') (implementation को सीधे call करना हो तो import match3d; match3d.match_chamfer_3d(scene, template, device='cpu', thr=0.3, edt='scipy'), registry से लेना हो तो ops3d.get("match_chamfer_3d"))
• Ledger के ज़रिए return value: fullseye.ledger.match_chamfer_3d(...) केवल घोषित out type position का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.match_chamfer_3d.raw(...) का उपयोग करें, या match3d.match_chamfer_3d को सीधे call करें।
• GPU: इस op का GPU path है (device="cuda")
chamfer / distance-field matching (partial और occlusion के प्रति robust)। voxel × chamfer column।
Scene के edges के EDT (हर voxel से निकटतम edge तक की दूरी) पर template के edge points रखकर दूरियों का योग minimise करता है। score(pos)=Σ_{template edge} DT_scene(pos+edge)/n। जितना कम, उतना बेहतर match। कुछ edge points गायब हों तब भी काम करता है (NCC से अधिक occlusion-robust)। Correlation (conv3d) हमेशा GPU पर होता है। Distance field edt="scipy" (CPU, default) या edt="jfa" (edt_jfa, पूरा GPU पर, CPU round trip नहीं; scipy से बिल्कुल मेल) है। Return value [chamfer दूरी, d, h, w]।
प्रक्रिया: दोनों volume में |∇| > thr·max|∇| वाले voxel को edge माना जाता है (thr हर volume के अधिकतम gradient के सापेक्ष relative ratio है, gradient sobel3d से)। scene edges का distance transform DT बनाया जाता है, और template के 2-valued edge volume को kernel बनाकर conv3d किया गया मान edge संख्या n से भाग दिया जाता है। Return value [dist, z, y, x] में dist "template के प्रति 1 edge voxel, निकटतम scene edge तक की औसत दूरी (voxel इकाई में)" है, और 0 पूरा match है। Position template center (T//2) का scene coordinate है, और integer है (subvoxel refinement नहीं; चाहिए तो refine_translation_lk पर जाएँ; corner convention है, इसलिए T//2 घटाएँ)। जहाँ template पूरा नहीं समाता, वे positions अधिकतम मान+1 से भरकर बाहर कर दी जाती हैं। Template में कोई edge न हो (thr बहुत ऊँचा आदि) तो score पूरा 0 होता है और index (0,0,0) लौटता है। scene में कोई edge न हो तो distance field का कोई अर्थ नहीं (thr घटाएँ)। edt="jfa" edt_jfa इस्तेमाल करता है और device पर ही पूरा होता है, अन्यथा scipy (CPU)।
• 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 के स्रोत।
• matching_localize — py -3.11 examples_3d/matching_localize.py
position को input के रूप में लेते हैं)refine_peak_newton · refine_translation_lk · refine_lm · fuse_to_voxel
match_localize)match_shape_3d · match_curvature_3d · match_hough_3d · match_mip_2d · match_points_ncc
*Provenance: match3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.