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:
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:
On the other end, I am trying to reverse that:
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
I am pretty new to Python and I am seeking some help and guidance.
I use OpenCV to grab frames from video cap:
1 |
ret, frame = self .cap.read() |
For subsequent processing, I need to serialize the value in order to pass it on to remote consumers:
1 2 |
data = np.fromstring(frame, np.uint8) message = data.tolist() |
1 2 |
frame = np.array(incoming_message, dtype = np.uint8) cv2.imwrite( 'debug.jpg' , frame) |
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