Last active
July 26, 2019 06:21
-
-
Save wwj718/0f6bee8a53358e3fe111dbeca18e7198 to your computer and use it in GitHub Desktop.
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 | |
import sys | |
import imagezmq | |
image_hub = imagezmq.ImageHub() | |
while True: # show streamed images until Ctrl-C | |
rpi_name, image = image_hub.recv_image() | |
cv2.imshow(rpi_name, image) # 1 window for each RPi | |
k = cv2.waitKey(1) | |
# k = cv2.waitKey(0) | |
if k == ord('t'): | |
cv2.imwrite('rpi.png',image) | |
if k==ord('q'): | |
sys.exit(0) | |
image_hub.send_reply(b'OK') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment