How does 'imerode' function compute erosion with the 'shape' attribute set to 'full'?
이전 댓글 표시
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?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Morphological Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!