Python | Image blurring using OpenCV (original) (raw)

Last Updated : 04 Jan, 2023

Image Blurring refers to making the image less clear or distinct. It is done with the help of various low pass filter kernels.Advantages of blurring:

Important types of blurring:

Below is the Python code:

import cv2

import numpy as np

cv2.imshow( 'Original Image' , image)

cv2.waitKey( 0 )

Gaussian = cv2.GaussianBlur(image, ( 7 , 7 ), 0 )

cv2.imshow( 'Gaussian Blurring' , Gaussian)

cv2.waitKey( 0 )

median = cv2.medianBlur(image, 5 )

cv2.imshow( 'Median Blurring' , median)

cv2.waitKey( 0 )

bilateral = cv2.bilateralFilter(image, 9 , 75 , 75 )

cv2.imshow( 'Bilateral Blurring' , bilateral)

cv2.waitKey( 0 )

cv2.destroyAllWindows()

Output:

Similar Reads

Getting Started






Working with Images - Getting Started








Working with Images - Image Processing
































Working with Images - Feature Detection and Description









Working with Images - Drawing Functions









Working with Videos










Applications and Projects


















OpenCV Projects