index.html 12.4 KB
<!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>
		<a href="https://github.com/willy-vvu/reveal.js" style="position:fixed;z-index:1000;left:0;top:0;"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
		<a href="http://www.chromeexperiments.com/detail/gesture-based-revealjs/" style="position:fixed;z-index:1000;left:20px;bottom:20px;"><img src="badge.jpg" alt="See my Experiment on ChromeExperiments.com" /></a>
		<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&nbsp;<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:&nbsp;</div>
        <div>
            <u>A flick of the hand&nbsp;</u>in mid-air changes the slide.</div>
            <p>
            <u>A two hand flick up or down</u>&nbsp;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/bXF68hNPuNo">http://youtu.be/bXF68hNPuNo</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,&nbsp;</div>
                            <div style="">you can also go&nbsp;</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 its 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: &gt;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&nbsp;<i>just</i>&nbsp;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>&nbsp;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!&nbsp;<a href="https://github.com/willy-vvu/reveal.js" style="">https://github.com/willy-vvu/reveal.js</a>
                    </div>
                    <div>
                        <br>
                    </div>
                    <div>My site is at&nbsp;<a href="http://willy.herokuapp.com/">http://willy.herokuapp.com</a>
                </div>
            </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>