Learn R Programming

gasper (version 1.1.3)

PSNR: Peak Signal to Noise Ratio.

Description

Compute the Peack Signal to Noise Ratio, defined by: $$PSNR(x,y)=10 \log_{10}( \max(\max(x),\max(y))^2 / |x-y|^2 )$$

Usage

PSNR(x, y)

Value

Peak Signal to Noise ratio.

Arguments

x

Original reference signal/image.

y

Restored or noisy signal/image.

See Also

SNR

Examples

Run this code
x <- cos(seq(0, 10, length=100))
y <- x + rnorm(100, sd=0.5)
PSNR(x, y)

Run the code above in your browser using DataLab