metrics op• 資料種類:points × points → signal
• 呼叫: import fullseye as fs; fs.ledger.m3c2_distance(a, b, cores, normals, radius, max_depth=None, min_points=4)(要直接呼叫實作,import metrics3d; metrics3d.m3c2_distance(a, b, cores, normals, radius, max_depth=None, min_points=4);從台帳取用則 ops3d.get("m3c2_distance"))
• 經台帳呼叫的回傳值: fullseye.ledger.m3c2_distance(...) 只回傳宣告的 out 型別 signal 的值(底層函式還會回傳輔助資訊)。需要被捨棄的部分時,請用 fullseye.ledger.m3c2_distance.raw(...),或直接呼叫 metrics3d.m3c2_distance。
沿法線方向測量 2 個時間點點雲之間的差異(M3C2)。→ (distance, lod) 這 2 個值。
最近鄰距離(chamfer / C2C)是「到最近點的距離」,因此 在傾斜面上連沿著面的偏移也會算作距離。在地形、結構物的變化偵測中,這是「僅僅重新量測就被偵測出的假變化」的主因(poc_structure_4d_deterioration
的實測:零劣化、僅重新量測,C2C 的中位數就為 21.07 mm,沿法線方向則為 0.55 mm)。
M3C2(Lague 2013)對每個 core 點以 以法線 n 為軸的圓柱(半徑 radius、長度 max_depth)截取兩個點雲,回傳各點投影到 n 上的平均值之差。方向以 n 所指的一側為正 —— 符號直接就是「增加 / 減少」。
Args:
a:時刻 1 的點雲 (Na,3)。
b:時刻 2 的點雲 (Nb,3)。
cores:量測位置 (M,3)(可以是 a 的子集合,也可以是另行配置的網格)。
normals:每個 core 的法線 (M,3)(可不正規化。符號決定結果的符號)。
radius:圓柱的半徑(在 core 周圍取平均的範圍。取得比面的粗糙度大、比想量測的
結構小)。
max_depth:圓柱長度的一半。None 時不限制軸向。
min_points:任一側點數不足此數的 core 回傳 nan(預設 4)。
Returns:
(distance, lod):皆為 (M,) float64。distance 是沿法線方向的
帶正負號差,lod(level of detection)為
1.96·sqrt(σa²/na + σb²/nb) —— 不超過此值的差無法與雜訊區分。
點數不足的 core 兩者皆為 nan。
★經由台帳(fullseye.ledger.m3c2_distance)時只回傳宣告的 out 型別
distance。還需要 lod 時用 fullseye.ledger.m3c2_distance.raw(...)。
Raises:
ValueError:點雲 / cores 不是 (N,3)、為空、normals 的數量與 cores
不符、radius <= 0、max_depth <= 0、min_points < 1 時。
局限(honest):(1) 法線由呼叫端給出 —— estimate_point_normals 的預設符號以重心為基準,不用 viewpoint 或 orient_normals 統一方向的話符號會因位置而翻轉。(2) lod 只考慮雜訊,不包含對位殘差(Lague 的原論文把對位誤差作為獨立一項加上)。
(3) 圓柱內點數少的邊緣處為 nan —— 不會回傳 0 而讓人
誤以為「沒有變化」。
Reference (public): D. Lague, N. Brodu, J. Leroux, "Accurate 3D comparison of complex topography with terrestrial laser scanner: application to the Rangitikei canyon (N-Z)", ISPRS Journal of Photogrammetry and Remote Sensing 82 (2013) 10-26.
• blender_interop — 與 Blender 搭配使用 —— 在 Blender 中建形、用 fullseye 量測(座標軸、單位、真值資料的陷阱)
• measurement_uncertainty — 量測不確定度與校正知識 —— 為了能主張「量得準」
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• metrics_eval — py -3.11 examples_3d/metrics_eval.py
signal 作為輸入)metrics)chamfer_distance · hausdorff_distance · fscore · rmse_correspondence · normal_consistency · voxel_iou · pose_error
*Provenance: metrics3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.