add displaying video stream using sse

This commit is contained in:
Sem van der Hoeven
2023-05-31 21:03:40 +02:00
parent bdcdb19d96
commit df8f391c9f
3 changed files with 69 additions and 83 deletions

View File

@@ -103,6 +103,7 @@ class ApiListener(Node):
frame = cv2.resize(frame,(640,480))
encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), 65]
man = cv2.imencode('.jpg', frame, encode_param)[1]
self.get_logger().info('Sending video')
self.message_queue.append(man.tobytes())
except Exception as e: