import cv2
import numpy as np
img = cv2.imread("lena.jpg")
layer = img.copy()
gaussian_pyramid_list = [layer]
for i in range(6):
layer = cv2.pyrDown(layer)
gaussian_pyramid_list.append(layer)
#cv2.imshow(str(i), layer)
layer = gaussian_pyramid_list[5]
cv2.imshow('upper level Gaussian Pyramid', layer)
laplacian_pyramid_list = [layer]
for i in range(5, 0, -1):
gaussian_extended = cv2.pyrUp(gaussian_pyramid_list[i])
laplacian = cv2.subtract(gaussian_pyramid_list[i-1], gaussian_extended)
cv2.imshow(str(i), laplacian)
cv2.imshow("Original image", img)
cv2.waitKey(0)
cv2.destroyAllWindows()#close window
============================
data used in this video
#===================================#
if you faced any issue contact me via
what's app : +201210894349
Comments
Post a Comment
I hope you have benefited from this blog, and if you have any question, feel free to leave it here.