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.ca
Try this:
import pygame
import pygame.camera
import time, string
from VideoCapture import Device
from pygame.locals import *
pygame.camera.init()
cam = pygame.camera.Camera(0,(640,480),"RGB")
cam.start()
img = pygame.Surface((640,480))
cam.get_image(img)
pygame.image.save(img, "img2.jpg")
cam.stop()