.env stuff
This commit is contained in:
@@ -2,10 +2,10 @@ import pygame
|
||||
import pygame.camera
|
||||
|
||||
|
||||
def capture():
|
||||
def capture(camera_stream = "/dev/video4"):
|
||||
pygame.camera.init()
|
||||
pygame.camera.list_cameras()
|
||||
cam = pygame.camera.Camera('/dev/video4', (640, 480))
|
||||
cam = pygame.camera.Camera(camera_stream, (640, 480))
|
||||
cam.start()
|
||||
img = cam.get_image()
|
||||
pygame.image.save(img, './capture.jpg')
|
||||
|
||||
Reference in New Issue
Block a user