Storing multiple image data in feature vector or .mat file,

4 vues (au cours des 30 derniers jours)
Adnan Ibrahim
Adnan Ibrahim le 13 Août 2014
Modifié(e) : Adnan Ibrahim le 13 Août 2014
% the first part of the code reads all the images and then crops each image one by one.my problem is ,each cropped image should go to the loop and then it has be saved in the .mat file .You can see the last part of my code. Sorry, for the posting untidy works before. Thank you very much for the quick response am looking your idea.
end
image= 'D:\NAI\images\';
file = dir(fullfile(image, '*.tif'));
totimages = numel(file);
for i = 1: totimages
name= fullfile(image, file(i).name);
images = imread(name);
im_crop= imcrop(images,[]);
img= imresize(im_crop,[128 128]);
end
end
% Incriminating the feature vector's index
x =statxture([ tmp2; coeff_h{2}(:,:,k); 255*ones(5,col/4) ])
for i = 1:totimages
x= [x] +i
end
end*
  1 commentaire
Nitin
Nitin le 13 Août 2014
It would make it easy for us if you could please post some of your code including parts where you are facing difficulties.

Connectez-vous pour commenter.

Réponses (1)

Joseph Cheng
Joseph Cheng le 13 Août 2014
Without any example implementation code, my thought is that in your loop, to go through each image, the feature vector is not incrementing its index properly or at all such that you are overwriting it each time. you'll need to either concatenate, check to see how each one is stored (using the debug tool), and/or not placed the feature vector = something in the right place (after the end of the for loop).
  1 commentaire
Joseph Cheng
Joseph Cheng le 13 Août 2014
yeah so your code below is complete? if not it doesn't belong in the Answer section. Also can you reformat so it is legible. Check the Preview Screen or highlight the code after you paste it in and hit the {}Code button.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by