cant access my image directory?

i created folder my image sets. then i called this images one by one for my coding access..but its not works. pls correct it.
files=dir('D:\M.E project10\train');
for k=1:10
I=imread(k,:);
end
i getting this error: Error in ==> folderimage at 3 I=imread(k,:);

Réponses (2)

Jan
Jan le 10 Fév 2013

0 votes

Do you expect imread(k, :) to know where to find the file? You do not use the files variable inside the loop. but imread gets the loop counter only.
Please copy error messages completely, when you want to get help in the forum. In this case we can guess, that the 2nd input ":" is not accepted by imread. Reading the documentation will be useful: doc imread.

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Tags

Question posée :

le 9 Fév 2013

Community Treasure Hunt

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

Start Hunting!

Translated by