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 comentarios

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

Iniciar sesión para comentar.

 Respuesta aceptada

DGM
DGM el 10 de Abr. de 2022
Editada: DGM el 10 de Abr. de 2022
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

Más respuestas (0)

Categorías

Más información sobre Strategy & Logic en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de Abr. de 2022

Comentada:

el 13 de Abr. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by