2
我想通过python访问我的摄像头。不幸的是openCV由于网络摄像头而不工作。 Pygame.camera的工作原理是使用此代码魅力:从pygame得到numpy数组
from pygame import camera,display
camera.init()
webcam = camera.Camera(camera.list_cameras()[0])
webcam.start()
img = webcam.get_image()
screen = display.set_mode((img.get_width(), img.get_height()))
display.set_caption("cam")
while True:
screen.blit(img, (0,0))
display.flip()
img = webcam.get_image()
我的问题是,现在,我怎样才能从网络摄像头numpy的阵列?
我无法从网络摄像机跳转到numpy数组 - 你想从图像中获得一个像素数组吗? – thegrinner