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
Noise is unwanted sound considered unpleasant, loud or disruptive to hearing. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrations through a medium, such as air or water. The difference aris ...
that affects the fidelity of its representation. Because many signals have a very wide
dynamic range
Dynamic range (abbreviated DR, DNR, or DYR) is the ratio between the largest and smallest values that a certain quantity can assume. It is often used in the context of signals, like sound and light. It is measured either as a ratio or as a base ...
, PSNR is usually expressed as a
logarithm
In mathematics, the logarithm is the inverse function to exponentiation. That means the logarithm of a number to the base is the exponent to which must be raised, to produce . For example, since , the ''logarithm base'' 10 ...
ic quantity using the
decibel
The decibel (symbol: dB) is a relative unit of measurement equal to one tenth of a bel (B). It expresses the ratio of two values of a power or root-power quantity on a logarithmic scale. Two signals whose levels differ by one decibel have a ...
scale.
PSNR is commonly used to quantify reconstruction quality for images and video subject to
lossy compression
In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data si ...
.
Definition
PSNR is most easily defined via the
mean squared error
In statistics, the mean squared error (MSE) or mean squared deviation (MSD) of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between ...
(''MSE''). Given a noise-free ''m''×''n'' monochrome image ''I'' and its noisy approximation ''K'', ''MSE'' is defined as
:
The PSNR (in
dB) is defined as
:
Here, ''MAX
I'' 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
Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the am ...
with ''B'' bits per sample, ''MAX
I'' is 2
B − 1.
Application in color images
For
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
A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represen ...
and PSNR is reported against each channel of that color space, e.g.,
YCbCr
YCbCr, Y′CbCr, or Y Pb/Cb Pr/Cr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in video and digital photography systems. Y′ is the luma component and CB and CR are the blue-diff ...
or
HSL.
Quality estimation with PSNR
PSNR is most commonly used to measure the quality of reconstruction of lossy compression
codec
A codec is a device or computer program that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder.
In electronic communications, an endec is a device that acts as both an encoder and a decoder on a signal or ...
s (e.g., for
image compression
Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior re ...
). 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
In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data si ...
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
In mathematics, division by zero is division where the divisor (denominator) is zero. Such a division can be formally expressed as \tfrac, where is the dividend (numerator). In ordinary arithmetic, the expression has no meaning, as there is ...
).
Performance comparison
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.
Generally, PSNR has been shown to perform poorly compared to other
quality metrics when it comes to estimating the
quality of images and particularly videos as perceived by humans.
Variants
PSNR-HVS is an extension of PSNR that incorporates properties of the human visual system such as
contrast perception.
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.
See also
*
Data compression ratio
Data compression ratio, also known as compression power, is a measurement of the relative reduction in size of data representation produced by a data compression algorithm. It is typically expressed as the division of uncompressed size by compresse ...
*
Perceptual Evaluation of Video Quality (PEVQ)
*
Structural similarity
The structural similarity index measure (SSIM) is a method for predicting the perceived quality of digital television and cinematic pictures, as well as other kinds of digital images and videos. SSIM is used for measuring the similarity between tw ...
(SSIM) index
*
Subjective video quality
Subjective video quality is video quality as experienced by humans. It is concerned with how video is perceived by a viewer (also called "observer" or "subject") and designates their opinion on a particular video sequence. It is related to the fiel ...
*
Video Multimethod Assessment Fusion
*
Video quality
Video quality is a characteristic of a video passed through a video transmission or processing system that describes perceived video degradation (typically, compared to the original video). Video processing systems may introduce some amount of dis ...
References
{{Machine learning evaluation metrics
Image compression
Noise (graphics)
Film and video technology
Digital television
Engineering ratios
vi:PSNR