Image quality assessment

From David's Wiki
Jump to navigation Jump to search
\( \newcommand{\P}[]{\unicode{xB6}} \newcommand{\AA}[]{\unicode{x212B}} \newcommand{\empty}[]{\emptyset} \newcommand{\O}[]{\emptyset} \newcommand{\Alpha}[]{Α} \newcommand{\Beta}[]{Β} \newcommand{\Epsilon}[]{Ε} \newcommand{\Iota}[]{Ι} \newcommand{\Kappa}[]{Κ} \newcommand{\Rho}[]{Ρ} \newcommand{\Tau}[]{Τ} \newcommand{\Zeta}[]{Ζ} \newcommand{\Mu}[]{\unicode{x039C}} \newcommand{\Chi}[]{Χ} \newcommand{\Eta}[]{\unicode{x0397}} \newcommand{\Nu}[]{\unicode{x039D}} \newcommand{\Omicron}[]{\unicode{x039F}} \DeclareMathOperator{\sgn}{sgn} \def\oiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222F}\,}{\unicode{x222F}}{\unicode{x222F}}{\unicode{x222F}}}\,}\nolimits} \def\oiiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x2230}\,}{\unicode{x2230}}{\unicode{x2230}}{\unicode{x2230}}}\,}\nolimits} \)

Methods for Image quality assessment

The standard metrics are mean-squared error, peak signal to noise ratio (psnr), and structural similarity (ssim).

Standard Images and Video


  • MSE
    \(\displaystyle \begin{align}MSE = \mean((I_1 - I_2)^2)\end{align}\)
  • PSNR
    \(\displaystyle \begin{align}PSNR=10\log_{10}(\frac{R^2}{MSE})\end{align}\)
    • where R^2 is the maximum fluctuation (e.g. 1.0 for [0-1] float images, 255 for uint8).
  • SSIM

For video, simply average MSE over all frames and then compute the PSNR over the averaged MSE.
Typically, for a yuv420 video, people only calculate MSE or PSNR for the luminance (Y) channel due to chroma subsampling.

FFmpeg can compute PSNR and SSIM.

Foveated Quality Assessment

  • Lee et al.[1] propose Foveated signal to noise ratio (FSNR) which measures the signal to noise ratio in a curvilinear space. However they do not provide the exact equations to compute the curvilienar space.

Spherical Quality Assessment

  • WS-PSNR[2] is a standard PSNR calculation where the mean squared error is weighted by the size of each pixel.
    \(\displaystyle \begin{align} WMSE &= \frac{1}{\sum_{i,j}w(i,j)} \sum_{i,j} (I_1(i,j)-I_2(i,j))^2 * w(i,j)\\ WS\_PSNR &= 10\log_{10}(\frac{R^2}{WMSE})\\ \end{align} \)
    • The weights are \(w(i,j) = \sin(\frac{j+0.5}{N}\pi) = \cos(\frac{j+0.5-N/2}{N}\pi)\).
  • Spherical PSNR (S-PSNR)[3] uses randomly sampled points on a sphere and back projects them to the reference and reconstructed images. In practice, these randomly sampled points need to be saved for reproducibility. They use 655262 points which are available on their repo.
  • Spherical Structural Similarity Index (S-SSIM) [4] is an extension of SSIM for spherical images.
    \(\displaystyle \begin{align} \text{S-SSIM}(i, j) &= \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)\\ \text{S-SSIM} &= \frac{\sum_m \sum_n \text{S-SSIM}(m, n) * w(m, n)}{\sum_m \sum_n w(m, n)} \end{align} \)



  1. Sanghoon Lee, M.S. Pattichis, A.C. Bovik, (2002) Foveated video quality assessment IEEE Multimedia 2002.
  2. Yule Sun, Ang Lu, Lu Yu (2017). Weighted-to-Spherically-Uniform Quality Evaluation for Omnidirectional Video. IEEE Signal Processing Letters
  3. Matt Yu, Haricharan Lakshman, Bernd Girod (2015) A Framework to Evaluate Omnidirectional Video Coding Schemes ISMAR 2015.
  4. Sijia Chen, Yingxue Zhang, Yiming Li, Zhenzhong Chen, Zhou Wang (2018). Spherical Structural Similarity Index for Objective Omnidirectional Video Quality Assessment. (ICME 2018)