- clear all
- tic
- x = imread('lena512.bmp');
- figure;
- subplot(121);
- imshow(x);
- y = jpegencode(x, 5);
- X = jpegdecode(y);
- subplot(122);
- imshow(X);
- %e = double(x) - double(X);
- %[m, n] = size(e);
- erms = erms(x, X) %sqrt(sum(e(:).^2)/(m*n))
- cr = imageratio(x, y)
- toc