You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The results using the blockhash algorithm in a simple test differed from those of other implementations.
In particular, I compared the blockhash crate (v0.2) and the Python implentation on their results for a 16bit hash of the 16x16_rgb.png image shipped with the blockhash crate (which both produced the same results):
The img_hash program was the hash_image base program modified by #40 and with this configuration:
let hash = HasherConfig::new().hash_size(16,16).hash_alg(img_hash::HashAlg::Blockhash).to_hasher().hash_image(&image);
Most of the difference can be explained by blockhash.py/blockhash-crate and img_hash using different bit orders -- once you flip the bits in the bytes, most of the difference goes away. By majority voting (and without looking into the spec of blockhash), I'm opening this as a bug here -- if you insist this behavior is correct, I'm happy to move it to the other projects.
The remaining two bit errors could be explained by rescaling; is there a hash configuration that can be documented and tested to be produce the exact hashes as the other implementations?
The text was updated successfully, but these errors were encountered:
The results using the blockhash algorithm in a simple test differed from those of other implementations.
In particular, I compared the blockhash crate (v0.2) and the Python implentation on their results for a 16bit hash of the 16x16_rgb.png image shipped with the blockhash crate (which both produced the same results):
The img_hash program was the hash_image base program modified by #40 and with this configuration:
Most of the difference can be explained by blockhash.py/blockhash-crate and img_hash using different bit orders -- once you flip the bits in the bytes, most of the difference goes away. By majority voting (and without looking into the spec of blockhash), I'm opening this as a bug here -- if you insist this behavior is correct, I'm happy to move it to the other projects.
The remaining two bit errors could be explained by rescaling; is there a hash configuration that can be documented and tested to be produce the exact hashes as the other implementations?
The text was updated successfully, but these errors were encountered: