DexterInd / GoPiGo3

The GoPiGo3 is a Raspberry Pi Robot!
https://gopigo.io
Other
96 stars 85 forks source link

OpenCV and streaming #279

Closed Cap-n-Proud closed 3 years ago

Cap-n-Proud commented 4 years ago

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 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.

Any idea on how to make it work?

CleoQc commented 3 years ago

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.