python pygame.camera.init() NO vidcapture
问题 I am trying to initialize the camera module in pygame and display video from a usb webcam. This is my code: import pygame import pygame.camera from pygame.camera import * from pygame.locals import * pygame.init() pygame.camera.init() cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() Yet i get this error: Traceback (most recent call last): File "C:/Users/Freddie/Desktop/CAMERA/Test1.py", line 7, in <module> pygame.camera.init() File "C:\Python27\lib\site