-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
101 lines (99 loc) · 3.76 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/underscore-min.js"></script>
<script type="text/javascript" src="swfobject/swfobject.js"></script>
<script type="text/javascript" src="js/Blob.js"></script>
<script type="text/javascript" src="js/color_match.js"></script>
<script type="text/javascript" src="js/fast_sobel.js"></script>
<script type="text/javascript" src="js/StackBlur.js"></script>
<script type="text/javascript" src="js/math.js"></script>
<script type="text/javascript" src="js/blob_detect.js"></script>
<script type="text/javascript" src="js/test.js"></script>
<link rel="stylesheet" href="style.css">
<style>
span, div {
font-family: arial,sans-serif;
font-size: 14px;
}
.cubie {
font-size: 12px;
color: white;
text-shadow: black 1px 1px;
width: 48px;
height: 33px;
float: left;
border: 1px solid white;
text-align: center;
padding-top: 15px;
}
</style>
</head>
<body style="background: #000000">
<div style="float:right">
<div style="padding-right: 50px; color:#ffffff">
<span>Sampled Average Color</span>
<div id="sampleCube" style="width:150px; height:150px;">
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
<div class="cubie color_grey"></div>
</div>
<span>(dist. from center color)</span>
</div>
<br>
<div style="width:230px; padding-right: 20px; color:#ffffff;">
<span style="color:#ffffff">Saturation vs. Hue</span>
<canvas id="satvshue" width="220" height="370"></canvas>
<br>
<input type="checkbox" id="cleargraph" name="cleargraph" checked> Clear before sample
</div>
</div>
<div id="webcam" style="margin: 0"></div>
<video autoplay width="320" height="240" style="display:none;margin:0;"></video>
<br>
<div style="float:left;">
<canvas id="snapshot" height="240" width="320"></canvas>
</div>
<div id="canvas_container" style="width: 320px; height: 240px;">
<canvas id="edgeDetect" height="240" width="320" style="position: absolute;"></canvas>
<canvas id="overlay" height="240" width="320" style="position: absolute;"></canvas>
</div>
<br>
<button onclick="capture()">Capture</button>
<button onclick="continuous(20)">Continuous</button>
<button onclick="contStop()">Stop</button>
<span id="fps" style="color:yellow;"></span>
<br>
<span style="color:#ffffff;">(You can use SPACE bar to capture)</span><br>
<br>
<button onclick="copy()">Copy Test Image</button>
<button onclick="stackblur('edgeDetect')">(1) Blur</button>
<button onclick="sobel('edgeDetect')">(2) Sobel</button>
<button onclick="blobDetect('edgeDetect')">(3) Blob Detect</button>
<br>
<div style="color:#ffffff; padding-top: 10px;">
<span style="color: #0000ff">blue: </span> not square blob<br>
<span style="color: #00ff00">green: </span> square blob, not grid detected<br>
<span style="color: #ff0000">red: </span> square blob, grid detected<br>
</div>
<div style="visibility: hidden;">
<img id="testImage" src="img/test.jpg">
<img id="webcamImage">
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-106043-4']);
_gaq.push(['_trackPageview']);
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>