% eecs 556, 2003, final exam, problem 2 template
load hw7image;
f0 = hw7image;
f0(end+1,end+1)=0;
% make filter 
a = .4;
h1 = [(.25-a/2) .25 a .25 (.25-a/2)];
h = h1'*h1;
f0l = conv2(f0,h,'same');
f1 = f0l(1:2:end,1:2:end);
f1l = conv2(f1,h,'same');
f2 = f1l(1:2:end,1:2:end);