问题
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