-
Notifications
You must be signed in to change notification settings - Fork 10
/
cfg_autocalib.m
53 lines (47 loc) · 2.13 KB
/
cfg_autocalib.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
52
53
function [arc_cfg, sampler_cfg, ransac_cfg, lo_cfg] = cfg_autocalib(varargin)
% Default configurations for auto-calibration
cfg = struct();
cfg.low = 15;
cfg.high = 50;
cfg.alpha = 1.5;
cfg.min_length = 0.04;
cfg.line_tol = 0.0015;
cfg.outlierT = 1e5;
cfg.min_trial_count = 500; % minimum number of RANSAC trials
cfg.max_trial_count = 500; % maximum number of RANSAC trials
cfg.max_num_retries = 100; % maximum number of re-sampling per trial
cfg.confidence = 0.995; % desired probability of RANSAC's success
cfg.display = true; % whether to display RANSAC's trials
cfg.display_freq = 1; % display every [N]th trial of RANSAC
cfg.irT = 0.3; % inlier ratio threshold
cfg.reprojT_rgn = 5; % reprojection threshold for points of covariant regions
cfg.reprojT_arc = 1.5; % reprojection threshold for contours points
cfg.baselineT_rgn = 25; % minimum average distance between points in a region correspondence
cfg.w_rgn = 1; % weights for covariant regions in weighted inlier ratio (currently unavailable)
cfg.w_arc = 1; % weights for contours in weighted inlier ratio (currently unavailable)
cfg.MaxIter = 10; % max number of LO iterations
cfg = cmp_argparse(cfg, varargin{:});
arc_cfg = {'low', cfg.low,...
'high', cfg.high,...
'alpha', cfg.alpha,...
'min_length', cfg.min_length,...
'line_tol', cfg.line_tol,...
'outlierT', cfg.outlierT,...
};
sampler_cfg = {'min_trial_count', cfg.min_trial_count,...
'max_trial_count', cfg.max_trial_count,...
'max_num_retries', cfg.max_num_retries,...
'confidence', cfg.confidence,...
};
ransac_cfg = {'display', cfg.display,...
'display_freq', cfg.display_freq,...
'irT', cfg.irT,...
};
lo_cfg = {'reprojT_rgn', cfg.reprojT_rgn,...
'reprojT_arc', cfg.reprojT_arc,...
'baselineT_rgn', cfg.baselineT_rgn,...
'w_rgn', cfg.w_rgn,...
'w_arc', cfg.w_arc,...
'MaxIter', cfg.MaxIter,...
};
end