Nadeau-Research-Lab / DHM-deconvolution

0 stars 2 forks source link

Complex Deconvolution makes farther distances brighter #3

Open sudgy opened 4 years ago

sudgy commented 4 years ago

When I try to use the complex deconvolution (polar, if it matters), the z planes further from the center are brighter than the z planes closer to the center. Do you have a data set that worked for complex deconvolution? If you can't reproduce it, I can send you the data set I'm using.

sudgy commented 4 years ago

I've been looking at the deconvolution code, and I was wondering, do you have a paper or something that you used to write it? I'm not familiar with the algorithm you used here.

sudgy commented 4 years ago

I got your sources from Jay, so that doesn't matter as much now.

I probably should have mentioned this, but this was happening when I was doing iterative deconvolution. I've also tried using the Wiener filter, and it fails in a different way (the focal plane is really bright, and then it falls off really quickly at further z planes).

schlackt commented 4 years ago

I wonder if this is caused by how the PSF is handled, since that is the only place I can think of where I might have done something differently than the sources. It might not be getting normalized properly, and I couldn't find much information in my sources about how/if they preprocess the PSF. Right now, the plugin normalizes the PSF so that the amplitudes of all pixels add to 1. I chose to do this because leaving the PSF as-is resulted in completely washed-out images (at least with the Wiener filter). I don't recall how using the raw PSF affects the result in iterative deconvolution - does that cause the same issue? (I won't have access to a machine that can use Fiji for another week.)

sudgy commented 4 years ago

Under traditional deconvolution, scaling the PSF should just scale the output, because all we are doing is Fourier transforms and division. I would think that most deconvolution algorithms would be similar. In the Wiener filter, scaling the PSF scales the output but also adjusts your value of β. Other than that, though, I don't think there should be much of a difference.

That being said, normalizing to make the sum of all the pixels one is strange. That makes the normalization act different depending on the size of the image, and I would think that the size of the image should just affect the resolution, and nothing else.

schlackt commented 4 years ago

Yes, that's good point. The Wiener filter (at least) certainly needs some kind of scaling, but I agree that the size of the image shouldn't have an effect. Maybe just find the maximum value in the PSF and divide by that to start? I'm still suspect of the PSF for the brightness issue - does its brightness seem to decrease properly as you go away from the focal plane? If not, I wonder if it would be helpful to weigh pixels based on their distance from the central point.