|
颜色问题新版本已经解决了。新旧版本我都测试过,hdmiin是可以稳定30fps的,没有发现像你说的只有十几帧,4K In也是30fps,你可以自己改下试试。参考测试代码如下:- import toybrick as toy
- import time
- if __name__ == '__main__':
- count = 0
- begintime = time.time()
- hdmi = toy.HdmiCapture(1920, 1080)
- disp = toy.Display('', 1920, 1080, True)
- print("Connect display width = " + str(disp.width()) + " ; height = " + str(disp.height()))
- while True:
- ret, frame = hdmi.read(1920, 1080)
- if frame is not None:
- ret = disp.imshow(frame)
- if ret == toy.RET_TERMINATED:
- break
- count += 1
- if time.time() - begintime >= 10:
- fps = count / (time.time() - begintime)
- print('fps = ' + str(fps))
- count = 0
- begintime = time.time()
- # End of While
|
|