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
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]) |
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
# 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): |