问题描述
我在 Scilab 5.5.2
工作。我需要将多个图像写入单个文件夹。我想要写的图像是来自一组输入的裁剪图像。我可以使用以下命令将单个图像写入文件夹:
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'));
我把它放在for循环中,所以输出图像被覆盖了,结果是单个图像。
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?
推荐答案
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
我通常使用 xs2 *
- 用于导出所选图形的命令。 (我使用了scilab 5.5.0,它不再包含 imwrite
。)
I usually use the xs2*
-command to export a chosen figure. (I use scilab 5.5.0, which does not contain imwrite
anymore.)
这篇关于scilab - 将多个图像写入单个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!