This file contains hidden or 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
| import cv2 | |
| #Lee las imágenes | |
| img = cv2.imread("images\where-is-wally.jpg") | |
| wally = cv2.imread("images\Wally.jpg") | |
| # Escala las imagenes de fondo para que pueda verse en pantalla | |
| scale_percent = 15 | |
| width_img = int(img.shape[1] * scale_percent / 100) | |
| height_img = int(img.shape[0] * scale_percent / 100) |
This file contains hidden or 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
| import numpy as np | |
| import cv2 | |
| # Captura video desde la cámara web | |
| cap = cv2.VideoCapture(0) | |
| while True: | |
| # ret indica si es posible usar el dispositivo | |
| # frame es el arreglo numpy del frame del video | |
| ret, frame = cap.read() |