how to create a newfolder and save images in it?

213 次查看(过去 30 天)
i'm accessing all the images in a folder and processing it. now i wanna save all these images in a new folder. the question is how do i create a new folder and start saving the processed images into the new folder?

采纳的回答

Walter Roberson
Walter Roberson 2015-5-10
You would use mkdir() to create the new directory, and you would use the instructions I gave in your previous Question to save the files to there.
For example,
destdirectory = 'C:\Documents and Settings\Pradeep\Processed';
mkdir(destdirectory); %create the directory
thisimage = 'skidoo023.jpg';
fulldestination = fullfile(destdirectory, thisimage); %name file relative to that directory
imwrite(TheData, fulldestination); %save the file there directory
  9 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by