Expand description
A perceptual hashing algorithm for detecting similar images.
This is an implementation of the Blockhash algorithm, and can produce 16-, 64-, 144-, and 256-bit perceptual hashes.
§Examples
Basic usage:
use blockhash::blockhash64;
let img = image::open("images/example.png").unwrap();
let hash = blockhash64(&img);
assert_eq!(hash.to_string(), "c7c48f8989c77e0c");
§Feature flags
std
: Enables features that require the Rust Standard Library (enabled by default).image
: Enables integration with theimage
crate (enabled by default).
Structs§
- A 16-bit hash digest.
- A 64-bit hash digest.
- A 144-bit hash digest.
- A 256-bit hash digest.
- An error that can be returned when parsing a hexadecimal string into a hash digest.
Traits§
- Image data.
Functions§
- Generates a 16-bit perceptual hash of an image.
- Generates a 64-bit perceptual hash of an image.
- Generates a 144-bit perceptual hash of an image.
- Generates a 256-bit perceptual hash of an image.