how to move image to a folder in for loop

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..

回答 (2 件)

Harri  S
Harri S 2013 年 4 月 22 日

0 投票

help imwrite
Adewale Obaro
Adewale Obaro 2018 年 8 月 10 日
編集済み: Adewale Obaro 2018 年 8 月 10 日

0 投票

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);

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2013 年 4 月 22 日

編集済み:

2018 年 8 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by