#fingerprint #hash #perceptual #blockhash

blockhash

A perceptual hashing algorithm for detecting similar images

4 releases (breaking)

0.4.0 Mar 29, 2022
0.3.0 Aug 12, 2021
0.2.0 May 26, 2020
0.1.0 May 14, 2020

#131 in Images

Download history 55/week @ 2022-03-04 54/week @ 2022-03-11 61/week @ 2022-03-18 55/week @ 2022-03-25 38/week @ 2022-04-01 46/week @ 2022-04-08 46/week @ 2022-04-15 43/week @ 2022-04-22 81/week @ 2022-04-29 59/week @ 2022-05-06 95/week @ 2022-05-13 39/week @ 2022-05-20 44/week @ 2022-05-27 63/week @ 2022-06-03 12/week @ 2022-06-10 11/week @ 2022-06-17

131 downloads per month

MIT license

1MB
671 lines

blockhash

A perceptual hashing algorithm for detecting similar images.

Crates.io

This is an implementation of the Blockhash algorithm, and can produce 16-, 64-, 144-, and 256-bit perceptual hashes.

Documentation

License

This project is licensed under the MIT license.


lib.rs:

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:

# #[cfg(all(feature = "image"))] {
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 the image crate.

Dependencies