What is the problem in the for loop?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Shaila parvin
am 17 Mär. 2014
Bearbeitet: Image Analyst
am 17 Mär. 2014
I've a problem in the for loop to extract texture features of images of a folder. The problem is in this line:
Im2=ComputeRankTransform(filename);
Can anyone please help me to access all images??
clc;
Im1=ComputeRankTransform('bi4.jpg');
folder = fullfile('E:\4-2\Thesis_codes\texture\code\dependencies');
srcFiles = dir(fullfile(folder, '*.jpg'));
for i = 1 : length(srcFiles)
% determins how many images are there in the folder,
filename = fullfile(folder,srcFiles(i).name);
thisImage = imread(filename);
Im2=ComputeRankTransform(thisImage);
sizeOfIm1=size(Im1);
sizeOfIm2=size(Im2);
if(sizeOfIm1==sizeOfIm2)
if(Im1==Im2)
fprintf('Yes\n');
else
fprintf('No\n');
end
else
fprintf('No Dimension\n');
end
end
0 Kommentare
Akzeptierte Antwort
per isakson
am 17 Mär. 2014
That is hard to tell based on the information you provide. However, here are some links on debugging in Matlab
2 Kommentare
Image Analyst
am 17 Mär. 2014
Bearbeitet: Image Analyst
am 17 Mär. 2014
The problem is we don't know what you mean when you say "help me to access all images" You say
thisImage = imread(filename);
so as far as we can tell, you're accessing the image right there with that line of code, and we don't know why you're asking.
By the way, you don't need to put useless tags (which I deleted) like "matlab" or "code" or similar on your post. All posts here are on MATLAB code.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!