Fix whash for images with invalid sizes, add remove_ll option for whash, remove multi hash

This commit is contained in:
2020-04-26 14:46:20 -04:00
parent b17c7f70a1
commit a37c08c11b
11 changed files with 38 additions and 301 deletions

View File

@@ -30,6 +30,3 @@ fastimagehash v0.1
![ahash_s](results/ahash_small.png)
![ahash_l](results/ahash_large.png)
**multi_hash**
![multi_s](results/multi_small.png)
![multi_l](results/multi_large.png)

View File

@@ -37,15 +37,3 @@ print_result("ahash", timeit.timeit(
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
))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -34,6 +34,4 @@ for f in files:
method = "ahash"
if "whash" in m:
method = "whash"
if "multi" in m:
method = "multi"
print("%s_%s,%s" % (f, method, t))