Effacer les filtres
Effacer les filtres

How to use Extract interest point descriptors in videos of folders

2 vues (au cours des 30 derniers jours)
Kong
Kong le 24 Mar 2020
Commenté : Kong le 17 Avr 2020
Hello.
I want to classify videos after feature extraction.
I tested this link using a image.
Could you give some ideas to use videos using for loop? I want to convert videos to gray images and use feature extraction. (use for loop)
Finally, I want to save the feature as matrix.
I am beginner at Matlab.
clear all
close all
I = imread('bend_shot.png');
I = rgb2gray(I);
points = detectSURFFeatures(I);
[features, valid_points] = extractFeatures(I, points);
figure; imshow(I); hold on;
plot(valid_points.selectStrongest(10),'showOrientation',true);

Réponse acceptée

Prabhan Purwar
Prabhan Purwar le 27 Mar 2020
Hello,
I am assuming that you are making use of a Neural Network for classification purpose.
In order to train Network using video, extract all the frames from each video and create an imageset for all frames. You may make use of HOG or SURF features from the frames and fitcecoc can be used to classify the frames using the description of each imageset as a label.
Following code may be implemented to make a row-wise matrix for frames using SURF features as descriptors.
for i=1:length(frames)
st=strcat('D:\test\chair\000',num2str(i,'%02d'),'.png'); %%Directory to image set
I = imread(st);
I = rgb2gray(I);
points = detectSURFFeatures(I);
[features, valid_points] = extractFeatures(I, points);
[s1,s2]=size(features);
S=s1*s2;
ftr=reshape(features,1,S);
F(i,:)=ftr;
end
Please refer to the following links:
Hope it helps!!
  1 commentaire
Kong
Kong le 17 Avr 2020
Thank you so much!
Your comment is so useful for me.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows 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