Pythonでカメラデータを取得

583 ワード

環境設定
  • 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
  • リモートモニタリング
  • を何らかの形で実現することを考慮する.
  • は、複数の画像を保存するなど、より多くの機能を追加します.