A loop that can repetitively extract features?
1 次查看(过去 30 天)
显示 更早的评论
Hi guys,
i would like to seek help! i'm trying to do a extract HOG feature from a list of UCF sport videos and save the size of hoefeature into a folder. how can i do it?
clc; clear; close;
% video data
vidObj=VideoReader('Kicking-Side-004.avi');
video=read(vidObj);
img=zeros(size(video,1),size(video,2),size(video,4));
for j=1:size(video,4)
img(:,:,j)=im2single(rgb2gray(video(:,:,:,j)));
end
% spatio temporal orientation filter
SOE = SpatialTemporalEnergy(img,'G3',3,0);
% seperate motion energy from static and unstructure energy
structure=max(SOE(:))/100;
SOE=max(bsxfun(@minus,SOE(:,:,:,1:end-1),SOE(:,:,:,end)+structure),0);
% normalization
SOE=bsxfun(@rdivide,SOE,sum(SOE,4)+eps);
% dense HOE
hoefeature=HOE(SOE,4,4,4);
% dense HOG
[gradient_x,gradient_y] = gradient(img);
hogfeature = HOG(gradient_x,gradient_y,4,4,4,8);
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!