11-16-2007 12:20 AM
11-16-2007 07:26 AM
The way I understand it is that we are switching from the standard to the optical representation of the 2d FFT. In the standard representation, high frequencies are grouped at the center of the image while for the optical representation, the low frequencies are grouped at the center and the high frequencies are pushed to the edges. I admit when I first was putting this together, I thought that wiring the True constant to the Forward and Inverse 2d FFT.vi would do the trick. But it did not and swapping quadrants was necessary to get the deconvolved image result to display properly. The Swap Quadrants VI was graciously provided by someone else to do the quarters permutation needed.
Sincerely,
Don
12-02-2008 11:26 AM
Greg S. or others interested in Weiner deconvolution - if you are still around here, I am revisiting deconvolution once again, this time in the 1d mode. I am attempting to take the 2d weiner code and downsize it one dimension but still follow the same basic methodology. I am attaching the code. Can you take a look? I hardcoded an instrument response function (IRF) and some data. Alpha is the noise parameter and Iterations is for the number of attempts to optimize the solution.
Thanks,
Don
12-02-2008 02:39 PM
Hi Don -
Yes, still around 🙂 I'll have a look at it, but I'm still running LV 8.2 for the next month or so - can you save the code for 8.2 and post it again?
Cheers ~ Greg
12-02-2008 02:54 PM
OK - see attached. I made a few minor changes from the version in the prior post. Some of the questions/issues I had:
1) How do we take into account the fact that waveform has negative values? (I just did absolute value prior to normalizing the instrument response fx)
2) Methodology is not quite in agreement with Weiner Filtering for deconvolution optimization formulas that I show, although close. If you open the VI '1d Deconv Weiner.vi', I put in a vugaph of what I found (I think I found this on Wikipedia). It would seem what we really want to do is determine and simulate noise as a function of frequency. Alpha is a independent of frequency.
3) It is not clear to me in this case what a good value for alpha would be to start with. I tried different combinations of iterations and alpha.
4) After the reverse FFT, I ended up doing a peak shift to reposition the waveform back to where it had its original peak. This would seem to make sense and is analagous to the quadrant shifting for image-based deconvolution process.
Any thoughts on this are very helpful. You helped me a lot previously on the image-based deconvolution.
Sincerely,
Don
12-03-2008 10:44 AM
12-03-2008 06:49 PM
I've had a fairly quick look at this, and had some ideas which might help:
1) How do we take into account the fact that waveform has negative values? (I just did absolute value prior to normalizing the instrument response fx)
I would shift the waveform (and IRF) to be positive, and then normalize the IRF. Taking absolute values will introduce HF content which will corrupt the solution.
2) Methodology is not quite in agreement with Weiner Filtering for deconvolution optimization formulas that I show, although close. If you open the VI '1d Deconv Weiner.vi', I put in a vugaph of what I found (I think I found this on Wikipedia). It would seem what we really want to do is determine and simulate noise as a function of frequency. Alpha is a independent of frequency.
3) It is not clear to me in this case what a good value for alpha would be to start with. I tried different combinations of iterations and alpha.
Possibly that would work. In general, constant values of alpha seem to do ok, and you may be able to derive an optimum value from the signal noise. I've included a Richardson-Lucy deconvolution which doesn't require alpha, and with 100-200 iterations seems to work very well.
4) After the reverse FFT, I ended up doing a peak shift to reposition the waveform back to where it had its original peak. This would seem to make sense and is analagous to the quadrant shifting for image-based deconvolution process.
That works ok here where you are finding a single peak (i.e. the data is very close to being a delta convolved with the IRF). That's not going to work in general. Quadrant shifting will always be by half of the waveform - if you do that here, the peak shifts a little to the right, which matches the fact the your IRF is not "balanced" about the mid-point.
Cheers ~ Greg
12-04-2008 12:55 PM
The Richardson-Lucy deconvolution does seem to work well as it results in almost an impulse response for the inverse FFT with 100 - 200 iterations. I will study this method. Do you have a good reference for both RL and Weiner?
It makes sense to just add the DC offset to the signals initially to remove negative values. Good idea.
Getting back to the Weiner method for a minute. What do you think about the fact that for the reference material I have provided, they use the mean power spectral density (S(f)) of the (expected) input signal (for which we are just using the the observed signal as our initial estimate) as opposed to using the FFT? Also this term S(f) shows up in the denominator of the Weiner function (I have played around with adding it in FFT form so far). It makes sense to me that it should be there, but seems to add a good amount of noise.
Sincerely,
Don
12-04-2008 08:28 PM
If you are just looking to identify an impulse response, then a cross-correlation is likely to work far more accurately and quickly than deconvolution.
One reference for R-L deconvolution is:
Dey N, Blanc-Feraud L, Zimmer C, Roux P, Kam Z, Olivo-Marin J-C, and Zerubia J. Richardson-Lucy algorithm with total variation regularization for 3D confocal microscope deconvolution. Microscopy Research and Technique 69(4): 260-266, 2006. http://dx.doi.org/10.1002/jemt.20294 
But there are a lot of descriptions of the R-L technique with various enhancements - I think I've also looked at the book "Image Processing and Data Analysis" by Jean-Luc Starck,  Fionn Murtagh,  A. Bijaoui: http://books.google.com/books?id=dv1fRG1oSIoC
I'm not sure about using S(f) - I had never previously seen it written that way, so I'm not sure what difference it makes. But I tend not to use the Wiener deconvolution in any case.
Cheers ~ Greg
12-05-2008 06:34 AM - edited 12-05-2008 06:35 AM
Thanks Greg for your time in this discussioin:
Last questions:
1) Goal of deconvolution would be to "deblur" original wave, just like wanting to deblur image in the 2d case. For the 1d waveform case, what does R-L give you that cross-correlation function would not?
2) you removed shift to center for FFT. Why? But we still would want that for 2d (image) case, correct?
Sincerely,
Don