# Prospects of Structural Similarity Index for Medical Image Analysis
## 3 Current Improvement in SSIM
### Gradient-Based SSIM  
Gradient-based SSIM (GSSIM) was the upgraded version of SSIM after realizing that the original SSIM has a defect in evaluating badly blurred images. The concept was derived by [PERSON] et al. in 2006 when comparing the similarity values between the \"Cameraman\" image with Gaussian white noise and a blurred image [16]. The original SSIM showed a similarity score contrary to human perception by presenting a low MSSIM for a Gaussian white-noise-contaminated image while exhibiting a high similarity score for a blurred image. The image with Gaussian noise was perceived more subjectively than the blurred image, and by identifying this flaw, a GSSIM attempts to resolve this discrepancy. The background of GSSIM emphasizes the sensitivity of the human eye in detecting the edge and contour information. From these two pieces of information, a human can capture the image structure from the scene. Therefore, to modify the original SSIM into GSSIM, the essential image processing insight is highlighting the edge of the images. In the original article on GSSIM, [PERSON] et al. utilized a Sobel operator to spot the edges in the images because it simply generates masks and implements them over the entire image. The Sobel masks consist of two \(3\times 3\) windows as filters, namely vertical and horizontal edge masks. Figure 3 shows the Sobel operator masks. The vertical mask \(G_{x}\) exposes the vertical edges, whereas the horizontal mask \(G_{y}\) discovers the horizontal edges in the images. The magnitude of the gradient, otherwise known as a gradient vector, can be calculated by  
\[G=\sqrt{\left(G_{x}\right)^{2}+\left(G_{y}\right)^{2}}=\left|G_{x}\right|+ \left|G_{y}\right|, \tag{16}\]  
and the edge angles can be formulated as  
\[\theta_{G}=tan^{-1}\frac{G_{y}}{G_{x}}\,. \tag{17}\]  
By applying the masks over the entire image and using Equation (16), we can obtain a gradient map indicating the edge and contour information [68]. Figure 3: Sobel operator masks for detecting the edge. Once we acquire the reference image gradient map \(\mathbf{X}^{\prime}\) and noise-contaminated image gradient map \(\mathbf{Y}\), the calculation technique for GSSIM is similar to that of SSIM by changing the contrast comparison \(c_{g}\) and structure comparison \(s_{g}\) as follows:  
\[c_{g}(\mathbf{x},\mathbf{y})=\frac{2\sigma_{x^{\prime}}\sigma_{y^{\prime}}+C_{2}}{\sigma _{x^{\prime}}^{2}+\sigma_{y^{\prime}}^{2}+C_{2}}\, \tag{18}\]  
\[s_{g}(\mathbf{x},\mathbf{y})=\frac{\sigma_{x^{\prime}y^{\prime}}+C_{3}}{\sigma_{x^{ \prime}}\sigma_{y^{\prime}}+C_{3}}\, \tag{19}\]  
where \(\sigma_{x^{\prime}}\) is the standard deviation of vector \(\mathbf{x}^{\prime}\), \(\sigma_{y^{\prime}}\) denotes the standard deviation of vector \(\mathbf{y}^{\prime}\), and \(\sigma_{x^{\prime}y^{\prime}}\) is the covariance for vectors \(\mathbf{x}^{\prime}\) and \(\mathbf{y}^{\prime}\). Hence, GSSIM can be written as  
\[GSSIM(\mathbf{x},\mathbf{y})=[l(\mathbf{x},\mathbf{y})]^{\alpha}\cdot[c_{g}(\mathbf{x},\mathbf{y})]^{ \beta}\cdot[s_{g}(\mathbf{x},\mathbf{y})]^{\gamma}, \tag{20}\]  
or  
\[GSSIM(\mathbf{x},\mathbf{y})=\frac{\left(2\mu_{x}\mu_{y}+C_{1}\right)\left(2\sigma_{x^ {\prime}y^{\prime}}+C_{2}\right)}{\left(\mu_{x}^{2}+\mu_{y}^{2}+C_{1}\right) \left(\sigma_{x^{\prime}}^{2}+\sigma_{y^{\prime}}^{2}+C_{2}\right)}. \tag{21}\]  
Using the same steps as formulated in Equations (9)-(13) and Figure 4, MGSSIM is as follows  
\[MGSSIM(\mathbf{X},\mathbf{Y})=\frac{1}{M}\sum_{j=1}^{M}GSSIM\Big{(}\mathbf{x}_{j},\mathbf{y}_{ j}\Big{)}. \tag{22}\]  
Figure 4 depicts the GSSIM approach used to obtain the similarity score. The entire process is similar to that shown in Figure 1 in terms of the original SSIM; however, GSSIM implements images \(\mathbf{x}\) and \(\mathbf{y}\) only to calculate the luminance. For contrast and structure measures, however, they use the gradient images \(\mathbf{X}^{\prime}\) and \(\mathbf{Y}^{\prime}\). Then, by utilizing Equations (20)-(22), the similarity score can be obtained.