How does 'imerode' function compute erosion with the 'shape' attribute set to 'full'?
Mostra commenti meno recenti
How does 'imerode' function compute erosion when 'shape' attribute is set to 'full'?
As an example, consider the following code:
A = [ 0 1 1 1 0 1 ;...
0 1 1 1 0 1 ;...
1 1 1 1 1 1 ;...
1 1 0 1 1 1 ;...
1 1 0 1 1 1 ];
B = [1 1]; % structuring element
D1 = imerode(A,B,'full');
>> D1 =
0 0 1 1 0 0 1
0 0 1 1 0 0 1
1 1 1 1 1 1 1
1 1 0 0 1 1 1
1 1 0 0 1 1 1
- -
| |
^ ^
The first column The last column should
should all be 0 all be zero
I was expecting the first column and the last column of the output matrix 'D1' to be all zeros, but they contain non-zero elements in the output. Is this behavior expected?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Morphological Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!