how to create a newfolder and save images in it?

150 vues (au cours des 30 derniers jours)
Pradeep Gowda
Pradeep Gowda le 10 Mai 2015
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?

Réponse acceptée

Walter Roberson
Walter Roberson le 10 Mai 2015
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 commentaires
Raka Mukherjee
Raka Mukherjee le 15 Nov 2019
I have figured out the issue, Thanks.
Jorge Ignacio Cisneros Saldana
What was the issue?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by