movis.imgproc.qimage_to_numpy#
- movis.imgproc.qimage_to_numpy(image: QImage) ndarray [source]#
Convert a QImage to a numpy ndarray.
Note
It asserts that the input QImage format is
QImage.Format.Format_ARGB32
. The memory layout of the returned numpy array corresponds to the QImage layout.- Args:
- image:
The input QImage object. The function assumes that the image format is
QImage.Format.Format_ARGB32
.
- Returns:
A 3D numpy array of shape
(height, width, 4)
representingQImage
. The returned array will have 4 channels (RGBA) and dtype will be uint8.