[−][src]Crate blockhash
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::blockhash256; let img = image::open("images/512x512_rgb.png").unwrap(); let hash = blockhash256(&img); assert_eq!( hash.to_string(), "9cfde03dc4198467ad671d171c071c5b1ff81bf919d9181838f8f890f807ff01", );
Feature flags
std
: Enables features that require the Rust Standard Library (enabled by default).image
: Enables integration with theimage
crate.
Structs
Blockhash16 | A 16-bit hash digest. |
Blockhash64 | A 64-bit hash digest. |
Blockhash144 | A 144-bit hash digest. |
Blockhash256 | A 256-bit hash digest. |
BlockhashParseError |
Traits
Image | Provides access to image data. |
Functions
blockhash16 | Generates a 16-bit perceptual hash of an image. |
blockhash64 | Generates a 64-bit perceptual hash of an image. |
blockhash144 | Generates a 144-bit perceptual hash of an image. |
blockhash256 | Generates a 256-bit perceptual hash of an image. |