Gi为输入图像 先执行down(缩小尺寸) 在执行up(放大尺寸) 每一层都这样做
import cv2
import numpy as np
def cv_show(img,name):
cv2.imshow(name,img)
cv2.waitKey()
cv2.destroyAllWindows()
img=cv2.imread("AM.png")
# cv_show(img,'img')
down=cv2.pyrDown(img)
down_up=cv2.pyrUp(down)
l_1=img-down_up
cv_show(l_1,'l_1')