I would like to fit a 2D (3D) gaussian in an image in order to detect fluorescent spots.
I’d like to know if there is already an implementation using imgLib2 (in Fourier space or not).
I saw they implemented detector based on LoG / DoG filtering, but those types of filtering are not sufficient for the images I have, this is why I’m looking for fitting metohds. Are there other methods for spot detection in track mate?
that’s probably more a question for Jean-Yves himself. You could check out the TrackMate javadocs in the meantime.
TrackMate uses quadratic fitting to subpixel localize the spot location. This is probably not what you are looking for.
A while ago I pushed to imglib2 something that does what you want, but it is in a dangling state. You would have to crawl through the code. Check this package:
I also made some interactive tests for it:
Also, keep us posted because so far I think this code has no use.
Thanks for your reply, that’s what I was looking for, and there are tests for it that’s perfect. I’ll take a look at it and keep you posted.
PS: Is the quadratic fitting for sub-voxel detection of local maxima within the filtered image?
If you quote the specific question you are replying to, by highlighting with the mouse and clicking “quote”, then I think you won’t get hit by the silly minimum character limit.
Ah, so sad. Tragic, really.
Could we introduce badges for the most creative way of circumventing the minimum character limit, please?
for the sake of clarity & readability of this thread I suggest you start a new thread to discuss this matter
@jeanollion coming back to your application:
Please keep us posted if you use the imglib2 code.
I initially developed it for a user that let me down. So I did not get a chance to know if the code could be used efficiently. Your application is a second chance.
So I would welcome comments on the design, the javadocs, etc…
I guess we will get this feedback in some weeks.
I run your test classes, it works great, out-of-the-box.
I also tested on real images, its seems very promising, but the solver sometimes goes crazy and finds solutions very far from initial conditions (large sigmas and/or large spatial displacement); this happens mostly in case of false positive spots, but also in a noisy environment.
So here are my first remarks (using the text-formatting capacities of the forum ) :
- My initial idea was actually to use a threshold on the error (distance between observed data to the fit) in order to filter local maxima. In order to achieve this, I think a solution could be to be able to limit the seach-space. I didn’t see how to constraint the parameters of the fit, but maybe it is already possible? Would it be possible for you to make those changes? Maybe I could help?
- To take in account the influence of neighboring spots, it would be good to be able to fit several gaussian simultaneously
- Also it would be more convenient if the solver could return the error (but it is currently not a limitation because it can be computed afterwards).
- Last, could you explain the lambda parameter (I didn’t go that far in your code!) I don’t understand provided javadoc.
I’m very grateful for those tools you provide.
PS: you talked about schedule, so for information, I’m going on vacations for 2 weeks tomorrow, but after tomorrow, you will hear about me when I come back.