Peak signal-to-noise ratio (PSNR) is an engineering term for the ratio between the maximum possible power of a
signal and the power of corrupting
noise that affects the fidelity of its representation. Because many signals have a very wide
dynamic range, PSNR is usually expressed as a
logarithmic quantity using the
PSNR is commonly used to quantify reconstruction quality for images and video subject to
PSNR is most easily defined via the
mean squared error (MSE). Given a noise-free m×n monochrome image I and its noisy approximation K, MSE is defined as
Here, MAXI is the maximum possible pixel value of the image. When the pixels are represented using 8 bits per sample, this is 255. More generally, when samples are represented using linear
PCM with B bits per sample, MAXI is 2B − 1.
Application in color images
color images with three
RGB values per pixel, the definition of PSNR is the same except that the MSE is the sum over all squared value differences (now for each color, i.e. three times as many differences as in a monochrome image) divided by image size and by three. Alternately, for color images the image is converted to a different
color space and PSNR is reported against each channel of that color space, e.g.,
Quality estimation with PSNR
PSNR is most commonly used to measure the quality of reconstruction of lossy compression
codecs (e.g., for
image compression). The signal in this case is the original data, and the noise is the error introduced by compression. When comparing compression codecs, PSNR is an approximation to human perception of reconstruction quality.
Typical values for the PSNR in
lossy image and video compression are between 30 and 50 dB, provided the bit depth is 8
bits, where higher is better. The processing quality of 12-bit images is considered high when the PSNR value is 60 dB or higher. For 16-bit data typical values for the PSNR are between 60 and 80 dB. Acceptable values for wireless transmission quality loss are considered to be about 20 dB to 25 dB.
In the absence of noise, the two images I and K are identical, and thus the MSE is zero. In this case the PSNR is infinite (or undefined, see
Division by zero).
Original uncompressed image
Q=90, PSNR 45.53dB
Q=30, PSNR 36.81dB
Q=10, PSNR 31.45dB
luma PSNR values for a
cjpeg compressed image at various quality levels.
Although a higher PSNR generally indicates that the reconstruction is of higher quality, in some cases it may not. One has to be extremely careful with the range of validity of this metric; it is only conclusively valid when it is used to compare results from the same codec (or codec type) and same content.
PSNR-HVS is an extension of PSNR that incorporates properties of the human visual system such as
PSNR-HVS-M improves on PSNR-HVS by additionally taking into account
visual masking. In a 2007 study, it delivered better approximations of human visual quality judgements than PSNR and
SSIM by large margin. It was also shown to have a distinct advantage over
DCTune and PSNR-HVS.
^Egiazarian, Karen, Jaakko Astola, Nikolay Ponomarenko, Vladimir Lukin, Federica Battisti, and Marco Carli (2006). "New full-reference quality metrics based on HVS." In Proceedings of the Second International Workshop on Video Processing and Quality Metrics, vol. 4.
^Nikolay Ponomarenko; Flavia Silvestri; Karen Egiazarian; Marco Carli; Jaakko Astola; Vladimir Lukin,
"On between-coefficient contrast masking of DCT basis functions"(PDF), CD-ROM Proceedings of the Third International Workshop on Video Processing and Quality Metrics for Consumer Electronics VPQM-07, 25.–26. Januar 2007 (in German), Scottsdale AZ