0% found this document useful (0 votes)
25 views127 pages

(IP'22) Lecture 3 - Enhancemet II - Spatial Filtering

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)
25 views127 pages

(IP'22) Lecture 3 - Enhancemet II - Spatial Filtering

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/ 127

CSC 447

Digital Image
Processing

10/19/2022 Dr. Maryam Al-Berry 1


[email protected]
Recall

1. What is image enhancement


2. Enhancement vs. restoration
3. Brightness vs. contrast
4. Image Histogram
5. Intensity transformation functions

10/19/2022 2
Image
Enhancement II

10/19/2022 3
Fundamental Steps of DIP
Wavelet and
Multi- Compression
resolution
Output is generally images

Color Image Morphological

Output is generally attributes


Processing Processing

Knowledge base
Restoration Segmentation

Representation
Enhancement and
Description

Object
Acquisition Recognition
Problem
10/19/2022 Domain 4
2. Histogram
Processing

10/19/2022 5
Image Histogram
• A way of viewing the distribution of
color/intensities in an image.
h(x) = the number of pixels in I with intensity value x
• A plot of pixels values against pixel counts.
Frequencies

10/19/2022 Grey Levels 6


Image Histogram – (cont.)
Gray Scale Image has one histogram while
color images has three; one for each band
(channel).

Luminosity

10/19/2022 7
Image Histogram – (cont.)
Color Image
I has 3 histograms:
hR(x) = number of pixels in I(:,:,1) with intensity value x
hG(x) = number of pixels in I(:,:,2) with intensity value x
hB(x) = number of pixels in I(:,:,3) with intensity value x

10/19/2022 8
Image Histogram – (cont.)
Color Image
Luminosity

There is one histogram


per color band hI L
R, G, & B. Luminosity
histogram is from 1
band ~ (R+G+B)/3

hI R hI G hI B

10/19/2022 9
Image Histogram – (cont.)
Color Image

10/19/2022 10
Image Histogram – (cont.)
Color to gray
• Lightness
Lightness = ½ × (max(R,G,B) + min(R,G,B))
• Luminosity
Luminosity = 0.21 × R + 0.72 × G + 0.07 × B
• Average
Average Brightness = (R + G + B) ÷ 3

10/19/2022 11
Image Histogram – (cont.)
Histogram Definition (normalized)
• An estimate to the probability of occurrence
of intensity level rk in an image.
nk
p(rk ) = , k = 0,1,2,..., L − 1
MN
MN : totoal number of pixels
nk : number of pixels having value rk

• Not unique.
10/19/2022 12
Image Histogram – (cont.)
Examples

10/19/2022 13
Image Histogram – (cont.)
Examples

10/19/2022 14
Image Histogram – (cont.)
Examples

10/19/2022 15
Image Histogram – (cont.)
Examples

10/19/2022 16
Image Histogram – (cont.)
Examples

10/19/2022 17
Image Histogram – (cont.)
Examples
Dark image
• Note that the high
contrast image has the
most evenly spaced Bright image
histogram.
Poor
contrast
Can we do image
that?
Good
contrast
10/19/2022
image 18
Histogram Processing
• Histogram equalization
Dark image
• Histogram matching

Bright image

Poor
contrast
image

Good
contrast
10/19/2022
image 19
Histogram Processing – (cont.)
Histogram Equalization
• Spreading out the frequencies in an image
(or equalizing the image) is a simple way to
improve dark or washed out images.
• Transfer the gray levels so that the histogram
of the resulting image is equalized to be a
constant (theoretically).
• Remap pixel values for image I so that its
histogram is as close to constant as possible.
10/19/2022 20
Histogram Processing – (cont.)
Histogram Equalization Why?

• Treating intensity levels as random variables.


• Applying transform T on the PDF of the input
intensity to produce output intensities with
equally spread probabilities (constant PDF).
• CHOICE OF T.

10/19/2022 21
(desired)
Known ?

Known
(given)

number of pixels mapped


from x to y is unchanged

10/19/2022 22
Histogram Processing – (cont.)
Histogram Equalization
• For any given mapping function y = f(x)
between the input and output images the
following holds
if the gray levels are assumed to be in the ranges between 0 and 1 then p(y) = 1 and

The Cumulative
Distribution
Function of x
10/19/2022 23
Histogram Processing – (cont.)
Histogram Equalization
• PDF of a random variable X is a measure of the
likelihood for X to occur at a given point .
x2
This is the probability
Px = Prob( x1  X  x2 ) =  f ( x)dx that an arbitrary pixel
x has value f(x).
x1
• Integrating gives the Cumulative Distribution
Function CDF of X: x
Fx = Prob( X  x) =  f ( x)dx
− This is the probability that any
given pixel from f has value less
10/19/2022 than or equal to x. 24
= P(x) = CDF (x)

Notice

Thus, an image which is


transformed using its
cumulative histogram yields
an output histogram which is
flat.

10/19/2022 25
10/19/2022 26
10/19/2022 27
Histogram Processing – (cont.)
Histogram Equalization - Discrete
if the gray levels are assumed to be in the ranges between 0 and L then p(y) = 1/(L-1)
and x
y = ( L − 1)  p (u)du
0

• For discrete intensity values we have

10/19/2022 28
Histogram Processing – (cont.)
Histogram Equalization - Discrete
x == rk y == sk == f(x) == f(rk ) = T(rk)

( L − 1) k
sk = T ( rk ) =
N j =0
 nj, k = 0, 1, 2,..., L − 1

rk: input intensity


sk: output intensity
k: the intensity level counter
nj: the histogram of intensity j
N: total number of pixels

Remember to round to the nearest integer.


10/19/2022 29
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 30
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 31
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 32
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 33
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 34
Histogram Processing – (cont.)
Histogram Equalization

10/19/2022 35
Histogram Processing – (cont.)
Histogram Matching (Specification)
• Mapping the histogram of an image to a
known histogram of another image.
• A method of color adjustment of two images
using the image histograms.

10/19/2022 36
Histogram Processing – (cont.)
Histogram Matching (Specification)

10/19/2022 37
Histogram Processing – (cont.)
Histogram Matching (Specification)
• Equalize the histogram of the input image.

• Equalize the specified (desired) histogram.

• Relate the two equalized histograms.

Since both images have the same equalized


histogram, they are actually the same image.

10/19/2022 38
Histogram Processing – (cont.)
Histogram Matching (Specification) - Discrete
• Discrete histograms and are not necessarily
identical. We need to relate each gray level in
x to a gray level in z, such that for every level
i, find level j where hist1 best matches hist2.

10/19/2022 39
Histogram Processing – (cont.)
Histogram Matching (Specification) - Discrete

10/19/2022 40
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 41
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example Resulting lookup table
Finding best level for best fit

10/19/2022 42
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 43
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 44
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 45
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 46
Histogram Processing – (cont.)
Histogram Matching (Specification) – Discrete
• Example

10/19/2022 47
Histogram Processing – (cont.)
Local Histogram Equalization
• Example

10/19/2022 48
Histogram Processing – (cont.)
Local Histogram Equalization
• Example

10/19/2022 49
Notes on Image Enhancement
• For human perception
– The visual evaluation of image quality is a highly
subjective process.
– It is hard to standardize the definition of a good image.
• For machine perception
– The evaluation task is easier.
– A good image is one which gives the best machine
recognition results.
• A certain amount of trial and error usually is
required before a particular approach is
selected.
10/19/2022 50
3. Spatial Filtering
(cont.)

10/19/2022 51
Contents

1. Neighborhood Operations
2. What is Spatial Filtering? How?
Correlation and Convolution
3. Smoothing Filters
Linear and Nonlinear
4. Sharpening Filters
First Derivatives
Second Derivatives
Neighborhood Operations
• For any specific location (x, y), the value of
g at that location is the result of applying an
operation to the pixels in the neighborhood
with origin (x, y).
Origin Origin
x x

Operation
(x, y) (x, y)

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


Neighborhood Operations – (cont.)
Some Simple Neighborhood Operations:
- Min: Set the pixel value to the minimum in the
neighbourhood.
- Max: Set the pixel value to the maximum in the
neighbourhood.
- Average: Set the pixel value to the sum of pixel
divided by the size of the neighborhood.
- Median: Set the pixel value to the midpoint value in
the ORDERED set. Sometimes the median works
better than the average.
Neighborhood Operations – (cont.)
Example
Original Image Output Image
x x
123 127 128 119 115 130

140 145 148 153 167 172 Average 142

133 154 183 192 194 191

194 199 207 210 198 195

164 170 175 162 173 151

y y
original 3x3 average
Neighborhood Operations – (cont.)
Example
Original Image Output Image
x x
123 127 128 119 115 130

140 145 148 153 167 172 Average 142 150

133 154 183 192 194 191

194 199 207 210 198 195

164 170 175 162 173 151

y y
original 3x3 average
Neighborhood Operations – (cont.)
Example

original 3x3 average


Neighborhood Operations – (cont.)
Example

original 3x3 average


Neighborhood Operations – (cont.)
Example

original 3x3 average


Neighborhood Operations – (cont.)
Example

original 3x3 average


What is Spatial Filtering?
- Neighborhood size.
- Operator (filter/mask/weight matrix).

Origin Origin
x x
Operator

(x, y) (x, y)

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


What is Spatial Filtering? – (cont.)
Basic Filtering Processes
• Convolution is used to linearly filter a signal,
for example to smooth a spike train.

• Correlation is used to characterize the


statistical dependencies between two
signals.

• Sum of products between two signals.


What is Spatial Filtering? – (cont.)
What is Spatial Filtering? – (cont.)
What is Spatial Filtering? – (cont.)
Correlation
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
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
What is Spatial Filtering? – (cont.)
Correlation two remarks

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

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

w(1,-1) w(1,0) w(1,1)


f(x+1,y-1) f(x+1,y) f(x+1,y+1)
An m×n = 3×3 filter
A 3×3 nighborhood
a b
g ( x, y ) =   w(s, t ) f ( x + s, y + t )
s = − at = − b

m = 2a + 1, n = 2b + 1
What is Spatial Filtering? – (cont.)
Convolution two remarks

a b c r s t eprocessed = v×e +
z×a + y×b + x×c +
d
g
e
h
f
i
* u
x
v
y
w
z
w×d + u×f +
t×g + s×h + r×i
Original Image Filter
Pixels

Mask is pre-rotated by 180⁰ before operating


Unless mask is
(flipping along one axis then the other). symmetric
What is Spatial Filtering? – (cont.)
Moving Window Transform
For any specific location (x, y), the value of g at
that location is the result of applying an
operation to the pixels in the neighborhood
with origin (x, y).
Origin Origin
x x

Operation
(x, y) (x, y)

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


What is Spatial Filtering? – (cont.)
Dealing with Image Borders
At the edges of an image
Origin
we are missing pixels to x
e e
form a neighbourhood.

e e e
y
Image f (x, y)
What is Spatial Filtering? – (cont.)
Dealing with Image Borders
• Omit missing pixels.
- Only works with some filters.
- Can add extra code and slow down processing.
• Pad the image.
- Typically with either all white or all black pixels.
• Replicate border pixels.
• Truncate the image.
• Allow pixels wrap around the image.
- Can cause some strange image artifacts.
What is Spatial Filtering? – (cont.)
Dealing with Image Borders

Filtered Image:
Zero Padding

Original Filtered Image:


Image Replicate Edge
Pixels

Filtered Image:
Wrap Around Edge
Pixels
What is Spatial Filtering? – (cont.)
Basic rule
• To generate an m×n linear spatial filter, we
need to specify mn mask coefficients
(weights).
• These are selected based on what the filter is
intended to do.
1. Smoothing
Filters

10/19/2022 74
Smoothing Filters
Main applications:
• Used for blurring and noise reduction.
• Removing small details prior to object
extraction.
• Bridging small gaps in lines and curves.
• Linear and nonlinear filters.
Smoothing Filters – (cont.)
Example: OCR preprocessing.
Smoothing Filters – (cont.)

Example: False contours


256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)

16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)
Smoothing Filters – (cont.)
Averaging Filter
• One of the simplest linear
spatial filtering operations.
• Response= average all of
the pixels in a 9
1
neighbourhood. R =  z i Simple averaging
9 i =1
filter

• Called low-pass filter.


Smoothing Filters – (cont.)
Averaging Filter
• Weighted average: allowing
different pixels in the
neighbourhood different
weights in the averaging
function.
Weighted
• Pixels closer to the central averaging filter
pixel are more important.
• More effective in smoothing.
Smoothing Filters – (cont.)
Averaging Filter
• Original
Smoothing Filters – (cont.)
Averaging Filter 1
1 1 1
1 1 1
9 1 1 1
• 3×3  
Smoothing Filters – (cont.)
1 1 1 1 1
Averaging Filter 1 
1 1 1 1 1
1 1 1 1 1
25 1
• 5×5 
1
1
1
1
1
1
1
1
1
Smoothing Filters – (cont.)
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1

Averaging Filter 1 
1

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

1
1
81 1 1

• 9×9
1 1 1 1 1 1 1
 
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1
 1 1 1 1 1 1 1 
Smoothing Filters – (cont.) 1
1
1

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1

Averaging Filter
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
289 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

• 17×17
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Smoothing Filters – (cont.)
Averaging Filter
• Highlighting gross detail: the size of the mask
determines the relative size of the objects blended.

Original Image Smoothed Image Thresholded Image


Smoothing Filters – (cont.)
Averaging Filter Usage
• Results an image with reduced sharp
transitions in intensities.
• Useful in removing noise and reducing
irrelevant detail (highlighting gross detail).
• Side effect: blurred edges.
Smoothing Filters – (cont.)
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.
Smoothing Filters – (cont.)
Nonlinear Filters
• Median Filter: sort pixels in neighborhood,
determine median, assign to center pixel.
• Forces points with distinct intensity levels to
be like their neighbors.
• Eliminates isolated clusters of pixels that are
light or dark with respect to their neighbors.
Smoothing Filters – (cont.)
Median Filter
• Excellent salt-and-pepper noise reduction.

Original Image Image After Image After


With Noise Averaging Filter Median Filter
Smoothing Filters – (cont.)
Example
• Original
Smoothing Filters – (cont.)
Example
• Average
Smoothing Filters – (cont.)
Example
• Median
2. Sharpening
Filters and Edge
Detectors
10/19/2022 93
Sharpening 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.
Sharpening Filters – (cont.)
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.
Sharpening Filters – (cont.)
1st Derivative Example in 1D:

A B
Sharpening Filters – (cont.)
1st Derivative Example in 1D:
Image Strip

8
7
6
5
4
3
2
1
0

1st Derivative

8
6
4
2
0
-2
-4
-6
-8
Sharpening Filters – (cont.)
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.
Sharpening Filters – (cont.)
2nd Derivative Example in 1D:
8
Image Strip

7
6
5
4
3
2
1
0

2nd Derivative

10

-5

-10

-15
8
7
6
5

Profile 4
3
2
1
0
1st Derivative

8
6
4
2
0

1st -2
-4
-6
-8
2nd Derivative

10

-5

2nd -10

-15
Sharpening Filters – (cont.)
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.
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
The Laplacian is defined as follows:
 2
f  2
f
 f = 2 + 2
2

 x  y
where in the x direction:
 f
2
= f ( x + 1, y ) + f ( x − 1, y ) − 2 f ( x, y )
 2
x
and in the y direction:
 f
2
= f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y)
 y
2
Sharpening Filters – (cont.)
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)

We can easily build a


filter based on this.
Sharpening Filters – (cont.)
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)
0 1 0

We can easily build a 1 -4 1

filter based on this. 0 1 0


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

Original Laplacian Laplacian


Image Filtered Image Filtered Image
Scaled for Display
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
Subtract a weighted Laplacian result from the
original image to obtain the sharpened image.
g ( x, y) = f ( x, y) −  f
2

= -
Sharpened Original Laplacian
Image Image Filtered Image
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
Subtracting or adding a weighted Laplacian
depending on the sign of the mask coefficients.
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
The entire enhancement can be combined into
a single filtering operation,
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)
− f ( x, y + 1) − f ( x, y −1)
Sharpening Filters – (cont.)
Second Derivative (Laplacian)
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
Sharpening Filters – (cont.)
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

-1 -1 -1
Sharpening Filters – (cont.)
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 
Sharpening Filters – (cont.)
First Derivative (Gradient)
The magnitude of this vector is given by:
M ( x, y) = mag (f )

= G +G2
x
2
y 
1
2

1
 f  2  f  2
 2

=   +   
 x   y  
For practical reasons this can be simplified as:
M ( x, y )  G x + G y
Sharpening Filters – (cont.)
First Derivative (Gradient)
Approximating the partial derivative in the x-
direction == third row – first row
Approximating the partial derivative in the y-
direction == third column – first column
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

f(x+1,y-1) f(x+1,y) f(x+1,y+1) z7 z8 z9


Sharpening Filters – (cont.)
First Derivative (Gradient)
Approximating the partial derivative in the x-
direction == third row – first row
Approximating the partial derivative in the y-
direction == third column – first column
M ( x, y )  (z7 + z8 + z9 ) − (z1 + z2 + z3 )
z1 z2 z3
+ (z3 + z6 + z9 ) − (z1 + z4 + z7 )
z4 z5 z6
-1 -1 -1 -1 0 1
0 0 0 -1 0 1 z7 z8 z9
Perwitt masks
1 1 1 -1 0 1
Sharpening Filters – (cont.)
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


Note that they do
the results are added together. not need to be
rotated before
convolution.
Sharpening Filters – (cont.)
First Derivative (Gradient)
Sobel filters are typically used for edge
detection.
Sharpening Filters – (cont.)
Original Image Horizontal Gradient Component

Vertical Gradient Component Combined Edge Image


Sharpening Filters – (cont.)

Original Image Vertical Gradient Component Horizontal Gradient Component


Sharpening Filters – (cont.)
Comparing the 1st and 2nd derivatives we can
conclude the following:
•1st order derivatives generally produce thicker
edges.
•1st order derivatives have stronger response to grey
level step.
•2nd order derivatives produce a double response at
step changes in grey level.
•2nd order derivatives have a stronger response to
fine detail e.g. thin lines.
Selected
Problems
Next Lecture
Frequency Domain

Assignment
- Textbook Chapter 3: 3, 4, 5, 6, 7
- Check associated problems
Chapter 3 14, 17, 18, 20, 21, 22, 23, 25, 26, 27, 30

10/19/2022 126
References
- Gonzalez and Woods, Digital Image Processing.
- Peters, Richard Alan, II, “Spatial Filtering 1 and 2", Lectures
on Image Processing, Vanderbilt University, Nashville, TN,
April 2008, Available on the web at the Internet Archive,
http://www.archive.org/details/Lectures_on_Image_Processing.

10/19/2022 127

You might also like