to_points — 3D transform op

• 資料種類:voxel × points × mesh × depth × gaussians → points

• 呼叫: import fullseye as fs; fs.ledger.to_points(data, kind, samples=20000, **kw)(要直接呼叫實作,import fuse3d; fuse3d.to_points(data, kind, samples=20000, **kw);從台帳取用則 ops3d.get("to_points"))

用法

任意 3D 結構 → 點群(共同表示)。把全部 5 種結構統一到一個入口。

kind: "points"(N,3)/ "mesh"=(vertices,faces)/ "depth"=depth+{fx,fy,cx,cy[,stride]}/

"voxel"=密度 grid+{iso}/ "3dgs"=means(N,3)。

各 kind 的轉換(依實作):

• "points" / "3dgs": 只回傳 np.asarray(data, float)(不檢查形狀。傳入 (N, 3) 是呼叫端的責任)。

• "mesh": data = (vertices, faces)。以 match3d.mesh_to_points 做依面積加權的均勻取樣,得 samples 個點(預設 20000,seed 固定 = 決定性)。

• "depth": data 為深度圖 (H, W),kw 中 fx, fy, cx, cy 必要(缺少則 KeyError),stride 可選(預設 1,抽取)。以 match3d.depth_to_points 的針孔反投影,僅將 depth > 0 的像素變為 (x, y, z) 點(相機座標,x = 行方向,y = 列方向,z = 深度)。

• "voxel": 以 kw["iso"](預設 0.5)對密度 grid (D, H, W) 做閾值, 將 np.argwhere 的 整數 index 座標 (z, y, x) 轉為 float 作為點雲。不轉換為物理座標(不乘 spacing)。

回傳值: (N, 3) float64。kind 不屬於以上任何一種時 ValueError。samples 在 "mesh" 以外被忽略。

注意: "voxel" 的座標為陣列 index 順序 (z, y, x),"depth" 為相機座標 (x, y, z),各種類的軸含義不同。以 register_cross / fuse_to_voxel 混合不同種類時,須由呼叫端統一這一差異。

參考(範例資料、文獻)

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

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

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

• transforms_repr — py -3.11 examples_3d/transforms_repr.py

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

points_to_voxel · gaussians_to_voxel · estimate_point_normals · match_points_ncc · match_pca · moment_axes · icp_point2point_3d · icp_point2plane

同類別(transform)

points_to_voxel · gaussians_to_voxel · mesh_to_voxel · mesh_to_points · depth_to_points · voxel_to_mips · voxel_to_mesh · tsdf_from_depth


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

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