原因是因为tif image存储精度是unit16,使用Image.open('a.tif').convert('L')
将数据格式转换为uint8后可以正常使用
np.array(ori_img.resize((128,128),PIL.Image.BICUBIC))
【记录】使用PIL打开tif图进行resize,PIL image.resize image has wrong mode
猜你喜欢
转载自blog.csdn.net/yaoyao_chen/article/details/132722122
今日推荐
周排行