【发布时间】:2010-08-29 23:02:33
【问题描述】:
我正在尝试显示来自 1394 相机的实时图像。 目前,我的代码能够从相机循环获取图像,我正在寻找任何可以动态更新的快速 GUI(作为单独的线程)。我可以在 PyQt 中做到这一点,也许使用 QThreads 但有什么建议或更快的方法吗? 这是我的代码
#循环从相机捕捉帧
for frame in range(1,500):
print 'frame:',frame
TIME.sleep(1) #capture frame every second
image_binary = pycam.cam.RetrieveBuffer()
#convert to PIL Image
pilimg = PIL.Image.frombuffer("L",(cimg.GetCols(),cimg.GetRows()),image_binary,'raw', "RGBA", 0, 1)
# At this point I want to send my image data to a GUI window and display it
谢谢。
【问题讨论】:
标签: python image user-interface camera live