-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
norm with NORM_HAMMING returns strange results #11426
Copy link
Copy link
Closed
Milestone
Description
System information (version)
- OpenCV => 3.4.0
- Operating System / Platform => Windows 10 64 bit
- Compiler => Visual Studio 2015
Detailed description
when using cv2.norm in python using NORM_HAMMING, the results are strange.
For instance the returned distance between 17 and 8 is 0, while clearly 17 = '00010001' and 8 = '00001000'
The real distance is 3.0
Steps to reproduce
a = np.array([8], dtype=np.uint8)
b = np.array([17], dtype=np.uint8)
cv2.norm(a, b, cv2.NORM_HAMMING)
0.0
Reactions are currently unavailable