修改图片的路径直接使用
from skimage import data, util,io
from skimage.metrics import peak_signal_noise_ratio as psnr
# 读取原图
image_01 = io.imread("./res/zhao.jpg")
image_02 = io.imread("./res/output.png")
#求psnr值
a = psnr(image_01, image_02)
print(a)
修改图片的路径直接使用
from skimage import data, util,io
from skimage.metrics import peak_signal_noise_ratio as psnr
# 读取原图
image_01 = io.imread("./res/zhao.jpg")
image_02 = io.imread("./res/output.png")
#求psnr值
a = psnr(image_01, image_02)
print(a)