DSPRelated.com
Code

Image denoising: Peak signal to Noise ratio calculation

Senthilkumar July 30, 20111 comment Coded in Matlab

This function used to calculate the peak signal to noise ratio for denoised image

function A = PSNR(G,H)
%G = original image
%H =  denoised image
  error = G - H;
  decibels = 20*log10((255*255)/(sqrt(mean(mean(error.^2)))));
  disp(sprintf('PSNR = %5.2f db',decibels)) 
  A = decibels;