Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Matlab by xixor ( 17 years ago )
function s = SNR(y,z)
%% SNR function takes two input. One of them is matrix of original image.
%% The other is also matrix but it is matrix of corrupted image. SNR is
%% about finding a number between 0 and infinite. f this number is closer
%% to infinite it is good but it is close to 0 it is bad.
%% As first step, we take output of function gaussian noise and use input
%% of SNR function. n order to do this, The output of function must have
%% same name with input of another function.
%%y = imread('thewoman.jpg');
%%% in that step we find error rate. This is necessary becuase this is
%%% actually about measurement sensitivity of an imaging system.
% z is the noisy image
% y is the noise free image
error = z - y;
s = 20 * log10(1/(sqrt(mean(mean(error.^2)))));
Revise this Paste
Parent: 12485