eecs 556 –image processing– w 09 spectral estimation...
TRANSCRIPT
EECS 556 – Image Processing– W 09
Spectral Estimation and Wiener Filtering
• Removing noise with Wiener filters• Spectral estimation• Does autocorrelation suffice?
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)
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
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.
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:
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:
Random processes in freq domain
• DSFT of the auto‐correlation function
= power spectrum or power spectral density of the random process
Pairs of random processes
• Consider both input and output images for LSI systems
• Analyze multiple random processes simultaneously
• Cross‐correlation function:
cross power spectrum
• DSFT of the cross‐correlation function:
• Properties of cross power spectrum: – Linearity
‐
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
Special case 1
• If WSS input WSS output
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.
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].
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]
Minimizing MSE
• Typically: choose the filter h[n,m] that minimizes the mean squared error:
An optimal filter can be found under these assumptions:
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
Minimizing MSE
Minimizing MSE
Minimizing MSE
Minimizing MSE
Minimizing MSE
NoncausalWiener filter
Minimizing MSE
NoncausalWiener filter
If the signal s[n,m] and the noise w[n,m] are zero‐mean and uncorrelated (standard assumption)
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
Spectral estimation
• Model the spectra based on knowledge of how an imaging system works – hard
• We must estimate spectra from noisy measurements
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
Periodogram• If R has a small central core surrounded by zeros
• safely window out the “noise” in the tails:
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:
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 ∞
Use the strong law of large numbers
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
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]
– 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….
2nd‐order statistics
• Autocorrelation is important but does not uniquely determine the properties of a random process
2nd‐order statistics
• Autocorrelation is important but does not uniquely determine the properties of a random process
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]
2nd‐order statistics
x[n,m] y[n,m]
25
2nd‐order statistics
where x[n,m] is an i.i.d. Bernoulli random process:
Why is Rz = Ry? [Class exercise!]
EECS 556 – Image Processing– W 09
Next lecture
• Intro restoration