% image downloaded from www.math.uic.edu x = imread('My Documents/Bean.jpg'); % the image we just downloaded is stored % as a matrix size(x) ans = 200 300 3 image(x) % let us remove the blue noblue = x; noblue(:,:,3) = zeros(size(x,1),size(x,2)); image(noblue) % to compute with the values, we must convert % the rgb encoding into doubles % every rgb code is stored as one byte dx = double(x); % let us increase the blue intensity moreblue = dx; moreblue(:,:,3) = dx(:,:,3)*1.5; % image does not take a matrix of % doubles on input, we must convert again % but now to uint8 y = uint8(moreblue); figure image(y) % we could create a new image, % selecting half of the rows from noblue % and the other half of from moreblue z = y; z(1:size(z,1)/2,:,:) = noblue(1:size(z,1)/2,:,:); figure image(z) edit help crypto blurs or deblurs an image blur = randn(size(x,1)); key = inv(blur); bx = crypto(blur,double(dx)); figure image(uint8(bx)) dbx = crypto(key,bx); figure image(uint8(dbx)) diary off