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
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 1 and 128i.e.1x128, 128x1, 128x128 and 64x48 are all part of the input set. For each image MxNI compute the hash and store the result into pixel (M,N) of a separate 128x128 output image. I use the color blue to indicate that the hash is zero and the color yellow to indicate non-zero. This is the result.
The upper blue region of the output image corresponds to input images with aspect ratio greater than 3.
The lower blue region of the output image corresponds to input images with aspect ratio lesser than 0.5.
The yellow region of the output image corresponds to input images with aspect ratio between 0.5 and 3, such as the 64x48 above whose aspect ratio is 4:3.
As you can see, this failure space looks like a cone, and is pretty regular, but, somewhat unexpectedly, the image with size 60x119 has hash zero, despite the aspect ratio being greater than 0.5.
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: