Oct-27-2022, 06:53 AM
Dear deanhystad,
thanks a lot for your very good answer!!
I will try your solution...
You asked where to get information about the distance.hamming function:
Just to know what is happening inside I will try your solution with the following function:
That's what I know/found about the hamming function:
It counts (=variable "count") the digits of the one string which differs from the other string.
The 2 strings have to be of the same length.
The higher the amount of the variable count, the more the one string differs from the other.
The hamming distance is a measure of how much 2 strings differs.
The hamming distance can be used for strings, binary...
In this case the to strings, which are to be compared, are the hash strings of 2 images.
Greetings,
flash77
thanks a lot for your very good answer!!
I will try your solution...
You asked where to get information about the distance.hamming function:
Just to know what is happening inside I will try your solution with the following function:
That's what I know/found about the hamming function:
It counts (=variable "count") the digits of the one string which differs from the other string.
The 2 strings have to be of the same length.
The higher the amount of the variable count, the more the one string differs from the other.
The hamming distance is a measure of how much 2 strings differs.
The hamming distance can be used for strings, binary...
In this case the to strings, which are to be compared, are the hash strings of 2 images.
def hdist(str1, str2): i = 0 count = 0 while (i<len(str1)): if (str1[i] != str[i]): count = += 1 i += 1 return count str1 = "testa" str2 = "testb" print(hdist(str1, str2))Because I'm currently professional restrained it will take some time until I implemented your solution.
Greetings,
flash77