image1 = cv2.imread("82.png",0)
image2 = cv2.imread("83.png",0)
np.uint16(image1)
np.uint16(image2)
I want to convert image1 and image2 to uint16 type. Thanks in advance :)
CodePudding user response:
you can achieve your goal by using np.astype()
EXAMPLE:
import numpy as np
import cv2
image1 = cv2.imread("82.png",0)
image_uint16=image1.astype("uint16")