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

1 visualización (últimos 30 días)
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.

Respuesta aceptada

JAY R
JAY R el 25 de Mzo. de 2015
Editada: JAY R el 25 de Mzo. de 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 comentario
Stephen23
Stephen23 el 25 de Mzo. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by