📜  pil 标准化图像 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:22.853000             🧑  作者: Mango

代码示例1
# load image
image = Image.open('sydney_bridge.jpg')
pixels = asarray(image)

# convert from integers to floats
pixels = pixels.astype('float32')
# normalize to the range 0-1
pixels /= 255.0