Main Content

decompose

Return sequence of decomposed structuring elements

Description

example

SEQ= decompose(SE)returns an array of structuring elements,SEQ, that are the decomposition of the structuring elementSE.SEQ相当于SE, but the elements ofSEQcannot be decomposed further.

Examples

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, useimdilatewith the full option.

imdilate(1,seq,'full')
ans =5×51 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 = decompose(se)
seq = 1x8 offsetstrel array with properties: Offset Dimensionality

Input Arguments

collapse all

Structuring element, specified as astreloroffsetstrelobject.

Output Arguments

collapse all

Sequence of structuring elements that approximate the desired shape, returned as an array ofstreloroffsetstrel对象.

Version History

Introduced before R2006a

See Also