先将图片转化为float32类型,再除以255,得到0-1之间的数 import numpy as np image = image.astype(np.float32) / 255. float32 转换成uint8.
確定! 回上一頁