3x3 8-connected structuring element

5 Ansichten (letzte 30 Tage)
Vijay
Vijay am 11 Feb. 2013
How exactly does a 8-connected 3x3 structuring element looks like in a matrix form?

Akzeptierte Antwort

Image Analyst
Image Analyst am 11 Feb. 2013
If you use a integer or double class, it's
1 1 1
1 1 1
1 1 1
which is the same as
se = ones(3); % <= double, or:
se = ones(3, 'uint8'); % <= uint8
or for a logical / boolean class:
true true true
true true true
true true true
which is the same as
se = true(3);
You can also use the strel function
se = strel('disk', 5);
where se is a special class of type 'strel'.
I usually use the logical form when I make up a structuring element manually.

Weitere Antworten (1)

ChristianW
ChristianW am 11 Feb. 2013
ones(3)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by