Effacer les filtres
Effacer les filtres

how to move image to a folder in for loop

1 vue (au cours des 30 derniers jours)
rubia
rubia le 22 Avr 2013
Modifié(e) : Adewale Obaro le 10 Août 2018
i have 10 images. and i divide every image into 4 parts.now i want store first part of all images into one folder,second part of all images into second folder... respectively. so what is the code for it..

Réponses (2)

Harri  S
Harri S le 22 Avr 2013
help imwrite

Adewale Obaro
Adewale Obaro le 10 Août 2018
Modifié(e) : Adewale Obaro le 10 Août 2018
THIS WILL DEFINITELY HELP YOU
destinationFolder = 'C:\Users\ADEWALE\Desktop\FACE\Matlab Projects\MATLAB projects\PCA ICA LDA\traindatabase';
if ~exist(destinationFolder, 'dir') mkdir(destinationFolder);
end
i=randi([140,200]);
baseFileName = sprintf('%d.JPG',i); % e.g. "1.png"
fullFileName = fullfile(destinationFolder, baseFileName);
imwrite(processed_img, fullFileName);

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by