当前位置: 首页 > news >正文

官方网站管理办法源码网站建设

官方网站管理办法,源码网站建设,网站建设移动网络公司,seo网站点击量排名优化用已经搭建好 face_recognition#xff0c;dlib 环境来进行人脸识别 未搭建好环境请参考#xff1a; 使用opencv 调用摄像头 import face_recognition import cv2 video_capture cv2.videocapture(0) # videocapture打开摄像头#xff0c;0为笔记本内置摄像头#xff0c;1…用已经搭建好 face_recognitiondlib 环境来进行人脸识别 未搭建好环境请参考 使用opencv 调用摄像头 import face_recognition import cv2 video_capture cv2.videocapture(0) # videocapture打开摄像头0为笔记本内置摄像头1为外usb摄像头或写入视频路径 mayun_img face_recognition.load_image_file(mayun.jpg) jobs_img face_recognition.load_image_file(jobs.jpg) mayun_face_encoding face_recognition.face_encodings(mayun_img)[0] jobs_face_encoding face_recognition.face_encodings(jobs_img)[0] face_locations [] face_encodings [] face_names [] process_this_frame true while true: ret, frame video_capture.read() # video_capture.read()按帧读取视频ret,frame是获video_capture.read()方法的两个返回值。 # 其中ret是布尔值如果读取帧是正确的则返回true # 如果文件读取到结尾它的返回值就为false。frame就是每一帧的图像是个三维矩阵。 small_frame cv2.resize(frame, (0, 0), fx0.25, fy0.25) # 对截取到的图像进行处理 if process_this_frame: face_locations face_recognition.face_locations(small_frame) face_encodings face_recognition.face_encodings(small_frame, face_locations) face_names [] for face_encoding in face_encodings: match face_recognition.compare_faces([mayun_face_encoding, jobs_face_encoding], face_encoding) if match[0]: name mayun elif match[1]: name jobs else: name unknown print(name) face_names.append(name) process_this_frame not process_this_frame for (top, right, bottom, left), name in zip(face_locations, face_names): top * 4 right * 4 bottom * 4 left * 4 cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) cv2.rectangle(frame, (left, bottom - 35), (right, bottom), (0, 0, 255), 2) font cv2.font_hershey_duplex cv2.puttext(frame, name, (left6, bottom-6), font, 1.0, (255, 255, 255), 1) cv2.imshow(video, frame) if cv2.waitkey(1) 0xff ord(q): break video_capture.release() cv2.destroyallwindows() 我使用手机中的照片来进行验证因为是按每一帧进行读取有些人在使用时会出现摄像头打不开的情况 我使用的是win10系统给出一个建议 在设置中找到隐私设置在找到相机选项把权限打开即可希望与广大网友互动 点此进行留言吧
http://www.sadfv.cn/news/47822/

相关文章:

  • 环保网站建设开发swf网站cms
  • 去年做啥网站致富公司域名查询
  • 网站建设前的ER图怎样登录柳州建设网站
  • 怎么在网站中做视频背景共享充电宝开发
  • 做网站怎么盈利定制旅游网站有哪些
  • 企业网站的公司和产品信息的介绍与网络营销关系北海哪家公司做网站建设研发
  • 设计一个公司网站多少钱百度一下做网站
  • 茶叶网站建设要求交互设计英文
  • 网站模板源码免费下载建设宠物店网站
  • 网站搜索栏怎么做网站如何做信誉认证
  • 洛阳做网站那家好网站的首页需要什么内容
  • 中国工商银行官网网站创新logo标志设计
  • 个人网站设计的参考文献高端上海网站设计公司价格
  • 做淘宝网站需要多少钱ICP备案网站服务内容
  • 无锡网站建设 app昆山市建设工程交易中心网站
  • 怎样设计自己网站域名安徽省高等级公路工程建设指挥部网站
  • 乐山网站公众号建设科技特长生包括哪些项目
  • 广州市住房建设局网站wordpress安卓显示
  • 西工网站建设设计怎么做网站的主页面
  • 快速搭建网站信息库国外专门做杂志的共享网站
  • 网站猜你喜欢代码网络营销是什么研究
  • 网页的创新型网站策划个人网站认证
  • 中英 网站模板 带手机版org的域名网站
  • 企业网站策划案模板做网站的案例
  • 马云做黄页网站时候wordpress百度云盘插件
  • 沈阳市建设局网站宣传的网站开发需要多少钱
  • 上海千途建站网站关键词数量减少
  • 南昌网站建设推广注册公司的条件
  • 网站设计策划书 模板深圳公司官网
  • 酒店怎样做网站好评开发者 电影