| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- """
- 使用digiCamControl进行处理
- 1、使用cmd命令检查相机是否有链接电脑
- 2、句柄检查digiCamControl软件是否有打开
- 3、注意没有单独对焦的命令,不对焦拍摄的话取另外一个控制命令
- 4、确保输出的内容在指定文件夹
- """
- import os.path
- import subprocess
- import time
- import settings
- # import win32api, win32gui, win32con
- # import win32process
- # from pynput.keyboard import Key, Controller
- from .capture_basic_mode import CaptureBasic
- import threading
- from .module_watch_dog import FileEventHandler
- # from win32gui import EnumWindows, GetWindowText
- class DigiCam(CaptureBasic):
- def __init__(self):
- super().__init__()
- # self.get_capture_one_hwnd()
- # self.install_path = settings.DigicamInstallPath
- self.is_first_init = 0
- # if self.install_path:
- # threading.Thread(target=self.check_and_open_software, args=()).start()
- # 拍照
- def photograph(self, is_af=True):
- """
- Args:
- data:
- info_show: 信息输出
- image_deal_mode:0 表示左脚,1表示右脚
- Returns:
- """
- print("55----------------------DigiCam------photograph")
- # 执行拍照
- time.sleep(0.1)
- # 自动对焦
- if is_af:
- self.auto_focus()
- self.run_capture_action("Capture")
- else:
- self.run_capture_action("Capture")
- time.sleep(float(settings.PhotographSeconds))
|