Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
JAY R
JAY R le 25 Mar 2015
Commenté : Stephen23 le 25 Mar 2015
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.

Réponse acceptée

JAY R
JAY R le 25 Mar 2015
Modifié(e) : JAY R le 25 Mar 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 commentaire
Stephen23
Stephen23 le 25 Mar 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox 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