-
Notifications
You must be signed in to change notification settings - Fork 1
/
go_windows.m
66 lines (47 loc) · 1.63 KB
/
go_windows.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
62
63
64
65
66
clc ;
clear all;
close all ;
% addpath
addpath RASL_toolbox ;
addpath data ;
addpath results ;
%% define images' path
currentPath = cd;
% input path
imagePath = fullfile(currentPath,'data') ;
pointPath = fullfile(currentPath,'data') ;
userName = 'Windows' ;
% output path
destRoot = fullfile(currentPath,'results') ;
destDir = fullfile(destRoot,userName) ;
if ~exist(destDir,'dir')
mkdir(destRoot,userName) ;
end
raslpara.DISPLAY = 1 ;
raslpara.saveStart = 1 ;
raslpara.saveEnd = 1 ;
raslpara.saveIntermedia = 0 ;
% for windows images
raslpara.canonicalImageSize = [ 200 200 ];
raslpara.canonicalCoords = [ 26 176 100; ...
24 24 184 ];
% parametric tranformation model
raslpara.transformType = 'HOMOGRAPHY';
raslpara.numScales = 1 ; % if numScales > 1, we use multiscales
% main loop
raslpara.stoppingDelta = .01; % stopping condition of main loop
raslpara.maxIter = 25; % maximum iteration number of main loops
% inner loop
raslpara.inner_tol = 1e-6 ;
raslpara.inner_maxIter = 1000 ;
raslpara.continuationFlag = 1 ;
raslpara.mu = 1e-3 ;
raslpara.lambdac = 1 ; % lambda = lambdac/sqrt(m)
transformationInit = 'AFFINE';
[fileNames, transformations, numImages] = get_training_images( imagePath, pointPath, userName, raslpara.canonicalCoords, transformationInit) ;
[D, Do, A, E, xi, numIterOuter, numIterInner ] = rasl_main(fileNames, transformations, numImages, raslpara, destDir);
layout.xI = 4 ;
layout.yI = 4 ;
layout.gap = 4 ;
layout.gap2 = 2 ;
rasl_plot(destDir, numImages, raslpara.canonicalImageSize, layout)