#single channel image# shape of img is [x, y]# repeat as three channels# shape of img_3channel is [x, y, 3]img_3channel = np.repeat(img[..., np.newaxis], 3, 2)
时间:2020-01-30 22:30:43
#single channel image# shape of img is [x, y]# repeat as three channels# shape of img_3channel is [x, y, 3]img_3channel = np.repeat(img[..., np.newaxis], 3, 2)