#导入工具包
from imutils import *
#读入图片
image = imread('image.jpg') show(image) image.shape
#高斯金字塔
for i in range(4): image = cv2.pyrDown(image) print(image.shape) show(image)
for i in range(4): image = cv2.pyrUp(image) print(image.shape) show(image)
# 拉普拉斯金字塔 image = imread('image.jpg') down_image1 = cv2.pyrDown(image) down_image2 = cv2.pyrDown(down_image1) up_image = cv2.pyrUp(down_image2) laplacian = down_image1-up_image show(laplacian)