Image Pyramids (Blending and reconstruction) – OpenCV 3.4 with python 3 Tutorial 24

Source code Image reconstruction: [python] import cv2 import numpy as np img = cv2.imread("hand.jpg") # Gaussian Pyramid layer = img.copy() gaussian_pyramid = [layer] for i in range(6): layer = cv2.pyrDown(layer) gaussian_pyramid.append(layer) # Laplacian Pyramid layer = gaussian_pyramid[5] laplacian_pyramid = [layer] for i in range(5, 0, -1): size = (gaussian_pyramid[i – 1].shape[1], gaussian_pyramid[i – 1].shape[0]) gaussian_expanded […]