% TP1, starter code
close all;
addpath('images');

% name of image file
imname = '00128u.tif';
%imname = '00757v.jpg';

% read image
fullim = imread(imname);

% convert to double matrix
fullim = im2double(fullim);

% compute size for each channel (1/3 each)
height = floor(size(fullim,1)/3);

% split color channels
B = fullim(1:height,:);
G = fullim(height+1:height*2,:);
R = fullim(height*2+1:height*3,:);

% Align images -- this is where you come into play!
% Useful functions: 
% "circshift", "sum", and "imresize" (for the pyramid)


% create a color image (3-D array)... use "cat"


% show the resulting image... use "imshow"
figure; imshow(aRGB);

% save results
[~,outname] = fileparts(imname);
imwrite(aRGB, strcat('result-' outname '.jpg'));