save_file_name='C:\Users\cong\Desktop\研一实战\项目\图像中时间数字识别\OCR\result6\';
for j=0:1:9
    image_path=strcat('C:\Users\cong\Desktop\研一实战\项目\图像中时间数字识别\trainingSample\num',num2str(j),'\');
    file=dir(image_path);%%%%%%    
    txtname=strcat('result',num2str(j),'.txt');    
    for i=3:length(file)
         path= strcat(image_path,file(i).name);%%%%%%
         fid=fopen([save_file_name,txtname],'a');%%%%%
         fprintf(fid,'%s\n',path);
         fclose('all');
    end    
end

 

相关文章:

  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-08-05
  • 2022-12-23
  • 2022-01-09
  • 2022-02-06
猜你喜欢
  • 2021-06-01
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
相关资源
相似解决方案