15 Star 48 Fork 17

Aaron_ou / opencv-face

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testopencv.py 553 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aaron_ou 提交于 2015-01-17 21:30 . first
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 30 06:43:36 2014
@author: aaron
"""
import cv2
cv2.namedWindow('Video')
capture = cv2.VideoCapture(0)
_, frame = capture.read()
while frame is not None:
cv2.imshow('Video', frame)
key = cv2.waitKey(10)
if key == ord('s'): # 当按下"s"键时,将保存当前画面
cv2.imwrite('screenshot.bmp', frame)
elif key == ord('q'): # 当按下"q"键时,将退出循环
cv2.destroyWindow('Video')
break
_, frame = capture.read()
cv2.destroyWindow('Video')
Python
1
https://gitee.com/Aaron_ou/opencv-face.git
git@gitee.com:Aaron_ou/opencv-face.git
Aaron_ou
opencv-face
opencv-face
master

搜索帮助