Return sequence of decomposed structuring elements
SEQ = decompose(SE)
example
SEQ = decompose(SE) returns an array of structuring elements, SEQ, that are the decomposition of the structuring element SE. SEQ is equivalent to SE, but the elements of SEQ cannot be decomposed further.
SEQ
SE
collapse all
Create a disk-shaped structuring element.
se = strel('square',5)
se = strel is a square shaped structuring element with properties: Neighborhood: [5x5 logical] Dimensionality: 2
Extract the decomposition of the structuring element.
seq = decompose(se)
seq = 2x1 strel array with properties: Neighborhood Dimensionality
To see that dilating sequentially with the decomposed structuring elements really does form a 5-by-5 square, use imdilate with the full option.
imdilate
imdilate(1,seq,'full')
ans = 5×5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Create a ball-shaped structuring element.
se = offsetstrel('ball',5, 6.5)
se = offsetstrel is a ball shaped offset structuring element with properties: Offset: [11x11 double] Dimensionality: 2
Obtain the decomposition of the structuring element.
seq = 1x8 offsetstrel array with properties: Offset Dimensionality
strel
offsetstrel
Structuring element, specified as a strel or offsetstrel object.
Sequence of structuring elements that approximate the desired shape, returned as an array of strel or offsetstrel objects.
You have a modified version of this example. Do you want to open this example with your edits?