The idea for a start is to draw a simple square on top of the video. I understand this can be done either in the class StreamingOutput(object)or in the class StreamingHandler(server.BaseHTTPRequestHandler), and the code for the rectangle will look like that: cv2.rectangle(cv2.imread(self.buffer), start_point, end_point, color, thickness)
However when I try to do so the stream breaks and I only see the blank screen the the waiting for stream message.
To be honest, no. As soon as you intervene in the streaming object, it's no longer streaming.
There might be something to be done, but we haven't figured it out yet.
I was trying to add OpenCV to the RemoteCameraRobot streaming example (https://github.com/DexterInd/GoPiGo3/tree/master/Projects/RemoteCameraRobot).
The idea for a start is to draw a simple square on top of the video. I understand this can be done either in the class
StreamingOutput(object)
or in the classStreamingHandler(server.BaseHTTPRequestHandler)
, and the code for the rectangle will look like that:cv2.rectangle(cv2.imread(self.buffer), start_point, end_point, color, thickness)
However when I try to do so the stream breaks and I only see the blank screen the the waiting for stream message.
Any idea on how to make it work?