Unable to determine file format and Ground truth error... Help
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
devang bhatt
el 26 de Abr. de 2018
Comentada: devang bhatt
el 27 de Abr. de 2018
disp('sparce disctonary processing. . ');
model = cell(1,5);
modelLow = cell(1,5);
DHigh = cell(1,5);
DLow = cell (1,5);
lamda = 0.025;
max_level= 1;
windowSize=5;
skipSize=1;
DictionarySize =100;
%%%%lena Train
dirNameTrain = '.\Train\';
% % outputName = '.\Results2\';
DTrain = dir(dirNameTrain); % check dir command, in matlab documentation
i=3;
ground_truth = [dirNameTrain DTrain(i).name];
patchSize = windowSize ^2;
truth_img = imread(ground_truth);
end
2 comentarios
Ameer Hamza
el 27 de Abr. de 2018
Can you show the output of
disp(class(DTrain(3).name));
disp(DTrain(3).name);
Respuesta aceptada
Walter Roberson
el 27 de Abr. de 2018
You are blindly reading in everything in the directory, but your directory contains Thumbs.db as well as whatever content you are expecting. You should be making your dir() more specific.
3 comentarios
Walter Roberson
el 27 de Abr. de 2018
Change
DTrain = dir(dirNameTrain); % check dir command, in matlab documentation
to
DTrain = dir(fullfile(dirNameTrain, '*.jpg')); % check dir command, in matlab documentation
Más respuestas (0)
Ver también
Categorías
Más información sobre File Operations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!