-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmulti_detect.m
More file actions
37 lines (30 loc) · 740 Bytes
/
multi_detect.m
File metadata and controls
37 lines (30 loc) · 740 Bytes
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
function demo()
name = 'G:/EDU/_SOURCE_CODE/Belgium/01/image.004639.jp2';
im=imread(name);
box1 = test(name,'sign');
box2 = test(name,'blueSign');
box1 = [box1;box2];
showboxes(im, box1);
function bbox = test(name, cls)
% load and display image
im=imread(name);
clf;
image(im);
axis equal;
axis on;
disp('input image');
% disp('press any key to continue'); pause;
% load and display model
load(['VOC2007/' cls '_final']);
% load([cls '_final']);
% visualizemodel(model);
disp([cls ' model']);
% disp('press any key to continue'); pause;
% detect objects
boxes = detect(im, model, 0);
% get bounding boxes
bbox = getboxes(model, boxes);
top = nms(bbox, 0.5);
bbox = clipboxes(im, top);
% showboxes(im, bbox);
disp('bounding boxes');