Add multi_hash (wip/untested)

This commit is contained in:
2019-12-26 16:58:32 -05:00
parent 514e53b934
commit 5ebbcf2845
10 changed files with 259 additions and 8 deletions

View File

@@ -36,3 +36,16 @@ print_result("ahash", timeit.timeit(
stmt="average_hash(Image.open('%s'), hash_size=%d)" % (IMAGE, SIZE),
number=COUNT
))
print_result("multi", timeit.timeit(
setup="from imagehash import average_hash,phash,whash,dhash \n"
"from PIL import Image",
stmt="im = Image.open('%s');"
"size = %d;"
"average_hash(im.copy(), hash_size=size);"
"phash(im.copy(), hash_size=size);"
"whash(im.copy(), hash_size=size, remove_max_haar_ll=False);"
"dhash(im.copy(), hash_size=size);"
% (IMAGE, SIZE),
number=COUNT
))