A Rust library for calculating perceptual hash values of images using multiple algorithms.
img_hash is a Rust library that calculates perceptual hash values from images using algorithms like aHash, dHash, pHash, and Blockhash.io. It generates compact representations of visual content that can be compared to detect similar or duplicate images efficiently. The library solves the problem of quickly identifying visually similar images without comparing raw pixel data.
Rust developers working on image processing applications, computer vision systems, or content management systems that need duplicate image detection or similarity search capabilities.
Developers choose img_hash because it provides multiple proven perceptual hashing algorithms in a single, well-documented Rust crate with seamless integration with the popular image crate. Its focus on stable Rust support and clean API makes it reliable for production use.
A Rust library for calculating perceptual hash values of images
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements established algorithms like aHash, dHash, pHash, and Blockhash.io, allowing developers to choose based on accuracy vs. speed trade-offs for different use cases.
Works directly with buffers from the popular PistonDevelopers/image crate, simplifying image loading and processing without extra dependencies.
Provides Hamming distance calculation between hashes, enabling straightforward similarity measurement and duplicate detection with minimal code.
Builds on stable Rust for production reliability, as highlighted in the README, though benchmarking requires nightly.
Requires Rust nightly to run benchmarks, which complicates performance testing for teams committed to stable toolchains.
Based on algorithms documented in 2014, potentially missing newer perceptual hashing advancements or optimizations.
Focuses solely on perceptual hashing; not suitable for exact pixel matching, cryptographic needs, or advanced computer vision tasks.