Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==================================================================================================#
- # #
- # Image analysis program accompanying The Little Robot project. This program takes a webcam image #
- # and passes it through a neural network to determine whats on the image. #
- # #
- # Constructed and written by Janez Štefulj. #
- # #
- #==================================================================================================#
- import os
- import sys
- import pygame
- from pygame.locals import *
- import pygame.camera
- Width = 900
- Height = 720
- pygame.init()
- pygame.camera.init()
- Camera = pygame.camera.Camera("/dev/video0", (Width, Height))
- Camera.start()
- Window = pygame.display.set_mode((Width, Height), 1, 16)
- pygame.display.set_caption('Camera')
- while True:
- Image = Camera.get_image()
- Window.blit(Image, (0, 0))
- pygame.display.update()
- Camera.stop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement