https://github.com/v2e4lisp/imagephash
phash binding for perl ( http://phash.org )
https://github.com/v2e4lisp/imagephash
perl-module phash
Last synced: 12 months ago
JSON representation
phash binding for perl ( http://phash.org )
- Host: GitHub
- URL: https://github.com/v2e4lisp/imagephash
- Owner: v2e4lisp
- Created: 2017-01-15T12:03:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T20:24:18.000Z (over 6 years ago)
- Last Synced: 2025-03-05T15:24:29.616Z (over 1 year ago)
- Topics: perl-module, phash
- Language: C++
- Homepage:
- Size: 1.78 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
Awesome Lists containing this project
README
=head1 ImagePhash
ImagePhash - Perl binding for pHash (http://phash.org)
=head1 SYNOPSIS
use ImagePhash qw(pdiff phash);
my $hash1 = phash("img1.jpg");
my $hash2 = phash("img1.png");
my $diff = pdiff($hash1, $hash2);
=head1 DESCRIPTION
Measure similarity between images.
=head2 EXPORT
None by default.
phash($img)
Calculate a perceptual hash for an image and returns a 16-byte long lowercase hex string
which itself represents a 64bit unsinged integer.
pdiff($hash1, $hash2)
Calculate the hamming distance between the two image hashes and returns a positive integer less than 64.
A small value means that the two images look similar to each other.
=head1 INSTALL
=over 4
=item *
For linux, libjpeg-dev and libpng-dev are requried.
=item *
For Mac, ImageMagic and libjpeg are required.
=item *
Windows is not supported.
=back
perl Makefile.PL
make
make test
make install
=head1 SEE ALSO
=over 4
=item *
http://phash.org
=item *
phash bindings for other languages https://github.com/clearscene/pHash/tree/master/bindings
=item *
How to automatically identify similar images using phash http://cloudinary.com/blog/how_to_automatically_identify_similar_images_using_phash
=back
=head1 AUTHOR
Wenjun Yan, Ewenjun.yan.dev@gmail.comE
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2017 by Wenjun Yan
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.18.2 or,
at your option, any later version of Perl 5 you may have available.