Blurring an image using the OpenCV function Gaussian Blur()

In this program, will blur an image using the openCV function GaussianBlur(). Gaussian blur is the process of blurring an image using the gaussian function. It is widely used in graphics software to remove noise from the image and reduce detail.


Step 1: Import cv2.
Step 2: Read the original image.
Step 3: Apply gaussian blur function. Pass the image and the kernel size as parameter.
Step 4: Display the image.

Original Image

Example Code

import cv2
image = cv2.imread("testimage.jpg")
Gaussian = cv2.GaussianBlur(image, (7,7), 0)
cv2.imshow("Gaussian Blur", Gaussian)


Gaussian Blur:

Updated on: 17-Mar-2021


Kickstart Your Career

Get certified by completing the course

Get Started