
% set string with file name
image_file = '00899r.jpg';

% load image file
I= imread(image_file);


% display the size of image I ( a matrix )
size(I)

% convert to double precision floats
I = im2double(I);

figure(1);

imagesc(I);  % show the image

colormap(gray) % set colormap to gray so it looks right!

[h,w]= size(I);  % get the size of I


t = floor(h/3)  % find one third of the height


% divide the image into 3 pieces
% note the plates go B G R from top to bottom...
I1 = I(1:t,:);
I2 = I(t+1:2*t,:);
I3 = I(2*t+1:3*t,:);

% TODO write these to image files for your webpage


% TODO align the images


% put the (aligned) pieces together in an image
Ic = cat(3,I3,I2,I1);

% show the image
imagesc(Ic)

% TODO write the aligned image to a file for your webpage


 

