OPENCV | Python for Computer Vision by Global Emenwa & IfeanyiChukwu Ejike

OPENCV | Python for Computer Vision by Global Emenwa & IfeanyiChukwu Ejike

Author:Global, Emenwa & IfeanyiChukwu, Ejike
Language: eng
Format: epub
Published: 2022-06-08T00:00:00+00:00


img = cv.imread ('images/cats.jpg')

cv.imshow('Cats', img)

# average = cv.blur(img, (3,3))

# cv.imshow('Averaging', average)

# gauss = cv.GaussianBlur(img, (7,7), 0)

#cv.imshow ("Gaussian Blur", gauss)

median = cv.medianBlur(img, 7)

cv.imshow ('Median Blur', median)

cv.waitKey(0)

And the way we apply the blur is by saying, let's call this median and set the use the cv.medianBlur () method, we pass in the source image, and this kernel size will not be a tuple of 7 by 7, but instead, just an integer to 7. And the reason for this is because open CV automatically assumes that this kernel size will be a 7 by 7, just based on this integer.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.