im = imread('BLOCK-02.TIF');
im = double(im(1:700,:));
fh1 = figure;
imagesc(im);  colormap(gray);
title('Original image');

% Bad (box) filter
bd = 31; 
bfk = fspecial('average',bd);
imbb = imfilter(im,bfk);
fh2 = figure; 
imagesc(imbb);  colormap(gray);
title('Bad (box) filter');

% Good (gaussian) filter
bfg = fspecial('gaussian',round(1.5*bd),round(bd/2));
imbg = imfilter(im,bfg);
fh3 = figure; 
imagesc(imbg);  colormap(gray);
title('Good (Gaussian) filter');
