環(huán)境配置
- Python 2.7+
- VideoCapture-0.9-5
- PIL(Python Imaging Library) PIL 1.1.7 win32 | PIL 1.1.7 amd64
程序?qū)崿F(xiàn)
#! /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
- 考慮通過某種形式實(shí)現(xiàn)遠(yuǎn)程監(jiān)控
- 增加更多功能先口,如保存多張圖片