mesh_to_voxel — 3D transform op

資料種類:meshvoxel

呼叫: import fullseye as fs; fs.ledger.mesh_to_voxel(vertices, faces, size, bounds=None, samples=40000, device='cpu', smooth=0.8)(要直接呼叫實作,import match3d; match3d.mesh_to_voxel(vertices, faces, size, bounds=None, samples=40000, device='cpu', smooth=0.8);從台帳取用則 ops3d.get("mesh_to_voxel"))

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

用法

mesh(頂點+面)→ 密度 voxel。面上均勻取樣 → splat(把 mesh 列接到所有方法)。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

三角形上の一様点は barycentric(sqrt トリック)。占有 voxel が要るなら閾値化する。

手順: 各三角形の面積に比例して `samples 個の面を選び(default_rng(0)` の固定 seed

→ 毎回同じ点)、面内一様な barycentric 点を作って `points_to_voxel に渡す(smooth`

既定 0.8 voxel)。`faces は (F,3) の頂点 index、vertices` は (V,3)。

退化面(面積 0)しか無い mesh は確率が NaN になり `rng.choice` が ValueError を出す。

`bounds=None` ならサンプル点の min/max(mesh の bbox とほぼ一致するが、サンプル次第で

僅かに内側)。`bounds の検証・範囲外 clip は points_to_voxel` と同じ。

返り値 `(size, size, size)` float64 の点密度(占有ではない。占有が要るなら閾値で

2 値化)。軸順は頂点座標の列順。seed を変えたい・点群も欲しいときは `mesh_to_points` で

点群を作ってから `points_to_voxel` へ。

參考(範例資料・文獻)

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

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

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

transforms_reprpy -3.11 examples_3d/transforms_repr.py

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

voxel_to_mips · voxel_to_mesh · signed_distance_field · to_points · sobel3d · hessian3d · curvature_maps · edt_jfa

同類別(transform)

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


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

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