Last active
February 25, 2020 05:18
-
-
Save THEFASHIONGEEK/c6fe1b8a4fc3720102106dc66d095fe3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Box blur using OpenCV with normalized kernel => Normal Blur | |
import numpy as np | |
import cv2 | |
from matplotlib import pyplot as plt | |
img = cv2.imread("imgs/chapter5/outdoor.jpg", -1) | |
# Used for even float type images | |
blurred_Normalized = np.uint8(cv2.boxFilter(img, cv2.CV_64F, ksize=(5, 5), normalize=True)) | |
blurred_without_Normalized = np.uint8(cv2.boxFilter(img, cv2.CV_64F, ksize=(3, 3), normalize=False)) | |
# data-types: http://ninghang.blogspot.com/2012/11/list-of-mat-type-in-opencv.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment