Check a directory for duplicate images. If a duplicate image is found, it will spit out the names of both images. Supports recursive directory searching.
python setup.py install
$ bin/imgdupcheck test/ test/py-copy-2.png test/py-orig.png test/py-copy.png test/py-2-copy.png test/py-2.png $ bin/imgdupcheck -r test/ test/dups/py-copy-2.png test/dups/py-orig.png test/dups/py-copy.png test/nodups/py-orig.png test/dups/py-2-copy.png test/dups/py-2.png test/nodups/py-2.png
""" python """ import imgdupcheck duplicates = imgdupcheck.check_images('/home/me/images', recursive=True) for dupset in duplicates: imgpaths = " ".join(dupset) print "These are all the same image: %s" % imgpaths import Image img1 = Image.open('py-orig.png') img2 = Image.open('py-copy.png') if imgdupcheck.is_same_image(img1, img2): do_something()
python setup.py test