/Gaussian-Blur-Effect

Gaussian Blur Effect using Python

Primary LanguagePython

Gaussian-Blur-Effect

In Gaussian Blur operation, the image is convolved with a Gaussian filter
The Gaussian filter is a low-pass filter that removes the high-frequency components are reduced.
This a very important bluring method.

Tools and Languages:

OpenCV

VS Code

pip

Python


Installation

Use the package manager pip to install cv2 and numpy.

pip install cv2
pip install numpy

Import

Use import keyword to import modules.

import cv2
import numpy as np

Reading image from file

img = cv2.imread("cat.png")

Gussian blur effect

gauss = cv2.GaussianBlur(img,ksize=(15,15),sigmaX=0,sigmaY=0)

Completion message

print('Gaussian Blur Applied.')

Comparing original vs grayscale

cv2.imshow('original',img)
cv2.imshow('gauss',gauss)
cv2.waitKey(0)
cv2.destroyAllWindows()

Images

Original png Blured

Developed by

Ashish ku. Behera