0


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

调用摄像头并展示视频

代码如下:

  1. <!doctype html>
  2. <html class="no-js" lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <title>Lookie Lookie!</title>
  7. <meta name="description" content="A website that learns to predict where you are looking at. Written in TensorFlow.js">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  9. </head>
  10. <body>
  11. <video id="webcam" width="400" height="300" autoplay></video>
  12. </body>
  13. <script>
  14. var video = document.querySelector("#webcam");
  15. if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
  16. navigator.mediaDevices.getUserMedia({ video: true })
  17. .then(
标签: 算法 html5 web

本文转载自: https://blog.csdn.net/guige8888811/article/details/140852056
版权归原作者 web前端神器 所有, 如有侵权,请联系我们删除。

“h5调用摄像头,并根据算法识别人脸跟踪”的评论:

还没有评论