0% found this document useful (0 votes)
58 views103 pages

Lec 5 Image Processing

Image processing

Uploaded by

sh1637
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)
58 views103 pages

Lec 5 Image Processing

Image processing

Uploaded by

sh1637
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

Digital Image Processing

(CSC 352)
2022 – 2023
Lecture-5
Dr: Mary monir saied
Email: mmh04@[Link]
Digital Image Fundamentals
Image Enhancement
Fundamental Steps of DIP

3
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 4
Fundamentals of Spatial Filtering
 The name filter is borrowed from frequency domain processing
where “filtering” refers to passing, modifying, or rejecting
specified frequency components of an image.

 Spatial filtering modifies an image by replacing the value of


each pixel by a function of the values of the pixel and its
neighbors.

 If the operation performed on the image pixels is linear, then the


filter is called a linear spatial filter.

 Otherwise, the filter is a nonlinear spatial filter.


5
The Mechanics of Linear Spatial Filtering

 A linear spatial filter performs a sum-of-products operation


between an image f and a filter kernel, w.

 The kernel is an array whose size defines the neighborhood of


operation, and whose coefficients determine the nature of the
filter.

 Other terms used to refer to a spatial filter kernel are mask,


template, and window

6
The Mechanics of Linear Spatial Filtering
Spatial Filtering
• Use filter (can also be called as mask/kernel/template
or window)
• The values in a filter sub-image are referred to as
coefficients, rather than pixel.
• Masks of odd sizes, e.g. 3x3, 5x5,…

7
The Mechanics of Linear Spatial Filtering
 The spatial domain processes are based on the expression

g(x, y) = T[ f (x, y)]


• f (x, y) is an input image
• g(x, y) is the output image
• T is an operator on f defined over a
neighborhood of point (x, y).

8
The Mechanics of Linear Spatial Filtering
 Neighbourhood operations simply operate on a larger
neighbourhood of pixels than point operations
 Neighbourhoods are mostly a rectangle around a central pixel
 Any size rectangle and any shape filter are possible

9
The Mechanics of Linear Spatial Filtering

- Neighborhood
- Operator (filter/mask)

Origin Origin
x x
Operator

(x, y) (x, y)

y Image f (x, y) y Image g (x, y) 10


The Mechanics of Linear Spatial Filtering

11
The Mechanics of Linear Spatial Filtering

12
The Mechanics of Linear Spatial Filtering
 The center coefficient of the kernel, w(0, 0), aligns with the
pixel at location (x, y).

 For a kernel of size m × n, we assume that m = 2a + 1 and n =


2b + 1, where a and b are nonnegative integers.

 Our focus is on kernels of odd size in both coordinate


directions.

 In general, linear spatial filtering of an image of size M × N


with a kernel of size m × n is given by the expression
a b

  w( s, t ) f ( x  s, y  t )
14
g ( x, y ) 
s   at   b
The Mechanics of Linear Spatial Filtering

Origin x
a b c r s t
d
g
e
h
f
i
* u
x
v
y
w
z
Original Image Filter
Simple 3*3 Pixels
e 3*3 Filter
Neighbourhood
eprocessed = v*e +
r*a + s*b + t*c +
u*d + w*f +
y Image f (x, y) x*g + y*h + z*i
15
 The above is repeated for every pixel in the original image to
generate the filtered image
The Mechanics of Linear Spatial Filtering
Dealing with Image Borders
At the edges of an image we are missing pixels to
form a neighbourhood
Origin x
e e

16
e e e
y Image f (x, y)
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

1. Ignore the edges.


2. Zero padding.
3. Mirror padding /symmetric.
4. Replicate padding.

17
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

1. Ignore the edges.

 The mask is only applied to those pixels in the image for with
the mask will lie fully within the image.
 The output is smaller than the original.
 If the mask is very large, a significant amount of information
may be lost by this method.

18
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

2. Zero padding.
 All values outside the image are zero.
 Output image of the same size as the original.
 It may consider unwanted artifacts like edges around the
image

19
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

2. Zero padding.
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
1 2 3 4 5
0 0 1 2 3 4 5 0 0
6 7 8 9 10 0 0 6 7 8 9 10 0 0
11 12 13 14 15 0 0 11 12 13 14 15 0 0
0 0 16 17 18 19 20 0 0
16 17 18 19 20
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 20
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

3. Mirror padding /symmetric.

 values outside the boundary of the image are obtained by


mirror-reflecting the image across its border;
 Mirror padding is more applicable when the areas near the
border contain image details.
 This type of padding attempt to “extend” the characteristics of
an image past its borders.
21
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

3. Mirror padding /symmetric.


13 12 11 12 13 14 15 14 13
8 7 6 7 8 9 10 9 8
1 2 3 4 5
3 2 1 2 3 4 5 4 3
6 7 8 9 10 8 7 6 7 8 9 10 9 8
11 12 13 14 15 13 12 11 12 13 14 15 14 13
18 17 16 17 18 19 20 19 18
16 17 18 19 20
13 12 11 12 13 14 15 14 13
8 7 6 7 8 9 10 9 8 22
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

4. Replicate padding.
 values outside the boundary are set equal to the nearest image
border value.
 Is useful when the areas near the border of the image are
constant.

23
The Mechanics of Linear Spatial Filtering

 What happens at the edge of the image, where the mask partly
falls outside the image?

4. Replicate padding.
1 1 1 2 3 4 5 5 5
1 1 1 2 3 4 5 5 5
1 2 3 4 5
1 1 1 2 3 4 5 5 5
6 7 8 9 10 6 6 6 7 8 9 10 10 10
11 12 13 14 15 11 11 11 12 13 14 15 15 15
16 16 16 17 18 19 20 20 20
16 17 18 19 20
16 16 16 17 18 19 20 20 20
16 16 16 17 18 19 20 20 20 24
The Mechanics of Linear Spatial Filtering

Filtered Image:
Zero Padding

Original
Image

Filtered Image:
Replicate Edge
Pixels 25
The Mechanics of Linear Spatial Filtering
Zero padding.

26
The Mechanics of Linear Spatial Filtering
Replicate padding.

27
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 28
Smoothing (Lowpass) Spatial Filters
❑ Smoothing spatial filters are used to reduce sharp transitions in
intensity.

❑ Smoothing Spatial Filters are used for:


✓ Noise reduction
 blurring is used in preprocessing steps, such as
 removal small details from an image prior to object extraction
 bridging of small gaps in lines or curves

• noise reduction can be accomplished by blurring with a linear 29


filter and also by a nonlinear filter
Smoothing (Lowpass) Spatial Filters
Example: extract, largest, brightest objects

15 x 15 averaging Binary image


30
Smoothing (Lowpass) Spatial Filters

31
Smoothing (Lowpass) Spatial Filters
 Smoothing filters are called low-pass filters.

 Image frequency is a measure of the amount by which grey


values change with distance.
1. High frequency components are characterized by large
changes in gray values over small distance.
2. Low frequency components are characterized by little changes
in gray value over small distance.

 Low-pass Filter: is a filter that passes over the low frequency


components and reduce or eliminate high frequency
components.
32
Smoothing (Lowpass) Spatial Filters
❑ Linear spatial filtering consists of convolving an image with
a filter kernel.

❑ Convolving a smoothing kernel with an image blurs the


image, with the degree of blurring being determined by :

 The size of the kernel


 The values of its coefficients

33
Smoothing (Lowpass) Spatial Filters

❑ Common smoothing spatial filters:


 Box or Average or mean Filter
 Gaussian or Weighted Filter

34
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters
Box(Average )filter:
 The simplest, separable lowpass filter
kernel is the box kernel, whose coefficients
have the same value (typically 1).
Simple averaging filter
 An 𝒎 × 𝒏 box filter is an 𝒎 × 𝒏 array of
1’s, with a normalizing constant in front,
whose value is 1 divided by the sum of the
values of the coefficients (i.e., 1/𝑚𝑛 when
all the coefficients are 1’s).
 For example: 3x3 average filter.
35
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters
Box(Average )filter:
Origin x
104 100 108 1/ 1/ 1/
9 9 9
1/ 1/ 1/
99 106 98

95 90 85
* 1/
9 9
1/ 1/
9

9 9 9

1/ 100
104
9
1/ 108
9
1/
9
Original Image Filter
Simple 3*3 1/
999 1106
/9 198
/9
3*3 Smoothing Pixels
Neighbourhood 195
/9 190
/9 185
/9
Filter
e = 1/9*106 +
1/ *104 + 1/ *100 + 1/ *108 +
9 9 9
1/ *99 + 1/ *98 + 36
9 9
y Image f (x, y) 1/ *95 + 1/ *90 + 1/ *85
9 9 9
= 98.3333
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters
Box(Average )filter:
Origin x
104 0 0 1/ 1/ 1/
9 9 9
1/ 1/ 1/
100

102
0

0
0

0
* 1/
9 9
1/ 1/
9

9 9 9

1/
104 1 1
9 0/9 0/9
Original Image Filter
Simple 3*3 1/ 1 1
3*3 Smoothing Pixels
1009 0/9 0/9
Neighbourhood 1/
102 1
9 0/9
1/ Filter
09

e = 1/9*104 +
1/ *100 + 1/ *102 + 1/ *0 +
9 9 9
1/ *0 + 1/ *0 + 37
9 9
y Image f (x, y) 1/ *0+ 1/ *0 + 1/ *0
9 9 9
= 34
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters

• Results an image with reduced sharp transitions in


intensities.
• Useful in removing noise and reducing irrelevant detail
(highlighting gross detail).
• Side effect: blurred edges.

38
Smoothing (Lowpass) Spatial Filters
Example
•The image at the top left
is an original image of
size 500*500 pixels

•The subsequent images


show the image after
filtering with an averaging
filter of increasing sizes 3, 5, 9, 15
and 35
39
•Notice how detail begins
to disappear
Smoothing (Lowpass) Spatial Filters
Example

original image

40
Smoothing (Lowpass) Spatial Filters
Example

Average Filter
3x3

41
Smoothing (Lowpass) Spatial Filters
Example

Average Filter
5x5

42
Smoothing (Lowpass) Spatial Filters
Example

Average Filter
9x9

43
Smoothing (Lowpass) Spatial Filters
Example

Average Filter
15x15

44
Smoothing (Lowpass) Spatial Filters
Example

Average Filter
35x35

45
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters
Weighted filter(Gaussian Filter):
Allowing different pixels in the
neighbourhood different weights in the
averaging function.
 Pixels closer to the central pixel are more
important.
 More effective in smoothing. Weighted averaging
filter

46
Smoothing (Lowpass) Spatial Filters
Origin x
104 100 108 1/ 2/ 1/
16 16 16

99 106 98

95 90 85
* 2/

1/
16

16
4/

2/
16

16
2/

1/
16

16

1/
104
16
2/
100 1/
16 10816
Original Image Filter
Simple 3*3 2/
/16 2/98
16 4106
99
3*3 Smoothing Pixels
16
Neighbourhood 1/
95
16
2
/16 1/
90 85
Filter
16

e = 4/16*106 +
1/ *104 + 2/ *100 + 1/ *108 +
16 16 16
2/ *99 + 2/ *98 +
16 16
y Image f (x, y) 1/ *95 + 2/ *90 + 1/ *85
16 16 16
= 99.375
47
Smoothing (Lowpass) Spatial Filters
Origin x
104 0 0 1/ 2/ 1/
16 16 16

100

102
0

0
0

0
* 2/

1/
16

16
4/

2/
16

16
2/

1/
16

16

1/
10416
2/
0 16 10/16
Original Image Filter
Simple 3*3 2/
10016 40/16 20/16
3*3 Smoothing Pixels
Neighbourhood 1/
102
2/16
16 0
1/ Filter
0 16

e = 4/16*0 +
1/ *104 + 2/ *100 + 1/ *102 +
16 16 16
2/ *0 + 2/ *0 +
16 16
y Image f (x, y) 1/ *0 + 2/ *0 + 1/ *0
16 16 16
= 25.375
48
Smoothing (Lowpass) Spatial Filters

49
Smoothing (Lowpass) Spatial Filters
Smoothing Linear Filters
• Highlighting gross detail: the size of the mask determines the relative
size of the objects blended.

50
Original Image Smoothed Image Thresholded Image
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 51
Smoothing Spatial Filters
Smoothing Nonlinear Filters
• Spatial filters whose response is based on ordering
(ranking) the pixels in the image area encompassed by
the filer, and replacing the center pixel with the value
determined by the ranking result.
• Examples:
– min filter, max filter, median filter.

52
Smoothing Spatial Filters
Smoothing Nonlinear Filters
Median Filter: sort pixels in neighborhood,
determine median, assign to center pixel.
Excellent salt-and-pepper noise
reduction(Impulse noise).

53
Smoothing Spatial Filters
Origin x
104 100 108

99 106 98

95 90 85

104 100 108


Original Image
Simple 3*3 99 106 98 Pixels
Neighbourhood 95 90 85

85, 90, 95, 98, 99, 100, 104, 106, 108

5th
y Image f (x, y)

The above is repeated for every pixel in the original image 54to
generate the smoothed image
Smoothing Spatial Filters
Median filter :

55
Smoothing Spatial Filters
Smoothing Nonlinear Filters
• Excellent salt-and-pepper noise reduction.

56
Original Image Image After Image After
With Noise Averaging Filter Median Filter
Smoothing Spatial Filters
Smoothing Nonlinear Filters
• Original

57
Smoothing Spatial Filters
Smoothing Nonlinear Filters
• Average

58
Smoothing Spatial Filters
Smoothing Nonlinear Filters
• Median

59
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 60
Sharpening Spatial Filters
Main objectives:
Highlight transitions in intensities
highlight edges.
Remove blurring  enhance details.
Sharpening filters are based on spatial
differentiation, which measures the rate of
change of a function.
First and second derivatives are used for
image enhancement. 62
Sharpening Spatial Filters

63
Sharpening Spatial Filters

64
Sharpening Spatial Filters
1st Derivative:
The formula for the 1st derivative of a function
is as follows:
f
 f ( x  1)  f ( x)
x
It’s just the difference between subsequent
values and measures the rate of change of the
function. 65
Sharpening Spatial Filters
2nd Derivative:
The formula for the 2nd derivative of a
function is as follows:
 f
2
 f ( x  1)  f ( x  1)  2 f ( x )
 x
2

Simply takes into account the values both


before and after the current value.
66
Sharpening Spatial Filters

67
Sharpening Spatial Filters
Example in 1D:

68
Sharpening Spatial Filters
Example in 1D:
• Note that the sign of the 2nd derivative changes
at the onset and end of ramp and step  zero
crossing  useful in locating edges.

• The 2nd derivative is more useful for image


enhancement than the 1st derivative
– Stronger response to fine detail.
– Simpler implementation. 69
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 70
Sharpening Spatial Filters
Using the Second Derivative for image
sharpening- The Laplacian
 The Laplacian, for a function (image) f(x, y)
of two variables, is defined and given below:

 2
f  2
f
 f  2  2
2

 x  y

71
Sharpening Spatial Filters
 Second Derivative (Laplacian)
where in the x direction:
2 f
 f ( x  1, y )  f ( x  1, y )  2 f ( x, y )
 x
2

f(x,y-1)
f(x-1,y) f(x,y) f(x+1,y)

f(x,y)

and in the y direction: f(x,y+1)


2 f
 f ( x, y  1)  f ( x, y  1)  2 f ( x, y )
72

 y
2
Sharpening Spatial Filters
Second Derivative (Laplacian)
Hence the Laplacian is given by:

 f  [ f ( x  1, y )  f ( x  1, y )
2

 f ( x, y  1)  f ( x, y  1)]
 4 f ( x, y )
.

73
Sharpening Spatial Filters
Second Derivative (Laplacian)
Hence the Laplacian is given by:

We can easily build a filter based on this.

0 1 0

1 -4 1

0 1 0 74
Sharpening Spatial Filters
 Explain the effect of such mask on…
 background region  eliminate it
 edge region  show it
 Ex.: 3×3 Laplacian filter on 3×3 image
X1 X2 X3 0 -1 0
X4 Y X5 -1 4 -1
X6 X7 X8 0 -1 0

Y Y Y Y
Result Explanation
-X2 -X4 -X5 -X7

If region is BG ≈0 ≈0 Eliminate the BG region

If Y > its Show the edge (by large +ve


≈ large +ve value ≈ +ve value
neighbor value)
If Y < its Show the edge (by large -ve 75
≈ large -ve value ≈ -ve value
neighbor value)

•Post-processing: NORMALIZATION
Sharpening Spatial Filters
Second Derivative (Laplacian)

76
Sharpening Spatial Filters
Second Derivative (Laplacian)
Applying the Laplacian gives a new image that highlights
edges and other discontinuities.

Not enhanced

Original Laplacian Laplacian 77


Image Filtered Image Filtered Image
Scaled for Display
Sharpening Spatial Filters
Second Derivative (Laplacian)

 f ( x, y )   2 f ( x, y ) If the center coefficient is negative


g ( x, y )  
 f ( x , y )   2
f ( x, y ) If the center coefficient is positive
78
Sharpening Spatial Filters
Second Derivative (Laplacian)
In the final sharpened image edges and fine detail are
much more obvious.

- =
79
Original Laplacian Sharpened
Image Filtered Image Image
Sharpening Spatial Filters
 Second Derivative (Laplacian)

80
Sharpening Spatial Filters
Composite Laplacian Filter
 This gives us a new filter which does the whole job for us in one
step.

g ( x, y )  f ( x, y )   f 2

 f ( x, y )  [ f ( x  1, y )  f ( x  1, y )
 f ( x, y  1)  f ( x, y  1)
 4 f ( x, y )]
 5 f ( x, y )  f ( x  1, y )  f ( x  1, y ) 81

 f ( x, y  1)  f ( x, y  1)
Sharpening Spatial Filters
Composite Laplacian Filter
This gives us a new filter which does the whole job
for us in one step.

0 -1 0

-1 5 -1

0 -1 0
82
Sharpening Spatial Filters
 Explain the effect of such mask on…
 background region  leave it
 edge region  sharp it
 Ex.: 3×3 Laplacian filter on 3×3 image
X1 X2 X3 0 -1 0
X4 Y X5 -1 5 -1
X6 X7 X8 0 -1 0

Y Y Y Y Y
Result Explanation
-X2 -X4 -X5 -X7
If region is BG ≈0 Y ≈Y Leave BG region as it’s
Increase the difference
If Y > its
≈ large +ve value Y ≈ Y + value between Y and its neighbors
neighbor
(i.e. sharp it)
Increase the difference 83
If Y < its
≈ large -ve value Y ≈ Y - value between Y and its neighbors
neighbor
(i.e. sharp it)
Sharpening Spatial Filters
Second Derivative (Laplacian)
There are lots of slightly different versions:
0 1 0 1 1 1
Simple Variant of
1 -4 1 1 -8 1
Laplacian Laplacian
0 1 0 1 1 1

-1 -1 -1

-1 9 -1 84

-1 -1 -1
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
 Laplacian vs. Composite Laplacian
Example: Apply the Laplacian and composite Laplacian filters
on the following blurred edge.
Sharpening Spatial Filters
2- First Derivative (Gradient)
The Gradient of f(x, y) at coordinates (x, y) is
defined as the column vector:

 f 
Gx   x 
f      f 
G y   
 y 
96
Main points of Image Enhancement

Image
Enhancement

Spatial Frequency
domain Domain

Point Neighborhood processing


processing (Filtering)

Smoothing Sharpening

First Second
Linear Nonlinear
Derivatives Derivatives 97
Sharpening Spatial Filters
2- First Derivative (Gradient)
Approximating the partial derivative in the x-
direction == third row – first row
Approximating the partial derivative in the y-
direction == third col – first col

f(x-1,y-1) f(x-1,y) f(x-1,y+1) z1 z2 z3


f(x,y-1) f(x,y) f(x,y+1)
= z4 z5 z6
98
f(x+1,y-1) f(x+1,y) f(x+1,y+1) z7 z8 z9
Sharpening Spatial Filters
2- First Derivative (Gradient)
Approximating the partial derivative in the x-
direction == third row – first row
Approximating the partial derivative in the y-
direction == third col – first col

M ( x, y)  z7  2 z8  z9   z1  2 z2  z3 
 z3  2 z6  z9   z1  2 z4  z7  z1 z2 z3
z4 z5 z6 99

z7 z8 z9
Sharpening Spatial Filters
2- First Derivative (Gradient)
Based on the previous equations we can derive the Sobel Operators
-1 -2 -1 -1 0 1
0 0 0 -2 0 2
1 2 1 -1 0 1
An image is filtered using both operators and the results are added
together.

100
Sharpening Spatial Filters
2- First Derivative (Gradient)

101
Sharpening Spatial Filters
2- First Derivative (Gradient)

102
Sharpening Spatial Filters
2- First Derivative (Gradient)

103
Sharpening Spatial Filters
Comparing the 1st and 2nd derivatives we
can conclude the following:
– 1st order derivatives generally produce
thicker edges.
– 2nd order derivatives have a stronger
response to fine detail e.g. thin lines.
– 2nd order derivatives produce a double
response at step changes in grey level.
104
Thank You
105

You might also like