Get structuring element neighborhood
getnhood will be removed in a future release. See
strel for the current list of methods.
Get Neighborhood of Flat Structuring Element
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
SE — Structuring element
strel object |
Structuring element, specified as a
nhood — Neighborhood of structuring element
Neighborhood of structuring element, returned as a logical array.
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
Introduced before R2006a