I want to use the Structural Similarity Index (SSIM)

import cv2
import os
import numpy as np
import matplotlib.pyplot as plt
from skimage import measure

# convert the images to grayscale
im1cr = cv2.cvtColor(im1cr, cv2.COLOR_BGR2GRAY)
im2cr = cv2.cvtColor(im2cr, cv2.COLOR_BGR2GRAY)
error, diff = mse(im1cr, im2cr)
error_sim= measure.compare_ssim(im1cr, im2cr)

But it return with the folllowing failure:

Traceback (most recent call last): File "<.......Path>", line 5, in from skimage import measure

File "geometry.pyx", line 1, in init skimage._shared.geometry ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

I tried to update the numpy with pip, but it did not help

Any Idea.

Thanks in Advance

0

There are 0 answers