#python #pygame
#python #pygame
Вопрос:
Я переустанавливаю pygame 3 раза, но проблема не решается. Ниже приведен мой код.
import pygame
import pygame.camera
import time
pygame.init()
pygame.camera.init()
camlist = pygame.camera.list_cameras()
cam = pygame.camera.Camera("C:/Program Files/iBall Face2Face ROBO K20 Webcam/VideoCap",(640,480))
cam.start()
time.sleep(0.1) # You might need something higher in the beginning
img = cam.get_image()
pygame.image.save(img,"C:/Users/mswatg05/Desktop/filename.jpg")
cam.stop()
Ответ №1:
По умолчанию расширение camera включено только в сборках Linux. Попробуйте использовать стороннюю компиляцию и установите VideoCapture из того же места.