## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Single-pixel interior filling function approach for detecting and correcting errors in particle tracking

Contributed by Stuart A. Rice, November 30, 2016 (sent for review November 5, 2015; reviewed by John Crocker and Eric R. Weeks)

## Significance

Researchers in many areas of science and engineering gather imaging data consisting of a set of pixel intensities. Quantitative analyses of such data often rely on estimating the positions of objects (e.g., single-particle tracking), and many of the algorithms used promise subpixel precision and accuracy. Here, we introduce a method that can reveal biases in such tracking algorithms and correct the associated errors. An advantage of the method is that it uses only the output of the tracking algorithm without needing knowledge of how it works. We illustrate how the method can solve common problems in single-particle tracking. Under some circumstances the method can even outperform the precision limit to which most algorithms are compared.

## Abstract

We present a general method for detecting and correcting biases in the outputs of particle-tracking experiments. Our approach is based on the histogram of estimated positions within pixels, which we term the single-pixel interior filling function (SPIFF). We use the deviation of the SPIFF from a uniform distribution to test the veracity of tracking analyses from different algorithms. Unbiased SPIFFs correspond to uniform pixel filling, whereas biased ones exhibit pixel locking, in which the estimated particle positions concentrate toward the centers of pixels. Although pixel locking is a well-known phenomenon, we go beyond existing methods to show how the SPIFF can be used to correct errors. The key is that the SPIFF aggregates statistical information from many single-particle images and localizations that are gathered over time or across an ensemble, and this information augments the single-particle data. We explicitly consider two cases that give rise to significant errors in estimated particle locations: undersampling the point spread function due to small emitter size and intensity overlap of proximal objects. In these situations, we show how errors in positions can be corrected essentially completely with little added computational cost. Additional situations and applications to experimental data are explored in *SI Appendix*. In the presence of experimental-like shot noise, the precision of the SPIFF-based correction achieves (and can even exceed) the unbiased Cramér–Rao lower bound. We expect the SPIFF approach to be useful in a wide range of localization applications, including single-molecule imaging and particle tracking, in fields ranging from biology to materials science to astronomy.

In an optical imaging experiment the photons that are detected to create a digital image of an object are distributed according to the point spread function (PSF) of the instrument used (1, 2). By exploiting specific properties of the PSF it is possible to determine the positions of particles with subpixel precision. This idea is used extensively for tracking single molecules (2, 3) and colloidal particles (4) and stars (5). The approaches used include special techniques that exploit photoactivation and photobleaching properties of fluorophores to achieve resolutions that can exceed the Abbe diffraction limit, fluorescence imaging with 1-nm accuracy (6), nanometer-localized multiple single molecules (7), photoactivated localization microscopy (8), stochastic optical reconstruction microscopy (9), and bleaching-assisted localization microscopy (10). In all of these techniques a key ingredient is the tracking algorithm that transforms the data from intensities at the detector pixels into individual particle positions.

A tracking algorithm is a mathematical procedure that assigns the position of the center of an emitter based on the recorded distribution of the photons across multiple pixels. Different algorithms make different assumptions that affect the tracking performance. Some methods exploit the symmetry of the PSF to localize emitters (3, 4, 11⇓⇓⇓⇓–16); these include the Crocker–Grier method, which estimates the center of mass directly from an average that is weighted by pixel intensities (4), and another recent method that exploits triangulation (11). Some methods specifically model the PSF as a Gaussian function (12); these include least-squares (Gaussian) fitting (3) and the maximal likelihood method (13).

Experimental realities can limit both tracking accuracy and precision to considerably lower resolution than often appreciated (e.g., pixel-level, rather than subpixel). Undersampling and inadequate magnification mainly affect the accuracy (17, 18), whereas poor signal-to-noise mainly affects precision (11, 18). Optical intensity overlaps that arise when emitters are closely spaced decrease both accuracy and precision (11). Unfortunately, there is no agreed-upon standard benchmark with which to evaluate tracking performance. Even worse, trajectories with erroneous information can lead to inference of behavior that is an artifact of the tracking algorithm (19). Moreover, because determining the assumptions made by a proprietary implementation of an algorithm can be challenging, it is important to have tools that can establish the quality of the estimated particle positions directly from the output. The common strategy of checking the variation in tracked positions of motionless reference markers has several drawbacks (18): (*i*) The field of view of interest may not contain suitable markers; (*ii*) markers may not be motionless; and (*iii*) the true positions of the markers with respect to the reference frame of the imaging system are unknown, so they cannot be used to quantify systematic errors. The need for a general method for validation was made clear in a recent comparison of algorithms for a range of different data types (20). The general problem of proper linking of tracked locations in various experimental situations (21) that stimulated this comparison is significantly affected by the proper estimation of locations in a single frame.

Here we develop an approach that can reveal, quantify, and correct bias in tracked positions. Our approach involves constructing the distribution of estimated positions within pixel interiors, which we term the single-pixel interior filling function (SPIFF; Fig. 1). Bias of the SPIFF toward the center of pixels is related to an effect known as “pixel locking” (22, 23) and “pixel biasing” (4, 24⇓–26). We formulate the SPIFF approach in terms of two axioms: (I) the probability of finding particles in a region of the image should be conserved by an unbiased tracking procedure and (II) the estimated particle positions should be uncorrelated with the boundaries between pixels of the detection system. We test for satisfaction of these constraints by constructing the SPIFF, a histogram of output positions. Any deviation of the SPIFF from a uniform distribution indicates bias in the tracking algorithm.

We use simulated data to illustrate how our approach can correct tracking errors arising from undersampling and intensity overlaps in crowded systems. The latter situation is of particular interest owing to its frequent occurrence in measurements and the lack of alternative means of controlling these errors. Moreover, we show that the SPIFF-based correction is capable of achieving and even exceeding the unbiased Cramér–Rao lower bound (CRLB), the standard by which tracking algorithms are commonly judged. Our approach contrasts with the standard approach of minimizing pixel locking by expanding the sampling region, which introduces additional noise to the measurement. Additional situations are considered in *SI Appendix*. In particular, we analyze experimental data for quasi-2D colloidal suspensions and show how tracking errors can introduce artificial correlations in successive particle displacements that the SPIFF-based approach corrects (*SI Appendix*, section I).

## Axioms and the SPIFF

The combination of an imaging experiment and tracking algorithm can be viewed as a mapping of the true particle position, *D*).

### Axiom I.

*For any unbiased tracking algorithm* g, *the probability that the true position* *has a value in some region* A *is equal to the probability that the estimated position* *has a value in the region*

In the absence of feedback between the pixel grid of the detector and the system being imaged, we have a second axiom:

### Axiom II.

*For any unbiased algorithm* *, the probability for* *to obtain a particular value is independent of the specific coordinates of the pixel grid. This assumes that there is no aberration (over the field of view) that causes bias in the detected intensities themselves*.

We now combine these axioms to define an essential condition for **1** it then follows that**2** is the Jacobian of the inverse function

The SPIFF is obtained from tracked data by building a histogram of the shifted positions **3** then tells us that deviations of the SPIFF (histogram) from a constant value (i.e., uniform filling) indicate the presence of bias in the tracking algorithm and inaccuracy of the derived coordinates. This indicator is independent of the specific tracking algorithm used and can be applied to any kind of tracked data given a sufficient number of sampled positions (*SI Appendix*, section II). Although one can theoretically study the performance of a specific algorithm with simulated PSFs, the exact experimental conditions are never known completely and thus may not be well represented. The SPIFF provides an essential validation test and indicates whether an algorithm produces biased results. Fig. 1*D* shows a hypothetical case when inaccuracies in

Fig. 2 shows an example of the SPIFF for particle positions that are obtained from the Crocker–Grier center-of-mass algorithm (4) applied to experimental data. The experimental system consists of a moderately dense quasi-2D aqueous suspension of colloid particles (diameter 1.57 *SI Appendix*, section I we show how the inaccuracy displayed in Fig. 2 introduces artificial memory to colloidal dynamics on short time scales (0.1 s, less than the time between collisions).

## Using the SPIFF to Correct Bias in Tracked Positions

The errors discussed above can be removed by inverting the mapping associated with the tracking algorithm: **2** to obtain *SI Appendix*, section III we show how to obtain **2** is also factorizable, and we integrate over the dimensions independently (*SI Appendix*, section III). This process is indicated schematically in Fig. 1*D*. Inverting the mapping is always possible if

In the following two subsections, we use simulated data to illustrate two common situations (undersampling and overlapping PSFs) that give rise to artifacts in particle tracking and show how the SPIFF can be used to correct them. We consider a third situation (background noise) in *SI Appendix*, section IV. In the examples we use the Crocker–Grier method (4) as the tracking algorithm, and a Gaussian for the PSF, but our findings apply to any tracking output without needing knowledge of the algorithm.

### Nyquist–Shannon Bias.

In signal processing the Nyquist–Shannon sampling theorem states that a band-limited function can be perfectly reconstructed from a series of samples if the bandwidth B is less than or equal to half the sampling rate (28). A similar restriction applies for correct determination of the location of the center of a (point) light source (15). The intensity of the point source must span a sufficient number of pixels to properly reconstruct the position of the center. If the Crocker–Grier method (4) is used, undersampling leads to systematic errors in the tracking algorithm (16, 17). These errors can be detected and corrected for sufficiently large signal-to-noise using the SPIFF.

To demonstrate the Nyquist–Shannon bias, we generate *A*).

The center-of-mass algorithm for determining the position of the center of a (point) light source is a simple averaging procedure. Let ^{2}) that is used to determine the position of the particle is

The factorizability of **5** allow treating the *x* and *y* directions separately. A transformation *B*. Owing to the symmetry of the problem and the factorizability of the PSF, we present our analysis in terms of only the *x* direction; statistically identical results hold for the *y* direction. Fig. 3*B* shows a large deviation from the uniform distribution, indicating bias in the tracking; the *D*).

The SPIFF can be constructed without knowledge of the true particle positions and thus can easily be used to test for bias. Moreover, for the case of undersampling the bias is systematic and thus can be corrected. Due to the symmetry of the PSF and the form of Eq. **5** the point **6** is the cumulative distribution; it is easily obtained from the estimated values **6** applies for the case ^{6} different positions of the particle in Fig. 3*C*. *B*, horizontal line with black symbols). Correspondingly, the error distribution of the corrected positions is almost a δ-function at 0 (Fig. 3*D*, black). The precision of the corrected positions is determined by the density of the samples and is 1 part in 10^{3}. These results demonstrate the benefit of the SPIFF with respect to both detecting errors and correcting them by inverting the mapping. The ability to correct errors arising from undersampling exists because we can compensate for the lack of information in a single frame with statistical information accumulated over time or across the ensemble. The SPIFF pools the information from many determinations of the PSF center, which, in turn, enables detection and correction of errors.

### Intensity Overlap of Adjacent Objects.

In the previous example, the bias in the tracking algorithm was systematic. We now show how actively generating such errors coupled with the SPIFF correction technique can help to overcome the effect of a nonsystematic bias. To this end, we consider pixel intensities that result from multiple emitters that are in close proximity. The resulting overlap of the PSFs affects the inferred locations of the particles by asymmetrically altering parts of the individual particle images. This form of error and means to address it have been considered previously in measurements of interactions between colloidal particles (29). Although no general method is likely to be able to correct this error in all situations, the approach that we discuss shows promise for certain experimental regimes.

To demonstrate the effect of overlap and its correction via the SPIFF, we do the following. We construct a pair of particles with a separation of 15.2 pixels and assign them Gaussian PSFs with *A* and *B*), a separation large enough that one would not suspect that intensity overlap plays a role in the tracking process. For this fixed distance between the particles we generate 100 different random orientations of the pair. For each of these orientations, we then translate the pair relative to the pixel grid by allowing the center-of-mass to undergo Brownian motion for 100 steps with step sizes obtained from a Gaussian distribution with zero mean and SD of 0.2 pixels in x and y. Given the resulting simulated intensities, we track the particle positions using Eq. **5** with

We plot the SPIFF for the *x* direction in Fig. 4*C*. There is a clear preference for positions toward the edges of the pixel. Fig. 4*D* shows the distribution of errors. Although the peak of the distribution is at zero, there is a significant probability of errors of 0.1 pixel or larger. In *SI Appendix*, section I we show that for this case the inferred dynamics is non-Brownian, in contradiction with the true simulated motion. The correlated interaction of the particle images in the tracked results gives a mean square displacement that varies nonlinearly with time. In fact, an order parameter for directional motion (30) indicates an inertial effect. Both effects are inconsistent with the simulated motion.

In the previous example, with systematic bias, we corrected the positions by transforming the SPIFF into a uniform distribution, but the nonsystematic bias that derives from overlaps prevents us from using the same procedure. Instead, we decrease *E* and *F* show the outcome of performing center-of-mass analysis with *C* and *D*; see also *SI Appendix*, section V). Fig. 4*E* shows that the deviations from a uniform distribution are larger than the ones shown in Fig. 4*B*, and Fig. 4*F* shows that limiting the number of pixels included significantly broadens the error distribution and thus the probability of significant errors. Nevertheless, the SPIFF can now be used to invert the mapping as in the previous example. Upon doing so, the SPIFF becomes uniform (Fig. 4*G*), and the errors are corrected (Fig. 4*H*).

We have implemented the strategy outlined in this section for the experimental data shown in Fig. 2 and *SI Appendix*, Figs. S1 and S2. From the images we selected colloid pairs in close proximity. The presence of additional nearby particles limits the window size that can be chosen for the tracking, which results in a strong systematic bias that we can correct with the SPIFF. The results show a significant improvement in the mean square displacement as a result of SPIFF correction.

## Noise and the CRLB

Although we have shown that the SPIFF enables nearly perfect reconstruction of particle positions in the absence of noise, the presence of noise limits the certainty in the particle positions. This limit, known as the CRLB (31), depends on the PSF and the type of noise present. For an unbiased estimator, the CRLB is _{T}) is the Fisher information. The unbiased CRLB is often used as the standard for evaluating particle-tracking algorithms (32⇓⇓⇓–36). In this section, we consider the effect of noise on the performance of the SPIFF in correcting errors and show that, because it is a biased estimator, it can actually achieve a precision that exceeds the standard unbiased CRLB.

To this end, we performed simulations like those in *Using the SPIFF to Correct Bias in Tracked Positions*, *Nyquist–Shannon Bias*, except that now the intensity at each pixel **4**, and *A* the optimal window size (*SI Appendix*, section VI) was used for each particle size (*B* we observe the case of a minimal window size (*Using the SPIFF to Correct Bias in Tracked Positions*, *Intensity Overlap of Adjacent Objects*. We see that for some particle sizes (

We now want to understand this result mathematically. In general, the Cramér–Rao bound is given by*SI Appendix*, section VII.

## Conclusions

Algorithms that use information from PSFs to localize emitters with subpixel resolution now play an essential role in many different areas of science (3, 27, 30, 37⇓⇓–40). Here we propose a simple validation method that only requires knowledge of the estimated particle positions. Our approach is based on the SPIFF. Because the positions of the objects being imaged are independent of the detection system, the SPIFF is a uniform distribution when the tracking algorithm is unbiased. The SPIFF is essentially a measure of pixel locking (24), and we show how its quantification can be used to invert the tracking algorithm mapping to correct errors.

Our key physical insight is that ergodicity of the physical processes being imaged allows pooling information from multiple times and/or emitters that compensates for limited sampling of the PSF over pixels (Nyquist–Shannon bias) and/or intensities (e.g., owing to a confounding background signal or nonsystematic noise). This additional information allows us to introduce a unique strategy for treating errors that arise when pixel intensities derive from multiple emitters (10), which is common in dense systems (39). In such cases, we limit our use of image information to the pixels nearest to the peak intensities; although this introduces a systematic pixel-locking bias (error), we demonstrate how that effect can be removed by integrating the SPIFF. Indeed, this strategy enables us to exceed the unbiased Cramér–Rao bound (11, 13) for a given signal-to-noise. The noise properties of this strategy differ fundamentally from those of the standard strategy of increasing the range of pixels included for each emitter. There is of course a limit to this procedure—if particles are too close, their signals cannot be separated, and the correction procedure homogenizes the SPIFF but does not yield accurate positions. We characterize this limit as a function of the width of the PSF and the extent of the noise in *SI Appendix*, Figs. S13–S15.

Remarkably, our procedure for detecting and correcting systematic errors requires only the tracked positions and does not require explicit knowledge of the PSF or independent knowledge of the extent to which the intensities from different emitters are overlapping. We have illustrated our approach with the center-of-mass method (4) owing to its popularity. However, our results are general and applicable to the output from all tracking algorithms, regardless of the source of the data or the mathematical operations performed.

The main limitations of our approach are that the particle positions must be well sampled with respect to the pixel boundaries, and the particle positions must be consistently generated from one pixel to another. We note that experimental realities (optical aberrations, variations in illumination and focus, etc.) can affect the latter. In our experience, proper calibration of the imaging system can mitigate these issues sufficiently to construct the SPIFF, but there are other situations that we have not explored and therefore for which we cannot guarantee the accuracy of the error correction (e.g., tracking 3D data where the focusing and relative particle positions create new challenges). It is also important to note that the SPIFF correction we propose does not solve all problems related to extraction of data from trajectories. For example, it is not designed to deal with nonsystematic errors such as those that arise from mixing of information coming from different sources. Nevertheless, we believe that many experiments will be in a regime that permits application of the SPIFF approach.

## Acknowledgments

We thank Yael Roichman for bringing existing work on pixel locking to our attention. This work was supported by The University of Chicago Materials Research Science and Engineering Center [National Science Foundation (NSF) Grant DMR-1420709]. B.L. acknowledges support from ChemMatCARS supported by NSF Grant CHE-1346572. N.F.S. is a Department of Defense National Security Science Engineering Faculty Fellow.

## Footnotes

- ↵
^{1}To whom correspondence may be addressed. Email: sarice{at}uchicago.edu, nfschere{at}uchicago.edu, or dinner{at}uchicago.edu.

Author contributions: S.B., N.F.S., and A.R.D. designed research; S.B., P.F., and B.L. performed research; S.B. and P.F. analyzed data; and S.B., S.A.R., N.F.S., and A.R.D. wrote the paper.

Reviewers: J.C., University of Pennsylvania; and E.R.W., Emory University.

The authors declare no conflict of interest.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1619104114/-/DCSupplemental.

## References

- ↵.
- Born M,
- Wolf E

- ↵.
- Novotny L,
- Hecht B

- ↵
- ↵
- ↵.
- Liebe CC

- ↵.
- Yildiz A, et al.

- ↵.
- Qu X,
- Wu D,
- Mets L,
- Scherer NF

- ↵.
- Betzig E, et al.

- ↵
- ↵.
- Burnette DT,
- Sengupta P,
- Dai Y,
- Lippincott-Schwartz J,
- Kachar B

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵.
- Alexander BF,
- Ng KC

- ↵
- ↵.
- Harland CW,
- Bradley MJ,
- Parthasarathy R

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵.
- Crocker JC,
- Weeks ER

- ↵
- ↵
- ↵.
- Shannon CE

- ↵
- ↵.
- Burov S, et al.

- ↵.
- Kay SM

- ↵.
- Wernet MP,
- Pline A

- ↵
- ↵
- ↵
- ↵
- ↵.
- Weigel AV,
- Simon B,
- Tamkun MM,
- Krapf D

- ↵.
- Tabei SMA, et al.

- ↵.
- Caswell TA,
- Zhang Z,
- Gardel ML,
- Nagel SR

- ↵.
- Gai M, et al.

## Citation Manager Formats

## Sign up for Article Alerts

## Jump to section

## You May Also be Interested in

### More Articles of This Classification

### Physical Sciences

### Chemistry

### Biological Sciences

### Biophysics and Computational Biology

### Related Content

- No related articles found.

### Cited by...

- No citing articles found.