フィルターのクリア

How can I store 10 strongest points of surf features of multiple images in one variable using matlab?

1 回表示 (過去 30 日間)
i have 40 images i extract the surf features 10 strongest points in a loop but the variable where i stored the values, it gives me the values of last image i.e. 10x2 values. i want to save the values for all 40 images in that single variable.how can i get for all images?? for 40 images my desired result is 40x 2. any help will be really appreciated.thanks
  2 件のコメント
Farman Shah
Farman Shah 2018 年 8 月 9 日
編集済み: Stephen23 2018 年 8 月 9 日
this is my code
srcFiles = dir('mypath\*.jpg');
for i = 1 : length(srcFiles)
filename = strcat('mypath',srcFiles(i).name);
input_images = imread(filename);
I2=rgb2gray(input_images);
points1 = detectSURFFeatures(input_images)
strongest = points1.selectStrongest(10);
%
plot(strongest);
strong= round(strongest.Location);
end
Stephen23
Stephen23 2018 年 8 月 9 日
Farman Shah's "Answer" moved here:
the code is working fine but stores only the 10 strongest points of the last image ..i want it to sotre for multiple images in a single variable.so then i can label it for further classification..any hope???

サインインしてコメントする。

採用された回答

Stephen23
Stephen23 2018 年 8 月 9 日
編集済み: Stephen23 2018 年 8 月 9 日
Just use a cell array and indexing:
D = 'mypath';
S = dir(fullfile(D,'*.jpg'));
N = numel(S);
C = cell(1,N);
for kk = 1:N
filename = fullfile(D,S(kk).name);
...
strongest = points1.selectStrongest(10);
C{kk} = strongest;
end
Then the strongest values for each loop iteration are stored in the cell array C.
It is recommended to use fullfile rather than concatenating strings and messing about with file separactor characters.
  10 件のコメント
Farman Shah
Farman Shah 2018 年 8 月 9 日
編集済み: Farman Shah 2018 年 8 月 9 日
okay thank you so much stephen Cobeldick sir..your idea was great and helpful...i asked another question. please have a look of that question too..
fadi ssuhimat
fadi ssuhimat 2020 年 2 月 7 日
Did you find the answer?
I have same problem exactly?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by