gaussian fitting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gaussian fitting

Jeff Spector
Hi all,
 I"m working on trying to develop a tracking plugin for ImageJ. I know
there are some good one out there most of them seem to use the center of
mass to find the middle of the point. I would like to try and take my
data, say a 4x4 grids of pixels, and fit it to a 2-D gaussian. I've
looked around bit and can't seem to figure out exactly how to do this,
can someone point me in the right direction, either to another plugin,
or a book or a website or something...
thanks
-jeff
Reply | Threaded
Open this post in threaded view
|

Re: gaussian fitting

David Hovis
Jeff,

I've done something similar.  I used some public domain Levenberg-
Marquardt Java code to fit a 2D Lorentzian.

It is pretty involved if you want to do it right, though.  There is  
some code out there that will try to compute all the derivatives  
automatically, but I find that it is better to compute the derivative  
functions analytically.  For a 2-D Gaussian, there would be 4  
derivatives that would need to be computed: (d/dXo, d/dYo, d/dW, d/dH).

It is also important to know that your data is best represented by a  
2D Gaussian and not, say a 2D Lorentzian or a 2D Voight.  Also, I find  
it very useful to constrain fits like that so that they don't go  
outside the intended range. Otherwise, it is common to end up with  
width going to infinity, height going to zero, or Xo and Yo moving  
outside the frame.

--David

----------------------------------------
David Hovis
Senior Research Associate
Department of Materials Science
Case Western Reserve University
[hidden email]

On Jan 30, 2008, at 10:45 AM, Jeff Spector wrote:

> Hi all,
> I"m working on trying to develop a tracking plugin for ImageJ. I  
> know there are some good one out there most of them seem to use the  
> center of mass to find the middle of the point. I would like to try  
> and take my data, say a 4x4 grids of pixels, and fit it to a 2-D  
> gaussian. I've looked around bit and can't seem to figure out  
> exactly how to do this, can someone point me in the right direction,  
> either to another plugin, or a book or a website or something...
> thanks
> -jeff