PSNR {gasper} | R Documentation |
Compute the Peak Signal to Noise Ratio
Description
PSNR
function computes the Peak Signal to Noise Ratio (PSNR) between two signals or images.
Usage
PSNR(x, y)
Arguments
x |
Numeric vector/matrix. Original reference signal/image. |
y |
numeric vector/matrix. Restored or noisy signal/image. |
Details
Higher values of PSNR indicate closer similarity between the original and the compared signal or image.
The PSNR is defined by:
\mathrm{PSNR}(x,y) = 10 \log_{10}\left(\frac{\max(\max(x),\max(y))^2}{\mathrm{MSE}(x, y)}\right)
Value
PSNR
Numeric. Peak Signal to Noise Ratio.
See Also
Examples
x <- cos(seq(0, 10, length=100))
y <- x + rnorm(100, sd=0.5)
PSNR(x, y)
[Package gasper version 1.1.6 Index]