-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
134 lines (113 loc) · 5.03 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
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
<!DOCTYPE html>
<!--
This is an example HTML that shows how WebGazer can be used on a website.
This file provides the additional features:
* An integrated, intuitive and sleek action bar with an informative "help" module accessible at all times
* Structured 9-point calibration system
* Accuracy measure of predictions based on calibration process
* Video feedback regarding face positioning
* Improved eye predictions visible to the user
Instructions on use can be found in the README repository.
-->
<html>
<head>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>WebGazer Demo</TITLE>
<link rel="stylesheet" type="text/css" href="./css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha256-YLGeXaapI0/5IgZopewRJcFXomhRMlYYjugPLSyNjTY=" crossorigin="anonymous" />
<script async type="text/javascript" src="./webgazer.js"></script>
<style>
#testImage{
background-image:url('');
background-size:cover;
background-position: center;
height: 100vh;
width: 100%;
}
</style>
</head>
<body LANG="en-US" LINK="#0000ff" DIR="LTR" id="testImage">
<div class="d-flex justify-content-end">
<p id="Accuracy">
<a href="#">Not Yet Calibrate</a>
</p>
<a href="#" class="btn-sm" onclick="Restart()">Recalibrate</a>
<a href="#" class="btn-sm" onclick="saveGaze(gazeData); saveGaze(onlyTime);">Save</a>
<input class="btn-sm" type="file" id="backImage" onchange="readURL(this);">
</div>
<canvas id="plotting_canvas" width="500" height="500" style="cursor:crosshair;"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"
integrity="sha256-KsRuvuRtUVvobe66OFtOQfjP8WA2SzYsmm4VPfMnxms=" crossorigin="anonymous"></script>
<script src="./js/main.js"></script>
<script src="./js/calibration.js"></script>
<script src="./js/precision_calculation.js"></script>
<script src="./js/precision_store_points.js"></script>
<!-- <nav class="navbar navbar-light bg-light" id="webgazerNavbar" style="width:5rem;">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item" id="Accuracy">
<a>Not yet Calibrated</a>
</li>
<li class="nav-item" onclick="Restart()">
<a class="nav-link" href="#">Recalibrate</a>
</li>
<li class="nav-item" onclick="saveGaze()">
<a class="nav-link" href="#">Save</a>
</li>
<li class="nav-item">
<input type='file' onchange="readURL(this);" />
</li>
</ul>
</div>
</nav> -->
<!-- Calibration points -->
<div class="calibrationDiv">
<input type="button" class="Calibration" id="Pt1"></input>
<input type="button" class="Calibration" id="Pt2"></input>
<input type="button" class="Calibration" id="Pt3"></input>
<input type="button" class="Calibration" id="Pt4"></input>
<input type="button" class="Calibration" id="Pt5"></input>
<input type="button" class="Calibration" id="Pt6"></input>
<input type="button" class="Calibration" id="Pt7"></input>
<input type="button" class="Calibration" id="Pt8"></input>
<input type="button" class="Calibration" id="Pt9"></input>
<img id="blah" src="" alt="your image" />
</div>
<!-- Modal -->
<div id="helpModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-footer">
<button id="closeBtn" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="Restart()">Calibrate</button>
</div>
</div>
</div>
</div>
<script>
document.getElementById('backImage').addEventListener('change', readURL, true);
function readURL(){
var file = document.getElementById("backImage").files[0];
var reader = new FileReader();
reader.onloadend = function(){
document.getElementById('testImage').style.backgroundImage = "url(" + reader.result + ")";
}
if(file){
reader.readAsDataURL(file);
}else{
}
}
</script>
<!-- Latest compiled JavaScript -->
<script src="./js/resize_canvas.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha256-CjSoeELFOcH0/uxWu6mC/Vlrc1AARqbm/jiiImDGV3s=" crossorigin="anonymous"></script>
</body>
</html>