Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manelli/dhashion
dHash in Ruby
https://github.com/manelli/dhashion
Last synced: 7 days ago
JSON representation
dHash in Ruby
- Host: GitHub
- URL: https://github.com/manelli/dhashion
- Owner: manelli
- License: mit
- Created: 2014-12-15T01:34:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-15T18:29:35.000Z (almost 10 years ago)
- Last Synced: 2024-04-24T16:04:18.402Z (7 months ago)
- Language: Ruby
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Dhashion
### _Lagrangian dHash for Ruby_
---## Installation
$ gem install dhashion
## Usage
```ruby
img1 = Dhashion::Image.new('img1_filepath.jpg')
img2 = Dhashion::Image.new('img2_filepath.jpg')Dhashion.distance(img1.fingerprint, img2.fingerprint)
```## Description
Dhashion is a Ruby implementation for the _dHash_ (difference hashing) algorithm.
Unlike other perceptual hashing algorithms like _aHash_ (average values) and
_pHash_ (frequency patterns), _dHash_ tracks gradients.Dhashion specifically uses ImageMagick's _Lagrange_ filter when resizing the
image.## Additional information
* http://www.hackerfactor.com/blog/?/archives/529-Kind-of-Like-That.html
* http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
* http://www.imagemagick.org/Usage/filter/#lagrange