SIVP Toolbox
Last update : May, 2006

imfilter - Image filtering

Calling Sequence

imf = imfilter(im, F)



imfilter filters an image im with filter F. When im is a mult-channel image, each channel can be filtered with F seperately. Input image pixel values outside the bounds of the image are assumed to equal the nearest array border value.

The only diffence of filter2 with imfilter is the output of filter2 is double matrix, and the output of imfilter has the same type as input and the elements in the output matrix that exceed the range of the integer type will be truncated.


    im = imread('lena.png');
    filter = fspecial('sobel');
    imf = imfilter(im, filter);


Shiqi Yu <shiqi.yu[at]>


The latest version of SIVP can be found at

See Also

fspecial,  filter2,