环境配置
- Python 2.7+
- VideoCapture-0.9-5
- PIL(Python Imaging Library) PIL 1.1.7 win32 | PIL 1.1.7 amd64
程序实现
#! /etc/bin/env python
# -*- coding:utf-8 -*-
'Capture'
__author__ = 'Gao Yuhao'
from VideoCapture import Device
import time
camera = Device(devnum = 1, showVideoWindow = 0)
i = 0
while 1:
camera.saveSnapshot('snapshot.jpg',timestamp = 3, boldfont = 1)
i += 1
print i
time.sleep(3)
TODO
- 考虑通过某种形式实现远程监控
- 增加更多功能,如保存多张图片