-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgo.m
61 lines (49 loc) · 1.56 KB
/
go.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
54
55
56
57
58
59
60
61
%
% Copyright (c) 2018 James Pritts
% Licensed under the MIT License (see LICENSE for details)
%
% Written by James Pritts
%
%img_name = 'pavement'
%img_name = 'darts'
%img_name = 'tran_1_046'
%img_path = 'circletext'
%img_path = 'nyu_test3'
%img_path = 'data/pattern24w.jpg'
%img_path = 'download'
%img_path = 'img'
%img_path = 'raw'
%img_path = 'cards'
%img_path = 'small'
%img_path = 'data/pattern1b.jpg';
%img_path = 'pavement'
%img_path = 'coke'
%img_name = 'fisheye'
%img_path = 'data/circles.jpg';
%img_path = 'data/barrels.jpg';
%img_path = 'data/cropped_dartboard.jpg';
%img_path =
%'/home/jbpritts/Downloads/data/fisheye/Nikon_D7000-10.5mm-f10.5mm-fe3516mm_shotwideopen.jpg';
%img_path = 'data/new_medium_63_o.jpg'
%img_path = '~/Desktop/veggies.jpg';
dt = datestr(now,'yyyymmdd_HHMMSS');
repeats_init();
solver = WRAP.lafmn_to_qAl(WRAP.laf22_to_ql);
results_path = fullfile('results',class(solver.solver_impl),dt);
ransac_settings = ...
{ 'min_trial_count', 750, ...
'max_trial_count', 750, ...
'reprojT', 15 } ;
dr_settings = ...
{ 'desc_cutoff', 150 };
varargin = { ransac_settings{:} dr_settings{:} };
[model_list,res_list,stats_list,meas,img] = ...
do_one_img(img_path,solver,varargin{:});
save_results(results_path,img_path,dt,model_list, ...
res_list,stats_list,meas,img);
render_settings = ...
{ 'min_scale',1e-5, 'max_scale',15 };
[uimg,rimg,rd_div_line_img] = ...
render_imgs(img.data,meas,model_list(1),res_list(1),...
render_settings{:});
save_imgs(results_path,img_path,uimg,rimg,rd_div_line_img,[]);