【发布时间】:2012-07-05 10:54:13
【问题描述】:
我正在创建一个图像:
image = np.empty(shape=(height, width, 1), dtype = np.uint16)
之后我将图像转换为 BGR 模型:
image = cv2.cvtColor(image, cv2.COLOR_GRAY2BGR)
我想现在将图像转换为dtype = np.uint8,以便将该图像与cv2.threshold() 函数一起使用。我的意思是,我想将图像转换为CV_8UC1。
【问题讨论】: