Accurate tracking of particles in images is crucial to experiments as diverse as microrheological studies of complex fluids and super-resolution imaging of sub-cellular structure. I provide here:
Abstract (from [1]): I introduce an algorithm for sub-pixel localization of imaged objects based on an analytic, non-iterative calculation of the best-fit radial symmetry center. This approach yields tracking accuracies that are near theoretical limits, similar to nonlinear Gaussian fitting and maximum likelihood estimation, but with orders of magnitude faster execution time, lower sensitivity to nearby particles, and applicability to any radially symmetric intensity distribution. I demonstrate the method with several types of data, including super-resolution microscopy images.
Reference:
A MATLAB function to determine the center of a single particle in an image, using this radial-symmetry-based approach: radialcenter.m (also in the above Supplementary Software). The "Supplementary Software" contains additional code to assess tracking accuracy; the graphical user interface noted below has additional code for tracking many particles in images (using any of a variety of algorithms). (See also the GUI and associated code, below.) [Note added Nov. 21, 2012: be sure your image is a double-precision array to avoid MATLAB complaints / errors about operations on integers.]
Mathematica. (Oct. 2012) From Mike Skaug and Dan Schwartz at the University of Colorado, Boulder: A Mathematica implementation of this radial-symmetry-based approach: MathematicaRadialCenter.m.
Update July 3, 2012: even faster radial-symmetry-based tracking for images containing many particles. (The algorithm is the same, but I avoid redundant array calculations.)
Update March 19, 2013: I've uploaded a (slightly) revised version of the GUI and documentation, linked above, inspired by this.)
Update July 20, 2014: A minor revision to the "linking" of objects into tracks.
Faster! and 3D!: (1) The radial-symmetry-based method can be further sped up for tracking many particles by avoiding redundant calculations of array properties. For 1000 9x9 px images, for example, the calculation time per image can be about 10 times shorter than 1000 calls to radialcenter.m. (On my laptop, the time per image is about 10 microseconds.) A function implementing this (radialcenter_stk.m) is bundled with the GUI noted above, and is called by the GUI. (2) I've extended this method to 3D images, i.e. localizing a single particle in a 3D image. Others have as well! See here for more information.
Many-particle images: Some simple code to assess the accuracy of tracking many particles in a simulated test image: Many particle assessment.zip .
More background: Methods for highly accurate particle tracking are crucial to a wide variety of experiments. Existing approaches to precisely localizing particles in images fall into two categories: exact fits based on Gaussian or other functional forms, and determinations of intensity centroids or other algebraically tractable calculations. The former involves iterative numerical calculations, and is prohibitively slow for large numbers of particles. The latter can be dangerously inaccurate[*], especially at low signal-to-noise ratios. I devised a fundamentally new approach to particle tracking, in which rather than fitting to any particular functional form, one finds the point of maximal radial symmetry in a particle's neighborhood [**]. An analytically exact expression for this symmetry center enables very rapid calculation, not requiring iterative computations. Using test images spanning a wide range of signal strengths, I showed that this method is as accurate as Gaussian fitting, with precision close to theoretical bounds, but with execution times orders of magnitude faster and with reduced sensitivity to the presence of nearby particles. Moreover, this localization method is applicable to any radially symmetric intensity profile. I further examined the performance of radial-symmetry-based tracking using several types of real experimental data, including fluorescence images of molecular motors, membrane receptors and colloidal microparticles, and PALM (photoactivated localization microscopy) super-resolution images of bacterial proteins. In all cases, this approach yielded high accuracy particle localization with very short analysis times.
* [We've discovered this, unfortunately, through direct experience. As a silver lining, this occurrence spurred the thoughts on new approaches to tracking described above.]
** [I was reminded when writing the paper cited above of this, "Using the first person in your writing humanizes your work. If possible, therefore, you should avoid using the first person in your writing. Science succeeds in spite of human beings, not because of us, so you want to make it look like your results magically discovered themselves." - from Adam Ruben http://sciencecareers.sciencemag.org/career_magazine/previous_issues/articles/2012_03_23/caredit.a1200033 .]
This work is supported in part by National Science Foundation Award no. 1006171.