How do I divide an FT by another FT (or the image of its power spectrum)?
I am trying to demonstrate removal of motion blur by division of the blurred image FT by the FT of the blur vector. Thanks Roger Bourne -- ___________________________ Dr Roger Bourne Medical Radiation Sciences Faculty of Health Sciences University of Sydney Tel: 0421 057 624 [hidden email] __________________________ |
On 5/8/07, roger bourne <[hidden email]> wrote:
> How do I divide an FT by another FT (or the image of its power spectrum)? > > I am trying to demonstrate removal of motion blur by division of the > blurred image FT by the FT of the blur vector. That's what is called the inverse filter. This only works in complete absence of any noise (sensor, discretization, ...), but is a highly unstable computation, since you will divide the highest frequencies by very small numbers (dividing by e.g. 0.001 is in fact multiplying with 1000, thus amplifying noise). If I am not mistaken, a motion blur point spread function even has zero's in its spectrum, so for those frequencies you divide by 0 (and every one knows that dividing by 0 is not a good thing). The simplest way to stabilize this is to add a small number to the denominator, but better yet is to apply a Wiener filter instead, taking into account the estimated spectra of the image and the noise. Of course there are still better techniques involving other sharpening procedures and stabilization methods... See my thesis, e.g., for more explanation: http://www.filiprooms.be/frooms-phd.pdf Kind regards, Filip Rooms |
In reply to this post by Roger Bourne
Hi Roger,
You can use FD Math in FFT with the operations "convolve" and "deconvolve". Thomas > How do I divide an FT by another FT (or the image of its power spectrum)? > > I am trying to demonstrate removal of motion blur by division of the > blurred image FT by the FT of the blur vector. > > Thanks > Roger Bourne > -- /*****************************************************/ Thomas Boudier, MCU Université Pierre et Marie Curie UMR 7101 / IFR 83. Bat A 328, Campus Jussieu Tél : 01 44 27 35 78 Fax : 01 44 27 25 08 /*****************************************************/ |
In reply to this post by Roger Bourne
On Tuesday 08 May 2007 05:59:45 roger bourne wrote:
> How do I divide an FT by another FT (or the image of its power spectrum)? > > I am trying to demonstrate removal of motion blur by division of the > blurred image FT by the FT of the blur vector. There is this macro that shows blurring/deblurring: http://rsbweb.nih.gov/ij/macros/MotionBlurRemoval.txt I have tried to deblur other images by specfying the blur vector as in the program above, but I cannot make it work. (I must be missing something quite obvious). Please post here if you find a way of doing motion deblurring this way. Cheers, Gabriel |
In reply to this post by Roger Bourne
Dear Roger Bourne,
for the mentioned purpose (inverse filtering) I fear you need to divide complex Fourier spectra. I doubt that this is possible with the built-in FT of ImageJ, but you may have a look at the FFTJ plug-in. >How do I divide an FT by another FT (or the image of its power spectrum)? > >I am trying to demonstrate removal of motion blur by division of the >blurred image FT by the FT of the blur vector. > >Thanks >Roger Bourne > >-- >___________________________ >Dr Roger Bourne >Medical Radiation Sciences >Faculty of Health Sciences >University of Sydney >Tel: 0421 057 624 >[hidden email] >__________________________ HTH Best -- Herbie ------------------------ <http://www.gluender.de> |
In reply to this post by Gabriel Landini
High Gabriel,
maybe it is the "divide by zero" problem mentioned by Filip Rooms that causes your problems? If I run the MotionBlurRemoval macro as it is, it works perfectly. If I add "Specified Noise" with a standard deviation of 2800 on the "Motion Blurred" image, the result looks awful. 2800 is roughly the sum of the PSF pixels, and thus it is the factor that "Motion Blurred" is multiplied by with respect to the input image. So this amount of noise only corresponds to one grayscale step of the input image, and it completely kills the result. Thus, for a "real world" pictures, where noise and nonlinearities are present and where the point spread function (PSF) is not exactly known, one has to use more elaborate methods (Wiener Filter, Maximum Entropy...) Michael ________________________________________________________________ On 8 May 2007, at 10:11, Gabriel Landini wrote: > On Tuesday 08 May 2007 05:59:45 roger bourne wrote: >> How do I divide an FT by another FT (or the image of its power >> spectrum)? >> >> I am trying to demonstrate removal of motion blur by division of the >> blurred image FT by the FT of the blur vector. > > There is this macro that shows blurring/deblurring: > > http://rsbweb.nih.gov/ij/macros/MotionBlurRemoval.txt > > I have tried to deblur other images by specfying the blur vector as > in the > program above, but I cannot make it work. (I must be missing > something quite > obvious). > > Please post here if you find a way of doing motion deblurring this > way. > > Cheers, > > Gabriel |
HI
The noise-free case works so nicely especially because the assumed "1d spread function" has a sudden onset and end, i.e. sharp edges, which mean it´s FT has still some sizeable spatial frequency content up to half the pixel spacing. For real world blurring with fuzzy, smooth onset and ending of the blurring kernel, noise senitivity will be even worse than the noisy, otherwise perfect case discussed here Joachim ImageJ Interest Group <[hidden email]> schrieb am 08.05.2007 10:47:22: > High Gabriel, > > maybe it is the "divide by zero" problem mentioned by Filip > Rooms that causes your problems? > If I run the MotionBlurRemoval macro as it is, it works perfectly. > > If I add "Specified Noise" with a standard deviation of 2800 > on the "Motion Blurred" image, the result looks awful. > 2800 is roughly the sum of the PSF pixels, and thus it is the > factor that "Motion Blurred" is multiplied by with respect to > the input image. So this amount of noise only corresponds to > one grayscale step of the input image, and it completely kills > the result. > > Thus, for a "real world" pictures, where noise and > nonlinearities are present and where the point spread function > (PSF) is not exactly known, one has to use more elaborate > methods (Wiener Filter, Maximum Entropy...) > > Michael > ________________________________________________________________ > > On 8 May 2007, at 10:11, Gabriel Landini wrote: > > > On Tuesday 08 May 2007 05:59:45 roger bourne wrote: > >> How do I divide an FT by another FT (or the image of its power > >> spectrum)? > >> > >> I am trying to demonstrate removal of motion blur by division of the > >> blurred image FT by the FT of the blur vector. > > > > There is this macro that shows blurring/deblurring: > > > > http://rsbweb.nih.gov/ij/macros/MotionBlurRemoval.txt > > > > I have tried to deblur other images by specfying the blur vector as > > in the > > program above, but I cannot make it work. (I must be missing > > something quite > > obvious). > > > > Please post here if you find a way of doing motion deblurring this > > way. > > > > Cheers, > > > > Gabriel ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
Free forum by Nabble | Edit this page |