Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. img_hash

img_hash

Apache-2.0Rust

A Rust library for calculating perceptual hash values of images using multiple algorithms.

GitHubGitHub
339 stars69 forks0 contributors

What is img_hash?

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.

Target Audience

Rust developers working on image processing applications, computer vision systems, or content management systems that need duplicate image detection or similarity search capabilities.

Value Proposition

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.

Overview

A Rust library for calculating perceptual hash values of images

Use Cases

Best For

  • Detecting duplicate images in content management systems
  • Building reverse image search functionality
  • Implementing copyright detection for image databases
  • Creating image deduplication pipelines
  • Developing visual similarity features for media applications
  • Comparing image modifications and transformations

Not Ideal For

  • Applications requiring cryptographic image hashing for security or integrity verification
  • Projects needing real-time perceptual hashing on 4K+ resolution video streams
  • Teams heavily invested in Python or JavaScript ecosystems for image analysis
  • Use cases demanding deep learning-based image similarity or object detection

Pros & Cons

Pros

Multiple Algorithm Support

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.

Seamless Image Crate Integration

Works directly with buffers from the popular PistonDevelopers/image crate, simplifying image loading and processing without extra dependencies.

Built-in Comparison Methods

Provides Hamming distance calculation between hashes, enabling straightforward similarity measurement and duplicate detection with minimal code.

Stable Rust Compatibility

Builds on stable Rust for production reliability, as highlighted in the README, though benchmarking requires nightly.

Cons

Nightly Rust for Benchmarking

Requires Rust nightly to run benchmarks, which complicates performance testing for teams committed to stable toolchains.

Outdated Algorithm References

Based on algorithms documented in 2014, potentially missing newer perceptual hashing advancements or optimizations.

Limited to Perceptual Hashing

Focuses solely on perceptual hashing; not suitable for exact pixel matching, cryptographic needs, or advanced computer vision tasks.

Frequently Asked Questions

Quick Stats

Stars339
Forks69
Contributors0
Open Issues8
Last commit2 years ago
CreatedSince 2014

Tags

#no-std-optional#perceptual-hashing#duplicate-detection#image-processing#rust-library#computer-vision#hamming-distance

Built With

R
Rust

Included in

Rust56.6k
Auto-fetched 5 hours ago

Related Projects

imageimage

Encoding and decoding images in Rust

Stars5,811
Forks709
Last commit3 days ago
opencv-rustopencv-rust

Rust bindings for OpenCV

Stars2,448
Forks184
Last commit8 days ago
cvcv

Rust CV mono-repo. Contains pure-Rust dependencies which attempt to encapsulate the capability of OpenCV, OpenMVG, and vSLAM frameworks in a cohesive set of APIs.

Stars1,051
Forks71
Last commit11 months ago
imageprocimageproc

Image processing operations

Stars965
Forks179
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub