pymerlin.iq.ssim

pymerlin.iq.ssim(img1, img2, kw=11, sigma=0)[source]

Calculate the Structural Similarity Index Measure

Wang, Z., Bovik, A. C., Sheikh, H. R., & Simoncelli, E. P. (2004). Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4), 600–612. https://doi.org/10.1109/TIP.2003.819861

Parameters
  • img1 (np.array) – Reference Image

  • img2 (np.array) – Comparison image

  • kw (int, optional) – Kernel width. Defaults to 11.

  • sigma (int, optional) – Gaussian window sigma. Defaults to 0.

Returns

Mean SSIM, SSIM image

Return type

float, np.array