Dhashion
Lagrangian dHash for Ruby
Installation
$ gem install dhashion
Usage
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.