Skip to content
Latchkey

What Is a Perceptual Hash?

A perceptual hash condenses an image into a short fingerprint that reflects how the image looks rather than its exact bytes. Two visually similar images produce hashes that differ by only a few bits, so the distance between hashes measures similarity. This makes it useful for matching images that have been resized, recompressed, or lightly edited.

Why it matters

Byte-for-byte comparison reports a difference for trivial recompression. A perceptual hash tolerates that noise, so visual tests and deduplication flag genuinely different images instead of harmless encoding changes.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →