scilab - Writing multiple images to a single folder

五迷三道 提交于 2019-12-12 02:45:37

问题


I am working in Scilab 5.5.2. I need to write multiple images to a single folder. The images which I want to write are cropped images from a set of inputs. I am able to write a single image to the folder with the following command:

imwrite(fname,strcat('C:\Users\dell\Desktop\example_sci\myfolder\1.jpg'));

I have put this in a for loop, so the output image is over written and the result is a single image.

How can i write all the results to a single folder?


回答1:


You should create the paths like this.

for j=1:10
   pathname = "C:\Users\dell\Desktop\example_sci\myfolder\"+ string(j) + ".jpg"
   xs2jpg(gcf(), pathname); 
end

I usually use the xs2*-command to export a chosen figure. (I use scilab 5.5.0, which does not contain imwrite anymore.)



来源:https://stackoverflow.com/questions/35644639/scilab-writing-multiple-images-to-a-single-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!