图像处理图像的读取与大小变换图像的归一化
图像的读取与大小变换
此部分需要导入的包:
import imageio #imageio用来读取图像
from skimage.transform import resize #resize更改图像尺寸大小
from matplotlib import pyplot as plt #plt提供画图工具
首先,我们根据图片路径使用imageio包中的imread函数来读取图片:
image_path = './img/img3.jpeg'
img = imageio.imread(image_path)
此时,图像的输出为imgHeight