标签:round log name blog end jpg read import filename
base_path = ‘D:\image\people‘; bb = importdata(‘output.txt‘); output_img = cell(99); for i = 1:100%length(temp_img) nz = strcat(‘%0‘,num2str(4),‘d‘); temp_id = sprintf(nz,i); id = strcat(temp_id,‘.jpg‘); img_path = fullfile(base_path,id); temp_img = imread(img_path); output_img = temp_img(bb.data(i,2):bb.data(i,4),bb.data(i,1):bb.data(i,3),:); filename = strcat(‘D:\image\output\‘,temp_id,‘.jpg‘); imwrite(output_img,filename); end
标签:round log name blog end jpg read import filename
原文地址:http://www.cnblogs.com/yqyouqing/p/6980409.html