hello. im doing my diploma project, and i dont know what do. i spent few hours to get the solution, but have no idea how to solve it. the last line of my code save the last iteration and i understand why. the problem is how to save every iteration.
numImages = numel(sciezka(1).Files) %tu wyciaga ile jest zdjec w folderze
tabela=[];
for i = 1:numImages
C=(readimage(sciezka,i)); %wczytujesz fote
vektorekpunkciki=detectSURFFeatures(C);
punktydlastania=selectStrongest(vektorekpunkciki, 20)
trainingFeatures = extractFeatures(C, punktydlastania);
tabela(i)=trainingFeatures(i)
end

 채택된 답변

Guillaume
Guillaume 2017년 12월 11일
편집: Guillaume 2017년 12월 11일

0 개 추천

That line
tabela(i)=trainingFeatures(i)
makes no sense at all. It stores numImages value in tabela , but for image i, it stores the 1st point of the ith feature vector and nothing else. I suspect you wanted either:
tabela = zeros(20, 64, numImages); %store feature vectors as 3d matrix.
for i = 1:numimages
%...
tabela(:, :, i) = trainingFeatures;
end
You then get the feature vector for a given image with
tabela(:, :, imagenumber)
Or you can use
tabela = cell(1, numImages);
for i = 1:numimages
%...
tabela{i} = trainingFeatures;
end
You then get the feature vector for a given image with
tabela{imagenumber}

댓글 수: 1

Kijek
Kijek 2017년 12월 11일
this is exactly what i was looking for. thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2017년 12월 11일

편집:

2018년 1월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by