## SSIM (Structural Similarity)

#### General info

Metric type

full-reference image metric

Value range

(images are different) -1..1 (images are same)

Value interpretation

bigger is better quality

MSU VQMT implementations

OpenCL (recommended),
CUDA

MSU VQMT visualization

pixel-wise

Available colorspaces

Y, U, V, YUV, R, G, B, RGB

Output values

metric value

Aggregated values

standard set

MSU VQMT usages

-metr ssim [over <color components>]
-metr ssim_precise [over <color components>]
-metr ssim_gpu_id [over <color components>]
-metr ssim_cuda [over <color components>]
-metr ssim [over <color components>] -dev <OpenCL device>

original paper (Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli)

#### Algorithm description

Main idea of the structure similarity index (SSIM) is to compare distortion of three image components:

• Luminance comparison
• Contrast comparison
• Structure comparison

This algorithm uses some window function $W_{i,j}$, $i,j=0..N$ and performs convolution with this window, defined as follows:

In fast implementation, it uses box window: $W_{i,j}=\frac1{(N+1)^2}$, in other implementations (precise, CUDA, OpenCL, GPU identical) it uses Gaussian window with σ= 1.5, N=10. You can note, that formula above uses negative $U$ indexes, and indexes out of image area. We should define image values outside of it’s edge. In VQMT we spread closest edge pixel to the desired position.

SSIM uses the following convolutions:

And the computed SSIM in each pixel by the following formula:

where $C_1=0.01^2$, $C_2=0.03^2$. Destination metric value is arithmetic mean of SSIM values for each pixel. You also can see SSIM for each individual pixel on visualization.

GPU identical, CUDA, OpenCL implementations should produce very similar result. They use Gaussian window as presice implementation. Value of Presice implementation can differs from these ones.

#### Benchmark

Choose benchmark:
Implementation System & settings Colors Resolution FPS Sec. per frame
VQMT 14.0 OpenCL OpenCL Y HD 720p 328.18 0.004
VQMT 14.0 OpenCL OpenCL Y FullHD 1080p 168.97 0.007
VQMT 14.0 OpenCL OpenCL Y 4K 2160p 47.15 0.024
VQMT 14.0 superfast multithreaded Y HD 720p 547.15 0.003
VQMT 14.0 superfast multithreaded Y FullHD 1080p 268.06 0.005
VQMT 14.0 superfast multithreaded Y 4K 2160p 57.31 0.02
VQMT 14.0 fast multithreaded Y HD 720p 207.4 0.006
VQMT 14.0 fast multithreaded Y FullHD 1080p 93.27 0.012
VQMT 14.0 fast multithreaded Y 4K 2160p 22.23 0.052
VQMT 14.0 precise multithreaded Y HD 720p 114.37 0.01
VQMT 14.0 precise multithreaded Y FullHD 1080p 51.73 0.021
VQMT 14.0 precise multithreaded Y 4K 2160p 12.52 0.097
VQMT 14.0 superfast singlethreaded Y HD 720p 167.23 0.007
VQMT 14.0 superfast singlethreaded Y FullHD 1080p 82.57 0.013
VQMT 14.0 superfast singlethreaded Y 4K 2160p 22.67 0.046
VQMT 14.0 fast singlethreaded Y HD 720p 49.93 0.021
VQMT 14.0 fast singlethreaded Y FullHD 1080p 24.23 0.043
VQMT 14.0 fast singlethreaded Y 4K 2160p 6.28 0.171
VQMT 14.0 precise singlethreaded Y HD 720p 44.45 0.024
VQMT 14.0 precise singlethreaded Y FullHD 1080p 21.53 0.049
VQMT 14.0 precise singlethreaded Y 4K 2160p 5.53 0.195
VQMT 14.0 OpenCL OpenCL YUV HD 720p 139.09 0.008
VQMT 14.0 OpenCL OpenCL YUV FullHD 1080p 72.87 0.015
VQMT 14.0 OpenCL OpenCL YUV 4K 2160p 20.67 0.057
VQMT 14.0 superfast multithreaded YUV HD 720p 394.5 0.004
VQMT 14.0 superfast multithreaded YUV FullHD 1080p 187.15 0.007
VQMT 14.0 superfast multithreaded YUV 4K 2160p 42.5 0.027
VQMT 14.0 fast multithreaded YUV HD 720p 83.48 0.013
VQMT 14.0 fast multithreaded YUV FullHD 1080p 37.32 0.03
VQMT 14.0 fast multithreaded YUV 4K 2160p 8.29 0.153
VQMT 14.0 precise multithreaded YUV HD 720p 42.91 0.025
VQMT 14.0 precise multithreaded YUV FullHD 1080p 19.23 0.058
VQMT 14.0 precise multithreaded YUV 4K 2160p 4.68 0.275
VQMT 14.0 superfast singlethreaded YUV HD 720p 117.32 0.009
VQMT 14.0 superfast singlethreaded YUV FullHD 1080p 56.61 0.019
VQMT 14.0 superfast singlethreaded YUV 4K 2160p 18.8 0.057
VQMT 14.0 fast singlethreaded YUV HD 720p 20.39 0.051
VQMT 14.0 fast singlethreaded YUV FullHD 1080p 9.15 0.115
VQMT 14.0 fast singlethreaded YUV 4K 2160p 2.29 0.473
VQMT 14.0 precise singlethreaded YUV HD 720p 17.81 0.059
VQMT 14.0 precise singlethreaded YUV FullHD 1080p 7.9 0.134
VQMT 14.0 precise singlethreaded YUV 4K 2160p 1.99 0.546
Measurements were done on VQMT 14.0 BETA r12792 PRO for Windows.
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 8 cores
GPU: NVIDIA CUDA/GeForce GTX 660 Ti
Values can vary depending on system configuration, input format and other factors
Implementation System & settings Colors Resolution FPS Sec. per frame
VQMT 13.1 OpenCL OpenCL Y HD 720p 339.83 0.004
VQMT 13.1 OpenCL OpenCL Y FullHD 1080p 167.01 0.007
VQMT 13.1 OpenCL OpenCL Y 4K 2160p 44.57 0.025
VQMT 13.1 fast multithreaded Y HD 720p 233.06 0.005
VQMT 13.1 fast multithreaded Y FullHD 1080p 102.66 0.011
VQMT 13.1 fast multithreaded Y 4K 2160p 23.67 0.049
VQMT 13.1 precise multithreaded Y HD 720p 114.89 0.01
VQMT 13.1 precise multithreaded Y FullHD 1080p 51.22 0.021
VQMT 13.1 precise multithreaded Y 4K 2160p 12.35 0.096
VQMT 13.1 fast singlethreaded Y HD 720p 55.71 0.019
VQMT 13.1 fast singlethreaded Y FullHD 1080p 26.34 0.039
VQMT 13.1 fast singlethreaded Y 4K 2160p 7.06 0.15
VQMT 13.1 precise singlethreaded Y HD 720p 44.79 0.023
VQMT 13.1 precise singlethreaded Y FullHD 1080p 21.42 0.049
VQMT 13.1 precise singlethreaded Y 4K 2160p 5.54 0.192
Measurements were done on VQMT 13.1 r12792 PRO for Windows.
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 8 cores
GPU: NVIDIA CUDA/GeForce GTX 660 Ti
Values can vary depending on system configuration, input format and other factors
Implementation System & settings Colors Resolution FPS Sec. per frame
VQMT 14.0 OpenCL OpenCL Y HD 720p 986.1 0.003
VQMT 14.0 OpenCL OpenCL Y FullHD 1080p 526.14 0.005
VQMT 14.0 OpenCL OpenCL Y 4K 2160p 72.32 0.022
VQMT 14.0 superfast multithreaded Y HD 720p 1283.81 0.002
VQMT 14.0 superfast multithreaded Y FullHD 1080p 648.72 0.004
VQMT 14.0 superfast multithreaded Y 4K 2160p 65.73 0.023
VQMT 14.0 fast multithreaded Y HD 720p 854.27 0.003
VQMT 14.0 fast multithreaded Y FullHD 1080p 204.12 0.009
VQMT 14.0 fast multithreaded Y 4K 2160p 54.93 0.048
VQMT 14.0 precise multithreaded Y HD 720p 582.73 0.004
VQMT 14.0 precise multithreaded Y FullHD 1080p 190.36 0.009
VQMT 14.0 precise multithreaded Y 4K 2160p 55.06 0.045
VQMT 14.0 superfast singlethreaded Y HD 720p 142.32 0.007
VQMT 14.0 superfast singlethreaded Y FullHD 1080p 54.24 0.019
VQMT 14.0 superfast singlethreaded Y 4K 2160p 19.54 0.052
VQMT 14.0 fast singlethreaded Y HD 720p 26.99 0.037
VQMT 14.0 fast singlethreaded Y FullHD 1080p 12.65 0.08
VQMT 14.0 fast singlethreaded Y 4K 2160p 3.5 0.296
VQMT 14.0 precise singlethreaded Y HD 720p 35.35 0.028
VQMT 14.0 precise singlethreaded Y FullHD 1080p 18.98 0.053
VQMT 14.0 precise singlethreaded Y 4K 2160p 5.35 0.193
VQMT 14.0 OpenCL OpenCL YUV HD 720p 368.49 0.005
VQMT 14.0 OpenCL OpenCL YUV FullHD 1080p 201.04 0.009
VQMT 14.0 OpenCL OpenCL YUV 4K 2160p 52.51 0.035
VQMT 14.0 superfast multithreaded YUV HD 720p 1111.23 0.003
VQMT 14.0 superfast multithreaded YUV FullHD 1080p 402.11 0.006
VQMT 14.0 superfast multithreaded YUV 4K 2160p 109.49 0.021
VQMT 14.0 fast multithreaded YUV HD 720p 286.64 0.007
VQMT 14.0 fast multithreaded YUV FullHD 1080p 161.71 0.014
VQMT 14.0 fast multithreaded YUV 4K 2160p 33.61 0.136
VQMT 14.0 precise multithreaded YUV HD 720p 216.48 0.008
VQMT 14.0 precise multithreaded YUV FullHD 1080p 97.35 0.018
VQMT 14.0 precise multithreaded YUV 4K 2160p 21.35 0.161
VQMT 14.0 superfast singlethreaded YUV HD 720p 79.12 0.013
VQMT 14.0 superfast singlethreaded YUV FullHD 1080p 38.22 0.027
VQMT 14.0 superfast singlethreaded YUV 4K 2160p 13.3 0.077
VQMT 14.0 fast singlethreaded YUV HD 720p 11.32 0.089
VQMT 14.0 fast singlethreaded YUV FullHD 1080p 5.28 0.193
VQMT 14.0 fast singlethreaded YUV 4K 2160p 1.48 0.705
VQMT 14.0 precise singlethreaded YUV HD 720p 17.71 0.057
VQMT 14.0 precise singlethreaded YUV FullHD 1080p 8.34 0.122
VQMT 14.0 precise singlethreaded YUV 4K 2160p 2.28 0.458
Measurements were done on VQMT 14.0 BETA r12792 PRO for Linux.
CPU: Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz, 64 cores
GPU: NVIDIA CUDA/TITAN RTX
Values can vary depending on system configuration, input format and other factors

#### Example (SSIM Precise)

Choose example:
Original
LQ H264, SSIM Precise-y=0.8847
MSU VQMT visualization
Original
Blurring, SSIM Precise-y=0.8663
MSU VQMT visualization
Original
Random points, SSIM Precise-y=0.9819
MSU VQMT visualization
Original
Luminance shift, SSIM Precise-y=0.9994
MSU VQMT visualization
Original
JPEG Q=2, SSIM Precise-y=0.7503
MSU VQMT visualization
Original
JPEG Q=5, SSIM Precise-y=0.8036
MSU VQMT visualization
Original
JPEG Q=10, SSIM Precise-y=0.8749
MSU VQMT visualization
Original
JPEG Q=15, SSIM Precise-y=0.9072
MSU VQMT visualization
Original
JPEG Q=20, SSIM Precise-y=0.9264
MSU VQMT visualization
Original
JPEG Q=40, SSIM Precise-y=0.9584
MSU VQMT visualization
Original
JPEG Q=80, SSIM Precise-y=0.9829
MSU VQMT visualization
Choose example:
Original
LQ H264, SSIM Precise-y=0.9297
MSU VQMT visualization
Original
Blurring, SSIM Precise-y=0.8920
MSU VQMT visualization
Original
Random points, SSIM Precise-y=0.9698
MSU VQMT visualization
Original
Luminance shift, SSIM Precise-y=0.9031
MSU VQMT visualization
Original
JPEG Q=2, SSIM Precise-y=0.7616
MSU VQMT visualization
Original
JPEG Q=5, SSIM Precise-y=0.6345
MSU VQMT visualization
Original
JPEG Q=10, SSIM Precise-y=0.9107
MSU VQMT visualization
Original
JPEG Q=15, SSIM Precise-y=0.8431
MSU VQMT visualization
Original
JPEG Q=20, SSIM Precise-y=0.9447
MSU VQMT visualization
Original
JPEG Q=40, SSIM Precise-y=0.9329
MSU VQMT visualization
Original
JPEG Q=80, SSIM Precise-y=0.9769
MSU VQMT visualization
Choose example:
Original
LQ H264, SSIM Precise-y=0.5167
MSU VQMT visualization
Original
Blurring, SSIM Precise-y=0.7149
MSU VQMT visualization
Original
Random points, SSIM Precise-y=0.9867
MSU VQMT visualization
Original
Luminance shift, SSIM Precise-y=0.9794
MSU VQMT visualization
Original
JPEG Q=2, SSIM Precise-y=0.5039
MSU VQMT visualization
Original
JPEG Q=5, SSIM Precise-y=0.6630
MSU VQMT visualization
Original
JPEG Q=10, SSIM Precise-y=0.7873
MSU VQMT visualization
Original
JPEG Q=15, SSIM Precise-y=0.8428
MSU VQMT visualization
Original
JPEG Q=20, SSIM Precise-y=0.8726
MSU VQMT visualization
Original
JPEG Q=40, SSIM Precise-y=0.9273
MSU VQMT visualization
Original
JPEG Q=80, SSIM Precise-y=0.9711
MSU VQMT visualization

#### Example (SSIM Fast)

Choose example:
Original
LQ H264, SSIM Fast-y=0.8768
MSU VQMT visualization
Original
Blurring, SSIM Fast-y=0.8613
MSU VQMT visualization
Original
Random points, SSIM Fast-y=0.9790
MSU VQMT visualization
Original
Luminance shift, SSIM Fast-y=0.9994
MSU VQMT visualization
Original
JPEG Q=2, SSIM Fast-y=0.7188
MSU VQMT visualization
Original
JPEG Q=5, SSIM Fast-y=0.7840
MSU VQMT visualization
Original
JPEG Q=10, SSIM Fast-y=0.8700
MSU VQMT visualization
Original
JPEG Q=15, SSIM Fast-y=0.9069
MSU VQMT visualization
Original
JPEG Q=20, SSIM Fast-y=0.9281
MSU VQMT visualization
Original
JPEG Q=40, SSIM Fast-y=0.9613
MSU VQMT visualization
Original
JPEG Q=80, SSIM Fast-y=0.9847
MSU VQMT visualization
Choose example:
Original
LQ H264, SSIM Fast-y=0.9243
MSU VQMT visualization
Original
Blurring, SSIM Fast-y=0.8898
MSU VQMT visualization
Original
Random points, SSIM Fast-y=0.9674
MSU VQMT visualization
Original
Luminance shift, SSIM Fast-y=0.9072
MSU VQMT visualization
Original
JPEG Q=2, SSIM Fast-y=0.7503
MSU VQMT visualization
Original
JPEG Q=5, SSIM Fast-y=0.6349
MSU VQMT visualization
Original
JPEG Q=10, SSIM Fast-y=0.9090
MSU VQMT visualization
Original
JPEG Q=15, SSIM Fast-y=0.8463
MSU VQMT visualization
Original
JPEG Q=20, SSIM Fast-y=0.9454
MSU VQMT visualization
Original
JPEG Q=40, SSIM Fast-y=0.9347
MSU VQMT visualization
Original
JPEG Q=80, SSIM Fast-y=0.9771
MSU VQMT visualization
Choose example:
Original
LQ H264, SSIM Fast-y=0.4727
MSU VQMT visualization
Original
Blurring, SSIM Fast-y=0.7193
MSU VQMT visualization
Original
Random points, SSIM Fast-y=0.9859
MSU VQMT visualization
Original
Luminance shift, SSIM Fast-y=0.9815
MSU VQMT visualization
Original
JPEG Q=2, SSIM Fast-y=0.4962
MSU VQMT visualization
Original
JPEG Q=5, SSIM Fast-y=0.6672
MSU VQMT visualization
Original
JPEG Q=10, SSIM Fast-y=0.8031
MSU VQMT visualization
Original
JPEG Q=15, SSIM Fast-y=0.8592
MSU VQMT visualization
Original
JPEG Q=20, SSIM Fast-y=0.8883
MSU VQMT visualization
Original
JPEG Q=40, SSIM Fast-y=0.9385
MSU VQMT visualization
Original
JPEG Q=80, SSIM Fast-y=0.9763
MSU VQMT visualization

#### Legacy notes

In VQMT 14 implemented SSIM Superfast. Also SSIM can be applied to three components simulteneously.