I want to use ssim
to compare similarity in 2 images.
I'm getting this error window_shape is incompatible with arr_in.shape
.
Why? (What does it mean?)
from skimage.measure import structural_similarity as ssim
from skimage import io
img1 = io.imread('http://pasteio.com/m85cc2eed18c661bf8a0ea7e43779e742')
img2 = io.imread('http://pasteio.com/m1d45b9c70afdb576f1e3b33d342bf7d0')
ssim( img1, img2 )
Traceback (most recent call last): File "", line 1, in File "/var/www/wt/local/lib/python2.7/site-packages/skimage/measure/_structural_similarity.py", line 58, in structural_similarity XW = view_as_windows(X, (win_size, win_size)) File "/var/www/wt/local/lib/python2.7/site-packages/skimage/util/shape.py", line 221, in view_as_windows raise ValueError("
window_shape
is incompatible witharr_in.shape
") ValueError:window_shape
is incompatible witharr_in.shape
I get the same error even when I feed it the same file twice ssim(img1,img1)
ssim(img1, img2, multichannel=True)
– FlytrapTypeError: structural_similarity() got an unexpected keyword argument 'multichannel'
, not available in the current stable release (0.11.3) . Tried to install the dev release, but fails due to dependency issues – Owlishfrom skimage import color; img1 = color.rgb2gray(img1)
etc. – Flytrap