decompose
Return sequence of decomposed structuring elements
Syntax
Description
Examples
View Decomposition of Structuring Element
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(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
Extract Decomposition of Structuring Element
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
SE
— Structuring element
strel
or offsetstrel
object
Structuring element, specified as a strel
or offsetstrel
object.
Output Arguments
SEQ
— Sequence of structuring elements
array of strel
or offsetstrel
objects
Sequence of structuring elements that approximate the desired shape,
returned as an array of strel
or offsetstrel
objects.
Version History
Introduced before R2006a
See Also
Topics
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)