Image Pyramids – OpenCV 3.4 with python 3 Tutorial 23

Source code: 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] cv2.imshow("6", layer) laplacian_pyramid = [layer] for i in range(5, 0, -1):…

Smoothing images – OpenCV 3.4 with python 3 Tutorial 16

import cv2 import numpy as np img = cv2.imread("early_1800.jpg") averaging = cv2.blur(img, (21, 21)) gaussian = cv2.GaussianBlur(img, (21, 21), 0) median = cv2.medianBlur(img, 5) bilateral = cv2.bilateralFilter(img, 9, 350, 350) cv2.imshow("Original image", img) cv2.imshow("Averaging", averaging) cv2.imshow("Gaussian", gaussian) cv2.imshow("Median", median) cv2.imshow("Bilateral", bilateral) cv2.waitKey(0) cv2.destroyAllWindows()   Files:…

Copyright © Pysource 2017-2019, VAT: PL9721276174, Poznan (Poland) - Privacy Policy