DIP Lec 11 Image Enhancement Mask Processing

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

EEE F435 (2021-22-I)

Digital Image Processing


(Image Enhancement in the Spatial Domain :
BITS Pilani Mask Processing)
K K Birla Goa Campus
Ashish Chittora
Mask Processing
Mask processing
Mask processing
Mask Processing
• Processed or modified value of pixel
Mask processing
Averaging Filter
•Also called Smoothing or Low
pass filer
•Reduces the sharp transitions
•Reduces “irrelevant” detail
(smaller than mask size)
•Noise reduction
•Smoothing of false contours
•Undesired effect: edge blurring
Spatial filtering

44 30 10 9 103 Original image

23 32 11 52 4

50 17 2 86 21 Resultant image

41 6 87 3 23 14 17 16 21 19
1 1 1

23 12 16 4 9
1 1 1

1 1 1
1 1 1

1/9 X 1 1 1

1 1 1
Averaging filter
Averaging Filter
Averaging Filter

• Wieghted Averaging

• Example
Sharpening Spatial Filters
• objective of sharpening is to highlight fine
detail in an image or to enhance detail that
has been blurred
• Averaging filter (analogous to integration)
produces blurring effect
• So sharpening must be a differentiation
operation
• Enhances discontinuities
• Deemphasizes areas with slowly varying gray
levels
Sharpening Spatial Filters

Intensities along the


Gray image (with 3 bits/pixel or centre line of image
8 intensity levels)
Sharpening Spatial Filter
Sharpening Spatial Filter
• First order derivative:

• Second order derivative:


Sharpening Spatial Filter : second derivative

• Second order derivative for enhancement:


– Laplacian operator

– For x-direction

– For y-direction

– Finally we get
Sharpening Spatial Filter
• This equation can be written as a 3X3 mask

» OR
Sharpening Spatial Filter
• If the Diagonal neighbors also included

» OR
Sharpening Spatial Filter
• Filter for combined effect of Laplacian filtering
and adding/subtracting
Sharpening Spatial Filter
• Filter for combined effect of Laplacian filtering
and adding

• If diagonal neighbors are also considered


Sharpening spatial filters : example
Unsharp masking

• Used in publishing industry for sharpening

• Subtract blurred image form original to get


sharpened image

• Also used in dark room photography


High boost filtering

• Slight further generalization of unsharp


masking

»a
High boost filtering
• If we use Laplacian operator to get sharpened
image then

• Mask for high boost filtering

– OR
High boost filtering
First derivative for enhancement
• First derivative or gradient

• Magnitude

• Approximation
Gradient operator
Horizental edges vertical edges
• Sobel’s

• Robert’s
Sobel’s operator : example

You might also like