Hello,
Does anybody know why np.frombuffer only work with dtype = np.int8 or np.uint8 (E.g. the following datatypes do not work with np.frombuffer()):
numpy_array = np.frombuffer(imgPtr, dtype=np.int16) //for images with unsigned integer with 2 byte(-32768 to 32767) //does not work "numpy_array = np.frombuffer(imgPtr, dtype=np.uint16) //for images with unsigned integer with 2 byte(0 to 65535) //does not work
numpy_array = np.frombuffer(imgPtr, dtype=np.int32) //for images with signed integer with 4 byte(-2^31 to 2^31-1) "numpy_array = np.frombuffer(imgPtr, dtype=np.uint32) //for images with unsigned integer with 4 byte(0 to 2^32)
Is there any other solution for supporting the above? i.e. for loading image data from the shared Python memory (shared by C++ app) and display it in Python?
Thanks.