I loaded an image in Matlab which has properties:
Name(X) , Size (512x512) , Bytes (262144) , Class(uint8) ,
I added gaussian noise and remove that noise by using wavelet transform. By doing Inverse wavelet transform I get the final output image:
Name(Xsyn) , Size (504x504) , Bytes (2032128) , Class(Double)
Now I am trying to calculate the signal-to-noise ratio (SNR) by using
SNR = 20*log10(norm(X(:))/norm(X(:)-Xsyn(:)));
But it show the following error:
??? Error using ==> minus
Matrix dimensions must agree.
So I think I should change my matrix dimension of the final image (Xsyn
). Now how can I change this matrix dimension of image Xsyn
(504x504 ) to Xsyn
size (512x512)?
Or is there another way to find out the SNR?