Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby wrapper around pHash, the perceptual hash library for detecting duplicate multimedia files
tree: 39a5070ce4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext/phashion_ext
lib
test
.document
.gitignore
CHANGES.md
LICENSE
README.md
Rakefile
TODO.md
phashion.gemspec

README.md

Phashion

Phashion is a Ruby wrapper around the pHash library, "perceptual hash", which detects duplicate and near duplicate multimedia files (images, audio, video). The wrapper currently only supports images.

See an overview of Phashion on my blog.

Installation

You install it just like any other Ruby gem:

gem install phashion

Phashion is somewhat involved to install as it has a few dependencies. I've wrapped up those dependencies into a custom tarball that is built locally just for this gem so you don't have to do anything special. See the code in ext/phashion_ext for more details.

Because of this complexity, it is possible the gem install will fail on your platform. I've tested it on Mac OSX 10.6 and Ubuntu 8.04 but please contact me if you have installation problems.

If you have an error upon install, like:

ld: library not found for -ljpeg

you need to install libjpeg. "brew install libjpeg" or "port install jpeg" on OSX.

Usage

require 'phashion'
img1 = Phashion::Image.new(filename1)
img2 = Phashion::Image.new(filename2)
img1.duplicate?(img2)
--> true

Author

Mike Perham, http://mikeperham.com, http://twitter.com/mperham, mperham AT gmail.com

Copyright

Copyright (c) 2010 Mike Perham. See LICENSE for details.

Something went wrong with that request. Please try again.