title: Calculate SNR in single image in MATLAB
body: <p>I have this image:</p>
  
  <p><img src="https://i.stack.imgur.com/GvABY.jpg" alt="noisy image"></p>
  
  <p>I want to calculate SNR in it. For this i used code:</p>
  
  <pre><code>img=imread('noicy.JPG');
  img=double(img(:));
  ima=max(img(:));
  imi=min(img(:));
  ims=std(img(:));
  snr=20*log10((ima-imi)./ims)
  </code></pre>
  
  <p>Is that correct code to calculate SNR?</p>