-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color hashing with alpha channel? #122
Comments
How about projecting onto a white or black background and removing the alpha channel? Presumably you want two images that look the same. |
Images containing 100% transparent background usually have RGB channels as (0,0,0), so even manual projection is unnecessary. However, the blacks (or whites) can occur in the image itself, which would probably make the colorhash more lossy, but that can still work as a workaround.
But that still is a workaround which will be more precise, but require 2x computations. It would be nice if there existed a colorhash alternative with the support for alpha channels. |
You mean including a rounded fraction of the image with 100% transparency? |
Yes |
Can you post here how you extract a alpha channel image (which is I guess then used as a grayscale image)? From that it should be easy to compute the transparent fraction. |
The new colorhash is great, it gives me the possibility to hash images based on color; combining that with other hash (aHash etc) lets users find matching images with great accuracy.
However, I am now working with images with alpha channels, which make difference a lot. Is there any possibility to hash images including the alpha channel into the hash? I haven't found any papers on this topic, but if there is a way, it would be great to include it into this library.
The text was updated successfully, but these errors were encountered: