hitN =[000;010;111];
missN =[111;000;000];
hitS =[111;010;000];
missS =[000;000;111];
hitE =[100;110;100];
missE =[001;001;001];
hitO =[001;011;001];
missO =[100;100;100];
hitNE =[000;110;010];
missNE =[011;001;000];
hitSE =[010;110;000];
missSE =[000;001;011];
hitNO =[000;011;010];
missNO =[110;100;000];
hitSO =[010;011;000];
missSO =[000;100;110];
Squel = Silhouette;
SquelPrecedent = 0;
while(~isequal(Squel, SquelPrecedent))
SquelPrecedent = Squel;
hmN = imerode(Squel, hitN) & imerode(~Squel, missN);
hmS = imerode(Squel, hitS) & imerode(~Squel, missS);
* hmE = imerode(Squel, hitE) & imerode(~Squel, missE);
hmO = imerode(Squel, hitO) & imerode(~Squel, missO);
hm = hmN | hmS | hmE | hmO;
my code blocks at the line where there is *
error message: Error in TP2 (line 79)
hmE = imerode(Squel, hitE) & imerode(~Squel, missE);

댓글 수: 2

the cyclist
the cyclist 2022년 4월 9일
We can't execute your code, because the variable Silhouette is not defined.
Yahia Samed Gabous
Yahia Samed Gabous 2022년 4월 9일
if it is set at the top of the first part of the code.

댓글을 달려면 로그인하십시오.

 채택된 답변

DGM
DGM 2022년 4월 10일
편집: DGM 2022년 4월 10일

0 개 추천

This:
hitE = [100; 110; 100]
hitE = 3×1
100 110 100
is not the same as this:
hitE = [1 0 0; 1 1 0; 1 0 0]
hitE = 3×3
1 0 0 1 1 0 1 0 0

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Strategy & Logic에 대해 자세히 알아보기

태그

질문:

2022년 4월 9일

댓글:

2022년 4월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by