Skip to content

Instantly share code, notes, and snippets.

View luigipacheco's full-sized avatar

Luis Arturo Pacheco luigipacheco

View GitHub Profile
from pygame.locals import KEYDOWN, K_ESCAPE, K_q
import pygame
import cv2
import sys
camera = cv2.VideoCapture(1)
pygame.init()
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280, 720])
@luigipacheco
luigipacheco / kivy_cv.py
Created May 20, 2019 14:52 — forked from ExpandOcean/kivy_cv.py
kivy and opencv work together demo
# coding:utf-8
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2
class KivyCamera(Image):
def __init__(self, capture, fps, **kwargs):