-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
63 lines (52 loc) · 1.7 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base target="_blank">
<title>Apriltag Detector Example Canvas</title>
<link href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div id="container">
<video id="webcam_canvas" playsinline autoplay style="display:none"></video>
<canvas id="out_canvas"></canvas>
Put up an apriltag to see its detection.
<button id="req_save">Save next detection (local storage)</button>
<p>Camera Parameters (valid json, as given by <a href="https://www.calibdb.net/">calibdb</a>):<br/>
<textarea id="camera_info" rows="10" cols="100">
{
"camera_matrix": [
[
939.3384407933022,
0,
640.347854307481
],
[
0,
938.2560270381138,
340.7192620859387
],
[
0,
0,
1
]
],
"img_size": [
1280,
720
]
}
</textarea>
</p>
Saved detection:<br/>
<canvas id="saved_det_canvas"></canvas>
<textarea id="saved_det_data" rows="10" cols="100">No detection saved yet.</textarea>
</div>
<script src="main.js" async></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/7.1.0/math.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lz-string/1.4.4/lz-string.min.js"></script>
<script type="module" src="video_process.js" async></script>
</body>
</html>