필터 지우기
필터 지우기

How to use Extract interest point descriptors in videos of folders

조회 수: 2 (최근 30일)
Kong
Kong 2020년 3월 24일
댓글: Kong 2020년 4월 17일
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);

채택된 답변

Prabhan Purwar
Prabhan Purwar 2020년 3월 27일
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!!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by