towhee.utils.ndarray_utils.to_ndarray¶
- towhee.utils.ndarray_utils.to_ndarray(t_img: Image, dtype=None) ndarray [source]¶
Convert a towhee.types.Image into ndarray.
The mode is same as towhee_img, use towhee_img.mode to get the information.
- Parameters:
t_img (towhee.types.Image) – A towhee image.
dtype – The type of the narray.
- Returns:
- (np.ndarray)
The ndarray of the image, the mode is same as the towhee_img.