Structuring element neighbor locations and heights
[offsets, heights] = getneighbors(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