# Рассчитаем хэш
_hash = ""
for x in range(8):
for y in range(8):
val = threshold_image[x, y]
if val == 255:
_hash = _hash + "1"
else:
_hash = _hash + "0"
return _hash
def CompareHash(hash1, hash2):
l = len(hash1)
i = 0
count = 0
while i < l:
if hash1[i] != hash2[i]:
count = count + 1
i = i + 1
hash1 = CalcImageHash('depth_data/etalon.png')
hash2 = CalcImageHash('depth_data/25.png') #мне нужно воткнуть сюда цикл
print(hash1)
print(hash2)
print(CompareHash(hash1, hash2))