Sliding window and HOG FEATURE

1 view (last 30 days)
aitali hassna
aitali hassna on 28 Apr 2020
Edited: aitali hassna on 28 Apr 2020
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!