how to create a newfolder and save images in it?

조회 수: 151 (최근 30일)
Pradeep Gowda
Pradeep Gowda 2015년 5월 10일
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
Raka Mukherjee
Raka Mukherjee 2019년 11월 15일
I have figured out the issue, Thanks.
Jorge Ignacio Cisneros Saldana
Jorge Ignacio Cisneros Saldana 2022년 10월 3일
What was the issue?

댓글을 달려면 로그인하십시오.

추가 답변 (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