Smart-Home am Beispiel der Präsenzerkennung im Raum Projektarbeit Lennart Heimbs, Johannes Krug, Sebastian Dohle und Kevin Holzschuh bei Prof. Oliver Hofmann SS2019
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zmq_video_client.py 490B

1234567891011121314
  1. # run this program on each RPi to send a labelled image stream
  2. import socket
  3. import time
  4. from imutils.video import VideoStream
  5. import imagezmq
  6. sender = imagezmq.ImageSender(connect_to='tcp://jeff-macbook:5555')
  7. rpi_name = socket.gethostname() # send RPi hostname with each image
  8. picam = VideoStream(usePiCamera=True).start()
  9. time.sleep(2.0) # allow camera sensor to warm up
  10. while True: # send images as stream until Ctrl-C
  11. image = picam.read()
  12. sender.send_image(rpi_name, image)