forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
266 lines (249 loc) · 12 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
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Webcam-based gesture recognition with reveal.js</title>
<meta name="description" content="Webcam-based gesture recognition with reveal.js">
<meta name="author" content="William Wu (reveal.js by Hakim El Hattab)">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<section>
<h1>What is this?</h1>
<div>This is what I got when I combined <b>webcam-based gesture recognition</b> with Hakim El Hattab's <i>reveal.js.</i>
</div>
<div>It took me a while to write and fine tune the detection algorithms. Even then, the algorithms are only about 80% accurate. You get the gist of it though: </div>
<div>
<u>A flick of the hand </u>in mid-air changes the slide.</div>
<p>
<u>A two hand flick up or down</u> activates the slide overview.</p>
<p>Tips and troubleshooting in the slides below (you can still use the keyboard or reveal.js's built in controls)</p>
</section>
<section>
<h2>USAGE TIPS</h2>
<div>(Troubleshooting is in the slide below this one)</div>
<div>
<div style="">
<ul>
<li>The detection algorithm can determine the amount and position of motion. It will only change the slide if your amount of motion exceeds a threshold.</li>
<li>Try to keep the rest of your body still.</li>
<li>Your hand should preferably come within two to three feet away from the camera.</li>
<li>Gestures should be performed with open palms facing the camera.</li>
</ul>
</div>
</div>
</section>
<section>
<h2>Troubleshooting</h2>
<div>
<li style="">You need a webcam. You're sunk if you don't have one.</li>
<li style="">If you're not viewing this in Google Chrome, please do.</li>
<li style="">If you're using Chrome, you should get a message asking to access your webcam. Hit Allow.</li>
<li style="">If you aren't getting that message, refresh.</li>
<li style="">If refreshing doesn't work, head over to chrome://flags and enable all flags that mention WebRTC. Restart Chrome.</li>
<li style="">If that doesn't work, I don't know what will. You can at least watch a video of this at <a href="http://youtu.be/VEX-dgV3iZs">http://youtu.be/VEX-dgV3iZs</a>.</li>
</div>
</section>
</section>
<section>
<section>
<h2>What is REVEAL.JS?</h2>
<blockquote>A framework for easily creating<br>beautiful presentations using HTML</blockquote>
<div style="letter-spacing: normal;text-transform: none;">-Hakim El Hattab, the author</div>
<div style="letter-spacing: normal;text-transform: none;">
<br>
</div>
<div style="letter-spacing: normal;text-transform: none;">(go down for details)</div>
</section>
<section>
<h2>REVEAL.JS IS A PRESENTATION FRAMEWORK</h2>
<p style="letter-spacing: normal;text-transform: none;">It's similar to Prezi or Powerpoint, except it's in HTML5.</p>
<p style="letter-spacing: normal;text-transform: none;">
<br>
</p>
<p style="letter-spacing: normal;text-transform: none;">HTML5 is the reason behind Reveal's speed, looks, and</p>
<p style="letter-spacing: normal;text-transform: none;">COOL 3D TRANSITIONS</p>
<p style="letter-spacing: normal;text-transform: none;">
<br>Beat that, Prezi! (which uses Flash)</p>
</section>
<section>
<h2>IT'S DIFFERENT.</h2>
<div>
<div style="">In addition to going left and right, </div>
<div style="">you can also go </div>
<div style="">
<br>
</div>
<div style="">up</div>
<div style="">and</div>
<div style="">down.</div>
<div style="">
<br>
</div>
<div style="">There's also a slide overview if you hit Esc.</div>
</div>
</section>
</section>
<section>
<section>
<h2>What is WebRTC?</h2>
<div>This is a developing standard in webpages to get data from your webcam and your microphone.</div>
<div>
<br>
</div>
<div>Once you have a video feed, you can display, alter, and extract information from it using JavaScript.</div>
<div>
<br>
</div>
<div>Why Chrome? Look below to find out.</div>
</section>
<section>
<h2>Chrome meets Javascript</h2>
<div>Chrome runs Javascript using it's wonderfully fast</div>
<div>
<b>V8 Javascript Engine.</b>
</div>
<div>
<br>
</div>
<div>It's remarkably fast. I ran my Tic-tac-toe algorithm on multiple browsers and this is how V8 stacks up:<br>
</div>
<div>
<br>
</div>
<div>
<ol>
<li>Chrome: 199 ms<br>
</li>
<li>FF: 241 ms<br>
</li>
<li>Opera: 439 ms<br>
</li>
<li>IE: >16000 ms<br>
</li>
</ol>
</div>
</section>
</section>
<section>
<h2>My thought Process</h2>
<div>You can get fabulous presentations and cool 3D transitions with Reveal.js...</div>
<div>You can get user input through the webcam using Web RTC...</div>
<div>
<br>
</div>
<div>
<div>Armed with the two and some spare time, I wrote some signal processing JS (took a while to get the algorithms <i>just</i> right) and overlay interface.</div>
<div>
<br>
</div>
<div>I believe this will be the one aspect of future of computing.</div>
</div>
</section>
<section>
<section>
<h2>What about Kinect?</h2>
<div>Kinect uses a 3D sensor, which costs around $100.</div>
<div>
<br>
</div>
<div>This uses a webcam, which is built into all newer computers. The cheaper ones come at $20 a pop.</div>
<div>
<br>
</div>
<div>However, there are limitations of webcams as described beneath.</div>
</section>
<section>
<h2>Webcams</h2>
<div>Webcams cannot detect depth.</div>
<div>
<br>
</div>
<div>Since all you get from a webcam is a picture, there is not much data you actually get, compared to a 3D scanner.</div>
<div>
<br>
</div>
<div>The lack of data forces developers to think outside the box and write algorithms to <i>infer</i> what is actually going on without the depth data.</div>
</section>
</section>
<section>
<h2>The WOW factor</h2>
<div>You can control the computer without touching it!</div>
<div>
<br>
</div>
<div>The computer can distinguish between different gestures!</div>
<div>
<br>
</div>
<div>Who needs touchscreens when you have this?</div>
</section>
<section>
<h2>mORE INFO</h2>
<div>
<div>Fork me on Github! <a href="https://github.com/wvvvw/reveal.js" style="">https://github.com/wvvvw/reveal.js</a>
</div>
<div>
<br>
</div>
<div>My site is at <a href="http://willys-apps.appspot.com/">http://willys-apps.appspot.com</a>
</div>
<a href="http://willys-apps.appspot.com/">
</a>
</div>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/highlight.js', async: true, callback: function() { window.hljs.initHighlightingOnLoad(); } },
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'lib/js/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'lib/js/data-markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
<style>
#comp{
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
opacity:0.1;
}
</style>
<div id="disp"><canvas id="comp"></canvas></div>
<video id="video" autoplay width="300" style="display:none"></video>
<canvas id="canvas" style="width:300px;display:none;"></canvas>
<script src="js/gesture.js"></script> </body>
</html>