Lec-2 Image Enhancement in the Frequency Domain
-
Upload
ravibabukancharla -
Category
Documents
-
view
29 -
download
1
description
Transcript of Lec-2 Image Enhancement in the Frequency Domain
![Page 1: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/1.jpg)
1
Image Enhancement in the Frequency Domain
Frequency Domain Filtering
![Page 2: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/2.jpg)
Basic steps for filtering in the frequency domain
![Page 3: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/3.jpg)
Basics of filtering in the frequency domain1. multiply the input image by (-1)x+y to center the
transform to u = M/2 and v = N/2 (if M and N are even numbers, then the shifted coordinates will be integers)
2. compute F(u,v), the DFT of the image from (1)3. multiply F(u,v) by a filter function H(u,v)4. compute the inverse DFT of the result in (3)5. obtain the real part of the result in (4)6. multiply the result in (5) by (-1)x+y to cancel the
multiplication of the input image.
![Page 4: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/4.jpg)
Images Black and white image is a 2D matrix. Intensities represented as pixels. Color images are 3D matrix, RBG.
![Page 5: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/5.jpg)
Linear Filtering About modifying pixels based on neighborhood.
Local methods simplest. Linear means linear combination of neighbors.
Linear methods simplest. Useful to:
• Integrate information over constant regions.• Scale.• Detect changes.
Fourier analysis. Many nice slides taken from image database.
![Page 6: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/6.jpg)
![Page 7: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/7.jpg)
![Page 8: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/8.jpg)
![Page 9: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/9.jpg)
![Page 10: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/10.jpg)
![Page 11: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/11.jpg)
![Page 12: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/12.jpg)
![Page 13: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/13.jpg)
![Page 14: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/14.jpg)
![Page 15: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/15.jpg)
![Page 16: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/16.jpg)
![Page 17: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/17.jpg)
![Page 18: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/18.jpg)
![Page 19: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/19.jpg)
![Page 20: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/20.jpg)
![Page 21: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/21.jpg)
![Page 22: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/22.jpg)
![Page 23: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/23.jpg)
Filtering to reduce noise Noise is what we’re not interested in.
• We’ll discuss simple, low-level noise: Light fluctuations; Sensor noise; Quantization effects; Finite precision
• Not complex: shadows; extraneous objects. A pixel’s neighborhood contains
information about its intensity. Averaging noise reduces its effect.
![Page 24: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/24.jpg)
Additive noise I = S + N. Noise doesn’t depend on
signal. We’ll consider:
ddistributey identicall ,
for t independen , tic.determinis
0)( with
ji
jiji
i
iiii
nn
nnnns
nEnsI
![Page 25: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/25.jpg)
Average Filter• Mask with positive
entries, that sum 1.• Replaces each pixel
with an average of its neighborhood.
• If all weights are equal, it is called a BOX filter.
111111
1111 11
1111
11
FF
1/91/9
![Page 26: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/26.jpg)
Does it reduce noise?
• Intuitively, takes out small variations.
),0(~),(ˆ1)),(ˆ(
0)),(ˆ(
),(1),(ˆm1
),(),(ˆm1 j)O(i,
)N(0,~j)N(i, with ),(),(ˆ),(
22
22
2/
2/
2/
2/
),(ˆ
2/
2/
2/
2/
2/
2/
2/
2/
mNjiN
mm
mjiNE
jiNE
kjhiNm
kjhiI
kjhiNkjhiI
jiNjiIjiI
m
mh
m
mk
jiN
m
mh
m
mk
m
mh
m
mk
2
2 2
![Page 27: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/27.jpg)
Example: Smoothing by Averaging
![Page 28: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/28.jpg)
Smoothing as Inference About the Signal
+ =
Nearby points tell more about the signal than distant ones.
Neighborhood for averaging.
![Page 29: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/29.jpg)
Gaussian Averaging Rotationally
symmetric. Weights nearby
pixels more than distant ones.• This makes sense
as probabalistic inference. A Gaussian gives a
good model of a fuzzy blob
![Page 30: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/30.jpg)
exp x2 y2
22
An Isotropic Gaussian The picture shows a
smoothing kernel proportional to
(which is a reasonable model of a circularly symmetric fuzzy blob)
![Page 31: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/31.jpg)
Smoothing with a Gaussian
![Page 32: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/32.jpg)
The effects of smoothing Each row shows smoothingwith gaussians of differentwidth; each column showsdifferent realizations of an image of gaussian noise.
![Page 33: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/33.jpg)
Efficient Implementation
Both, the BOX filter and the Gaussian filter are separable:• First convolve each row with a 1D filter• Then convolve each column with a 1D filter.
![Page 34: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/34.jpg)
Smoothing as Inference About the Signal: Non-linear Filters.
+ =
What’s the best neighborhood for inference?
![Page 35: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/35.jpg)
Filtering to reduce noise: Lessons Noise reduction is probabilistic inference. Depends on knowledge of signal and
noise. In practice, simplicity and efficiency
important.
![Page 36: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/36.jpg)
Filtering and Signal Smoothing also smooths signal. Removes detail This is good and bad: - Bad: can’t remove noise w/out blurring
shape. - Good: captures large scale structure
![Page 37: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/37.jpg)
Notch filter
otherwise 1
N/2 (M/2, v)(u, if 0),(
) vuH
• this filter is to force the F(0,0) which is the average value of an image (dc component of the spectrum)• the output has prominent edges• in reality the average of the displayed image can’t be zero as it needs to have negative gray levels. the output image needs to scale the gray level
![Page 38: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/38.jpg)
Low pass filter
high pass filter
![Page 39: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/39.jpg)
Add the ½ of filter height to F(0,0) of the high pass filter
![Page 40: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/40.jpg)
Correspondence between filter in spatial and frequency domains
![Page 41: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/41.jpg)
Convolution
Convolution kernel g, represented as matrix.• it’s associative
Result is:
![Page 42: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/42.jpg)
![Page 43: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/43.jpg)
![Page 44: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/44.jpg)
![Page 45: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/45.jpg)
![Page 46: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/46.jpg)
![Page 47: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/47.jpg)
Smoothing Frequency-domain filters: Ideal Lowpass filter
![Page 48: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/48.jpg)
image power circles
![Page 49: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/49.jpg)
Result of ILPF
![Page 50: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/50.jpg)
Example
![Page 51: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/51.jpg)
Butterworth Lowpass Filter: BLPF
![Page 52: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/52.jpg)
Example
![Page 53: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/53.jpg)
Spatial representation of BLPFs
![Page 54: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/54.jpg)
Gaussian Lowpass Filter: GLPF
![Page 55: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/55.jpg)
Example
![Page 56: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/56.jpg)
Example
![Page 57: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/57.jpg)
Example
![Page 58: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/58.jpg)
Example
![Page 59: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/59.jpg)
Sharpening Frequency Domain Filter: Ideal highpass filter
Butterworth highpass filter
Gaussian highpass filter
0
0
Dv)D(u, if 1Dv)D(u, if 0
),( vuH
nvuDvuH 2
0 ),(D11),(
20
2 2/),(1),( DvuDevuH
![Page 60: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/60.jpg)
Spatial representation of Ideal, Butterworth and Gaussian highpass filters
![Page 61: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/61.jpg)
Example: result of IHPF
![Page 62: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/62.jpg)
Example: result of BHPF
![Page 63: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/63.jpg)
Example: result of GHPF
![Page 64: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/64.jpg)
Laplacian in the Frequency domain
![Page 65: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/65.jpg)
Example: Laplacian filtered image
![Page 66: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/66.jpg)
Example: high-boost filter
![Page 67: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/67.jpg)
Examples
![Page 68: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/68.jpg)
2-D Fourier Transform Properties
![Page 69: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/69.jpg)
![Page 70: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/70.jpg)
![Page 71: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/71.jpg)
![Page 72: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/72.jpg)
![Page 73: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/73.jpg)
![Page 74: Lec-2 Image Enhancement in the Frequency Domain](https://reader034.fdocuments.us/reader034/viewer/2022052513/577cc77c1a28aba711a1150a/html5/thumbnails/74.jpg)