how can i save feature vectors in a mat file?

조회 수: 6 (최근 30일)
maida
maida 2016년 12월 8일
편집: Jan 2016년 12월 8일
i have 50 rows and infinite(unknown lets say 30,000) columns. how can i use for loop using 50 iterations as there are 50 different images whom feature vectors i am trying to store.. please help me

답변 (1개)

Jan
Jan 2016년 12월 8일
FileList = dir('*,jpg');
Result = nan(length(FileList), 30000);
for iFile = 1:numel(FileList)
FileName = FileList{iFile}.name;
... obtain features
Result(iFile, :) = <features>
end
  댓글 수: 2
maida
maida 2016년 12월 8일
Error using cast Conversion to single from struct is not possible.
FileList = dir('E:\RESEARCH WORK\Features_vect_lungs\*.png');
Result = nan(length(FileList), 30000);
for iFile = 1:numel(FileList)
FileName = FileList(iFile);
isRotInv=false;
isChanWiseRot=false;
filtR= generateRadialFilterLBP(8, 1);
fv= efficientLBP(FileName, 'filtR', filtR, 'isRotInv',
false, 'isChanWiseRot', false);
Result(iFile, :) = fv;
end
Jan
Jan 2016년 12월 8일
편집: Jan 2016년 12월 8일
Do you see, that your code is gard to read? Omit the empty lines and use the "{} Code" button to see, how code is formatted properly. Please.
It is necessary to reveal, which line causes the error. We cannot guess this, while this detail is shown in your command window.
If the failing line is "Result(iFile, :) = fv;", you have to find out, how you want to store the "30'000" feature. I cannot run your code and cannot guess its intention.

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

카테고리

Help CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by