여러 개의 이미지가 포함 된 폴더가 있습니다. 모든 이미지를로드하고 개별적으로 처리하고 싶습니다 ... matlab을 사용하여 어떻게 할 수 있습니까? 다음 코드를 사용해 보았습니다. "xyz.jpg를 읽을 수 없습니다. 해당 파일이나 디렉토리를 찾을 수 없습니다"... xyz는 해당 폴더의 첫 번째 파일입니다.matlab에있는 폴더의 모든 이미지로드
imagefiles = dir('F:\SIFT_Yantao\demo-data\*.jpg');
nfiles = length(imagefiles); % Number of files found
for i=1:nfiles
currentfilename=imagefiles(i).name;
I2 = imread(currentfilename);
[pathstr, name, ext] = fileparts(currentfilename);
textfilename = [name '.mat'];
fulltxtfilename = [pathstr textfilename];
load(fulltxtfilename);
descr2 = des2;
frames2 = loc2;
do_match(I1, descr1, frames1, I2, descr2, frames2) ;
end
코드와 질문이 정확히 어떻게 같을 수 있습니까? 이게 어떤 숙제인가요? – tashuhka