-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.m
51 lines (39 loc) · 1.03 KB
/
test.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%
%
% im=imread('092.png');
%
% bgray=rgb2gray(im);
%
% BW=im2bw(bgray);
% BW = ~BW;
%
%
% st = regionprops(BW, 'BoundingBox' );
% for k = 1 : length(st)
% thisBB = st(k).BoundingBox;
% % rectangle('Position', [thisBB(1),thisBB(2),thisBB(3),thisBB(4)],'EdgeColor','r','LineWidth',2 );
% %
% % end
%
%
%
%
% Ftt = dir('C:\Users\Hela\Documents\MATLAB\Human_Detection_Project\photos\*.png');
%
% for i=1:length(Ftt)
% file2= strcat('C:\Users\Hela\Documents\MATLAB\Human_Detection_Project\photos\',Ftt(i).name);
% im=imread(file2);
% im=imresize(im, [128,256]);
function RESULT=test(input)
for j=1:7
Img=input(1:128,1+64*(j-1)-32*(j-1): 64*j-32*(j-1),:);
if (SVMClassification(Img)==1)
k=1+64*(j-1)-32*(j-1);
rect = [k, 1, 64, 128];
rgb = [255, 0 , 0];
thickness = 3;
RESULT=drawBox(input, rect, rgb, thickness);
end
end
end
% end