Closed PankajSavaliya closed 2 years ago
If i reproduced exactly the error you got, I think that the problem here is even though they are both NumPy ndarray, their shapes are not equals, you can see this with np_array.shape
and frame.shape
.
You need to process the binary as an image and that's the job that you're doing in the line
frame = cv2.imdecode(np_array, cv2.IMREAD_UNCHANGED) # 'Load it as it is'.
If this doesn't solve your error, please provide more information about the error and maybe I could help you.
both output types are numpy.ndarray and np_array getting an error and the second one getting the right result, can you please explain why the first one is not working even it's the right type for method?.