Skip to content

Instantly share code, notes, and snippets.

View damascenodiego's full-sized avatar
🎯
Focusing

CDN (Diego) Damasceno damascenodiego

🎯
Focusing
View GitHub Profile
@damascenodiego
damascenodiego / opencv_video_to_pygame.py
Created May 22, 2019 15:31 — forked from radames/opencv_video_to_pygame.py
OpenCV VideoCapture running on PyGame
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])
@damascenodiego
damascenodiego / camerastream.py
Created May 22, 2019 15:32 — forked from snim2/camerastream.py
Display the output of a webcam using Python and Pygame
import pygame
import pygame.camera
from pygame.locals import *
DEVICE = '/dev/video0'
SIZE = (640, 480)
FILENAME = 'capture.png'
def camstream():
pygame.init()