-
Notifications
You must be signed in to change notification settings - Fork 45
/
index.html
79 lines (71 loc) · 1.83 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>AR Sudoku Solver</title>
<script src="./lib/opencv.js"></script>
<script src="./lib/tfjs.js"></script>
<script src="./lib/tfjs-backend-wasm.js"></script>
<style type="text/css">
html,
body,
.wrapper {
height: 100%;
margin: 0;
}
.wrapper {
display: flex;
flex-direction: column;
align-items: stretch;
align-content: stretch;
}
.video {
flex: 1;
position: relative;
flex-direction: column;
height: 100%;
}
.controls {
height: 50px;
display: flex;
flex-direction: column;
}
canvas {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
.controls input {
width: 85%;
align-self: center;
}
</style>
</head>
<body>
<div class="wrapper">
<div id="browser" style="display: none;">
This demo relies on modern browser features (JS imports, async, const,
etc ...) please use a more modern browser!
</div>
<div class="video">
<canvas id="videoTargetCanvas" style="display: none;"></canvas>
<canvas id="tempCanvas" style="display: none;"></canvas>
</div>
<div class="controls">
<input type="range" id="range" min="0" max="6" value="6" />
</div>
</div>
<video id="videoElement" height="0" autoplay="" playsinline=""></video>
<script type="module">
import "./src/index.js";
</script>
<script nomodule type="text/javascript">
document.getElementById("browser").style.display = "block";
</script>
</body>
</html>