Showing
2 changed files
with
13 additions
and
12 deletions
... | @@ -152,7 +152,7 @@ setTimeout(processVideo, 0); | ... | @@ -152,7 +152,7 @@ setTimeout(processVideo, 0); |
152 | } | 152 | } |
153 | </script> | 153 | </script> |
154 | </head> | 154 | </head> |
155 | -<body onload="cv['onRuntimeInitialized']=()=>{ load_cascade() }"> | 155 | +<body onload="cv['onRuntimeInitialized']=()=>{ load_cascade(); };"> |
156 | <div id="container"> | 156 | <div id="container"> |
157 | <video autoplay="true" id="videoInput" width=640 height=480 style="display: none;"></video> | 157 | <video autoplay="true" id="videoInput" width=640 height=480 style="display: none;"></video> |
158 | <canvas id="canvasOutput" width=640 height=480></canvas> | 158 | <canvas id="canvasOutput" width=640 height=480></canvas> | ... | ... |
1 | <!doctype html> | 1 | <!doctype html> |
2 | <html> | 2 | <html> |
3 | <head> | 3 | <head> |
4 | -<meta charset="UTF-8"> | 4 | +<meta charset="utf-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
6 | <title>Web Attendance System Register</title> | 6 | <title>Web Attendance System Register</title> |
7 | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | 7 | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> |
... | @@ -14,13 +14,11 @@ | ... | @@ -14,13 +14,11 @@ |
14 | let tempCanvas = document.createElement("canvas"); | 14 | let tempCanvas = document.createElement("canvas"); |
15 | function load_cascade() | 15 | function load_cascade() |
16 | { | 16 | { |
17 | - alert("shibal"); | 17 | + let faceCascadeFile = 'haarcascade_frontalface_default.xml' |
18 | - let faceCascadeFile = 'haarcascade_frontalface_default.xml'; | 18 | + let faceCascadeURL = 'static/js/haarcascade_frontalface_default.xml' |
19 | - let faceCascadeURL = "{{url_for('static', filename='js/haarcascade_frontalface_default.xml')}}"; | ||
20 | let utils = new Utils('errorMessage'); | 19 | let utils = new Utils('errorMessage'); |
21 | utils.createFileFromUrl(faceCascadeFile, faceCascadeURL, () => { | 20 | utils.createFileFromUrl(faceCascadeFile, faceCascadeURL, () => { |
22 | - alert("shibal"); | 21 | + activate() |
23 | - activate(); | ||
24 | }); | 22 | }); |
25 | } | 23 | } |
26 | function activate() | 24 | function activate() |
... | @@ -100,14 +98,17 @@ var loadFile = function(event) { | ... | @@ -100,14 +98,17 @@ var loadFile = function(event) { |
100 | } | 98 | } |
101 | }; | 99 | }; |
102 | 100 | ||
101 | +cv['onRuntimeInitialized']=()=>{ | ||
102 | + load_cascade(); | ||
103 | +}; | ||
104 | + | ||
103 | </script> | 105 | </script> |
104 | </head> | 106 | </head> |
105 | -<body class="w3-light-grey" onload="cv['onRuntimeInitialized']=()=>{ load_cascade() }"> | 107 | +<body class="w3-light-grey"> |
106 | <!-- w3-content defines a container for fixed size centered content, | 108 | <!-- w3-content defines a container for fixed size centered content, |
107 | and is wrapped around the whole page content, except for the footer in this example --> | 109 | and is wrapped around the whole page content, except for the footer in this example --> |
108 | - | 110 | + <div class="w3-content" style="max-width:1400px"> |
109 | -<div class="w3-content" style="max-width:1400px"> | 111 | + <!-- Header --> |
110 | -<!-- Header --> | ||
111 | <header class="w3-container w3-center w3-padding-32"> | 112 | <header class="w3-container w3-center w3-padding-32"> |
112 | <h1><b>얼굴 등록</b></h1> | 113 | <h1><b>얼굴 등록</b></h1> |
113 | <p>Made by <span class="w3-tag">정해갑</span></p> | 114 | <p>Made by <span class="w3-tag">정해갑</span></p> |
... | @@ -126,7 +127,7 @@ and is wrapped around the whole page content, except for the footer in this exam | ... | @@ -126,7 +127,7 @@ and is wrapped around the whole page content, except for the footer in this exam |
126 | <input id="sender" type="button" onclick="submit" value="등록" disabled> | 127 | <input id="sender" type="button" onclick="submit" value="등록" disabled> |
127 | </div> | 128 | </div> |
128 | </div> | 129 | </div> |
129 | -</div> | 130 | + </div> |
130 | </body> | 131 | </body> |
131 | </html> | 132 | </html> |
132 | 133 | ... | ... |
-
Please register or login to post a comment