Project

dhashion

0.0
No commit activity in last 3 years
No release in over 3 years
Lagrangian dHash in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.13.4, ~> 2.13
 Project Readme

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.

Additional information