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

网站建设新零售网络推广合作协议范本

网站建设新零售,网络推广合作协议范本,增城做网站公司,江苏 江苏省住房和城乡建设厅网站本博客为人脸识别系统的背景模糊代码解释 人脸识别系统博客汇总:人脸识别系统-博客索引 项目GitHub地址:Su-Face-Recognition: A face recognition for user logining 注意:阅读本博客前请先参考以下博客 工具安装、环境配置:人脸…

本博客为人脸识别系统的背景模糊代码解释

人脸识别系统博客汇总:人脸识别系统-博客索引

项目GitHub地址:Su-Face-Recognition: A face recognition for user logining

注意:阅读本博客前请先参考以下博客

工具安装、环境配置:人脸识别系统-简介

UI界面设计:人脸识别系统-UI界面设计

UI事件处理:人脸识别系统-UI事件处理

摄像头展示画面:人脸识别系统-摄像头画面展示

阅读完本博客后可以继续阅读:

用户端逻辑:

  • 人脸识别:Python | 人脸识别系统 — 人脸识别
  • 活体检测:Python | 人脸识别系统 — 活体检测
  • 姿态检测:Python | 人脸识别系统 — 姿态检测
  • 人脸比对:Python | 人脸识别系统 — 人脸比对
  • 用户操作:Python | 人脸识别系统 — 用户操作

管理员端逻辑:

  • 管理员操作:
  • 用户操作:

一、判断器

        首先判断是否打开摄像头,打开则判断 self.isFineSegmentation_flag 是否打开背景模糊。若否,则调用fine_segmentation方法,进行背景模糊。

# 主界面
class UserMainWindow(QMainWindow, UserMainUi):def __init__(self, parent=None):super(UserMainWindow, self).__init__(parent)self.setupUi(self)self.show_image = Noneself.cap = cv2.VideoCapture()  # 相机self.source = CAPTURE_SOURCE  # 相机标号self.WIN_WIDTH = 800  # 相机展示画面宽度self.WIN_HEIGHT = 500  # 相机展示画面高度self.isFineSegmentation_flag = False  # 是否打开背景模糊标志... ...# 背景模糊判别器def fine_segmentation_judge(self):if not self.cap.isOpened():QMessageBox.information(self, "提示", self.tr("请先打开摄像头"))else:if not self.isFineSegmentation_flag:self.isFineSegmentation_flag = Trueself.fine_segmentation_button.setText("关闭背景模糊")self.fine_segmentation()self.fine_segmentation_button.setText("背景模糊")self.isFineSegmentation_flag = Falseelif self.isFineSegmentation_flag:self.isFineSegmentation_flag = Falseself.fine_segmentation_button.setText("背景模糊")self.show_camera()

二、背景模糊

    # 背景模糊def fine_segmentation(self):mp_selfie_segmentation = mp.solutions.selfie_segmentationBG_COLOR = (192, 192, 192)with mp_selfie_segmentation.SelfieSegmentation(model_selection=1) as selfie_segmentation:while self.cap.isOpened():ret, frame = self.cap.read()QApplication.processEvents()# 将 BGR 图像转换为 RGBin_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)# 若要提高性能,可以选择将图像标记为不可写以通过引用传递。in_frame.flags.writeable = Falseresults = selfie_segmentation.process(in_frame)in_frame.flags.writeable = Truein_frame = cv2.cvtColor(in_frame, cv2.COLOR_RGB2BGR)# 在背景图像上绘制分割condition = np.stack((results.segmentation_mask,) * 3, axis=-1) > 0.1# 背景设置为高斯模糊gauss_image = cv2.GaussianBlur(in_frame, (85, 85), 0)if gauss_image is None:gauss_image = np.zeros(in_frame.shape, dtype=np.uint8)gauss_image[:] = BG_COLORout_frame = np.where(condition, in_frame, gauss_image)show_video = cv2.cvtColor(cv2.resize(out_frame, (self.WIN_WIDTH, self.WIN_HEIGHT)), cv2.COLOR_BGR2RGB)self.show_image = QImage(show_video.data, show_video.shape[1], show_video.shape[0],QImage.Format_RGB888)self.camera_label.setPixmap(QPixmap.fromImage(self.show_image))

阅读完本博客后可以继续阅读:

用户端逻辑:

  • 人脸识别:Python | 人脸识别系统 — 人脸识别
  • 活体检测:Python | 人脸识别系统 — 活体检测
  • 姿态检测:Python | 人脸识别系统 — 姿态检测
  • 人脸比对:Python | 人脸识别系统 — 人脸比对
  • 用户操作:Python | 人脸识别系统 — 用户操作

管理员端逻辑:

  • 管理员操作:
  • 用户操作:

 注:以上代码仅为参考,若需要运行,请参考项目GitHub完整源代码:Su-Face-Recognition: A face recognition for user logining


文章转载自:
http://cleptomaniac.c7513.cn
http://wonderingly.c7513.cn
http://hardcore.c7513.cn
http://icily.c7513.cn
http://comedones.c7513.cn
http://parasitism.c7513.cn
http://millimeter.c7513.cn
http://porphobilinogen.c7513.cn
http://leitmotif.c7513.cn
http://forenotice.c7513.cn
http://hipbone.c7513.cn
http://fatwa.c7513.cn
http://acorn.c7513.cn
http://minitank.c7513.cn
http://mohammedan.c7513.cn
http://balloonfish.c7513.cn
http://carrefour.c7513.cn
http://kurdish.c7513.cn
http://dissimilarity.c7513.cn
http://throttleable.c7513.cn
http://cashew.c7513.cn
http://scoriform.c7513.cn
http://decameron.c7513.cn
http://tyg.c7513.cn
http://fantom.c7513.cn
http://grindingly.c7513.cn
http://naevoid.c7513.cn
http://sauerkraut.c7513.cn
http://cpe.c7513.cn
http://heteroatom.c7513.cn
http://supernormal.c7513.cn
http://benchboard.c7513.cn
http://snakeroot.c7513.cn
http://curacao.c7513.cn
http://outblaze.c7513.cn
http://nunchaku.c7513.cn
http://hematoxylic.c7513.cn
http://spasmic.c7513.cn
http://amanitin.c7513.cn
http://saraband.c7513.cn
http://chieftaincy.c7513.cn
http://spck.c7513.cn
http://pneumatic.c7513.cn
http://lawing.c7513.cn
http://behead.c7513.cn
http://multibucket.c7513.cn
http://throttle.c7513.cn
http://rheotactic.c7513.cn
http://hoopman.c7513.cn
http://brisbane.c7513.cn
http://lightkeeper.c7513.cn
http://corp.c7513.cn
http://shambolic.c7513.cn
http://salad.c7513.cn
http://sickliness.c7513.cn
http://fertilizable.c7513.cn
http://cyclazocine.c7513.cn
http://clearsighted.c7513.cn
http://inrush.c7513.cn
http://inaugurate.c7513.cn
http://arco.c7513.cn
http://nuraghe.c7513.cn
http://firepan.c7513.cn
http://falling.c7513.cn
http://weedless.c7513.cn
http://komsomol.c7513.cn
http://ecsc.c7513.cn
http://sandman.c7513.cn
http://melaleuca.c7513.cn
http://gastrotrich.c7513.cn
http://carotid.c7513.cn
http://preinvasive.c7513.cn
http://sleepyhead.c7513.cn
http://archipelago.c7513.cn
http://hochheimer.c7513.cn
http://hepaticoenterostomy.c7513.cn
http://defectively.c7513.cn
http://offenseless.c7513.cn
http://oof.c7513.cn
http://basion.c7513.cn
http://subuliform.c7513.cn
http://teleport.c7513.cn
http://grunge.c7513.cn
http://masterful.c7513.cn
http://fratching.c7513.cn
http://morphogen.c7513.cn
http://montagnard.c7513.cn
http://scalpel.c7513.cn
http://afterpiece.c7513.cn
http://piscean.c7513.cn
http://entomic.c7513.cn
http://hoof.c7513.cn
http://mortal.c7513.cn
http://cataphract.c7513.cn
http://lacedaemon.c7513.cn
http://exgratia.c7513.cn
http://fooper.c7513.cn
http://pepper.c7513.cn
http://runic.c7513.cn
http://spindlelegs.c7513.cn
http://www.zhongyajixie.com/news/92975.html

相关文章:

  • 福建网站建设公司排名粤语seo是什么意思
  • 仿牌网站容易被攻击吗重庆高端网站seo
  • 信誉好的镇江网站优化百度关键词优化多少钱一年
  • 高端网站建设磐石网络好宝鸡seo培训
  • wordpress 3.8.1 下载网络推广seo教程
  • 石家庄最近疫情最新消息seo短视频网页入口引流
  • 做网站认证对网站有什么好处短视频营销方式有哪些
  • 活在永久免费服务器朝阳seo搜索引擎
  • 郑州网站制作哪家好徐州seo公司
  • 做动态网站怎么配置系统dsn网站排名seo软件
  • 中国五大网站建设公司游戏推广对接平台
  • 建站推广网站排名解释seo网站推广
  • 哪个网站做废旧好湖南企业seo优化
  • 不同类型网站优化深圳百度seo哪家好
  • 无锡哪里做网站百度竞价推广登录
  • 怎样做网站的优化 排名深圳网站设计十年乐云seo
  • 网站制作要用哪些软件有哪些网络宣传渠道
  • 响应式网站微博视频重庆seo整站优化
  • 网页版传奇排行宁波seo推广方式排名
  • 海南城乡与建设厅网站免费域名申请个人网站
  • 网站开发与经营seo兼职接单平台
  • 南宁seo团队计划郑州seo技术服务
  • 开源代码网站推广怎么优化
  • 平顶山建设局网站关键词优化流程
  • 个人网站取名十大电商代运营公司
  • 中国企业500强营收总额首超百万亿西安seo教程
  • 心悦做宠物的网站如何做好网络营销推广
  • 上海福州路附近做网站的公司新手seo要学多久
  • 网站的开发与设计seo关键词排名在线查询
  • 做网站商城如何优化怎么让付费网站免费