Skip to content

9elt/fast-dhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast dhash

A fast rust implementation of the perceptual hash "dhash".

The main difference with other rust implementations, and the reason it is called "fast", is that it doesn't use grayscale and resize_exact image methods, therefore running about ~50% faster

basic usage

use fast_dhash::Dhash;

use image;
use std::path::Path;

fn main() {
    let path = Path::new("../image.jpg");
    let image = image::open(path);

    if let Ok(image) = image {
        let hash = Dhash::new(&image);
        println!("hash: {}", hash);
        // hash: d6a288ac6d5cce14
    }
}

About

A fast rust implementation of dhash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages