2

I need to compare the quality of streaming between Linux desktop server and an Android client. So I have two images one from Linux server and the other one from Android client and they have different resolution.

My question is how to calculate SSIM between these two images (I do not need CODE just a direction to the solution). I already have SSIM code in c++ but it will compare between similar resolutions.

THANKS

2 Answers2

3

What you are trying to achieve is not entirely straight-forward. Comparing the objective quality of two images of different resoluition using a metric like SSIM is ill-defined. This is due to a plethora of factors, among the foremost being:

a) Sampling-related, where the comparison of a number of samples in the reference image against a subset of those samples in the downscaled (degraded) image is not particularly meaningful (how do you compare something against nothing?)

b) Due to characteristics of the human visual system, most notably the contrast sensitivity function, which in this case can be summed up as that a human observer will perceive the lightness of the samples differently, due to differing spatial frequencies.

What the way forward is here depends on the actual problem formulation, which is not clear. What is it exactly that you are trying to measure? If you are measuring the quality of a resampling algorithm, that is something for which SSIM is not an appropriate metric. If you are trying to measure the relative quality of two different image sets, then the obvious answer is to create two uncompressed images at the different resolutions, encode and measure them separately, and compare their respective SSIM values.

Do note that the original SSIM does not account for various HVS properties which would come into play, any you may be better off trying to find a different metric. Also, in case you mean to measure the quality of a stream (i.e. video), SSIM is not particularly performant.

awdz9nld
  • 1,663
  • 15
  • 26
0

You could use this workaround: Scale down the bigger image to match the resolution of the smaller image.

After the scale down you can compare the images with the SSIM

giò
  • 3,402
  • 7
  • 27
  • 54