Spatial Filtering Basics-Digital Image Processing-Lecture Slides, Slides of Digital Image Processing

Dr. Chittaranjan Verma delivered this lecture for Digital Image Processing course at B R Ambedkar National Institute of Technology. It includes: Spatial, Filtering, Basics, Digital, Image, Processing, Value, Smoothing, Filters

Typology: Slides

2011/2012

Uploaded on 07/20/2012

shalaby_88cop
shalaby_88cop 🇮🇳

4.3

(15)

63 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2
Spatial filtering: Basics
Given the 3×3 mask with coefficients: w1, w2,…, w9
The mask cover the pixels with gray levels: z1, z2,…, z9
z gives the output intensity value for the processed
image (to be stored in a new array) at the location of z5
in the input image
Z9
z8
Z7
Z6
z5
z4
Z3
z2
z1
9
11 2 2 3 3 9 9 1ii
i
z
zw zw zw zw zw

docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Spatial Filtering Basics-Digital Image Processing-Lecture Slides and more Slides Digital Image Processing in PDF only on Docsity!

2

Spatial filtering: Basics ^ Given the 3×3 mask with coefficients:

w^1

,^ w^2

w^9

^ The mask cover the pixels with gray levels:

z , z^1

z^9

^ z

gives the output intensity value for the processedimage (to be stored in a new array) at the location of

z^5

in the input image

Z^9

z^8

Z^7

Z^6

z^5

z^4

Z^3

z^2

z^1

9

1 1

2 2

3 3

9 9

i^ 1 i i

z^

z w

z w

z w

z w

z w 

^

^

^

^

^

^ 

3

Smoothing spatial filters ^ For blurring/noise reduction; ^ Blurring is usually used in preprocessing steps, e.g.,to remove small details from an image prior to objectextraction, or to bridge small gaps in lines or curves ^ Equivalent to Low-pass spatial filtering in frequencydomain because smaller (high frequency) details areremoved

based

on^

neighborhood

averaging

(averaging filters)  Applications:

Reduce noise; smooth false contours

^ Side effect:

Edge blurring

5

Original imageSize: 500x

Smooth by 3x3box filter

Smooth by 5x

box filter

Smooth by 9x9box filter

Smooth by 15x15 box filter

Smooth by35x35 box filter

8

Median filtering

Median =? 20

9

Median filtering: Example

11

Sharpening Spatial Filters ^ Operation of Image Differentiation^ 

Enhance

edges

and

discontinuities

(magnitude

of

output gray level >>0)  De-emphasize

areas

with

slowly

varying

gray-level

values (output gray level: 0)

^ Mathematical

Basis

of^

Filtering

for^

Image

Sharpening ^ First-order and second-order derivatives ^ Approximation in discrete-space domain ^ Implementation by mask filtering

12

First and second order derivative

14

Comparison of first (f’) andsecond order (f’’) derivative ^ First order derivatives produce thicker edges in an image ^ Second order derivatives have a stronger response tofine details, such as thin lines and isolated points

15

Comparison of first (f’) andsecond order (f’’) derivative ^ First

order

derivatives

generally

have

a

stronger

response to gray level steps  Second order derivatives produce double response atstep changes in gray levels

17

Comparison of first (f’) andsecond order (f’’) derivative ^ For image enhancement, second order derivative isgenerally better suited than first order derivative ^ Major application of first order derivative is for edgeextraction ^ First

order

derivative

used

together

with

second

order derivative results in impressive enhancementeffect

18

Enhancement by second orderderivative: Example Applying the second derivative through 1-D kernel: -1 2 -1On a sequence

2 2 2 2 2 4

6 6 6 6 6

Will give

0 0 0 0 -2 0 +2 0 0 0 0

Adding them

2 2 2 2 0 4

8 0 0 0 0

20

Use of second derivatives for imageenhancement: The Laplacian

21

Use of second derivatives for imageenhancement: The Laplacian