| Image Processing Toolbox™ | ![]() |
[offsets, heights] = getneighbors(SE)
[offsets, heights] = getneighbors(SE) returns the relative locations and corresponding heights for each of the neighbors in the structuring element object SE.
offsets is a P-by-N array where P is the number of neighbors in the structuring element and N is the dimensionality of the structuring element. Each row of offsets contains the location of the corresponding neighbor, relative to the center of the structuring element.
heights is a P-element column vector containing the height of each structuring element neighbor.
SE is a STREL object. The return values offsets and heights are arrays of double-precision values.
se = strel([1 0 1],[5 0 -5])
[offsets,heights] = getneighbors(se)
se =
Nonflat STREL object containing 2 neighbors.
Neighborhood:
1 0 1
Height:
5 0 -5
offsets =
0 -1
0 1
heights =
5 -5![]() | getline | getnhood | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |