hash op• 資料種類:phash × phash → measurement
• 呼叫: import fullseye as fs; fs.ledger.hash_distance(hash1, hash2) -> 'int'(要直接呼叫實作,import imgforensics; imgforensics.hash_distance(hash1, hash2) -> 'int';從台帳取用則 opsimgforensics.get("hash_distance"))
兩個感知雜湊的漢明距離(不同位元數)。
檢查 dtype 和長度,fail-closed(失敗即拒絕)。若接受 float 的 1-D 並以 != 計數,幾乎必然得到「全部位元都不同」= 最大距離這個 *看似合理*的值 —— 那是型別混淆,而不是影像的差異。
回傳 Python 的 int(measurement 詞彙)。若需要除以位元長的正規化距離,用 hash_distance(a, b) / a.size。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• 演算法的正典(作者、年份)與用途見上面的族使用指南。
• image_forensics_audit — py -3.11 examples/image_forensics_audit.py
measurement 作為輸入)hash)*Provenance: imgforensics.py — IMGFORENSICS 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.