PSNR is easy to compute but matches human vision poorly. Learn the PSNR formula, typical dB ranges, and how SSIM tries to close the gap.
To tune an encoder or compare two codecs, you need to measure 'quality' as a number. Let's start with the oldest and most common metric.
MSE = (1/N) Σ (original[i] - reconstructed[i])²
PSNR = 10 · log10( MAX² / MSE ) [unit: dB]
MAX : the maximum pixel value (255 for 8-bit)
The smaller the MSE, the larger the PSNR (better quality)These aren't absolute thresholds. Depending on the content, the same PSNR can look very different.
PSNR looks only at per-pixel arithmetic error. It knows nothing about the 'structure' the human eye cares about. For example, shifting the whole picture slightly brighter makes PSNR drop sharply, yet the eye barely notices. Conversely, blur costs little PSNR but is plainly irritating to the eye. The industry generally agrees that PSNR is useful as a regression test during encoder development, but not enough to judge final perceived quality.
SSIM, proposed in 2004 by Zhou Wang and colleagues, compares not pixel values but three similarities — luminance, contrast, and structure — over local windows. It starts from the observation that people perceive images by their 'structure.'
SSIM values lie between -1 and 1 (in practice usually 0 to 1), where 1 means identical. In broadcast and streaming, people more often use SSIM (dB), converted as -10·log10(1-SSIM), or MS-SSIM (computed at several resolution scales and averaged).
SSIM correlates better with human perception than PSNR, but it's still not perfect. It tends to be insensitive to compression-specific artifacts in particular (blocking, ringing, mosquito noise). That's why VMAF, created by Netflix, has become today's industry standard — we'll cover it in the next lesson.
A quality metric based on pixel error. Easy to compute but weakly correlated with perception.
Mean Squared Error. The basis of the PSNR calculation.
A metric that compares luminance, contrast, and structure. Correlates better with perception than PSNR.
A metric that combines SSIM computed at several resolutions.
What is PSNR's biggest weakness?