-
Notifications
You must be signed in to change notification settings - Fork 2
/
otsu.html
50 lines (50 loc) · 1.9 KB
/
otsu.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
<!doctype html>
<html>
<head>
<title>Otsu threshold</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<script type="text/javascript" src="otsu.js"></script>
</head>
<body>
<table>
<tbody>
<tr>
<td>
<img id="otsu-test-src" border="0" src="lena.jpg" width="320" onload="update();" />
</td>
<td>
<canvas id="otsu-test-dst" width="320"></canvas>
</td>
</tr>
<tr>
<td colspan="2">
<div class="jxgbox" id="otsu-histogram" style="height: 250px; width: 640px;"></div>
</td>
</tr>
<tr>
<td colspan="2">
<input type="file" name="image-load" id="image-load" onchange="loadImage(this);" alt="" />
</td>
</tr>
<tr>
<td colspan="2">
N° of classes:
<select id="n-classes" onchange="onNClassesChanged(this);">
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
Thresholds: <input id="thresholds-results" type="text" />
</td>
</tr>
</tbody>
</table>
</body>
</html>