Since humans usually use contrast, color, and frequency changes in their image quality measures,^{22} the SSIM uses the luminance, contrast, and structure comparison shown in Fig. 1.^{8}^{,}^{22} The SSIM of two images $x$ and $y$ is defined by the combination $f()$ of three components as follows:^{8}Display Formula
$SSIM(x,y)=f[l(x,y),c(x,y),s(x,y)],$(3)
where $l$, $c$, and $s$ are the luminance, contrast, and structure comparison functions, respectively, defined by Display Formula$l(x,y)=2\mu x\mu y+C1\mu x2+\mu y2+C1,$(4)
Display Formula$c(x,y)=2\sigma x\sigma y+C2\sigma x2+\sigma y2+C2,$(5)
Display Formula$s(x,y)=\sigma xy+C3\sigma x\sigma y+C3,$(6)
where $\mu x$ and $\sigma x$ denote the mean and the standard deviation of $x$; $\mu y$ and $\sigma y$ denote the mean and the standard deviation of $y$; $\sigma xy$ denotes the covariance between $x$ and $y$; and $C1$, $C2$, and $C3$ are constants used to avoid instability when the denominators are very close to zero. The values of $l$, $c$, and $s$ are in [0, 1] and they indicate higher similarities for each comparison function when the values are close to 1. The local statistics are calculated within the local window having circular symmetric Gaussian weights, which are $w={wi|i=1,2,\u2026,N}$ and $\u2211i=1Nwi=1$ as follows: Display Formula$\mu x=\u2211i=1Nwixi,$(7)
Display Formula$\sigma x=[\u2211i=1Nwi(xi\u2212\mu x)2]1/2,$(8)
Display Formula$\sigma xy=\u2211i=1Nwi(xi\u2212\mu x)(yi\u2212\mu y),$(9)
where $i$ is an index of the pixels in the Gaussian window and $N$ is the total pixel number of the Gaussian window.