-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (34 loc) · 1010 Bytes
/
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
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Facemask Detector Web</title>
<script src="utils.js"></script>
<script src="opencv.js"></script>
<script src="bundle.js"></script>
</head>
<body>
<video id="source" width="320" height="240"></video>
<canvas id="output" width="320" height="240"></canvas>
<script>
cv['onRuntimeInitialized']=()=>{
const utils = new Utils();
let cascadeFiles = [
'face.xml',
'eye.xml',
'mouth.xml',
'nose.xml'
];
cascadeFiles.forEach((file) => {
utils.createFileFromUrl(file, file, () => {
console.log("loaded cascade file:" + file);
});
})
utils.startCamera('qvga', () => {
// We will have to pass cv to our app to access it
runApp(cv, utils);
}, 'source');
};
</script>
</body>
</html>