-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (57 loc) · 2.88 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Shaky Shake JS : Motion Detection In Video Through Javascript" />
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>Shaky Shake JS</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/demoive/Shaky-Shake-JS">View on GitHub</a>
<h1 id="project_title">Shaky Shake JS</h1>
<h2 id="project_tagline">Motion Detection In Video Through Javascript</h2>
<section id="downloads">
<a class="zip_download_link" href="https://github.com/demoive/Shaky-Shake-JS/zipball/master">Download this project as a .zip file</a>
<a class="tar_download_link" href="https://github.com/demoive/Shaky-Shake-JS/tarball/master">Download this project as a tar.gz file</a>
</section>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<h1>
<a name="shaky-shake-js" class="anchor" href="#shaky-shake-js"><span class="octicon octicon-link"></span></a>Shaky Shake JS</h1>
<p>Simple Motion Detection In Video Through Javascript</p>
<p>The first example (<a href="demos/movement.html">movement</a>) shows how to detect any movement within a video stream. It is able to detect how much movement is occurring. The concept is quite basic:</p>
<ul>
<li>Grab each frame of the video media</li>
<li>Compare the current frame with the previous frame</li>
<li>Perform a difference of the luminosity (grayscale) for every pixel in the frame</li>
<li>If the luminosity difference is above a certain threshold (0-255), it is counted as a "movement pixel"</li>
<li>The count of how many of these movement pixels is what drives the gauge showing how much movement occurred</li>
</ul>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">Shaky Shake JS maintained by <a href="https://github.com/demoive">demoive</a></p>
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-2390640-8");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>