Graduate

Opencv.js face detection

...@@ -41,9 +41,6 @@ if (navigator.mediaDevices.getUserMedia){ ...@@ -41,9 +41,6 @@ if (navigator.mediaDevices.getUserMedia){
41 } 41 }
42 </script> 42 </script>
43 <script> 43 <script>
44 -function openCvReady() {
45 - cv['onRuntimeInitialized']=()=>{
46 - // do all your work here
47 let video = document.getElementById('videoElement'); 44 let video = document.getElementById('videoElement');
48 let src = new cv.Mat(video.height, video.width, cv.CV_8UC4); 45 let src = new cv.Mat(video.height, video.width, cv.CV_8UC4);
49 let dst = new cv.Mat(video.height, video.width, cv.CV_8UC4); 46 let dst = new cv.Mat(video.height, video.width, cv.CV_8UC4);
...@@ -86,8 +83,6 @@ function openCvReady() { ...@@ -86,8 +83,6 @@ function openCvReady() {
86 } 83 }
87 // schedule the first one. 84 // schedule the first one.
88 setTimeout(processVideo, 0); 85 setTimeout(processVideo, 0);
89 - };
90 -}
91 </script> 86 </script>
92 </body> 87 </body>
93 </html> 88 </html>
......