Page 1 of 1
Perceptual Hash
Posted: 2014-01-31T10:23:19-07:00
by magick
A perceptual hash maps visually identical images to the same or similar hash-- useful in image retrieval, authentication, indexing, or copy detection as well as digital watermarking. See Tests Of Perceptual Hash (PHASH) Compare Metric @
http://www.fmwconcepts.com/misc_tests/p ... index.html for a detailed discussion. Thanks to Fred Weinhaus for the design based on a modification of this paper:
http://www.naturalspublishing.com/files ... g3omq1.pdf.
Note, perceptual hash is supported in ImageMagick 6.8.8-3. There will be an algorithm correction to properly handle "zero" image moments (e.g. in an all black image) in the upcoming 6.8.8-5 release.
Re: Perceptual Hash
Posted: 2014-01-31T11:12:45-07:00
by fmw42
The algorithm is under review and may change for the next release such that values are different for non-black images. But the concept is demonstrated in the current documentation referenced above.
Re: Perceptual Hash
Posted: 2014-02-10T14:12:07-07:00
by fmw42
The algorithm has been changed now in IM 6.8.8.5 and some values are only slightly different than in IM 6.8.8.3 and 6.8.8.4. Documentation and examples can be found at
http://www.fmwconcepts.com/misc_tests/p ... index.html
Re: Perceptual Hash
Posted: 2016-08-23T21:19:47-07:00
by fmw42
User snibgo has done some extensive testing. His test and result can be found at
http://im.snibgo.com/phashtest.htm
Re: Perceptual Hash
Posted: 2016-11-25T13:02:11-07:00
by fmw42
As of IM 7.0.3.8, the perceptual hash now allows one to choose up to six colorspace and allows the phash compare metric to be normalized per number of channels. It is not implemented in IM 6. See
http://www.imagemagick.org/script/comma ... php#define
Re: Perceptual Hash
Posted: 2016-11-25T14:25:06-07:00
by snibgo
Good stuff.
Re: Perceptual Hash
Posted: 2016-11-25T15:20:40-07:00
by fmw42
snibgo wrote:Good stuff.
Check it out and make sure it is working properly. The selection of individual channels was not implemented yet. Magick only had limit time to do what was the easier parts. It is only in IM 7.