我的代码如下:
image_name = filename
f_uyvy = open(image_name, "rb")
image_out = array.array('B')
image_out = Image.new("RGB", (width, height),"rgb(85%,85%,85%)")
pix = image_out.load()
#YUV is converted into RGB and stored into numpy
video = np.array(image_out)
cv2.imshow('video', video)
if cv2.waitKey(25) & 0xFF == ord('q'):
exit()
print "File Ended"
它正在工作,但很慢。如何更快地显示帧?