Tag: matlab cvst

加载目录中的所有图像

我有一个目录中的某些图像,我想加载所有这些图像做一些处理。 我尝试使用loadfunction。 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 我得到一个错误,因为无法读取xyz.jpg找不到这样的文件或目录,其中xyz是我的第一个图像在该目录中。 我也想从目录加载所有格式的图像,而不是只是JPG格式…我怎么能这样做?