diff options
Diffstat (limited to 'Utilidades/src/displayImage.py')
-rw-r--r-- | Utilidades/src/displayImage.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Utilidades/src/displayImage.py b/Utilidades/src/displayImage.py deleted file mode 100644 index 06b59af..0000000 --- a/Utilidades/src/displayImage.py +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env python -import pygame, sys, os -from opencv.cv import * -from opencv.highgui import * - -def main(): - capture = cvCreateCameraCapture(0) - #Actualmente estas funcinoes no andan por lo tanto no nos permite setear el tamano del frame - #cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH,320) - #cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT,240) - size = (640,480) - screen = pygame.display.set_mode(size) - - surface = pygame.display.get_surface() - - running = True - while running: -# screen.fill((255,255,255)) - - frame = cvQueryFrame(capture) - - pg_img = pygame.image.frombuffer(frame.imageData,size, "RGB") - screen.blit(pg_img, (0,0)) - - pygame.display.flip() - for event in pygame.event.get(): - if event.type == pygame.QUIT: - running = False - elif event.type == pygame.KEYDOWN: - if event.key == pygame.K_ESCAPE: - running = False - -if __name__ == "__main__": - main() |