Ai
1 Star 0 Fork 0

xidianwz/qhyccd-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
GetLiveImage.py 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
H.F 提交于 2022-07-18 11:12 +08:00 . add GetLiveImage.py
import qhyccd
import time
import numpy as np
from time import strftime,localtime
qc = qhyccd.qhyccd()
def live():
qc.BeginLive()
while(True):
#time.sleep(0.001)
img = qc.GetLiveFrame()
server.send_img( img )
#print( time.monotonic() )
qc.StopLive()
def seq_capture_0924(intervalS, durationMin, name):
print("Begin Sequence Capture, interval:", intervalS, "s duration:", durationMin, "min")
qc.SetExposure(100)
qc.SetGain(1)
qc.SetROI(400, 0, 3522, 3522)
counter = 0
total_cycle = int(durationMin * 60 // intervalS)
t_start = time.monotonic()
state = 0
qc.BeginLive()
print("Star capture at", strftime("%Y-%m-%d %H:%M:%S", localtime()) )
for t in range(total_cycle + 4):
t_start = time.monotonic()
img = qc.GetLiveFrame()
print("*", end="")
while(time.monotonic() - t_start < intervalS):
time.sleep(0.001)
print()
print("Stop capture at", strftime("%Y-%m-%d %H:%M:%S", localtime()) )
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wz1010/qhyccd-python.git
git@gitee.com:wz1010/qhyccd-python.git
wz1010
qhyccd-python
qhyccd-python
master

搜索帮助