Hello, I am a novice user in MATLAB. So,I have a question. I have 8760 of images in one folder and I want to read it one-by-one and take every time 336 image from first.how can i do this? As for example, At first,(1-3​36),(2-337​),(3-338), (4-339), (5-

1 回表示 (過去 30 日間)
Hello, I am a novice user in MATLAB. So,I have a question. I have 8760 of images in one folder and I want to read 336 number of images sequentially and consider every time 336 set of images from first.How can i do this? As for example, I want to take (1-336),(2-337),(3-338), (4-339), (5-340),...., (8425-8760) from images folder. Is it possible?

採用された回答

KSSV
KSSV 2016 年 8 月 26 日
imgfiles = dir('*.jpg'); % You are in the folder of jpg files/ change extension accordingly
Nfiles = length(imgfiles) ; % number of image files
% loop for each file
for i = 1:Nfiles
fname = imgfiles(i).name ; % file name
data = imread(fname) ; % read the image
%%do what you want %%%
end
  4 件のコメント
Dipankar Kumar
Dipankar Kumar 2016 年 8 月 26 日
Thank you for your reply. I want to consider 336 sets of images. But, At first I want to take 336 only, image number-1 to image number-336, After, image number-2 to image number-337, image number-3 to image number-338 continue...
KSSV
KSSV 2016 年 8 月 26 日
It is pretty simple....run a loop from 1 to 336 for the first 336 images...you fix the loop as you want...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by