vitali-fedulov/images

Wrong detection

Closed this issue · 3 comments

Hello.

I am trying to compare images with your tool and it works good, except some files.

To reproduce try to compare this image with itself:

https://play-lh.googleusercontent.com/aanOd9yhae5dQXgjwB6XJsGAmGrnkYqiGXNkwtclMuZetDDFkPneG8zOVVAUBhXjMhQ=s512

Your tool will say that it is not similar images.

But your online demo works good with this examples.

Can you help, please?

Hello,

Thanks for using the package. Could you try to encode the file as a high quality jpeg or (another new) png, and see what happens? It could be an encoding problem of the input file, because Go and browsers use own different decoders. Please let us know if this was the issue.

Yes, converting to JPEG helps sometime.

But for example, this image

https://play-lh.googleusercontent.com/XY26ZKTyBJoHFLZVvOb5E0OAr9rgLBnxDhyR3UDVltYI8riZGjSHzt6H4eQCVDMpV4Q

after converting to JPEG (attaching) and compared to itself gives false result

1

Indeed, there was a bug. Thank you for reporting it!

Fixed it: 8a90db9

Please let us know if this change has addressed your case.