Skip to content
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

assertion failed: i <= 1.0 && i >= 0.0 #94

Closed
mlwilkerson opened this issue Mar 2, 2021 · 4 comments
Closed

assertion failed: i <= 1.0 && i >= 0.0 #94

mlwilkerson opened this issue Mar 2, 2021 · 4 comments

Comments

@mlwilkerson
Copy link

mlwilkerson commented Mar 2, 2021

After updating to dssim 3.0.0 two of my tests fail with:

assertion failed: i <= 1.0 && i >= 0.0

One of them compares an image to itself, and the other compares that image to itself rotated by 90 degrees.

This failure seems to occur only when dssim is built in debug mode.

It can be reproduced by building the cli v3.0.0 in debug mode and running:

$ dssim beer-solid.png beer-solid.png

or

$ dssim beer-solid.png beer-solid-sideways.png

If the cli is built in release mode and the same commands are run, the process completes as expected, reporting the dssim values: 0.00075077 and 1.64705301, respectively.

These images are rendered from the Font Awesome Free beer icon in the Solid style.

Font Awesome Free 5.15.2 by @FontAwesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)

beer-solid-sideways
beer-solid

@kornelski
Copy link
Owner

I can't reproduce. Can you attach the actual images you use?

@mlwilkerson
Copy link
Author

Oh, whoops! Yeah, I had intended to attach those. I've updated the original post with them.

@kornelski
Copy link
Owner

Thanks. It turns out that if you add * 1.1 to an algorithm, you get numbers larger than 1.0. Who knew!?

@mlwilkerson
Copy link
Author

awesome. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants