# 结构相似性

## 定义

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {y} )=[l(\mathbf {x} ,\mathbf {y} )]^{\alpha }[c(\mathbf {x} ,\mathbf {y} )]^{\beta }[s(\mathbf {x} ,\mathbf {y} )]^{\gamma }}$

${\displaystyle l(\mathbf {x} ,\mathbf {y} )={\frac {2\mu _{x}\mu _{y}+C_{1}}{\mu _{x}^{2}+\mu _{y}^{2}+C_{1}}}}$${\displaystyle c(\mathbf {x} ,\mathbf {y} )={\frac {2\sigma _{x}\sigma _{y}+C_{2}}{\sigma _{x}^{2}+\sigma _{y}^{2}+C_{2}}}}$${\displaystyle s(\mathbf {x} ,\mathbf {y} )={\frac {\sigma _{xy}+C_{3}}{\sigma _{x}\sigma _{y}+C_{3}}}}$

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {x} )={\frac {2\mu _{x}^{2}+C_{1}}{\mu _{x}^{2}+\mu _{x}^{2}+C_{1}}}\times {\frac {2\sigma _{x}^{2}+C_{2}}{\sigma _{x}^{2}+\sigma _{x}^{2}+C_{2}}}\times {\frac {\sigma _{xx}+C_{3}}{\sigma _{x}\sigma _{x}+C_{3}}}=1}$

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {y} )={\frac {(2\mu _{x}\mu _{y}+C_{1})(2\sigma _{xy}+C_{2})}{(\mu _{x}^{2}+\mu _{y}^{2}+C_{1})(\sigma _{x}^{2}+\sigma _{y}^{2}+C_{2})}}}$

## 性质

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {y} )={\text{SSIM}}(\mathbf {y} ,\mathbf {x} )}$
• 局限性

${\displaystyle \forall \mathbf {x} ,\mathbf {y} ,{\text{SSIM}}(\mathbf {x} ,\mathbf {y} )\leq 1,}$
• 单一最大值

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {y} )=1\Leftrightarrow \mathbf {x} =\mathbf {y} }$

## 使用

${\displaystyle {\text{SSIM}}(\mathbf {x} ,\mathbf {y} )={\frac {(2\mu _{x}\mu _{y}+C_{1})(2\sigma _{xy}+C_{2})}{(\mu _{x}^{2}+\mu _{y}^{2}+C_{1})(\sigma _{x}^{2}+\sigma _{y}^{2}+C_{2})}}}$

## 比较

• Image A：原图
• Image B：(Image A * 0.5) + 128
• Image C：255 - Image A
• Image D：Image A 叠加影子后的结果
• Image E：对照组

• 相似性评估：

• 影像分类：

## 限制

• Image F: Image A 往右平移30像素
• Image G: Image A 逆时针旋转30度
• Image H: Image A 长宽各缩短6.25%

## 变形

### 结构相异性

${\displaystyle {\hbox{DSSIM}}(x,y)={\frac {1-{\hbox{SSIM}}(x,y)}{2}}}$

### 复小波结构相似性

${\displaystyle {\text{CW-SSIM}}(c_{x},c_{y})={\bigg (}{\frac {2\sum _{i=1}^{N}|c_{x,i}||c_{y,i}|+K}{\sum _{i=1}^{N}|c_{x,i}|^{2}+\sum _{i=1}^{N}|c_{y,i}|^{2}+K}}{\bigg )}{\bigg (}{\frac {2|\sum _{i=1}^{N}c_{x,i}c_{y,i}^{*}|+K}{2\sum _{i=1}^{N}|c_{x,i}c_{y,i}^{*}|+K}}{\bigg )}}$

## 参考资料

1. Zhou Wang, Alan C. Bovik, Hamid R. Sheikh, and Eero P. Simoncelli, "Image quality assessment: from error visibility to structural similairty," IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600−612, Apr. 2004.
2. ^ Zhou Wang and Alan C. Bovik, "Mean squared error: Love it or leave it? - A new look at signal fidelity measures," IEEE Signal Processing Magazine, vol. 26, no. 1, pp 98−117, Jan. 2009.
3. ^ H.R. Sheikh, M.F. Sabir, and A.C. Bovik, "A statistical evaluation of recent full reference image quality assessment algorithms," IEEE Transactions on Image Processing, vol.15, no.11, pp.3440−3451, Nov. 2006.
4. ^ T. Richter, K. J. Kim, "A MS-SSIM optimal JPEG 2000 encoder," in Proc. Data Compression Conf., pp.401−410, Mar. 2009.
5. ^ A. M. Alattar, E. T. Lin, and M. U. Celik, "Digital watermarking of low bit-rate advanced simple profile MPEG-4 compressed video," IEEE Trans. Circuits Syst. Video Technol., vol. 13, no. 8, pp. 787−800, Aug. 2003.
6. ^ V. Vukadinovi and G. Karlsson, "Trade-offs in bit-rate allocation for wireless video streaming," in Proc. ACM Int. Symp. Modeling, Analysis, and Simulation of Wireless and Mobile Systems, Quebec, Canada, 2005, pp. 349−353
7. ^ S. A. Reinsberg, S. J. Doran, E. M. Charles-Edwards, and M. O. Leach, "A complete distortion correction for MR images: II. Rectification of static-field inhomogeneities by similarity-based profile mapping," Phys. Med. Biol., vol. 50, no. 11, pp. 2651−2661, June 2005.
8. Gao, Y.; Rehman, A.; Wang, Z. (September 2011). CW-SSIM based image classification (PDF). IEEE International Conference on Image Processing (ICIP11).
9. ^ Z. Wang and E. P. Simoncelli, "Translation insensitive image similarity in complex wavelet domain," in Proc. IEEE Int. Conf. Acoustics, Speech, Signal Processing, pp. 573−576, Mar. 2005.
10. ^ Wang, Z.; Simoncelli, E.P.; Bovik, A.C. (2003-11-01). Multiscale structural similarity for image quality assessment. Conference Record of the Thirty-Seventh Asilomar Conference on Signals, Systems and Computers, 2004. Vol. 2. pp. 1398–1402 Vol.2.
11. ^ Jian-Jiun Ding, Time frequency analysis and wavelet transform class note,the Department of Electrical Engineering, National Taiwan University (NTU), Taipei, Taiwan, 2007.