Filter löschen
Filter löschen

How to read the specific numbered image from a serially numbered image

1 Ansicht (letzte 30 Tage)
Hi everyone, I would folder of 1000 image with the number from "IM_NN_PP.jpg" form. such that (M,NN,PP are the integer number)
I1_01_01.jpg;
I1_01_02.jpg;
I1_01_03.jpg;
I1_02_01.jpg;
I1_02_02.jpg;
I1_02_03.jpg;
I2_01_01.jpg;
I2_01_02.jpg;
I2_01_03.jpg;
I2_02_01.jpg;
I2_02_02.jpg;
I2_02_03.jpg;
etc
Now I would like read only those image imahges for all NN (for 01 to 10) i.e.
I1_01_01.jpg;
I1_01_02.jpg;
I1_01_03.jpg;
I2_01_01.jpg;
I2_01_02.jpg;
I2_01_03.jpg;
and so on.
Thanks in advance.

Akzeptierte Antwort

JAY R
JAY R am 25 Mär. 2015
Bearbeitet: JAY R am 25 Mär. 2015
for XX=1:10
for YY=1:10
for Z = 1:10
Iname1=sprintf('I%1.2d_%1.2d_%d.bmp', XX, YY,Z)
imread(Iname1)
end
end
end
Now one can modify to get the any numbered image.
  1 Kommentar
Stephen23
Stephen23 am 25 Mär. 2015
Rather than just accepting your own answer you might liked to have waited for other suggestions, after all this is a forum for discussing and giving code advice. Others might even have solutions that you had not thought of, that might be more suitable for solving the specific talk at hand.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by