Image Filter
Image smoothing and blurring
Step1 : Import the libraries and read the image
Step 2: Image Smoothing/blurring using different mothods
Step 3: Displaying the output
Step1 : Import the libraries and read the image
import numpy as np
import cv2
from matplotlib import pyplot as plt
image = [Link]('projectpro_noise_20.jpg')
image=[Link](image, cv2.COLOR_BGR2RGB)
Step 2: Image Smoothing/blurring using different methods
The image that we have is boisterous with unwanted dots and disturbances. Image smoothing is
generally used to remove this noise from the image.
Method 1: cv.filter2D
Method 2: [Link]
Mehtod 3: [Link]
kernel=[Link]((5,5), np.float32)/25
cov=cv2.filter2D(image, -1, kernel)
blur=[Link](image, (5,5))
gblur=[Link](img, (5,5),0)
Step 3: Displaying the output
[Link](2, 2, 1), [Link](image, cmap='gray')
[Link]('Original Image'), [Link]([]), [Link]([])
[Link](2, 2, 2), [Link](cov, cmap='gray')
[Link]('2D Convolution'), [Link]([]), [Link]([])
[Link](2, 2, 3), [Link](blur, cmap='gray')
[Link]('Box Filter'), [Link]([]), [Link]([])
[Link](2, 2, 4), [Link](gblur, cmap='gray')
[Link]('Gaussian Filter'), [Link]([]), [Link]([])
[Link]()
Lab Assignment
Practice the programming of Gaussian pyramid
You need to submit a short report which includes the algorithms you programmed, your code,
and the input and output images you obtained.