h5调用摄像头,并根据算法识别人脸跟踪

avatar
作者
筋斗云
阅读量:0

调用摄像头并展示视频

代码如下:

<!doctype html> <html class="no-js" lang="">  <head>   <meta charset="utf-8">   <meta http-equiv="x-ua-compatible" content="ie=edge">   <title>Lookie Lookie!</title>   <meta name="description" content="A website that learns to predict where you are looking at. Written in TensorFlow.js">   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">  </head>  <body>   <video id="webcam" width="400" height="300" autoplay></video> </body> <script>  var video = document.querySelector("#webcam");  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {     navigator.mediaDevices.getUserMedia({ video: true })         .then(

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!