Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function teste()
- for k=1:99
- %if exist(Name, 'file') == 2
- nome_imagem=strcat(int2str(k),'.jpg');
- x=imread(nome_imagem);
- nome_fich=strcat(int2str(k),'.txt');
- fid=fopen(nome_fich,'w');
- for i=1:size(x,1)
- for j =1:size(x,2)
- if x(i,j)~=0
- x(i,j)=1;
- end
- end
- end
- for i = 1:size(x,1)
- fprintf(fid,'%d\t',x(i,:));
- fprintf(fid,'\n');
- end
- fclose(fid);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement