Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

N-D filtering of multidimensional images

`B = imfilter(A,h)`

`gpuarrayB = imfilter(gpuArrayA,h)`

`___= imfilter(___,options,...)`

filters
the multidimensional array `B`

= imfilter(`A`

,`h`

)`A`

with the multidimensional
filter `h`

. The array `A`

can
be `logical`

or a nonsparse numeric array of any
class and dimension. The result `B`

has the same
size and class as `A`

.

`imfilter`

computes each element of the output, `B`

,
using double-precision floating point. If `A`

is
an integer or logical array, `imfilter`

truncates
output elements that exceed the range of the given type, and rounds
fractional values.

This function may take advantage of hardware optimization for data types

`uint8`

,`uint16`

,`int16`

,`single`

, and`double`

to run faster.If you specify a large kernel, a kernel that contains large values, or specify an image containing large values, you can see different results between MATLAB and generated code using codegen for floating point data types. This happens because of accumulation errors due to different algorithm implementations.

Was this topic helpful?