In my image comparision code following: https://www.pyimagesearch.com/2014/09/15/python-compare-two-images/
While using from skimage.measure import structural_similarity as ssim
and then s = ssim(imageA, imageB)
I am getting error:
from skimage.measure import structural_similarity as ssim
ImportError: cannot import name 'structural_similarity'
I found the solution. As this question is unique and not covered anywhere. So, posting the answer.
#from skimage.measure import structural_similarity as ssim from skimage import measure . . . #s = ssim(imageA, imageB) s = measure.compare_ssim(imageA, imageB)
Change commented line to uncommented line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With