SHINE Toolbox mssim Error

3 views (last 30 days)
Ceren
Ceren on 13 May 2024
Answered: Ayush Singh on 16 May 2024
Hello,
When I use luminance match code in SHINE Toolbox, I get ssim error which I write below. Whan can I do to fix error?
Output argument "mssim" (and possibly others) not assigned a value in the execution with "ssim_index" function.
Error in SHINE (line 400)
mssim = ssim_index(images_orig{im},images{im});

Answers (1)

Ayush Singh
Ayush Singh on 16 May 2024
Hi Ceren
As per the error message shared by you it suggests to me that 'mssim' was not assigned a value when 'ssim_index' function is used.
I can suggest one workaround just based on the above information:
If you are not specifically tied to a custom ssim_index function, MATLAB's built-in ssim function is recommended for calculating the Structural Similarity Index. You can replace your ssim_index call with ssim like below:
[mssim, ssim_map] = ssim(images_orig{im}, images{im});
The ssim function returns the mean SSIM value (mssim) and the SSIM map (ssim_map) for the two images. Ensure that both images are of the same size and type. If they are not, you may need to resize or convert them before calling ssim.
For more information on ssim you can refer here:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!