This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import pygame.camera | |
from pygame.locals import * | |
DEVICE = '/dev/video0' | |
SIZE = (640, 480) | |
FILENAME = 'capture.png' | |
def camstream(): | |
pygame.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
import cv2 | |
import numpy as np | |
import sys | |
camera = cv2.VideoCapture(0) | |
pygame.init() | |
pygame.display.set_caption("OpenCV camera stream on Pygame") | |
screen = pygame.display.set_mode([1280,720]) |