-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdemo.m
32 lines (26 loc) · 786 Bytes
/
demo.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
%% Paths
addpath('matlab');
addpath('cmex');
%% Global variables (needed for callbacks)
global h imgId files imgDir configFile;
%% Input
imgDir = 'test_images';
imgId = 1;
configFile = fullfile('config', 'rp.mat');
%'config/rp_4segs.mat' to sample from 4 segmentations (slower but higher recall)
%'config/rp.mat' to sample from 1 segmentations (faster but lower recall)
%% Find images in dir:
files = dir(imgDir);
assert(numel(files) >= 3);
files = files(3 : end);
if(strcmp(files(1).name, '.svn'))
files = files(2 : end);
end
%% Figure initialization:
close all;
h = figure(1);
set(h, 'Menubar', 'none')
set(h, 'WindowButtonMotionFcn', @WindowButtonMotionCallback);
set(h, 'WindowButtonDownFcn', @WindowButtonDownFcnCallback);
%% Processing:
InteractiveCenterDemo(configFile);