eecs 556 –image processing– w 09 spectral estimation...
TRANSCRIPT
![Page 1: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/1.jpg)
EECS 556 – Image Processing– W 09
Spectral Estimation and Wiener Filtering
• Removing noise with Wiener filters• Spectral estimation• Does autocorrelation suffice?
![Page 2: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/2.jpg)
What is image processing?
Image processing is the application of 2D signal processing methods to images
• Image representation and modeling
• Image enhancement
• Image restoration/image filtering
• Compression(computer vision)
![Page 3: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/3.jpg)
Filtering methods: Wiener filter
• The Wiener filter (and its relatives) are formulated based on random process principles
• random variables, random vectors, random processes
• 2nd‐order properties, through LSI systems
![Page 4: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/4.jpg)
Random processes
• An infinite collection of random variables is called a random process.
• In the context of imaging problems, random processes are often called random fields
• If x[n,m] denotes a random field, ∀[n,m], x[n,m] is a random variabledefined over a common probability space.
![Page 5: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/5.jpg)
Random processes• The behavior of a random process is specified completely by all of its joint distribution functions.
• mean function:
• auto‐correlation function:
• auto‐covariance function:
![Page 6: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/6.jpg)
Wide‐sense stationary (WSS)
• A random process x[n,m] is called wide‐sense stationary (WSS) if:– the mean function is a constant
– the auto‐correlation function depends only on the difference in spatial coordinates:
![Page 7: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/7.jpg)
Random processes in freq domain
• DSFT of the auto‐correlation function
= power spectrum or power spectral density of the random process
![Page 8: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/8.jpg)
Pairs of random processes
• Consider both input and output images for LSI systems
• Analyze multiple random processes simultaneously
• Cross‐correlation function:
![Page 9: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/9.jpg)
cross power spectrum
• DSFT of the cross‐correlation function:
• Properties of cross power spectrum: – Linearity
‐
![Page 10: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/10.jpg)
Random processes through LSI systems
• What happens to the cross‐correlation of jointly distributed random processes w[n,m] and x[n,m] after being passed through filters?
• If the inputs x[n,m] and w[n,m] are jointly WSS
![Page 11: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/11.jpg)
Special case 1
• If WSS input WSS output
![Page 12: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/12.jpg)
The noncausal Wiener filter
• A classic method for attempting to remove noise from images
• Developed (for 1D applications) by Norbert Wiener in the 1930’s and 1940’s.
• Useful if 2nd order statistics of signal and noise are known
•Norbert Wiener (1894‐1964) Pure and applied mathematician.
![Page 13: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/13.jpg)
Noise removal problem
• Problem:
• y[n,m] = observed (noisy) image
• w[n,m] = additive random noise
• s[n,m] = true but unknown underlying image
• Goal: Recover s[n,m] from y[n,m].
![Page 14: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/14.jpg)
Noise removal problem
• Convenient solution: use linear shift‐invariant filtering
• How should we choose this filter?– find h[n,m] such that h[n,m] ** y[n,m] close to s[n,m]
– Find a metric to compare s[n,m] with s^[n,m]
![Page 15: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/15.jpg)
Minimizing MSE
• Typically: choose the filter h[n,m] that minimizes the mean squared error:
An optimal filter can be found under these assumptions:
![Page 16: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/16.jpg)
Minimizing MSE
• Typically: choose the filter h[n,m] that minimizes the mean squared error:
An optimal filter can be found under these assumptions:• noise and signal are jointly WSS,
• auto‐correlation function of the noise w[n,m] is known
• auto‐correlation function of the true signal s[n,m] is known
• cross‐correlation function between w and s is known
![Page 17: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/17.jpg)
Minimizing MSE
![Page 18: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/18.jpg)
Minimizing MSE
![Page 19: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/19.jpg)
Minimizing MSE
![Page 20: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/20.jpg)
Minimizing MSE
![Page 21: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/21.jpg)
Minimizing MSE
![Page 22: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/22.jpg)
NoncausalWiener filter
Minimizing MSE
![Page 23: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/23.jpg)
NoncausalWiener filter
If the signal s[n,m] and the noise w[n,m] are zero‐mean and uncorrelated (standard assumption)
![Page 24: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/24.jpg)
![Page 25: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/25.jpg)
![Page 26: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/26.jpg)
![Page 27: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/27.jpg)
![Page 28: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/28.jpg)
NoncausalWiener filter• Typically: choose the filter h[n,m] that minimizes the mean squared error:
Wiener filter can be found under these assumptions:• noise and signal are jointly WSS,
• auto‐correlation function of the noise w[n,m] is known
• auto‐correlation function of the true signal s[n,m] is known
• cross‐correlation function between w and s is known
• Or equivalently knowledge of the signal power spectrum and the noise power spectrum is given
![Page 29: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/29.jpg)
Spectral estimation
• Model the spectra based on knowledge of how an imaging system works – hard
• We must estimate spectra from noisy measurements
![Page 30: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/30.jpg)
Periodogram
• Given a (finite‐extent) realization of a random process x[n,m], the periodogram is defined as
• Smoothing is required to reduce the effect of measurement noise
the normalized squared magnitude of its Fourier transform
![Page 31: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/31.jpg)
Periodogram• If R has a small central core surrounded by zeros
• safely window out the “noise” in the tails:
![Page 32: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/32.jpg)
Spectral estimation via autocorrelation
• Idea: Given a realization (or several realizations) of a random process x[n,m], estimate its auto‐correlation function
• For a WSS random process, the auto‐correlation function is the correlation between any pixel and another pixel that is [n,m] away:
![Page 33: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/33.jpg)
The strong law of large numbers
• Random variables Zn– independent and identically distributed rv
– mean E[Z]
• Estimated mean converges to E[Z] as N goes to ∞
![Page 34: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/34.jpg)
Use the strong law of large numbers
![Page 35: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/35.jpg)
The strong law of large numbers
• Similarly, if (Xn, Yn) are independent and identically distributed pairs of random variables with correlation E[XY ]
• By considering all pairs of pixels with separation n,m
![Page 36: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/36.jpg)
![Page 37: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/37.jpg)
Designing autocorrelations functions in Matlab
• Design WSS random process y[n,m] with a given desired autocorrelation function Ry
– Create a white Gaussian random process x[n,m] using randn.m
– convolve x[n,m] with an filter with h[n,m]
x[n,m] y[n,m]
![Page 38: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/38.jpg)
– choose h such that we obtain the desired Ry‐ how?
– Take FT on both sides:
Designing autocorrelations functions in Matlab
It must = to any integer of pi for every wx wyif we want zero‐phase filters….
![Page 39: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/39.jpg)
2nd‐order statistics
• Autocorrelation is important but does not uniquely determine the properties of a random process
![Page 40: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/40.jpg)
2nd‐order statistics
• Autocorrelation is important but does not uniquely determine the properties of a random process
![Page 41: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/41.jpg)
![Page 42: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/42.jpg)
2nd‐order statistics
• X = white Gaussian noise
• h[n,m] = separable filter = g(n)g(m)
• g(n) = [1 1 1 1 1].
x[n,m] y[n,m]
![Page 43: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/43.jpg)
2nd‐order statistics
x[n,m] y[n,m]
25
![Page 44: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/44.jpg)
2nd‐order statistics
where x[n,m] is an i.i.d. Bernoulli random process:
Why is Rz = Ry? [Class exercise!]
![Page 45: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/45.jpg)
EECS 556 – Image Processing– W 09
Next lecture
• Intro restoration
![Page 46: EECS 556 –Image Processing– W 09 Spectral Estimation …web.eecs.umich.edu/~silvio/teaching/EECS556_2009/lectures/lecture... · Spectral Estimation and Wiener Filtering ... •](https://reader035.vdocuments.net/reader035/viewer/2022062600/5a9d9e777f8b9a28388c5cda/html5/thumbnails/46.jpg)