Friday, January 20, 2012

Filtering images in Matlab

Given image stored in matrix M:

%build the filter to convolve with the image
imFilt=fspecial('gaussian',10,10);
%convolve them
smoothed=imfilter(M,imFilt,'symmetric','conv');