how to calculate mse and snr of an image?
I have done adding noise to an image.now what i need is to calculate the
mse and snr of the image.here b is the orginal image k is the encrypted
image.can anyone help how to calculate the two and plot them?
clc;
clear all;
close all;
a=imread('lenna.jpg');
b=rgb2gray(a);
figure,imshow(b);
c=double(b);
d=randn(512,512);
e=exp(2*pi*i*d);
f=c.*e;
g=fft2(f);
h=randn(512,512);
s=exp(2*pi*i*h);
j=g.*s;
k=fft2(j);
k(1:512, 1:256)= 0;
figure,imshow(k);
No comments:
Post a Comment