hash opphash × phash → measurementimport fullseye as fs; fs.ledger.hash_distance(hash1, hash2) -> 'int' (実装を直接呼ぶなら import imgforensics; imgforensics.hash_distance(hash1, hash2) -> 'int'、台帳から引くなら opsimgforensics.get("hash_distance"))2 つの知覚ハッシュのハミング距離(異なるビット数)。
dtype と長さを検査して fail-closed する。float の 1-D を受け取って
!= で数えると、ほぼ確実に「全ビット違う」= 最大距離という
もっともらしい 値が出る —— それは型の取り違えであって画像の違いではない。
返りは Python の int(measurement 語彙)。ビット長で割った
正規化距離が欲しければ hash_distance(a, b) / a.size。
py -3.11 examples/image_forensics_audit.pymeasurement を入力に取れる)hash)Provenance: imgforensics.py — IMGFORENSICS operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.