binary image access in matlab
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I have binary images(.jpg)I want to access those images successively for training in matlab.How to access it?Is it required to save images in specific format or database? thanks
0 件のコメント
回答 (1 件)
  Wouter
      
 2013 年 3 月 21 日
        if all the files are in the same folder you could use:
 pathtofiles            = '/path/to/folder/';
 allfiles               = dir(pathtofiles); % use dir to get the file 
                                                   % information of directory
 selection_of_jpg_files = ~([allfiles.isdir])      % only files that are not (~) 
                                                   % a directory
 for index = find(selection_of_jpg_files)
    if strcmp(allfiles(index).name(end-3:end),'jpg') % check if the file is a jpg 
        IMG = imread(fullfile(pathtofile,allfiles(index).name) % load the file
        % now do something with the IMG...
    end
 end
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で Search Path についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!