Re: Image deconvolution with the Wiener filter
- From: "Luca D." <ldantona@xxxxxxxxx>
- Date: Fri, 5 Dec 2008 09:40:19 -0800 (PST)
1) Watch the bit depth of the image. If at some point during the
process, your image or PSF reverts to an 8-bit bit depth, information
is lost and cannot be retained.
They are always floating point images.
2) Watch the noise. You are adding noise to the image, but not the
PSF. Thus your PSF has higher spatial frequency information than your
image. Dividing by it in frequency space will over-amplify the noise
in the image.
Are you sure about this?
I'm studying Image Restoration from "Digital Image Processing" by
Gonzales which uses the following notation (which is the same used in
that page of wikipedia I posted).
The model is the following:
g(x, y) = h(x, y)*f(x, y) + n(x, y) where:
g = degraded image
h = degradation function (blurring)
f = original image
n = additive noise
In the fourier domain it becomes:
G(u, v) = H(u, v)F(u, v) + N(u, v)
That said, H is the PSF and it doesn't take into account the additive
noise.
Moreover, if you look at the wiener equation here:
http://en.wikipedia.org/wiki/Wiener_deconvolution
H is just the fourier transform of the degradation function (impulse
response) h.
Furthermore, for example, the inverse filtering technique supposes to
know the degradation function H, and then calculate:
Finv = G / H = F + N / H
And the problem of this approach is exactly what you said: even small
noise could be amplified at high frequencies.
The Wiener filter tries to avoid this by incorporating statistical
characteristics of noise, and its equation is:
Finv = (1 / H) * (|H|^2 / (|H|^2 + Sn/Sf))
where:
H = fourier transform of the PSF h (without noise)
Sn = |N|^2 = power spectrum of the noise
Sf = |F|^2 = power spectrum of the undegraded image
3) In practical situations, you do not have a non-blurred image, nor a
model of the PSF. I would suggest using the 'temp2' as a tuning
parameter, which makes the equation a 'pseudo-inverse' filter.
You are right, we don't always have Sn and/or Sf, in fact there a
simpler version of the filter where a costant K takes the place of Sn/
Sf, but in this example we have everything; therefore I'm confident to
obtain good results :)
4) Watch the edges. Unless you apply a hamming window (or similar) or
'reflect' the image outward to the next 2^N size, your deconvolution
will be affected by edge ringing.
Yes, once I understand where I'm going wrong I'll think about
padding :)
Thanks for all your hints!
.
- Follow-Ups:
- Re: Image deconvolution with the Wiener filter
- From: JimAtQuarktet
- Re: Image deconvolution with the Wiener filter
- From: Luca D.
- Re: Image deconvolution with the Wiener filter
- References:
- Image deconvolution with the Wiener filter
- From: Luca D.
- Re: Image deconvolution with the Wiener filter
- From: JimAtQuarktet
- Image deconvolution with the Wiener filter
- Prev by Date: Re: Copying "i" to a new variable after load
- Next by Date: Matlab Classes problem
- Previous by thread: Re: Image deconvolution with the Wiener filter
- Next by thread: Re: Image deconvolution with the Wiener filter
- Index(es):
Relevant Pages
|
Loading