joint_entropy — IMGMETRICS information op

• 資料種類:image2d × image2d → scalar

• 呼叫: import fullseye as fs; fs.ledger.joint_entropy(a, b, bins=64, data_range=None)(要直接呼叫實作,import imgmetrics; imgmetrics.joint_entropy(a, b, bins=64, data_range=None);從台帳取用則 opsimgmetrics.get("joint_entropy"))

用法

聯合熵 H(A, B) [bit]。

公式:對 joint_histogram(a, b, bins, data_range) 的全部格子(僅 p > 0)取 -sum(p log2 p)。

• a、b:同形、有限。dtype 和 data_range 的處理與 joint_histogram 相同(float 不在 [0, 1] 時必須明確給出)。

• bins:2 以上的整數。值依賴於分箱數 —— 上限為 2 log2(bins) (預設 64 時為 12 bit)。與別處的數值比較時要統一 bins 和 data_range。

• 回傳值:Python 的 float,單位 bit,0 以上。2 張都均勻時為 0。H(A) + H(B) - H(A, B) 即互資訊(mutual_information)。

• 失敗(MetricContractError):形狀不同 / 為空 / 非有限 / bins < 2 / 無法推定 data_range。

作為對位(registration)的目標函數,與 mutual_information / normalized_mutual_information 一起使用。

詳細使用指南

• image_difference_metrics 族使用指南

參考(範例資料、文獻)

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

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

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

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

• image_quality_metrics — py -3.11 examples/image_quality_metrics.py

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

luma_limited_u8 · rank_data · tid2013_index

同類別(information)

image_entropy · mutual_information · normalized_mutual_information · joint_histogram


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

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