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

SSIM.ssim_value() broken #32

Open
JuriAbramov opened this issue Feb 13, 2019 · 3 comments
Open

SSIM.ssim_value() broken #32

JuriAbramov opened this issue Feb 13, 2019 · 3 comments

Comments

@JuriAbramov
Copy link

PIL (no longer) supports image multiplication with * operator, causing error:

File ".../lib/python3.6/site-packages/ssim/ssimlib.py", line 126, in ssim_value
img_mat_12 = self.img.img_gray * target.img_gray
TypeError: unsupported operand type(s) for *: 'Image' and 'Image'

One needs to add ndarray conversion, like cw_ssim_value() counterpart.

@jterrace
Copy link
Owner

Looks like it's still passing on Travis CI:
https://travis-ci.org/jterrace/pyssim

Is python 3.6 the missing part? We're only testing 3.4 and 3.5 at the moment.

@jterrace
Copy link
Owner

@JuriAbramov
Copy link
Author

I think the difference to your test is that I do not pass gaussian_kernel_1d to SSIM constructor, like you do on line 238, after which the greyscale conversion has a different type.

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