title: Negative value for PSNR after image enhancment in MATLAB
body: <p>I have done this so far. After image enhancement in frequency domain for assessment, I have calculated PSNR. The value of PSNR and SNR is negative.</p>
  
  <p>Further, the class of input and output image is double. </p>
  
  <pre><code>ref = imread('img.tif');
  ref=im2double(ref);
  %A = processing(ref);
  %Calculate the PSNR.
  [peaksnr, snr] = psnr(A, ref);
  </code></pre>
  
  <p>Can someone help me further?</p>