forked from xmlyqing00/PuzzleSolving-tool
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgenerator.html
More file actions
146 lines (126 loc) · 4.53 KB
/
generator.html
File metadata and controls
146 lines (126 loc) · 4.53 KB
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
<!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>Image Kneader</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/generator.js"></script>
</head>
<body>
<div class="page">
<div class="main">
<!-- scene -->
<canvas id="scene" width="960" height="600"></canvas>
<p>Authors: Yongqing Liang, Xin Li. All rights reserved.</p>
<p>If you want to run the program in local, please refer to our python-based generator in <a href="https://github.com/xmlyqing00/PuzzleSolving-tool">github</a>.</p>
<p>Please see our project [webpage](https://www.ece.lsu.edu/xinli/PuzzleSolving/index.html) for more information.</p>
</div>
<div class="side">
<div class="form-group">
<div class="form-row">
<strong>Infomation:</strong>
</div>
<div class="form-row">
<p>Image Size:</p>
<p class="offset-1" id="img-size">Unknown</p>
</div>
<div class="form-row">
<p>Region Number:</p>
<p class="offset-1" id="region-num">Unknown</p>
</div>
<div class="form-row">
<p>Piece Size:</label>
<p class="offset-1" id="piece-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="img-file">
</div>
<br>
<div class="form-row">
<button type="button" class="btn btn-primary btn-sm col-5" onclick="uploadImg()">
Upload Img
</button>
<button type="button" class="btn btn-primary btn-sm col-6 offset-1" id="save-pieces-btn" onclick="savePieces()" disabled>
Save Pieces
</button>
</div>
</div>
<hr>
<!-- Pieces Parameters -->
<div class="form-group">
<div class="form-row">
<strong>Parameters:</strong>
</div>
<div class="form-row">
<label class="col-9 col-form-label">Row Seams: </label>
<input type="text" class="form-control form-control-sm col-3" id="row-seams" value="5">
</div>
<div class="form-row">
<label class="col-9 col-form-label">Col Seams: </label>
<input type="text" class="form-control form-control-sm col-3" id="col-seams" value="5">
</div>
<div class="form-row">
<label class="col-9 col-form-label">Small Region Pixel: </label>
<input type="text" class="form-control form-control-sm col-3" id="small-region" value="1000">
</div>
<div class="form-row">
<label class="col-9 col-form-label">Carving Step Hori: </label>
<input type="text" class="form-control form-control-sm col-3" id="carving-step-hori" value="10">
</div>
<div class="form-row">
<label class="col-9 col-form-label">Carving Step Vert: </label>
<input type="text" class="form-control form-control-sm col-3" id="carving-step-vert" value="30">
</div>
<div class="custom-control custom-radio">
<input type="radio" id="random-chopping" name="method" class="custom-control-input" value="random" checked>
<label class="custom-control-label" for="random-chopping">Random Chopping</label>
</div>
<br>
<button type="button" class="btn btn-primary btn-sm" onclick="startChopping()" id="start-chopping-btn" disabled>
Start Chopping
</button>
</div>
<hr>
<div class="form-group">
<div class="form-row">
<strong>Instructions:</strong>
</div>
<div class="form-row">
<p>Step 1. Upload an image.</p>
<p>Step 2. Start chopping.</p>
<p>Step 3. Save pieces.</p>
</div>
</div>
</div>
</div>
</body>
</html>