代码拉取完成,页面将自动刷新
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()) )
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。