Matlab批量實現圖片檔案格式轉換

dp_research發表於2017-05-02
for n=0:1673
 
str1='G:\obj\';str2=num2str(n);str3='.png';
SC=[str1,str2,str3];
            
i=imread(SC);  
%imshow(i),title('Original');  
figure(2),imshow(i,'border','tight','InitialMagnification','fit'),title('Translated') ; 

set (gcf,'Position',[0,0,500,500]);
axis normal;

saveas(figure(2),['G:\obj\',num2str(n),'.jpg']);

end

相關文章