16:52
class ROSImageStream:
def __init__(self):
self.bridge = CvBridge()
self.websocket_clients = []
rospy.init_node('image_stream_node', anonymous=True)
rospy.Subscriber("/vision/image/color", Image, self.callback)
def callback(self, data):
cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8")
_, jpeg = cv2.imencode('.jpg', cv_image, [int(cv2.IMWRITE_JPEG_QUALITY), 50])
Currently, I am attempting to send streaming images via WebSocket. At the moment, I am transmitting them in JPEG-to-byte format and also streaming camera (...)