% Lecture 34: Images. x = imread('h:easter-egg.jpg'); image(x) axis off nored = x; nored(:,:,1) = zeros(size(x,1), size(x,2)); image(nored); noblue = x; noblue(:,:,3) = zeros(size(x,1), size(x,2)); image(noblue); figure image(x) g = (x(:,:,1)+x(:,:,2)+x(:,:,3))/3; ??? Error using ==> + Function '+' is not defined for values of class 'uint8'. dx = double(x); g = (dx(:,:,1)+dx(:,:,2)+dx(:,:,3))/3; gx(:,:,1) = g; gx(:,:,2) = g; gx(:,:,3) = g; % the array gx stores the grayscale image of x image(uint8(gx)) % crypting the image blur = randn(size(x,1)); key = inv(blur); cd h: bx = crypto(blur,dx); image(uint8(bx)) xx = crypto(key,bx); image(uint8(xx)) diary off