hough_plane_3d — 3D detect op

• 資料種類:voxel → primitive

• 呼叫: import fullseye as fs; fs.ledger.hough_plane_3d(vol, device='cpu', ndir=200, nd=128, mc=0.0, iso=0.5, tol=1.0)(要直接呼叫實作,import match3d; match3d.hough_plane_3d(vol, device='cpu', ndir=200, nd=128, mc=0.0, iso=0.5, tol=1.0);從台帳取用則 ops3d.get("hough_plane_3d"))

• GPU:該運算子有 GPU 路徑(device="cuda")

用法

平面偵測(2D Hough 直線的 3D 提升)。以梯度=法線,向 (法線 n, 距離 d) 空間投票。

薄邊界面的每個 voxel 向自身法線方向 bin 與 d=n·p 投票 → 峰值=主平面。法線以勝出 bin 內實際法線的平均來精細化,d 取投影的眾數。用於從點雲/voxel 中擷取地面、牆面。回傳值 (n(3,), d, inliers, total)。

步驟:取 (vol > iso) 的 1 voxel 厚的邊界面(佔用 voxel 中經 3³ erosion 後消失者), 以這些 voxel 的單位梯度(sobel3d,mc 是對原始輸出的閾值)作為法線 n。n 折疊到軸 0 分量非負的半球,d = n·p(p 為整數 voxel index (z,y,x))。向 ndir 個參考方向(26 以下為 26 鄰域,更多則為 fibonacci 球)與 nd 個 d bin 投票, 以票數最多 bin 的實際法線平均精細化 n,以向該 n 的投影直方圖眾數附近的中位數精細化 d。回傳值 (n(3,), d, inliers, total):n 為 (z,y,x) 順序的單位法線(numpy float32), 平面為 n·(z,y,x) = d(voxel 單位)。inliers 為 |n·p − d| < tol 的邊界 voxel 數, total 為邊界 voxel 總數(inliers/total 即主平面所佔比例)。

• 邊界 voxel 少於 10 個時 回傳 None(不是例外)。

• 密度 voxel 依 iso 2 值化(若為點數密度,0.5 即「1 個點以上」)。

• 只回傳 1 個平面。多個平面需去掉內點後重新執行,點雲則用 plane_segmentation

/ ransac_plane。

後段:以 distance_point_plane / angle_between_planes 量測。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• detect_primitives_3d — py -3.11 examples_3d/detect_primitives_3d.py

型別可銜接的下一個運算子(可接受 primitive 作為輸入)

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

同類別(detect)

hough_sphere_3d


*Provenance: match3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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