<< fspecial Image Linear Filtering Image Reading, Display and Exploration >>

IPCV >> Image Linear Filtering > imfilter

imfilter

Image filtering

Syntax

imf = imfilter(im, F, bound, opsz)

Parameters

im :

An image which will be filterd. The image can be UINT8, INT8, UINT16, INT16, INT32, DOUBLE.

F :

A double 2D filter.

imf :

The filtered image which has the same dimension and class with im .

bound :

Type of boundary, values or keywords. Current supported type with keyword is 'circular'.

opsz :

Output image size, either 'full' or 'same'.

Description

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.

Examples

im = imread(fullpath(getIPCVpath() + "/images/baboon.png"));
filter = fspecial('sobel');
imf = imfilter(im, filter);
imshow(imf);

See also

Authors


Report an issue
<< fspecial Image Linear Filtering Image Reading, Display and Exploration >>