Hello, I am trying to read an image(only luma channel) sent to the server over the network like so -
textureY.GetRawTextureData ()
At the server side when I read the image using opencv, I get a completely garbled image
My guess is that the method is returning pixels in a format that is not standard.
Can anyone suggest pointers how to get a proper image read at the server side ?
luma = request.files['data']
in_memory_file = io.BytesIO()
luma.save(in_memory_file)
luma = np.frombuffer(in_memory_file.getvalue(), dtype=np.uint8)
luma = luma.reshape([height, -1])
cv2.imwrite('debug_unity.png' , luma)
↧