필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
JAY R
JAY R 2015년 3월 25일
댓글: Stephen23 2015년 3월 25일
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.

채택된 답변

JAY R
JAY R 2015년 3월 25일
편집: JAY R 2015년 3월 25일
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
Stephen23
Stephen23 2015년 3월 25일
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.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by