-
Notifications
You must be signed in to change notification settings - Fork 79
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
Wrong phash value for 195x64 images #34
Comments
I conducted a little experiment to help characterize the family of image sizes that cause the algorithm to "fail". It seems that the problem is really with aspect ratios more than with sizes. The results suggest that any image with an aspect ratio greater than 3, as well as any image with an aspect ratio lesser than 1/2, will cause the algorithm to fail. I wrote a program that creates a bunch of images like the following: Specifically, it creates all images like that with dimensions between The upper blue region of the output image corresponds to input images with aspect ratio greater than The lower blue region of the output image corresponds to input images with aspect ratio lesser than The yellow region of the output image corresponds to input images with aspect ratio between As you can see, this failure space looks like a cone, and is pretty regular, but, somewhat unexpectedly, the image with size |
The phash is all 0 when the image is more than 194 pixels wide and has a height of 64 pixels or less, e.g. a resolution of 195x64 pixels.
Steps to reproduce:
Problem:
projs.nb_pix_perline
at index 134 is not changed, i.e. this value is 0projs.nb_pix_perline[134]
(nb_pixels):The text was updated successfully, but these errors were encountered: