Finding duplicated photo

Dan Stromberg drsalists at gmail.com
Fri Jul 8 11:29:13 EDT 2011


On Fri, Jul 8, 2011 at 8:16 AM, Thomas Jollans <t at jollybox.de> wrote:

> On 07/08/2011 01:29 PM, TheSaint wrote:
> > Hello,
> >
> > I came across the problem that Gwenview moves the photo from the camera
> > memory by renaming them, but later I forgot which where moved.
> > Then I tought about a small script in python, but I stumbled upon my
> > ignorance on the way to do that.
> >
> > PIL can find similar pictures. I was thinking to reduce the foto into
> gray
> > scale and resize them to same size, what algorithm should take place?
> > Is PIL able to compare 2 images?
> >
>
> If Gwenview simply moves/renames the images, is it not enough to compare
> the actual files, byte by byte?
>

This'll detect duplicates pretty fast; it often doesn't even need to read a
whole file once, while not sacrificing accuracy:

http://stromberg.dnsalias.org/~dstromberg/equivalence-classes.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110708/2f9d41e8/attachment-0001.html>


More information about the Python-list mailing list