0% found this document useful (0 votes)
34 views13 pages

Computer Vision and Image Computer Vision and Image Processing (CSEL Processing (CSEL - 393) 393)

This document summarizes a lecture on spatial filtering processes. It discusses smoothing spatial filters, which average pixel intensities in a neighborhood to reduce noise. An example is shown where a 3x3 mask is used to smooth each pixel by averaging its value with its neighbors. The lecture also addresses padding images at boundaries when applying the filter mask.

Uploaded by

ali sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views13 pages

Computer Vision and Image Computer Vision and Image Processing (CSEL Processing (CSEL - 393) 393)

This document summarizes a lecture on spatial filtering processes. It discusses smoothing spatial filters, which average pixel intensities in a neighborhood to reduce noise. An example is shown where a 3x3 mask is used to smooth each pixel by averaging its value with its neighbors. The lecture also addresses padding images at boundaries when applying the filter mask.

Uploaded by

ali sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

10/7/2021

Computer Vision and Image


Processing (CSEL-
(CSEL-393)

Lecture 5

Dr. Qurat ul Ain Akram


Assistant Professor
Computer Science Department (New
Campus) KSK, UET, Lahore

1
10/7/2021

Spatial Filter Process

Spatial Filter Process


Sum of Product Operations (SoP)

2
10/7/2021

Spatial Filter Process

Smoothing Spatial Filter


• One of the simplest spatial filtering
operations which we can perform is
a smoothing operation
– Simply average all of the neighboring
pixels intensities of a central pixel
value
– Useful in removing noise from images
– Useful for highlighting overall details
of image

3
10/7/2021

Smoothing Spatial Filter- Example

Smoothing Spatial Filter- Example

4
10/7/2021

Smoothing Spatial Filter- Example

Smoothing Filtering process- Example

Window Size (W)= 3 x 3

5
10/7/2021

Smoothing Filtering process- Example


Filtering at boundaries of images
• Possible solution
– Ignore missing pixels
– Pad the image: Zero-padding or One-Padding
depending on the intensity values of the image
– Replicate border pixels
– Truncate the image
– Wrap around pixels at boundary of the image

Smoothing Filtering process- Example


Filtering at boundaries of images

6
10/7/2021

Smoothing Filtering process- Example

Window Size (W)= 3

Padded Image Size


Number of rows= M+W-1= 3+3-1=5
Number of columns= N+W-1=3+3-1=5

Smoothing Filtering process- Example

Window Size (W)= 3

Padded Image Size


Number of rows= M+W-1= 3+3-1=5
Number of columns= N+W-1=3+3-1=5

Copy pixels values of I in I_p in


respective locations

7
10/7/2021

Smoothing Filtering process- Example

Window Size (W)= 3

Padded Image Size


Number of rows= M+W-1= 3+3-1=5
Number of columns= N+W-1=3+3-1=5

Zero-Padding

Smoothing Filtering process- Example


Apply Mask

8
10/7/2021

Smoothing Filtering process- Example


Apply Mask

Smoothing Filtering process- Example


Apply Mask

9
10/7/2021

Smoothing Filtering process- Example


Apply Mask

Smoothing Filtering process- Example


Apply Mask

10
10/7/2021

Smoothing Filtering process- Example


Apply Mask

Smoothing Filtering process- Example


Apply Mask

11
10/7/2021

Smoothing Filtering process- Example


Apply Mask

Smoothing Filtering process- Example


Apply Mask

12
10/7/2021

Smoothing Filtering process- Example


Apply Mask

13

You might also like