a = imread('PSWebImageBitMap0001.bmp',  'bmp');
b = a(:,:,2);

f = inline('max(x(:))');
c = nlfilter(b,[3 3],f);

figure(4)
clf
imagesc(c)
colormap(gray)
title('Max filter')
