有的时候我们需要对ImageHash进行一些特殊的操作,比如旋转,方法如下:
hash_matrix = Hash_check.hash
new_matrix = np.rot90(hash_matrix, k=-1)
new_hash = imagehash.ImageHash(new_matrix)
如上代码实现的是将Hash右旋90度.
有的时候我们需要对ImageHash进行一些特殊的操作,比如旋转,方法如下:
hash_matrix = Hash_check.hash
new_matrix = np.rot90(hash_matrix, k=-1)
new_hash = imagehash.ImageHash(new_matrix)
如上代码实现的是将Hash右旋90度.