sejong univ. ch3. area processes convolutions blurring sharpening averaging vs. median filtering
TRANSCRIPT
Sejong Univ.Sejong Univ.
CH3. Area Processes
• Convolutions
• Blurring
• Sharpening
• Averaging vs. Median Filtering
• <Experiment 6>
Sejong Univ.Sejong Univ.- 2 -
Area process: Weighted sum of neighboring pixels Weight is called as mask, filter, kernel, or window
i.e. Area process = convolution with the mask If mask is separable, faster processing is possible
Ex) per pixel (Multiplication & addition 9 times) -> (3*2 = 6 times)
= &
Convolutions
1 2 1
0 0 0
-1 -2 -1
1
0
-1
1 2 1
Sejong Univ.Sejong Univ.- 3 -
Ex) Embossing: p71 Fig.3.5, Photoshop: filter>stylize>emboss Convolving with the following directional mask & +128
Convolutions
-1 0 0
0 0 0
0 0 1
0 0 1
0 0 0
-1 0 0
1 0 0
0 0 0
0 0 -1
Sejong Univ.Sejong Univ.- 4 -
What about processing the boundary pixels?
1.Zero padding: traditional method, no good2.Symmetric expansion is better.
Convolutions
Sejong Univ.Sejong Univ.- 5 -
Blurring
Remove noises, low-pass filter Averaging filter: p75 Fig. 3.7
Photoshop: filter>blur>average
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
1/25 1/25 1/25 1/25 1/25
Sejong Univ.Sejong Univ.- 6 -
Blurring
Gaussian smoothing filter: Improves contrast Photoshop: filter>blur>Gaussian
1/16 1/8 1/16
1/8 1/4 1/8
1/16 1/8 1/16
Sejong Univ.Sejong Univ.- 7 -
Inverse process of blurring, sharpening the image
p.77 Fig. 3.9, Photoshop: filter>sharpen
Sharpening
0 -1 0
-1 5 -1
0 -1 0
1 -2 1
-2 5 -2
1 -2 1
-1 -1 -1
-1 9 -1
-1 -1 -1
Sejong Univ.Sejong Univ.- 8 -
High-pass filterp.78 Fig. 3.19, Photoshop: filter>etc>highpass
High-boost filter(Output) = α(Input) – Low-pass filtered valueEx) When low-pass filter is averaging filter, w = 9α -1
Sharpening
-1/9 -1/9 -1/9
-1/9 8/9 -1/9
-1/9 -1/9 -1/9
-1/9 -1/9 -1/9
-1/9 w/9 -1/9
-1/9 -1/9 -1/9
Sejong Univ.Sejong Univ.- 9 -
Averaging vs. Median Filtering
Median value in the windowPhotoshop: filter>noise>median
Compare the performance of median and averaging filter for scratch noise & Gaussian noise, respectively.
Sejong Univ.Sejong Univ.- 10 -
<Experiment 6>
1.Implement 1) Embossing, 2) Averaging (3*3 mask), 3) Gaussian Smoothing, 4) Median, 5) Sharpening, 6) High-pass filter by using the given masks.
2. Compare Averaging Filter & Median Filter for lena-scratch-noise.raw & lena-gaussian-noise.raw images.
Sejong Univ.Sejong Univ.- 11 -
< HW & QZ #2 on 04/10 Fri. >
You need to complete 5 computer programs.1.One point per a program is given.2.All the programs are very similar to the programs
given in experiment 4-6.3.In order to get the point, you need to show the
result within the given time for each program.4.It is highly recommended to bring your own source
codes for experiment 4-6.