pHash (perceptual hash) for duplicates & similar

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, helmut, xnview

Goulu
Posts: 2
Joined: Thu May 29, 2008 12:49 pm

pHash (perceptual hash) for duplicates & similar

Post by Goulu »

Hello,

I suggest indexing all images in the database by a "perceptual hash" . See here : http://www.hackerfactor.com/blog/?/arch ... ke-It.html it's extremely simple and fast. There is a library here to do it : https://www.phash.org/

I use it for a professional project and it's incredible : with a 32 bits key, you can instantaneously (well O(log N) ...) find duplicates in hundreds of thousands of images. And very quickly find similar images.

Since XnView already builds a database, I think this feature would make it the fastest duplicates and similar image finder on Earth. :D
User avatar
xnview
Author of XnView
Posts: 44593
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: pHash (perceptual hash) for duplicates & similar

Post by xnview »

thanks, i'll check it
Pierre.
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am

Re: pHash (perceptual hash) for duplicates & similar

Post by m.Th. »

m. Th.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
jadO
Posts: 490
Joined: Wed Apr 29, 2015 6:36 am

Re: pHash (perceptual hash) for duplicates & similar

Post by jadO »

xnview wrote: Mon Oct 02, 2017 7:24 am thanks, i'll check it
Will that be built into XnViewMP?
User avatar
xnview
Author of XnView
Posts: 44593
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: pHash (perceptual hash) for duplicates & similar

Post by xnview »

yes usefull, but to create it, i need to load image
Pierre.
jadO
Posts: 490
Joined: Wed Apr 29, 2015 6:36 am

Re: pHash (perceptual hash) for duplicates & similar

Post by jadO »

xnview wrote: Tue Mar 16, 2021 3:15 pm yes usefull, but to create it, i need to load image
Is that a problem? From my understanding when a creating thumbnails, the image must be loaded too. So why not combining thumbnailing with hashing?
User avatar
xnview
Author of XnView
Posts: 44593
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: pHash (perceptual hash) for duplicates & similar

Post by xnview »

jadO wrote: Fri Jul 30, 2021 7:51 am
xnview wrote: Tue Mar 16, 2021 3:15 pm yes usefull, but to create it, i need to load image
Is that a problem? From my understanding when a creating thumbnails, the image must be loaded too. So why not combining thumbnailing with hashing?
No, image is not always loaded, when embedded thumbnail is available or small preview
Pierre.