function im2 = filter3(filt, im)
%
% Same as filter2 but works on each band separately
%
%

k = size(im,3);
im2 = im;
for i = 1:k
    im2(:,:,i) = filter2(filt, im(:,:,i));
end

