Sliding window and HOG FEATURE

3 次查看(过去 30 天)
aitali hassna
aitali hassna 2020-4-28
Hello Friends ,
please i have a question about how can I draw a slidingwindow with HOG descriptor
i am trying to do with but i stuck with..
this is my code
[r,c]=size(img)
z=zeros(r,c);
for nbr=1:r% r is the nbr of row of input image
for nbc=1:c% c is the nbr of column of the input image
% imge2=readimage(imdsTest,2);
% img2=rgb2gray(imge2);
img3=imge2(g:g+10,f:f+12);% using input image size [g+10 f+12]
histo=extractHOGFeatures(img3, 'CellSize', [2 2]); %extract hog features
[pred ,scores]=predict(classifier,histo);%predictiin
if (string(pred)=='non_Stop')
z(g,f)=-scores(2);
% break;
end
f=1;
g=g+1;
end
g=1;
f=f+1;
end
Thank you

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Feature Detection and Extraction 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by