how to load images in order

조회 수: 1(최근 30일)
Kamyar Mazarei
Kamyar Mazarei 2021년 4월 10일
댓글: Kamyar Mazarei 2021년 4월 12일
hi i have 520 images in total
20 images in 26 files
each images is names 1 to 20 and files 1 to 26
i want to load them 1 by 1 and put them in a matrix or process them
im looking for something like this :
for ii=1:26
for jj=1:20
a=load('C:\Users\Nik\Desktop\NNDL-Pr1\English Alphabet\ii\jj.png');
*process codes*
thank you

채택된 답변

Jan 2021년 4월 10일
Folder = 'C:\Users\Nik\Desktop\NNDL-Pr1\English Alphabet';
for ii=1:26
SubFolder = sprintf('%d', ii);
for jj=1:20
File = fullfile(Folder, SubFolder, sprintf('%d.png', jj));
a = load(File);
  댓글 수: 2
Kamyar Mazarei
Kamyar Mazarei 2021년 4월 12일
ok i got it
need to use a=imread(File);
thanks man

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by