Professional Documents
Culture Documents
RESUMEN:
considerar dentro del sistema es, un espacio definido
para posicionar el laberinto, en donde no se llegue a
mover, ya que al momento de tomar las fotos lo ideal es
que sean iguales.
Cuando las imgenes salen movidas o fuera de cuadro
ocasiona tambin muchos problemas difciles de
identificar y muchas veces se pierde tiempo buscando
alternativas cuando el problema esta directamente en la
foto y no en la lgica del programa.
INTRODUCCIN
MATLAB (abreviatura
de MATrix
LABoratory,
("laboratorio de matrices") es un software matemtico
que ofrece un entorno de desarrollo integrado(IDE) con
un lenguaje de programacin propio (lenguaje M).
CONCLUSIONES
REFERENCIAS
Daniel
Hernndez
Moedano,
instalacin y uso de graphics
para Ubuntu
PROGRAMA PRINCIPAL
3
J(i,j)=0;
else
J(i,j)=1;
end
end
end
figure (5)
imshow(J);
J=not(J);
imshow(J)
[d1,d2,d3] = size(A);
O=d1*d2;
if (d3>=3)
d=rgb2gray(A);
else
d=(A);
end
[L Ne]=bwlabel(J);
%% CALCULAR LAS PROPIEDADES DE LOS
OBJETOS DE LA IMAGEN
propied= regionprops(L);
hold on
figure(2)
imshow(d);
whos
rectangle('Position',propied(s(n)).Bou
ndingBox,'EdgeColor','b','LineWidth',2
)
end
for i= 1:g
for j=1:h
m(i,j)=d(i,j);
end
x=point(1);
y=point(2);
end
%CONVIERTE LA IMAGEN A BINARIO
A=0;
I=im2double(d);
for i=1:d1
for j=1:d2
A=A + I(i,j);
end
end
media=A/O*.6;
J=im2double(m);
for i=1:g
for j=1:h
if J(i,j)< media
j=1;
for i=1:size(s)
i;
if i~0 ;
v(j)=i;
j=j+1;
end
end
cont2=0;
close = point;
v;
A=imread('i39.jpg');
imshow (A)
while cont1 ~= 1
%derecha
der=0;
%derecha
while der ~= 1
x=x+1;
if base2(y,x+5)== 1
der =1;
end
figure(1)
imshow(BA);
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
if BA(i,j) == 0;
end
base(i,j)=1;
base2(i,j)=1;
end
end
end
end
end
%abajo
ab=0;
figure(2)
imshow(base);
%abajo
while ab ~= 1
figure(3)
imshow(base2);
y=y+1;
for i=1:5
for j=1:5
figure(3)
imshow(base);
cont2=1;
cont1=1;
base(i+x,j+y) = 1;
end
end
end
figure(2)
imshow(base)
impixelinfo
if base2(y+5,x)== 1
ab =1;
end
rep =0;
cont1=0;
for i=1:5
for j=1:5
%izquierda
while izq ~= 1
base(i+y,j+x) = .80;
end
x=x-1;
end
if base2(y,x-5)== 1
izq =1;
end
end
%izquierda
izq=0;
%izquierda
while izq ~= 1
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
x=x-1;
end
if base2(y,x-5)== 1
izq =1;
end
end
end
%abajo
ab=0;
%abajo
while ab ~= 1
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
y=y+1;
end
end
end
%arriba
arr=0;
%arriba
end
while arr ~= 1
figure(3)
imshow(base);
cont2=1;
cont1=1;
if base2(y+5,x)== 1
ab =1;
end
y=y-1;
if base2(y-5,x)== 1
arr =1;
end
for i=1:5
for j=1:5
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
base(i+y,j+x) = .80;
end
end
end
end
end
end
rep=rep+1;
if (x==close(1) && y==close(2))
%izquierda
izq=0;
cont1=1;
end
if (rep >=35)
cont1=1;
end
end
end
end
end
%abajo
ab=0;
%abajo
while ab ~= 1
rep2=0;
close2 = point;
while cont2 ~= 1
y=y+1;
%arriba
arr=0;
%arriba
while arr ~= 1
y=y-1;
end
if base2(y-5,x)== 1
arr =1;
end
if base2(y+5,x)== 1
ab =1;
end
for i=1:5
for j=1:5
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
end
end
base(i+y,j+x) = .80;
end
end
end
end
%derecha
der=0;
%derecha
while der ~= 1
%izquierda
izq=0;
%izquierda
while izq ~= 1
x=x+1;
x=x-1;
if base2(y,x+5)== 1
der =1;
end
if base2(y,x-5)== 1
izq =1;
end
for i=1:5
for j=1:5
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
base(i+y,j+x) = .80;
end
arr=0;
%arriba
end
while arr ~= 1
end
y=y-1;
%arriba
arr=0;
%arriba
if base2(y-5,y)== 1
arr =1;
end
while arr ~= 1
y=y-1;
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
if base2(y-5,x)== 1
arr =1;
end
end
for i=1:5
for j=1:5
end
end
base(i+y,j+x) = .80;
%izquierda
izq=0;
%izquierda
while izq ~= 1
end
end
x=x-1;
end
if base2(y,x-5)== 1
izq =1;
end
%izquierda
izq=0;
%izquierda
while izq ~= 1
x=x-1;
for i=1:5
for j=1:5
if base2(y,x-5)== 1
izq =1;
end
base(i+y,j+x) = .80;
end
for i=1:5
for j=1:5
end
end
base(i+y,j+x) = .80;
%abajo
ab=0;
end
end
%abajo
while ab ~= 1
end
y=y+1;
%arriba
end
figure(3)
imshow(base);
arr =1;
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
cont2=1;
break;
end
end
if base2(y+5,x)== 1
ab =1;
end
end
end
%derecha
der=0;
for i=1:5
for j=1:5
%derecha
while der ~= 1
base(i+y,j+x) = .80;
x=x+1;
end
if base2(y,x+25)== 1
der =1;
end
end
end
for i=1:5
for j=1:5
rep2=rep2+1;
if (x==close2(1) && y==close2(2))
cont2=1;
base(i+y,j+x) = .80;
end
if (rep2 >=10)
end
figure(3)
imshow(base)
cont2=1;
end
end
%arriba
arr=0;
%arriba
end
end
rep3 =0;
cont3=0;
cont4=0;
close = point;
while arr ~= 1
y=y-1;
if base2(y-5,x)== 1
arr =1;
end
%arriba
arr=0;
%arriba
while arr ~= 1
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
y=y-1;
if base2(y-5,x)== 1
%derecha
while der ~= 1
end
end
x=x+1;
end
%derecha
der=0;
if base2(y,x+25)== 1
der =1;
end
%derecha
while der ~= 1
for i=1:5
for j=1:5
x=x+1;
if base2(y,x+25)== 1
der =1;
end
base(i+y,j+x) = .80;
end
end
for i=1:5
for j=1:5
end
%arriba
arr=0;
%arriba
base(i+y,j+x) = .80;
end
while arr ~= 1
end
y=y-1;
end
%arriba
arr=0;
%arriba
if base2(y-5,x)== 1
arr =1;
end
while arr ~= 1
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
y=y-1;
if base2(y-5,x)== 1
arr =1;
end
end
end
for i=1:5
for j=1:5
base(i+y,j+x) = .80;
end
%derecha
der=0;
%derecha
while der ~= 1
end
end
y=x+1;
end
%derecha
der=0;
if base2(y,x+5)== 1
der =1;
end
10
end
for i=1:5
for j=1:5
end
base(i+y,j+x) = .80;
end
11