Storing multiple image data in feature vector or .mat file,
이전 댓글 표시
% 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
Nitin
2014년 8월 13일
It would make it easy for us if you could please post some of your code including parts where you are facing difficulties.
답변 (1개)
Joseph Cheng
2014년 8월 13일
0 개 추천
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
Joseph Cheng
2014년 8월 13일
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.
카테고리
도움말 센터 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!