hough_sphere_3d — 3D detect op

• Data kinds: voxel → primitive

• Call: import fullseye as fs; fs.ledger.hough_sphere_3d(vol, device='cpu', radii=None, mc=0.0, iso=0.5, subvoxel=True) (implementation को सीधे call करना हो तो import match3d; match3d.hough_sphere_3d(vol, device='cpu', radii=None, mc=0.0, iso=0.5, subvoxel=True), registry से लेना हो तो ops3d.get("hough_sphere_3d"))

• GPU: इस op का GPU path है (device="cuda")

उपयोग

sphere detection (2D Hough circle का 3D lift)। हर radius r के लिए centre = p + sgn·r·n पर vote करता है।

पतली boundary surface का हर voxel अपने normal n के साथ center की ओर vote करता है (दोनों sign आज़माए जाते हैं ताकि bright और dark दोनों sphere पकड़े जाएँ)। हर radius के लिए center-peak vote का अधिकतम = detected sphere। votes-vs-radius को parabola interpolation से sub-voxel radius मिलता है। उद्योग में: ball, गोलाकार part, point cloud में spherical surface। Return value (votes, radius, center(3,))।

प्रक्रिया: (vol > iso) की 1 voxel मोटी boundary surface के voxel p और उनके unit normal n (sobel3d; mc raw output पर threshold है) से, हर radius r के लिए c = round(p ± r·n) पर vote किया जाता है (± bright और dark दोनों sphere आज़माता है और ज़्यादा वाला लेता है), और volume के अंदर गिरे vote का अधिकतम उस r का score होता है। सभी r में सबसे बड़ा detected sphere है।

• radii: आज़माए जाने वाले radius (voxel इकाई) का क्रम। None हो तो range(4, 16) (4 से 15)। subvoxel=True

सबसे अच्छे r के दोनों पड़ोसी r±1 radii में हों तभी votes के parabolic interpolation से radius को ±1 के भीतर refine करता है (किनारे वाले r या बिखरे radii में integer ही रहता है)।

• Return value (votes, radius, center): votes vote की संख्या है (boundary voxel की संख्या ऊपरी सीमा), radius float है,

center integer (z,y,x) का tuple है (center refine नहीं होता)।

• boundary voxel 10 से कम हों तो None। radii खाली हो तो TypeError से रुक जाता है।

• केवल 1 sphere लौटाता है। कई sphere के लिए detected sphere के voxel मिटाकर फिर चलाएँ, या point cloud के लिए

ransac_sphere / fit_sphere_3d।

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

• detect_primitives_3d — py -3.11 examples_3d/detect_primitives_3d.py

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

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

इसी category के (detect)

hough_plane_3d


*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.