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
It would be good to have a canonical set of reference images (like the ones included in the testing projects), with a matching set of reference hashes for various component sizes (X and Y). This would greatly help with testing and verifying new implementations.
I'm currently implementing a C# port of BlurHash (BlurSharp), and am in the process of writing tests for the encode function. Using the colour Doughnut image pic2.png from the python testing project, I get differing results from the current implementations:
My result is obviously wrong (incorrect average colour), but this highlights that it is difficult to test a new implementation when even the existing reference implementations return differing results that both look correct at a glance. Without running the image through all existing implementations, it is difficult to know which ones are correct.
The text was updated successfully, but these errors were encountered:
I'm not sure the algorithm is specified quite tightly enough to warrant creating references at the moment. Colour space conversions will affect the result slightly, and there is no specification of what exactly it should be, nor have I checked thoroughly that all implementations are strict enough about it.
The whole algorithm is all about rough approximations anyway, and I am not sure if such strictness is even desirable.
It would be good to have a canonical set of reference images (like the ones included in the testing projects), with a matching set of reference hashes for various component sizes (X and Y). This would greatly help with testing and verifying new implementations.
I'm currently implementing a C# port of BlurHash (BlurSharp), and am in the process of writing tests for the encode function. Using the colour Doughnut image pic2.png from the python testing project, I get differing results from the current implementations:
https://blurha.sh/:
LSM=%_00?^H?OpV]R.E1R*X9R%bH
blurhash-python:
LlMF%n00%#MwS|WCWEM{R*bbWBbH
BlurSharp:
LlF?k*00?ZE2kQaejFM{WAocWBj?
My result is obviously wrong (incorrect average colour), but this highlights that it is difficult to test a new implementation when even the existing reference implementations return differing results that both look correct at a glance. Without running the image through all existing implementations, it is difficult to know which ones are correct.
The text was updated successfully, but these errors were encountered: