How does 'imerode' function compute erosion with the 'shape' attribute set to 'full'?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Morphological Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!