Hi everyone,
I am pretty new to Python and I am seeking some help and guidance.
I use OpenCV to grab frames from video cap:
For subsequent processing, I need to serialize the value in order to pass it on to remote consumers:
How should I proceed to obtain the original nparray so that I can save it as an image?
Please, advise.
Thanks in advance!
Cheers,
G
I am pretty new to Python and I am seeking some help and guidance.
I use OpenCV to grab frames from video cap:
ret, frame = self.cap.read()frame.shape here is (480,640,3)
For subsequent processing, I need to serialize the value in order to pass it on to remote consumers:
data = np.fromstring(frame, np.uint8) message = data.tolist()On the other end, I am trying to reverse that:
frame = np.array(incoming_message, dtype=np.uint8) cv2.imwrite('debug.jpg', frame)but clearly, it is not the right way to do it.
How should I proceed to obtain the original nparray so that I can save it as an image?
Please, advise.
Thanks in advance!
Cheers,
G