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

Returns NaN when width and height are not divisible by window size #1

Open
georeith opened this issue Jul 13, 2016 · 0 comments
Open

Comments

@georeith
Copy link

georeith commented Jul 13, 2016

Comparing two images I get NaN as the returned MS-SSIM value unless the width and height of them is divisible by the window size.

However SSIM often returns correctly. Inspecting it appears one of the SSIM comparisons always returns NaN and by multiplying them together the overall becomes NaN.

I have also noticed the test browser incorrectly specifies image width, where it uses the default width instead of canvas.width:

ctx.drawImage(img, 0, 0, width, canvas.height);

ctx.drawImage(img, 0, 0, width, canvas.height);

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

1 participant