Trying to use the function recursiveFileList but it doesnt exist how can i use it help thanks.
imageDir=[mltRoot, '/dataSet/att_faces'];
faceData=recursiveFileList(imageDir, 'pgm');
fprintf('Reading %d face images from %s...', length(faceData), imageDir)
tic
for i=1:length(faceData)
% fprintf('%d/%d: file=%s\n', i, length(faceData), faceData(i).path);
faceData(i).image=imread(faceData(i).path);
end
fprintf(' ===> %.2f sec\n', toc);
fprintf('Saving faceData.mat...\n');
save faceData faceData

답변 (2개)

Geoff Hayes
Geoff Hayes 2015년 1월 24일

0 개 추천

Haziq = perhaps consider an alternative to recursiveFileList (since you don't have the code for it). See Jonathan Sullivan's FEX submission dir2 for an example of a recursive file "finder".
Image Analyst
Image Analyst 2015년 1월 24일

0 개 추천

You can use genpath(). See attached example where it gets a list of all subfolders and then goes into them finding filenames.

카테고리

도움말 센터 및 File Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

질문:

2015년 1월 22일

답변:

2015년 1월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by