-
Notifications
You must be signed in to change notification settings - Fork 59
/
index.html
212 lines (203 loc) · 10.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Image Processing for Video Capture 🤳</title>
<link href="../css/base.css" rel="stylesheet">
<link href="../css/menu.css" rel="stylesheet">
<link href="../css/settings.css" rel="stylesheet">
<link href="../css/camera-bar.css" rel="stylesheet" type="text/css">
<link href="../css/google-icons.css" rel="stylesheet">
</head>
<body>
<p id="errorMessage" class="err centered"></p>
<div id="mainContent" class="hidden centered">
<div class="canvas-wrapper">
<canvas id="canvasOutput" class="canvas-big"></canvas>
<div class="settings-wrapper">
<div class="settings-bar">
<div id="thresholdSettings" class="settings hidden"><label for="thresholdValue">Threshold value:
<output id="thresholdValueOutput"></output>
<input type="range" id="thresholdValue" value="100" min="0" max="200" step="1"></label>
</div>
<div id="adaptiveThresholdSettings" class="settings hidden"><label for="adaptiveBlockSize">Block size:
<output id="adaptiveBlockSizeOutput"></output>
<input type="range" id="adaptiveBlockSize" value="3" min="3" max="99" step="2"></label>
</div>
<div id="gaussianBlurSettings" class="settings hidden"><label for="gaussianKernelSize">Kernel size:
<output id="gaussianKernelSizeOutput"></output>
<input type="range" id="gaussianKernelSize" value="7" min="7" max="99" step="2"></label>
</div>
<div id="medianBlurSettings" class="settings hidden"><label for="medianKernelSize">Kernel size:
<output id="medianKernelSizeOutput"></output>
<input type="range" id="medianKernelSize" value="5" min="3" max="99" step="2"></label>
</div>
<div id="sobelSettings" class="settings hidden"><label for="sobelKernelSize">Kernel size:
<output id="sobelKernelSizeOutput"></output>
<input type="range" id="sobelKernelSize" value="3" min="3" max="13" step="2"></label>
</div>
<div id="laplacianSettings" class="settings hidden"><label for="laplacianKernelSize">Kernel size:
<output id="laplacianKernelSizeOutput"></output>
<input type="range" id="laplacianKernelSize" value="3" min="1" max="15" step="2"></label>
</div>
<div id="bilateralFilterSettings" class="settings hidden"><label for="bilateralDiameter">Diameter:
<output id="bilateralDiameterOutput"></output>
<input type="range" id="bilateralDiameter" value="5" min="1" max="15" step="1"></label>
<label for="bilateralSigma">Sigma:
<output id="bilateralSigmaOutput"></output>
<input type="range" id="bilateralSigma" value="75" min="1" max="255" step="1"></label>
</div>
<div id="morphologySettings" class="settings hidden"><label for="morphologyOperation">Operation:
<select id="morphologyOperation">
<option value="MORPH_ERODE">MORPH_ERODE</option>
<option value="MORPH_DILATE">MORPH_DILATE</option>
<option value="MORPH_OPEN">MORPH_OPEN</option>
<option value="MORPH_CLOSE">MORPH_CLOSE</option>
<option value="MORPH_GRADIENT">MORPH_GRADIENT</option>
<option value="MORPH_TOPHAT">MORPH_TOPHAT</option>
<option value="MORPH_BLACKHAT">MORPH_BLACKHAT</option>
</select></label>
<label for="morphologyShape">Shape:
<select id="morphologyShape">
<option value="MORPH_RECT">MORPH_RECT</option>
<option value="MORPH_CROSS">MORPH_CROSS</option>
<option value="MORPH_ELLIPSE">MORPH_ELLIPSE</option>
</select></label>
<label for="morphologySize">Kernel size:
<output id="morphologySizeOutput"></output>
<input type="range" id="morphologySize" value="5" min="1" max="15" step="2"></label>
<label for="morphologyBorder">Shape:
<select id="morphologyBorder">
<option value="BORDER_CONSTANT">BORDER_CONSTANT</option>
<option value="BORDER_REPLICATE">BORDER_REPLICATE</option>
<option value="BORDER_REFLECT">BORDER_REFLECT</option>
<option value="BORDER_REFLECT_101">BORDER_REFLECT_101</option>
</select></label>
</div>
<div id="cannySettings" class="settings hidden"><label for="cannyThreshold1">Threshold1:
<output id="cannyThreshold1Output"></output>
<input type="range" id="cannyThreshold1" value="150" min="1" max="500" step="1"></label>
<label for="cannyThreshold2">Threshold2:
<output id="cannyThreshold2Output"></output>
<input type="range" id="cannyThreshold2" value="300" min="1" max="500" step="1"></label>
<label for="cannyAperture">Aperture size:
<output id="cannyApertureOutput"></output>
<input type="range" id="cannyAperture" value="3" min="3" max="7" step="2"></label>
<label class="single-label">Gradient I2<input type="checkbox" id="cannyGradient"></label>
</div>
<div id="backprojectionSettings" class="settings hidden"><label for="backprojectionLow">Range low:
<output id="backprojectionLowOutput"></output>
<input type="range" id="backprojectionLow" value="0" min="0" max="255" step="1"></label>
<label for="backprojectionHigh">Range high:
<output id="backprojectionHighOutput"></output>
<input type="range" id="backprojectionHigh" value="150" min="0" max="255" step="1"></label>
</div>
</div>
</div>
<section class="carousel-wrapper">
<div class="card">
<label id="passThrough">No Filter</label>
<canvas id="passThroughCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="gray">Gray</label>
<canvas id="grayCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="hsv">HSV</label>
<canvas id="hsvCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="threshold">Thresholding</label>
<canvas id="thresholdCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="adaptiveThreshold">Adaptive Thresholding</label>
<canvas id="adaptiveThresholdCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="gaussianBlur">Gaussian Blurring</label>
<canvas id="gaussianBlurCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="medianBlur">Median Blurring</label>
<canvas id="medianBlurCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="bilateralFilter">Bilateral Filtering</label>
<canvas id="bilateralFilterCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="morphology">Morphology</label>
<canvas id="morphologyCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="sobel">Sobel Derivatives</label>
<canvas id="sobelCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="scharr">Scharr Derivatives</label>
<canvas id="scharrCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="laplacian">Laplacian Derivatives</label>
<canvas id="laplacianCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="canny">Canny Edge Detection</label>
<canvas id="cannyCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="calcHist">Calculation</label>
<canvas id="calcHistCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="equalizeHist">Equalization</label>
<canvas id="equalizeHistCanvas" class="small-canvas"></canvas>
</div>
<div class="card">
<label id="backprojection">Backprojection</label>
<canvas id="backprojectionCanvas" class="small-canvas"></canvas>
</div>
</section>
</div>
<div class="camera-bar-wrapper">
<ul id="cameraBar">
<li class="camera-bar-item bar-with-three-items">
<div class="gallery-wrapper">
<canvas id="gallery" class="camera-bar-icon"></canvas>
</div>
</li>
<li class="camera-bar-item bar-with-three-items">
<div class="take-photo-wrapper">
<button id="takePhotoButton" class="camera-bar-icon material-icons" disabled>photo_camera</button>
</div>
</li>
<li class="camera-bar-item bar-with-three-items">
<div class="face-mode-wrapper">
<button id="facingModeButton" class="camera-bar-icon material-icons" disabled>camera_rear</button>
</div>
</li>
</ul>
</div>
<div class="stats-settings centered">
<label id="hideStatsLabel" class="hidden" for="hideStats">Hide statistics</label>
<input id="hideStats" class="hidden" type="checkbox" checked>
</div>
<div class="threads-control centered hidden">
<label for="threadsNum" id="threadsNumLabel"></label>
<input type="number" id="threadsNum" min="1" max="16">
</div>
</div>
<video id="videoInput" class="hidden"></video>
<script src="../../libs/stats.min.js" type="text/javascript"></script>
<script src="../../libs/adapter-latest.js" type="text/javascript"></script>
<script src="../../utils/utils.js" type="text/javascript"></script>
<script src="../../utils/statsInit.js" type="text/javascript"></script>
<script src="../../utils/menu.js" type="text/javascript"></script>
<script src="js/ui.js" type="text/javascript"></script>
<script src="js/filters.js" type="text/javascript"></script>
<script src="js/index.js" type="text/javascript"></script>
</body>
</html>