You are on page 1of 23

Image Enhancement in the Spatial

Domain

Digital Image Processing (DIP)

Lecture # 7
Topics for Today
• Sharpening Spatial Filters
Sharpening Spatial Filters
• The principal objective of sharpening is to
highlight fine details in an image or to
enhance detail that has been blurred, either in
error or as a natural effect of a particular
method of image acquisition. Use of image
sharpening vary and include applications
ranging from electronic printing and medical
imaging.
Examples of High pass Filters
application
Calculation of first order derivative
1st and 2nd order derivative
Calculation 1st Order Derivative
Properties of 1st Order Derivative
Properties of 1st Order Derivative

1. Zero in the areas of constant intensity.


2. Non-Zero at the onset of a step.
3. Non-Zero along intensity ramp.
Calculate 1st Order Derivative

6 6 6 6 5 4 3 2 1 1 1 1 1 1 6 6 6 6 6
Answer for 1st Order Derivative

6 6 6 6 5 4 3 2 1 1 1 1 1 1 6 6 6 6 6

0 0 -1 -1 -1 -1 -1 0 0 0 0 0 5 0 0 0 0
Calculation 2nd Order Derivative
1st and 2nd order Derivative
Properties of 2nd Order Derivative

.
1. Non-Zero at the onset and end of a step/end of ramp
2. Zero in flat areas and zero along intensity ramp.
Summary copied from book
(p-127)
Calculate 2nd Order Derivative

6 6 6 6 5 4 3 2 1 1 1 1 1 1 6 6 6 6 6
Answer for 2nd Order Derivative

6 6 6 6 5 4 3 2 1 1 1 1 1 1 6 6 6 6 6

0 0 -1 0 0 0 0 1 0 0 0 0 5 -5 0 0 0
Summary about 1st and 2nd Order
derivatives
• 1st Order Derivative Edge Detection Generally, the first
order derivative operators are sensitive to noise and
produce thicker edges like prewitt, roberts, sobel etc

• 2nd Order Derivative Edge Detection operators are more


sophisticated methods towards edge detection, however,
still very noise-sensitive like laplacian .
An image is a function of two d dimensions so
the equation for 2nd derivative will be

Generation of Laplacian MASK


Different forms of Laplacian Mask
Assignment No 1.
• Implementation of first order Derivatives in
MATLAB and explain the difference between
them ( Roberts, Prewitt , Sobel and Canny)

Due date is 12-12-2018


(in the form of hard copy)
Implementation of 1st and 2nd
Order derivate using Matlab
• Using all 1st order derivative

• Using Laplacian mask (2nd order)

You might also like