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

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

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

Neighborhood operations on binary images using lookup tables

`applylut`

is not recommended. Use `bwlookup`

instead.

`A = applylut(BW,LUT)`

`A = applylut(BW,LUT)`

performs
a 2-by-2 or 3-by-3 neighborhood operation on binary image `BW`

by
using a lookup table (`LUT`

). `LUT`

is
either a 16-element or 512-element vector returned by `makelut`

.
The vector consists of the output values for all possible 2-by-2 or
3-by-3 neighborhoods.

`BW`

can be numeric or logical, and it must
be real, two-dimensional, and nonsparse. `LUT`

can
be numeric or logical, and it must be a real vector with 16 or 512
elements. If all the elements of `LUT`

are `0`

or `1`

,
then `A`

is logical. If all the elements of `LUT`

are
integers between 0 and 255, then `A`

is `uint8`

.
For all other cases, `A`

is `double`

.

Was this topic helpful?