I've made code for face recognition, but I get this error. Can anyone help me?
Here is my code:
function histSLGS = FP_FaceRecognition_Neat
directory = uigetdir;
imageVolum = [];
for i = 1:23
%imageVolume = [];
%directoryFinal = cell(23,1);
garing = '\';
extension = '.txt';
strI = num2str(i);
directoryFinal = strcat(directory,garing,strI);
fileList = dir(directoryFinal);
%fl = fileList
%DF = directoryFinal
%a = numel(fileList)
for idx = 3:numel(fileList)
tempImage = imread(fullfile(directoryFinal, fileList(idx).name));
imageVolum(:,:,:,idx) = tempImage;
end
%sI = size(imageVolum)
for j = 3:33
strJ = num2str(j);
garis = '_';
fileNameFinal = cell(30,1);
fileNameFinal = strcat(directoryFinal,garing,strI,garis,strJ,extension);
imgManipulation3 = SLGS(imageVolum(:,:,:,j));
histSLGS = hist(imgManipulation3);
[rowhist, columnhist] = size(histSLGS);
%r = rowhist
%c = columnhist
%fn = fileNameFinal
fid = fopen(fileNameFinal, 'w');
for l = 1:rowhist
for k = 1:columnhist
fprintf(fid, '%.3f, ', histSLGS(l,k));
end
fprintf(fid, '\n');
end
fclose(fid);
histSLGS;
end
end
I got this error message:
Unable to determine the file format.
Error in ==> FP_FaceRecognition_Neat at 18
tempImage =
imread(fullfile(directoryFinal,
fileList(idx).name));
Thanks.