-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdebugger.html
183 lines (157 loc) · 5.93 KB
/
debugger.html
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Puzzle Solving</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- jquery -->
<script type="text/javascript" src="js/lib/jquery-3.3.1.min.js"></script>
<!-- bootstrap -->
<script type="text/javascript" src="js/lib/popper.min.js"></script>
<script type="text/javascript" src="js/lib/bootstrap.min.js"></script>
<!-- FileSaver.js -->
<script type="text/javascript" src="js/lib/canvas-toBlob.js"></script>
<script type="text/javascript" src="js/lib/FileSaver.min.js"></script>
<!-- zip.js -->
<script type="text/javascript" src="js/lib/jszip.min.js"></script>
<!-- custom js -->
<script type="text/javascript" src="js/debugger.js"></script>
</head>
<body>
<div class="page">
<div class="main">
<div class="row justify-content-start">
<strong>Pairwise Matching:</strong>
<div id="pairwise-interaction"></div>
</div>
<div class="row justify-content-start">
<hr>
<strong>Composition:</strong>
<div id="global-image"></div>
</div>
<!-- Add pieces here. -->
<div class="row justify-content-start">
<hr>
<strong>All Pieces:</strong>
<div id="pieces"></div>
</div>
<div class="row justify-content-center">
<hr>
<p>Authors: Yongqing Liang, Xin Li. All rights reserved.</p>
<p>Please see our project [webpage](https://www.ece.lsu.edu/xinli/PuzzleSolving/index.html) for more information.</p>
</div>
</div>
<div class="side">
<div class="form-group">
<div class="form-row">
<strong>Infomation:</strong>
</div>
<div class="form-row">
<p>Pieces Number:</p>
<p class="offset-1" id="pieces-num">Unknown</p>
</div>
<div class="form-row">
<p>Piece Size:</p>
<p class="offset-1" id="piece-size">Unknown</p>
</div>
<div class="form-row">
<p>Composition Size:</p>
<p class="offset-1" id="composition-size">Unknown</p>
</div>
</div>
<div class="form-group">
<div class="form-row">
<strong>Status:</strong>
</div>
<div class="form-row">
<p id="status"></p>
</div>
</div>
<hr>
<!-- Upload and Save Data -->
<div class="form-group">
<div class="form-row">
<strong>Input / Output:</strong>
</div>
<div class="form-row">
<input type="file" class="form-control-file" id="upload-file">
</div>
</div>
<div class="form-group">
<div class="form-row">
<button type="button" class="btn btn-primary btn-sm" onclick="uploadPieces()">
Upload Pieces
</button>
</div>
</div>
<div class="form-group">
<div class="form-row">
<button type="button" class="btn btn-primary btn-sm" id="btn-load-transforms" onclick="uploadGlobalTransform()" disabled>
Upload Global Transforms
</button>
</div>
</div>
<hr>
<!-- Pieces Parameters -->
<div class="form-group">
<div class="form-row">
<strong>Pairwise Interaction:</strong>
</div>
<div class="form-row">
<p class="col-3 col-form-label">Pieces: </p>
<input type="text" class="form-control form-control-sm col-2" id="piece-id0" value="0">
<input type="text" class="form-control form-control-sm col-2" id="piece-id1" value="1">
<button type="button" class="btn btn-primary btn-sm offset-2 col-3" id="btn-select-pieces" onclick="selectPieces()" disabled>Select</button>
</div>
<div class="form-row">
<p class="col-5 col-form-label">Rotate 1st Piece: </p>
<button type="button" class="btn btn-primary btn-sm col-3" id="btn-rotate-first-left" onclick="rotateFirstLeft()" disabled>Left</button>
<button type="button" class="btn btn-primary btn-sm offset-1 col-3" id="btn-rotate-first-right" onclick="rotateFirstRight()" disabled>Right</button>
</div>
<div class="form-row">
<p class="col-5 col-form-label">Rotate 2nd Piece: </p>
<button type="button" class="btn btn-primary btn-sm col-3" id="btn-rotate-second-left" onclick="rotateSecondLeft()" disabled>Left</button>
<button type="button" class="btn btn-primary btn-sm offset-1 col-3" id="btn-rotate-second-right" onclick="rotateSecondRight()" disabled>Right</button>
</div>
<div class="form-row">
<button type="button" class="btn btn-primary btn-sm col-8" id="btn-toggle-contour" onclick="toggleContour()" disabled>Toggle Contour</button>
<button type="button" class="btn btn-primary btn-sm col-3 offset-1" id="btn-save-pairwise-transformation" onclick="savePairwiseTransformation()" disabled>Save</button>
</div>
<div class="form-row">
<p class="col-6 text-right">Piece 1</p>
<p class="col-6 text-right">Piece 2</p>
</div>
<div class="form-row">
<p class="col-2">dx:</p>
<p class="col-4 text-right" id="piece0-dx">0</p>
<p class="col-6 text-right" id="piece1-dx">0</p>
</div>
<div class="form-row">
<p class="col-2">dy:</p>
<p class="col-4 text-right" id="piece0-dy">0</p>
<p class="col-6 text-right" id="piece1-dy">0</p>
</div>
<div class="form-row">
<p class="col-2">ro:</p>
<p class="col-4 text-right" id="piece0-rotation">0</p>
<p class="col-6 text-right" id="piece1-rotation">0</p>
</div>
</div>
<hr>
<div class="form-group">
<div class="form-row">
<strong>Instructions:</strong>
</div>
<div class="form-row">
<p>1. Upload a package of pieces, which must contains all piece images and the config file. The puzzle can be generated by Debugger in Python or Debugger in Javascript.</p>
<p>2. Upload a groundtruth file in json format to see the groundtruth composition.</p>
<p>3. You can interactively maniplute any two pieces.</p>
</div>
</div>
</div>
</div>
</body>
</html>