Article View: comp.soft-sys.khoros
Article #980Image deblurring
From: donohoe
Date: Fri, 13 Nov 1992 16:01
Date: Fri, 13 Nov 1992 16:01
74 lines
3518 bytes
3518 bytes
>From article <41581@pprg.eece.unm.edu.pprg.unm.edu>, by "Mario Errico" <errico@staff.tc.umn.edu>: > Hello Mathew, khorosers, > > speaking of Image Restoration, are RLAB or other khoros routines usable for > improving the quality of images degraded by out-of-focus: for example obtained > with a video or still camera not foucused correctly (or just because of shallow > depth-of-field)? > > Thanks a lot, > > Mario > > + From: teague@a.cs.okstate.edu (Keith Teague) + + I am also interested in answers to this question. Please post replies. + + Thanks in advance. + + Keith Teague + In the regular VIPL library there are two routines, both under IMAGE PROCESSING | Frequency Filters in the canata master form. One is vinverse, which is a frequency-domain inverse filter. If you model the blur function as a linear operator, then blurring image f(x,y) by blurring function h(x,y) to produce blurred image g(x,y) is produced by a convolution: g(x,y) = f(x,y) * h(x,y). In the frequency domain, this is becomes a point-by-point multiplicationG(u,v) = F(u,v) H(u,v), where F(u,v) is the Discrete Fourier Transform of f(). To 'undo' the blur, in the frequency domain, just divide: F(u,v) = G(u,v)/H(u,v); this is what vinverse does. This scheme is frustrated by noise and the possibility of division by zero. Therefore, vinverse lets you specify a threshold value for 1/H(u,v) to make it behave better. The Wiener filter is similar, but takes noise and image properties into account to give better results. The version in Khoros is the para- metric Wiener filter, with some simplifying assumptions made (See R.C. Gonzalez and R.E. Woods, Digital Image Processing, Addison-Wesley, 1992, pp 170-282, esp. Equation (5.5-10)). Vwiener gives good results if the noise isn't too bad and the blur function not too extreme. The flexibility of Khoros lets you construction better Wiener filters as workspaces; the more you know or can assume about your problem, the better you can tailer the filter to it, and you'll get better results. A central problem is coming up with the blur function, H(u,v). one way is to do a test, if this is possible -- image a point source of light, record the "fuzzy" point, use this as h(x,y), and use vfft to get H(u,v). Optical blur functions are often modelled as sin(x)/x or as Bessel functions: these have lots of zeroes, which produce numerical instability. You can often get by with a Gaussian approxim- ation, easily generated with vggauss. More sophisticated approaches use the Cepstrum (DFT of the log of the image) to estimate blur functions. I'm sure some of the users out there have fancier toolboxes -- maybe they'll reply as well. Good luck. ==================================================================== Greg Donohoe, Ph.D. Assistant Professor Electrical and Computer Engineering University of New Mexico Tel: 505-277-6724 Albuquerque, NM 87131 email: donohoe@chama.eece.unm.edu Fortuen cookie: "You learn from your mistakes. You will learn much today." ====================================================================
Technical Details
Message-ID:
<41637@pprg.eece.unm.edu.pprg.unm.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mimbres.cs.unm.edu!pprg.unm.edu!daemonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mimbres.cs.unm.edu!pprg.unm.edu!daemon From: donohoe@jemez.eece.unm.edu Newsgroups: comp.soft-sys.khoros Subject: Image deblurring Message-ID: <41637@pprg.eece.unm.edu.pprg.unm.edu> Date: 13 Nov 92 16:01:16 GMT Sender: news@pprg.unm.edu Lines: 75