Image Processing Toolbox User's Guide |
Multidimensional image filtering
Syntax
Description
B = imfilter(A,H)
filters the multidimensional array A
with the multidimensional filter H
. The array A
can be a nonsparse numeric array of any class and dimension. The result B
has the same size and class as A
.
Each element of the output B
is computed using double-precision floating point. If A
is an integer array, then output elements that exceed the range of the integer type are truncated, and fractional values are rounded.
B = imfilter(A,H,option1,option2,...)
performs multidimensional filtering according to the specified options. Option arguments can have the following values.
N-D convolution is related to N-D correlation by a reflection of the filter matrix.
Examples
Read a color image into the workspace and view it.
Create a filter, h
, that can be used to approximate linear camera motion.
Apply the filter, using imfilter
, to the image rgb
to create a new image, rgb2
.
Note that imfilter
is more memory efficient than some other filtering operations in that it outputs an array of the same data type as the input image array. In this example, the output is an array of uint8
.
whos rgb2 Name Size Bytes Class h 37x37 10952 double array rgb 384x512x3 589824 uint8 array rgb2 384x512x3 589824 uint8 array
This example specifies the replicate
boundary option.
See Also
conv2
, convn
, filter2
, fspecial
, ippl
imfill | imfinfo |
© 1994-2005 The MathWorks, Inc.