MATLAB Answers

0

how to get SNR for 2 images

Asked by Rawan hamdi on 11 Apr 2013
hi,
i have 2 images and i would like to get SNR between these 2 images. i have an original clean image which is X0, i added some noise to it and the noisy image is Xn

  0 Comments

Sign in to comment.

1 Answer

Answer by Kye Taylor
on 11 Apr 2013
Edited by Kye Taylor on 11 Apr 2013

You'll get different answers, depending on who you're talking to.
I would suggest using
snr = 20*log(norm(X0,'fro')/norm(X0-Xn,'fro'))

  3 Comments

Thank you. suppose i have 3 images now and i want to compare between their snr X0 is the original image,X is the noisy image and XX is the denoised image how can i do that?
Check it....
Define a function handle to compute the SNR of images, relative to the clean image X0:
g = @(X)20*log(norm(X0,'fro')/norm(X0-X,'fro'))
Then, you can compute the SNRs of your two images like
snrOfXn = g(Xn);
snrOfXX = g(XX);
How rad is that?
The higher the SNR, the better the denoising process. In other words, if XX is denoised version of Xn, you should see snrOfXn < snrOfXX
i'm sorry im new to matlab but how can i define this function?

Sign in to comment.