How can I find PSNR values of the denoised image of the SRAD filter.

3 views (last 30 days)
I had downloaded the MATLAB code for ' speckle reducing anisotropic diffussion(SRAD)' filter from the link "http://viva.ee.virginia.edu/downloads.html". But I could not find the PSNR values of the denoised image.I have used the following codes to find PSNR values:
I=imread('my_image');
X=imnoise(I,'speckle',.01);
rect = [10 15 40 40];
[J,rect]=SRAD(X,10,0.9,rect);
imshow(J,[]);
MSE_W=mean(mean(((double(uint8(I)))-(double(uint8(J)))).^2));
PSNR_W=10*log10(255^2/MSE_W)
Can anyone help me in this matter?

Accepted Answer

Iman Ansari
Iman Ansari on 19 Apr 2013
Hi. Your J is between [0 1]:
MSE_W=mean(mean(((double(uint8(I)))-(double(uint8(J.*255)))).^2));
PSNR_W=10*log10(255^2/MSE_W)

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!