Crate blockhash

source ·
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 the image crate (enabled by default).

Structs§

Traits§

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.