Does SSIM depend on intensity scale of the images ?

10 views (last 30 days)
I have one phantom image(say ref) which is the ground truth and intensity range is [0 1]. Now I have another image(img) in the intensity range [-I I] where I is a positive real number. Now I have three cases of the img -
Img1=img; %same image Img2=img/max(img(:)) ;%max normalized to 1 temp=img-min(img(:)); Img3=temp/max(temp(:));normalized to [0 1]
Now I calculate SSIMs for these three images- SSIM1=ssim(Img1,ref); SSIM2=ssim(Img2,ref); SSIM3=ssim(Img3,ref);
I need to know which is the correct implementation of SSIM ? How does scaling effect ssim ?

Answers (1)

Prasanna
Prasanna on 22 Aug 2024
Hi Kaushik,
When using the Structural Similarity Index Measure (SSIM) to compare images, the scaling and normalization of the intensity values can significantly affect the results. SSIM is sensitive to changes in luminance and contrast, as it aims to mimic human visual perception. Therefore, the intensity range of the images being compared can influence the SSIM score.
For a fair comparison with SSIM, both images should ideally be in the same intensity range. Therefore, Img3 which normalizes "imgto ([0,1]), is the most appropriate for calculating SSIM against "ref". The correct implementation of SSIM depends on the context and what you are trying to measure. If you want to compare the structural similarity without considering the intensity range differences, normalizing the images to the same range (like in "Img3") is often preferred. This way, you are comparing the structural content rather than the absolute intensity values.
The effect of scaling in SSIM is essentially with respect to contrast and luminance sensitivity. Changing the image can lead to a change in contrast and luminance which can affect the SSIM value. Normalizing both images to the same range helps ensure that SSIM reflects structural similarity rather than differences in intensity scaling.
For more information about ‘ssim’, refer the following documentation: https://www.mathworks.com/help/images/ref/ssim.html
Hope this helps!

Tags

Community Treasure Hunt

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

Start Hunting!