以下は、フォルダー内の任意の数の画像の一般的なコードです。フォルダーごとに 3 つの画像があり、それぞれのファイル名の形式がわかっている場合は、簡単にすることができます。
%# Set the relative path for the database
basePath = 'Database/CASIA Iris Image Database (version 1.0)/';
for iFolder = 1:108
%# Set current folder
folder = sprintf('%s%03d/', basePath, iFolder);
%# Find the image (e.g. bmp) files in the folder. Modify bmp for your needs.
%# and also modify 'left' string according to the subfolder of left images
filenames = arrayfun(@(x) x.name, dir([folder 'left/*.bmp']),'UniformOutput',false);
for iFile = 1:length(filenames)
img = imread([folder filenames{iFile}]);
%# and process the image
%# ...
end
%# Modify the code for to run it for right folder
%# ...
end