blob_features — BLOB measure op

• 資料種類:labels2d → table

• 呼叫: import fullseye as fs; fs.ledger.blob_features(labels: 'Any', spacing: 'float' = 1.0) -> 'dict'(要直接呼叫實作,import blob2d; blob2d.blob_features(labels: 'Any', spacing: 'float' = 1.0) -> 'dict';從台帳取用則 opsblob.get("blob_features"))

用法

將每個物體的形狀特徵量以每個鍵 1 個陣列的形式回傳。

Parameters

labels : array_like

blob_label 的輸出(整數,背景 0)。

spacing : float

1 個像素的大小[單位/px]。長度乘以它,面積乘以它的 2 次方。

預設 1.0 = 保持像素單位。

Returns

dict

n(物體數)、spacing、units(項目 → 單位的對應),以及

長度為 n 的陣列 19 個(FEATURE_KEYS)。即使物體為 0 個,

也會備齊所有鍵並以空陣列回傳(呼叫方無需分支)。

Notes

• angle 是矩陣座標系中的傾角(+行 → +列 為正 = 螢幕上為順時針)。

• major / minor 是具有相同 2 階矩的橢圓的軸長(4 sqrt(lambda))。並非像素排列的外接範圍,因此對於正方形會比邊長略長 —— 這符合定義,不是誤差。

• circularity 為 4 pi A / P^2。HALCON 的 circularity 是「面積 / 以最遠點為半徑的圓的面積」,是另一回事,因此對照數值時請確認定義。

• touches_border 為 True 的物體,面積與周長都會小掉被截斷的部分。請在計數前捨棄,或讓真值一側也依相同約定計數。

Examples

>>> import numpy as np

>>> m = np.zeros((20, 20), bool); m[4:14, 4:9] = True

>>> f = blob_features(blob_label(m))

>>> int(f["n"]), float(f["area"][0])

(1, 50.0)

詳細使用指南

• blob_analysis 族使用指南

參考(範例資料、文獻)

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

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

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

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

• poc_am_thermal_to_ct — py -3.11 examples/poc_am_thermal_to_ct.py

• poc_bone_trabecular_thickness — py -3.11 examples/poc_bone_trabecular_thickness.py

• poc_bump_coplanarity — py -3.11 examples/poc_bump_coplanarity.py

• poc_fresco_craquelure — py -3.11 examples/poc_fresco_craquelure.py

• poc_gear_tooth_metrology — py -3.11 examples/poc_gear_tooth_metrology.py

• poc_leaf_disease_area — py -3.11 examples/poc_leaf_disease_area.py

• poc_metal_grain_size — py -3.11 examples/poc_metal_grain_size.py

• poc_nuclei_ploidy — py -3.11 examples/poc_nuclei_ploidy.py

• poc_particle_sizing — py -3.11 examples/poc_particle_sizing.py

• poc_particle_tracking — py -3.11 examples/poc_particle_tracking.py

• poc_peg_insertion_tactile — py -3.11 examples/poc_peg_insertion_tactile.py

• poc_print_warpage_risk — py -3.11 examples/poc_print_warpage_risk.py

• poc_pv_thermal_survey — py -3.11 examples/poc_pv_thermal_survey.py

• poc_real_coin_metrology — py -3.11 examples/poc_real_coin_metrology.py

• poc_rotation_invariance_audit — py -3.11 examples/poc_rotation_invariance_audit.py

• poc_sea_ice_concentration — py -3.11 examples/poc_sea_ice_concentration.py

• poc_solar_el_inspection — py -3.11 examples/poc_solar_el_inspection.py

• poc_solder_fillet_aoi — py -3.11 examples/poc_solder_fillet_aoi.py

• poc_traffic_counting — py -3.11 examples/poc_traffic_counting.py

• poc_vessel_network — py -3.11 examples/poc_vessel_network.py

• poc_weld_radiograph_porosity — py -3.11 examples/poc_weld_radiograph_porosity.py

• poc_wound_area_tracking — py -3.11 examples/poc_wound_area_tracking.py

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

—

同類別(measure)

—


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

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