getnhood

Get structuring element neighborhood

getnhood will be removed in a future release. See strel for the current list of methods.

Description

example

nhood = getnhood(SE) returns the neighborhood associated with the structuring element SE.

Examples

collapse all

se = strel(eye(5));
nhood = getnhood(se)
nhood =

  5×5 logical array

   1   0   0   0   0
   0   1   0   0   0
   0   0   1   0   0
   0   0   0   1   0
   0   0   0   0   1

Input Arguments

collapse all

Structuring element, specified as a strel or offsetstrel object.

Output Arguments

collapse all

Neighborhood of structuring element, returned as a logical array.

Note

If SE is an offsetstrel object, then nhood indicates which pixels are in the neighborhood but does not return the offset of the pixels. You can get the offset from the property SE.Offset.

Data Types: logical

See Also

Introduced before R2006a