xmar / 360Transformations

67 stars 16 forks source link

Issue with MS-SSIM function in your code #17

Closed phunm211 closed 7 years ago

phunm211 commented 7 years ago

I think that there is a problem with your MS-SSIM function in file Picture.cpp (line 271)

//overall_mssim = prod(mcs_array(1:level-1).^weight(1:level-1))mssim_array(level); double msssim = mssim[m_nlevs-1]; for (int l=0; l<m_nlevs-1; l++) { msssim = pow(mcs[l], m_mssimWeight[l]); } return msssim;

According to the paper "MULTI-SCALE STRUCTURAL SIMILARITY FOR IMAGE QUALITY ASSESSMENT" of Zhou Wang, the true formula of MS-SSIM is image So I think that in line 272 of your code, it should be

double msssim = mssim[m_nlevs-1] * m_mssimWeight[m_nlevs-1];

phunm211 commented 7 years ago

Sorry, I type wrong. It should be

double msssim = pow(mssim[m_nlevs-1] ,m_mssimWeight[m_nlevs-1]);

xmar commented 7 years ago

Thanks for openning this issue. I applied your fix.