6
Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov a,b , Patrick Figliozzi c , Binhua Lin b,d , Stuart A. Rice b,c,1 , Norbert F. Scherer b,c,e,1 , and Aaron R. Dinner b,c,e,1 a Department of Physics, Bar-Ilan University, Ramat-Gan 5290002, Israel; b James Franck Institute, The University of Chicago, Chicago, IL 60637; c Department of Chemistry, The University of Chicago, Chicago, IL 60637; d Center for Advanced Radiation Sources, The University of Chicago, Chicago, IL 60637; and e Institute for Biophysical Dynamics, The University of Chicago, Chicago, IL 60637 Contributed by Stuart A. Rice, November 30, 2016 (sent for review November 5, 2015; reviewed by John Crocker and Eric R. Weeks) 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. Un- biased SPIFFs correspond to uniform pixel filling, whereas biased ones exhibit pixel locking, in which the estimated particle posi- tions 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 experi- mental data are explored in SI Appendix. In the presence of experimen- tal-like shot noise, the precision of the SPIFF-based correction achieves (and can even exceed) the unbiased CramérRao 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. imaging | particle tracking | error correction | pixel locking | CramérRao lower bound I n 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 de- termine 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 ac- curacy (6), nanometer-localized multiple single molecules (7), photoactivated localization microscopy (8), stochastic optical reconstruction microscopy (9), and bleaching-assisted locali- zation 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 dis- tribution 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, 1116); these include the CrockerGrier method, which esti- mates 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 eval- uate tracking performance. Even worse, trajectories with erro- neous information can lead to inference of behavior that is an artifact of the tracking algorithm (19). Moreover, because de- termining the assumptions made by a proprietary implementa- tion 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 refer- ence 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 un- known, 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 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. Author contributions: S.B., N.F.S., and A.R.D. designed research; S.B., P.F., and B.L. per- formed 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. 1 To whom correspondence may be addressed. Email: [email protected], nfschere@ uchicago.edu, or [email protected]. This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10. 1073/pnas.1619104114/-/DCSupplemental. www.pnas.org/cgi/doi/10.1073/pnas.1619104114 PNAS | January 10, 2017 | vol. 114 | no. 2 | 221226 CHEMISTRY BIOPHYSICS AND COMPUTATIONAL BIOLOGY Downloaded by guest on July 1, 2020

Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

Single-pixel interior filling function approach fordetecting and correcting errors in particle trackingStanislav Burova,b, Patrick Figliozzic, Binhua Linb,d, Stuart A. Riceb,c,1, Norbert F. Schererb,c,e,1, and Aaron R. Dinnerb,c,e,1

aDepartment of Physics, Bar-Ilan University, Ramat-Gan 5290002, Israel; bJames Franck Institute, The University of Chicago, Chicago, IL 60637; cDepartmentof Chemistry, The University of Chicago, Chicago, IL 60637; dCenter for Advanced Radiation Sources, The University of Chicago, Chicago, IL 60637;and eInstitute for Biophysical Dynamics, The University of Chicago, Chicago, IL 60637

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

We present a general method for detecting and correcting biasesin the outputs of particle-tracking experiments. Our approach isbased on the histogram of estimated positions within pixels,which we term the single-pixel interior filling function (SPIFF). Weuse the deviation of the SPIFF from a uniform distribution to testthe veracity of tracking analyses from different algorithms. Un-biased SPIFFs correspond to uniform pixel filling, whereas biasedones exhibit pixel locking, in which the estimated particle posi-tions concentrate toward the centers of pixels. Although pixellocking is a well-known phenomenon, we go beyond existingmethods to show how the SPIFF can be used to correct errors. Thekey is that the SPIFF aggregates statistical information from manysingle-particle images and localizations that are gathered overtime or across an ensemble, and this information augments thesingle-particle data. We explicitly consider two cases that give riseto significant errors in estimated particle locations: undersamplingthe point spread function due to small emitter size and intensityoverlap of proximal objects. In these situations, we show how errors inpositions can be corrected essentially completely with little addedcomputational cost. Additional situations and applications to experi-mental data are explored in SI Appendix. In the presence of experimen-tal-like shot noise, the precision of the SPIFF-based correction achieves(and can even exceed) the unbiased Cramér–Rao lower bound. Weexpect the SPIFF approach to be useful in a wide range of localizationapplications, including single-molecule imaging and particle tracking, infields ranging from biology to materials science to astronomy.

imaging | particle tracking | error correction | pixel locking |Cramér–Rao lower bound

In an optical imaging experiment the photons that are detectedto 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 de-termine the positions of particles with subpixel precision. This ideais used extensively for tracking single molecules (2, 3) and colloidalparticles (4) and stars (5). The approaches used include specialtechniques that exploit photoactivation and photobleachingproperties of fluorophores to achieve resolutions that can exceedthe Abbe diffraction limit, fluorescence imaging with 1-nm ac-curacy (6), nanometer-localized multiple single molecules (7),photoactivated localization microscopy (8), stochastic opticalreconstruction microscopy (9), and bleaching-assisted locali-zation microscopy (10). In all of these techniques a key ingredientis the tracking algorithm that transforms the data from intensitiesat 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 dis-tribution of the photons across multiple pixels. Different algorithmsmake 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 esti-mates the center of mass directly from an average that is weightedby pixel intensities (4), and another recent method that exploitstriangulation (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 andinadequate 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 closelyspaced decrease both accuracy and precision (11). Unfortunately,there is no agreed-upon standard benchmark with which to eval-uate tracking performance. Even worse, trajectories with erro-neous information can lead to inference of behavior that is anartifact of the tracking algorithm (19). Moreover, because de-termining the assumptions made by a proprietary implementa-tion of an algorithm can be challenging, it is important to havetools that can establish the quality of the estimated particlepositions directly from the output. The common strategy ofchecking the variation in tracked positions of motionless refer-ence markers has several drawbacks (18): (i) The field of view ofinterest may not contain suitable markers; (ii) markers may notbe motionless; and (iii) the true positions of the markers withrespect to the reference frame of the imaging system are un-known, so they cannot be used to quantify systematic errors. Theneed for a general method for validation was made clear in arecent comparison of algorithms for a range of different datatypes (20). The general problem of proper linking of trackedlocations in various experimental situations (21) that stimulatedthis comparison is significantly affected by the proper estimationof locations in a single frame.Here we develop an approach that can reveal, quantify, and

correct bias in tracked positions. Our approach involves constructing

Significance

Researchers in many areas of science and engineering gatherimaging data consisting of a set of pixel intensities. Quantitativeanalyses of such data often rely on estimating the positions ofobjects (e.g., single-particle tracking), and many of the algorithmsused promise subpixel precision and accuracy. Here, we introducea method that can reveal biases in such tracking algorithms andcorrect the associated errors. An advantage of the method is thatit uses only the output of the tracking algorithmwithout needingknowledge of how it works. We illustrate how the method cansolve common problems in single-particle tracking. Under somecircumstances the method can even outperform the precisionlimit to which most algorithms are compared.

Author contributions: S.B., N.F.S., and A.R.D. designed research; S.B., P.F., and B.L. per-formed research; S.B. and P.F. analyzed data; and S.B., S.A.R., N.F.S., and A.R.D. wrotethe paper.

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

The authors declare no conflict of interest.1To whom correspondence may be addressed. Email: [email protected], [email protected], or [email protected].

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

www.pnas.org/cgi/doi/10.1073/pnas.1619104114 PNAS | January 10, 2017 | vol. 114 | no. 2 | 221–226

CHEM

ISTR

YBIOPH

YSICSAND

COMPU

TATIONALBIOLO

GY

Dow

nloa

ded

by g

uest

on

July

1, 2

020

Page 2: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

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 relatedto an effect known as “pixel locking” (22, 23) and “pixel biasing”(4, 24–26). We formulate the SPIFF approach in terms of twoaxioms: (I) the probability of finding particles in a region ofthe image should be conserved by an unbiased tracking proce-dure and (II) the estimated particle positions should be uncor-related with the boundaries between pixels of the detectionsystem. We test for satisfaction of these constraints by constructingthe SPIFF, a histogram of output positions. Any deviation ofthe SPIFF from a uniform distribution indicates bias in thetracking algorithm.We use simulated data to illustrate how our approach can

correct tracking errors arising from undersampling and intensityoverlaps in crowded systems. The latter situation is of particularinterest owing to its frequent occurrence in measurements andthe lack of alternative means of controlling these errors. More-over, we show that the SPIFF-based correction is capable ofachieving and even exceeding the unbiased Cramér–Rao lowerbound (CRLB), the standard by which tracking algorithms arecommonly judged. Our approach contrasts with the standardapproach of minimizing pixel locking by expanding the samplingregion, which introduces additional noise to the measurement.Additional situations are considered in SI Appendix. In particu-lar, we analyze experimental data for quasi-2D colloidal suspen-sions and show how tracking errors can introduce artificialcorrelations in successive particle displacements that the SPIFF-based approach corrects (SI Appendix, section I).

Axioms and the SPIFFThe combination of an imaging experiment and tracking algo-rithm can be viewed as a mapping of the true particle position,XT (in Cartesian coordinates due to the pixel grid), to an esti-mated particle position, XE:gðXTÞ→XE. The mapping generatesan estimate of the true position but with unknown accuracy. Toreconstruct the true position without loss of information, g mustbe injective, that is, a function that preserves distinctness of el-ements in its domain. Because ideally XE =XT, g should be theidentity function. In practice, algorithms in current use exhibitsystematic errors, and g deviates significantly from the identityfunction in those cases. Moreover, because XT varies continu-ously, the identity property of an unbiased algorithm meansthat g is also differentiable. Differentiability, in turn, impliesthat connected regions are mapped to connected regions, evenif the mapping is not one-to-one (Fig. 1D). XT can be describedas a random variable, and the probability for XT to attain a valuein some region A is transformed to the probability for XE to attaina value in the region gðAÞ. The conservation of probability enablesus to write our first axiom:

Axiom I. For any unbiased tracking algorithm g, the probability thatthe true position XT has a value in some region A is equal to theprobability that the estimated position XE has a value in the regiongðAÞ.In the absence of feedback between the pixel grid of the de-

tector and the system being imaged, we have a second axiom:

Axiom II. For any unbiased algorithm g , the probability for XE toobtain a particular value is independent of the specific coordinatesof the pixel grid. This assumes that there is no aberration (over thefield of view) that causes bias in the detected intensities themselves.

We now combine these axioms to define an essential condi-tion for XE to represent the tracking results of an unbiasedalgorithm. Let {XEðiÞ} be a series of estimated positions of{XTðiÞ}. This series includes time traces that are produced bythe tracking algorithm g for different particles. Each XTðiÞ canbe written as XTðiÞ= X̂TðiÞ+ aðiÞ, where a(i) is the coordinate ofthe center of the pixel corresponding to XTðiÞ and X̂TðiÞ is thesubpixel position; X̂TðiÞ is mapped by the algorithm g togðXTðiÞÞ− aðiÞ=XEðiÞ− aðiÞ= X̂EðiÞ. Using axiom I we write theconservation of probability (in one dimension for simplicity) as

PT�X̂TðiÞ

�dX̂TðiÞ=PE

�X̂EðiÞ

�dX̂EðiÞ, [1]

where P is the SPIFF density function and dX is the differential ofX. Subscripts E and T refer to the SPIFF obtained for the esti-mated and true positions. By axiom II, the SPIFF, PT, is uniform,that is, PTðX̂TðiÞÞ= 1 ∀  X̂TðiÞ. From Eq. 1 it then follows that

PE�X̂EðiÞ

�=

�����dg−1

�X̂EðiÞ

�dX̂EðiÞ

�����, [2]

where g−1 is the inverse function of g. The term on the right-handside of Eq. 2 is the Jacobian of the inverse function g−1. It assumesthat g acts identically in each pixel. For an unbiased trackingalgorithm, g is the identity function and thus an essential conditionfor any tracked data to accurately represent the true positions is

PE�X̂EðiÞ

�= 1. [3]

The SPIFF is obtained from tracked data by building a his-togram of the shifted positions X̂EðiÞ (Fig. 1). Eq. 3 then tells usthat deviations of the SPIFF (histogram) from a constant value(i.e., uniform filling) indicate the presence of bias in the tracking

SPIF

F

A

D

C

B

E

Detection

Correction

A

Recorded Imageof Single Particle

True Positions(XT)

Subpixelrepresentationsand collapse toa single pixel

Pixel locking

EstimatedPosition onPixel Grid

EstimatedPositions

(XE)

g–1(XE)→XT

XE

g(A)

Fig. 1. Schematic representation of the tracking process and its relationto the SPIFF. (A) The distribution of intensities in pixels of the detectorforms an image of each particle. (B) A tracking algorithm transforms thedistribution of intensities into estimated particle positions with subpixelresolution. The estimated positions can differ from the true positions. (C )We construct a histogram of positions within pixels, the SPIFF. The SPIFFaggregates statistical information from many particle localizations. (D)The SPIFF of the true positions is uniform, whereas that of a biased algo-rithm is nonuniform (Eq. 2). The region of all of the true positions, A, istransformed into the region g(A) of estimated positions. (E ) Correction ofthe bias detected by discovery of a nonuniform SPIFF profile obtainedfrom experiment. Integration of the SPIFF (red line) is used to determinethe inverse function g−1 (i.e., calculating the area under the SPIFF, repre-sented by the blue region), which is used to transform the estimated po-sitions to true positions by rescaling of the SPIFF to have a uniformdistribution over the entire pixel.

222 | www.pnas.org/cgi/doi/10.1073/pnas.1619104114 Burov et al.

Dow

nloa

ded

by g

uest

on

July

1, 2

020

Page 3: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

algorithm and inaccuracy of the derived coordinates. This in-dicator is independent of the specific tracking algorithm usedand can be applied to any kind of tracked data given a sufficientnumber of sampled positions (SI Appendix, section II). Althoughone can theoretically study the performance of a specific algo-rithm with simulated PSFs, the exact experimental conditions arenever known completely and thus may not be well represented.The SPIFF provides an essential validation test and indicateswhether an algorithm produces biased results. Fig. 1D shows ahypothetical case when inaccuracies in g are manifest as failureof the tracked positions to fill the pixels.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 ofa moderately dense quasi-2D aqueous suspension of colloid par-ticles (diameter 1.57 ± 0.02 μm) (27). A digital camera was used torecord the particle motions with temporal resolution of 200frames per second. The image analysis was performed using aPython implementation of the Crocker–Grier method (4). We seethat the tracked positions cluster toward the centers of the pixels.This deviation from a uniform distribution can be caused byvarious factors, including intensity overlaps of nearby particlesand background noise. Regardless of the cause, the SPIFF showsthat the subpixel positions are biased. This inaccuracy is impor-tant and different from the precision of the algorithm. Loss ofprecision usually arises from randomly distributed errors, whereasinaccuracy can arise from correlations. In SI Appendix, section Iwe show how the inaccuracy displayed in Fig. 2 introduces arti-ficial 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 PositionsThe errors discussed above can be removed by inverting themapping associated with the tracking algorithm: XT = g−1ðXEÞ.The explicit form of g−1 is easily found noting that the Jacobianof g−1 is simply the SPIFF itself. In 1D it is a matter of integrationof PE in Eq. 2 to obtain g−1, under the condition that g−1 is

monotonic. In higher dimensions this task is also possible undercertain constraints. In 1D the mapping g−1 is from a scalar to ascalar, whereas in higher dimensions it maps a vector to a vector.Knowledge of the Jacobian of the transformation provides us witha scalar quantity, which is generally insufficient to reconstruct thevector mapping. However, when the mapping has a specific sym-metry (or is bounded by constraints), we can simplify the integrationof PE. In SI Appendix, section III we show how to obtain g−1 forseveral cases. In the following we assume PE is factorizable—that is,PEðx, yÞ=PEðxÞPEðyÞ; in this case, the Jacobian in Eq. 2 is alsofactorizable, and we integrate over the dimensions independently(SI Appendix, section III). This process is indicated schematically inFig. 1D. Inverting the mapping is always possible if g is injective,for example when a tracking algorithm has only systematic bias.However, when the bias is not systematic, noise can distort theSPIFF to an extent that there is a loss of information, and there isno longer a one-to-one relation between XE and XT.In the following two subsections, we use simulated data to

illustrate two common situations (undersampling and over-lapping PSFs) that give rise to artifacts in particle tracking andshow how the SPIFF can be used to correct them. We consider athird situation (background noise) in SI Appendix, section IV. Inthe examples we use the Crocker–Grier method (4) as thetracking algorithm, and a Gaussian for the PSF, but our findingsapply to any tracking output without needing knowledge ofthe algorithm.

Nyquist–Shannon Bias. In signal processing the Nyquist–Shannonsampling theorem states that a band-limited function can beperfectly reconstructed from a series of samples if the bandwidthB is less than or equal to half the sampling rate (28). A similarrestriction applies for correct determination of the location of thecenter of a (point) light source (15). The intensity of the pointsource must span a sufficient number of pixels to properly re-construct the position of the center. If the Crocker–Grier method(4) is used, undersampling leads to systematic errors in the trackingalgorithm (16, 17). These errors can be detected and correctedfor sufficiently large signal-to-noise using the SPIFF.To demonstrate the Nyquist–Shannon bias, we generate 106

random positions XT = ðxc, ycÞ and for each position generatepixel intensities that correspond to a Gaussian PSF with SD σ:

Ik,m =14

�erf

�k+ 1

2− xcffiffiffi2

�− erf

�k− 1

2− xcffiffiffi2

3

�erf

�m+ 1

2− ycffiffiffi2

�− erf

�m− 1

2− ycffiffiffi2

�.

[4]

To model undersampling we used σ= 0.25 pixels, such that theintensity is mainly concentrated in one pixel (Fig. 3A).The center-of-mass algorithm for determining the position of

the center of a (point) light source is a simple averaging pro-cedure. Let Ik,m be the recorded intensity in pixel ðk,mÞ, andchoose the coordinate system such that the maximum intensity ofthe light source (in the absence of other nearby emitters) is atpixel (0, 0). Here, the size of a pixel is taken to be 1 and the pixelcenters have integer locations. The position of the center of thelight source ðx, yÞ is then estimated to be (4)

ðx, yÞ=Pk=w

k=−wPm=w

m=−wðk,mÞIk,mPk=wk=−w

Pm=wm=−wðk,mÞ

, [5]

where the size of the region (in pixels2) that is used to determine theposition of the particle is ð2w  +   1Þ  ×   ð2w  +   1Þ. We use w = 10.The factorizability of Ik,m and the form of Eq. 5 allow treating

the x and y directions separately. A transformation XE   → X̂ isperformed and the SPIFF is plotted in Fig. 3B. Owing to the

Fig. 2. Illustration of pixel locking and correction with experimentally ac-quired images of colloid particles in a quasi-2D suspension. (A) Image of twocolloid particles. The window functions used to localize the particles aremarked in red. (B) The SPIFF obtained from a center-of-mass algorithm.(C) Projection of B onto the x axis. (D) The SPIFF after correction. In D thecolor scale was restricted to 0.88–1.20; the full corrected SPIFF is shown in SIAppendix, section I, where we discuss consequences of the bias for datainterpretation.

Burov et al. PNAS | January 10, 2017 | vol. 114 | no. 2 | 223

CHEM

ISTR

YBIOPH

YSICSAND

COMPU

TATIONALBIOLO

GY

Dow

nloa

ded

by g

uest

on

July

1, 2

020

Page 4: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

symmetry of the problem and the factorizability of the PSF, wepresent our analysis in terms of only the x direction; statisticallyidentical results hold for the y direction. Fig. 3B shows a largedeviation from the uniform distribution, indicating bias in thetracking; the X̂EðiÞ are systematically shifted toward the center ofthe pixel. This arises because discrete pixels effectively averagethe PSF within their interiors, so that undersampling results in aloss of information about the PSF. Because we generated thesimulated data, we can determine the actual errors made in thedetection of particle positions. The distribution of errors is bi-modal with peaks at ± 0.1 pixels (Fig. 3D).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 andthus can be corrected. Due to the symmetry of the PSF and theform of Eq. 5 the point XT = ð0,   0Þ at the center of a given pixel isa fixed point of the mapping algorithm. The existence of such afixed point establishes it as a lower bound for the integration ofPðX̂EÞ. Therefore, the true particle position is given by

X̂T = g−1�X̂E

�=±

ZX̂E

0

PX̂

′E

�dX̂

′E. [6]

The integral on the right-hand side of Eq. 6 is the cumulativedistribution; it is easily obtained from the estimated values X̂Eby calculating the fraction of estimated values in the rangeð0, X̂EÞ relative to the total number of estimated positions. Theminus sign in Eq. 6 applies for the case X̂E   <   0. We plot theinverse transformation as obtained from sampling 106 differentpositions of the particle in Fig. 3C. X̂T deviates strongly from theidentity function (dashed line). We calculate a new SPIFF for thecorrected positions and find that it is uniform as desired (Fig. 3B,horizontal line with black symbols). Correspondingly, the errordistribution of the corrected positions is almost a δ-function at0 (Fig. 3D, black). The precision of the corrected positions is de-termined by the density of the samples and is 1 part in 103. Theseresults demonstrate the benefit of the SPIFF with respect to bothdetecting 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 singleframe with statistical information accumulated over time or acrossthe ensemble. The SPIFF pools the information from many de-terminations of the PSF center, which, in turn, enables detectionand correction of errors.

Intensity Overlap of Adjacent Objects. In the previous example, thebias in the tracking algorithm was systematic. We now show howactively generating such errors coupled with the SPIFF correctiontechnique can help to overcome the effect of a nonsystematic bias.To this end, we consider pixel intensities that result from multipleemitters that are in close proximity. The resulting overlap of thePSFs affects the inferred locations of the particles by asymmetri-cally altering parts of the individual particle images. This form oferror and means to address it have been considered previously inmeasurements of interactions between colloidal particles (29).Although no general method is likely to be able to correct thiserror in all situations, the approach that we discuss shows promisefor 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 witha separation of 15.2 pixels and assign them Gaussian PSFs withσ= 1.96 pixels (Fig. 4 A and B), a separation large enough thatone would not suspect that intensity overlap plays a role in thetracking process. For this fixed distance between the particles wegenerate 100 different random orientations of the pair. For eachof these orientations, we then translate the pair relative to thepixel grid by allowing the center-of-mass to undergo Brownianmotion for 100 steps with step sizes obtained from a Gaussiandistribution with zero mean and SD of 0.2 pixels in x and y. Giventhe resulting simulated intensities, we track the particle positionsusing Eq. 5 with w= 9.We plot the SPIFF for the x direction in Fig. 4C. There is a clear

preference for positions toward the edges of the pixel. Fig. 4Dshows the distribution of errors. Although the peak of the distri-bution is at zero, there is a significant probability of errors of 0.1pixel or larger. In SI Appendix, section I we show that for this casethe inferred dynamics is non-Brownian, in contradiction with thetrue simulated motion. The correlated interaction of the particleimages in the tracked results gives a mean square displacementthat varies nonlinearly with time. In fact, an order parameter fordirectional motion (30) indicates an inertial effect. Both effects areinconsistent 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 usfrom using the same procedure. Instead, we decrease w in thetracking algorithm and consequently decrease the effect of theintensities coming from nearby particles. Fig. 4 E and F showthe outcome of performing center-of-mass analysis with w= 2 (vs.w= 9 used in Fig. 4 C and D; see also SI Appendix, section V). Fig.4E shows that the deviations from a uniform distribution arelarger than the ones shown in Fig. 4B, and Fig. 4F shows thatlimiting the number of pixels included significantly broadens theerror distribution and thus the probability of significant errors.Nevertheless, the SPIFF can now be used to invert the mapping asin the previous example. Upon doing so, the SPIFF becomesuniform (Fig. 4G), and the errors are corrected (Fig. 4H).We have implemented the strategy outlined in this section for

the experimental data shown in Fig. 2 and SI Appendix, Figs. S1and S2. From the images we selected colloid pairs in closeproximity. The presence of additional nearby particles limits thewindow size that can be chosen for the tracking, which results ina strong systematic bias that we can correct with the SPIFF. Theresults show a significant improvement in the mean square dis-placement as a result of SPIFF correction.

−1 −0.5 0 0.5 10

0.51

1.52

X (pixel)

PSF

−0.5 −0.25 0 0.25 0.50

0.51

1.52

2.5

X (pixel)

SPIF

F−0.5 −0.25 0 0.25 0.5

−0.5−0.25

00.25

0.5

X̂E

X̂T

−0.2 −0.1 0 0.1 0.205

101520

ΔX (pixel)E

rror

PDF

A B

C D

Fig. 3. Tracking error resulting from undersampling and its correction.(A) Gaussian PSF in the x direction with σ= 0.25 (blue curve). Dashed verticallines represent the boundaries of a pixel where the maximum of the PSF islocated. Over 90% of the intensity is located within a single pixel. (B) SPIFF(x direction) for locations obtained by Eq. 6 (red) and SPIFF (black) for cor-rected locations. (C) g−1 as obtained from simulated data (thick line) and forthe identity function expected for an unbiased tracking algorithm (dashedline). (D) Error probability density function for estimated (red) and corrected(black) locations. The error values are computed by comparison with the truepositions of the particles (i.e., ΔX is the difference between the blue solidand black dashed lines in C). The distribution of the errors for correctedlocations is centered at 0 and has a second moment of 10−7 pixels2.

224 | www.pnas.org/cgi/doi/10.1073/pnas.1619104114 Burov et al.

Dow

nloa

ded

by g

uest

on

July

1, 2

020

Page 5: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

Noise and the CRLBAlthough we have shown that the SPIFF enables nearly perfectreconstruction of particle positions in the absence of noise, thepresence of noise limits the certainty in the particle positions.This limit, known as the CRLB (31), depends on the PSF and thetype of noise present. For an unbiased estimator, the CRLB isVarðXTÞ≥ 1=IðXTÞ, where I(XT) is the Fisher information. Theunbiased CRLB is often used as the standard for evaluating parti-cle-tracking algorithms (32–36). In this section, we consider theeffect of noise on the performance of the SPIFF in correcting errorsand show that, because it is a biased estimator, it can actuallyachieve 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 ðk,mÞ is drawn randomlyfrom a Poisson distribution with a mean of NSIk,m +NB, where Nsis the total number of photons expected per particle (for the wholeimage), Ik,m is obtained from Eq. 4, and NB is the average intensityof the background noise. We set NB to be 10 photons (per pixel),similar to other studies (34), and we study the performance of thealgorithm as we vary NS from 102 to 2× 104 photons (per image).We then estimate the particle positions by applying the Crocker–Grier method with the SPIFF correction. The results are shown inFig. 5. In Fig. 5A the optimal window size (SI Appendix, section VI)was used for each particle size (σ), and we see that the precision is

close to the CRLB. In Fig. 5B we observe the case of a minimalwindow size (w= 1), which is relevant for Using the SPIFF toCorrect Bias in Tracked Positions, Intensity Overlap of AdjacentObjects. We see that for some particle sizes (σ values) our methodachieves better precision than the unbiased CRLB. This is possiblebecause the Crocker–Grier algorithm is biased.We now want to understand this result mathematically. In

general, the Cramér–Rao bound is given by

VarðXTÞ≥ ðdhgðXTÞi=dXTÞ2IðXTÞ , [7]

where IðXTÞ is the Fisher information as above, and hgðXTÞi is theoutput of the tracking algorithm (the subpixel part of the positionestimate), averaged over noise. In the case of an unbiased algo-rithm, there is a one-to-one mapping between the true positionsand the output of the tracking algorithm, so the numerator onthe right-hand side is 1. For a biased estimator, we can havejdhgðXTÞi=dXTj≤ 1. Specifically, for the case of the Crocker–Grieralgorithm, we have seen that the algorithm systematicallybiases the positions toward the center of the pixel, such thatjdhgðXTÞi=dXTj≤ 1. By itself, this increase in precision is not use-ful because the accuracy is lower. However, when we correct theresults with the SPIFF, we are able to remove the systematic errorand take advantage of the decrease in variance implied by thebiased CRLB. The SPIFF actually mitigates this decrease, butnot so much as to lose the effect. In this way, we exceed theunbiased CRLB and thus the performance of most tracking algo-rithms. In this regard, it should be noted that maximum-likelihoodmethods also approach the CRLB (34), but they are computation-ally costly. Here, we achieve comparable or better results withminimal computational effort—both the Crocker–Grier algorithmand the SPIFF correction are fast. A more extended discussion ofthe role of noise and the removal of its effects can be found in SIAppendix, section VII.

ConclusionsAlgorithms that use information from PSFs to localize emitterswith subpixel resolution now play an essential role in many dif-ferent areas of science (3, 27, 30, 37–40). Here we propose asimple validation method that only requires knowledge of theestimated particle positions. Our approach is based on theSPIFF. Because the positions of the objects being imaged areindependent of the detection system, the SPIFF is a uniformdistribution when the tracking algorithm is unbiased. The SPIFF isessentially a measure of pixel locking (24), and we show how its

−0.5 −0.25 0 0.25 0.5

0.8

1

1.2

SPIF

F

−0.2 −0.1 0 0.1 0.20

5

10

−0.5 −0.25 0 0.25 0.50

2

4

SPIF

F

−0.5 −0.25 0 0.25 0.50

1

2

Erro

rPD

F

−0.5 −0.25 0 0.25 0.5

0.8

1

1.2

X (pixel)

SPIF

F

−0.2 −0.1 0 0.1 0.20

100

200

∆ X (pixel)

C

E

G

D

F

H

4 6 80

0.01

0.02

0.03

0.04

Distance (pixel)

PSF

SUM BA

Fig. 4. Tracking error resulting from PSF overlap of two particles and itscorrection. (A) Two different realizations of the system of two particles withGaussian PSF (σ= 1.96 pixels) and center-to-center distance of 15.2 pixels. Theintensity was scaled such that the pixel value with maximal intensity is equalto 1 (arbitrary units) and the overlap of the two PSFs is not detectable by eye.(B) Sum of the PSFs along the center-to-center distance showing nonzerointensity at the midpoint between the particles. (C and E) SPIFF for the es-timated particle positions (x direction) obtained with w = 9 (C) and w = 2 (E)in the center-of-mass algorithm. (D and F) Error probability density functionsfor the estimated positions, corresponding to C and E. (G) SPIFF after cor-recting the positions by inverting the mapping based on the SPIFF in E.(H) Error probability density function corresponding to G.

A B

Fig. 5. Precision of the corrected Crocker–Grier center of mass for simulateddata with experimental-like noise compared with the CRLB. The results areaveraged over 104 images; the number of photons is per image, not perestimating window. In each case the symbols represent the simulation resultsand the lines represent the unbiased CRLBs. (A) Positions are estimated withoptimal window sizes of 2σ × 2σ for each particle size (SI Appendix, sectionVI), as specified by σ in the Gaussian PSF: σ = 0.5 (red circles), σ= 1.5 (bluesquares), and σ =2.5 (black crosses), all in pixels. (B) Positions are estimatedwith a fixed window size of 3× 3 pixels ðw= 1Þ; σ = 1 (blue squares), σ = 1.5(red circles), and σ= 2 (black crosses).

Burov et al. PNAS | January 10, 2017 | vol. 114 | no. 2 | 225

CHEM

ISTR

YBIOPH

YSICSAND

COMPU

TATIONALBIOLO

GY

Dow

nloa

ded

by g

uest

on

July

1, 2

020

Page 6: Single-pixel interior filling function approach for ... · Single-pixel interior filling function approach for detecting and correcting errors in particle tracking Stanislav Burov

quantification can be used to invert the tracking algorithm map-ping to correct errors.Our key physical insight is that ergodicity of the physical pro-

cesses being imaged allows pooling information from multipletimes and/or emitters that compensates for limited sampling ofthe PSF over pixels (Nyquist–Shannon bias) and/or intensities(e.g., owing to a confounding background signal or nonsystematicnoise). This additional information allows us to introduce a uniquestrategy for treating errors that arise when pixel intensities derivefrom multiple emitters (10), which is common in dense systems(39). In such cases, we limit our use of image information to thepixels nearest to the peak intensities; although this introduces asystematic pixel-locking bias (error), we demonstrate how thateffect can be removed by integrating the SPIFF. Indeed, thisstrategy enables us to exceed the unbiased Cramér–Rao bound(11, 13) for a given signal-to-noise. The noise properties of thisstrategy differ fundamentally from those of the standard strategyof increasing the range of pixels included for each emitter. There isof course a limit to this procedure—if particles are too close, theirsignals cannot be separated, and the correction procedure ho-mogenizes the SPIFF but does not yield accurate positions. Wecharacterize this limit as a function of the width of the PSF and theextent of the noise in SI Appendix, Figs. S13–S15.Remarkably, our procedure for detecting and correcting sys-

tematic errors requires only the tracked positions and does notrequire explicit knowledge of the PSF or independent knowledgeof the extent to which the intensities from different emitters areoverlapping. We have illustrated our approach with the center-of-

mass method (4) owing to its popularity. However, our results aregeneral and applicable to the output from all tracking algorithms,regardless of the source of the data or the mathematical opera-tions performed.The main limitations of our approach are that the parti-

cle positions must be well sampled with respect to the pixelboundaries, and the particle positions must be consistently gen-erated from one pixel to another. We note that experimentalrealities (optical aberrations, variations in illumination and focus,etc.) can affect the latter. In our experience, proper calibration ofthe imaging system can mitigate these issues sufficiently to con-struct the SPIFF, but there are other situations that we have notexplored and therefore for which we cannot guarantee the accu-racy of the error correction (e.g., tracking 3D data where the fo-cusing and relative particle positions create new challenges). It isalso important to note that the SPIFF correction we propose doesnot solve all problems related to extraction of data from trajec-tories. For example, it is not designed to deal with nonsystematicerrors such as those that arise from mixing of information com-ing from different sources. Nevertheless, we believe that manyexperiments will be in a regime that permits application of theSPIFF approach.

ACKNOWLEDGMENTS.We thank Yael Roichman for bringing existing work onpixel locking to our attention. This work was supported by The University ofChicago Materials Research Science and Engineering Center [National ScienceFoundation (NSF) Grant DMR-1420709]. B.L. acknowledges support fromChemMatCARS supported by NSF Grant CHE-1346572. N.F.S. is a Departmentof Defense National Security Science Engineering Faculty Fellow.

1. Born M, Wolf E (1999) Principles of Optics: Electromagnetic Theory of Propagation,Interference and Diffraction of Light (Cambridge Univ Press, Cambridge, UK).

2. Novotny L, Hecht B (2006) Principles of Nano-Optics (Cambridge Univ Press, Cam-bridge, UK).

3. Thompson RE, Larson DR, Webb WW (2002) Precise nanometer localization analysisfor individual fluorescent probes. Biophys J 82(5):2775–2783.

4. Crocker JC, Grier DG (1996) Methods of digital video microscopy for colloidal studies.J Colloid Interface Sci 179:298–310.

5. Liebe CC (2002) Accuracy performance of star trackers—A tutorial. IEEE Trans AerospElectron Syst 38:587–599.

6. Yildiz A, et al. (2003) Myosin V walks hand-over-hand: Single fluorophore imagingwith 1.5-nm localization. Science 300(5628):2061–2065.

7. Qu X, Wu D, Mets L, Scherer NF (2004) Nanometer-localized multiple single-moleculefluorescence microscopy. Proc Natl Acad Sci USA 101(31):11298–11303.

8. Betzig E, et al. (2006) Imaging intracellular fluorescent proteins at nanometer reso-lution. Science 313(5793):1642–1645.

9. Rust MJ, Bates M, Zhuang X (2006) Sub-diffraction-limit imaging by stochastic opticalreconstruction microscopy (STORM). Nat Methods 3(10):793–795.

10. Burnette DT, Sengupta P, Dai Y, Lippincott-Schwartz J, Kachar B (2011) Bleaching/blinking assisted localization microscopy for superresolution imaging using standardfluorescent molecules. Proc Natl Acad Sci USA 108(52):21081–21086.

11. Parthasarathy R (2012) Rapid, accurate particle tracking by calculation of radialsymmetry centers. Nat Methods 9(7):724–726.

12. Stallinga S, Rieger B (2010) Accuracy of the gaussian point spread function model in2D localization microscopy. Opt Express 18(24):24461–24476.

13. Mortensen KI, Churchman LS, Spudich JA, Flyvbjerg H (2010) Optimized localizationanalysis for single-molecule tracking and super-resolution microscopy. Nat Methods7(5):377–381.

14. Berglund AJ, McMahon MD, McClelland JJ, Liddle JA (2008) Fast, bias-free algorithmfor tracking single particles with variable size and shape. Opt Express 16(18):14064–14075.

15. Andersson SB (2008) Localization of a fluorescent source without numerical fitting.Opt Express 16(23):18714–18724.

16. van Loenhout MTJ, Kerssemakers JWJ, De Vlaminck I, Dekker C (2012) Non-bias-lim-ited tracking of spherical particles, enabling nanometer resolution at low magnifi-cation. Biophys J 102(10):2362–2371.

17. Alexander BF, Ng KC (1991) Elimination of systematic error in subpixel accuracycentroid estimation. Opt Eng 30:1320–1331.

18. CheezumMK, Walker WF, Guilford WH (2001) Quantitative comparison of algorithmsfor tracking single fluorescent particles. Biophys J 81(4):2378–2388.

19. Harland CW, Bradley MJ, Parthasarathy R (2010) Phospholipid bilayers are viscoelastic.Proc Natl Acad Sci USA 107(45):19146–19150.

20. Chenouard N, et al. (2014) Objective comparison of particle tracking methods. NatMethods 11(3):281–289.

21. Saxton MJ (2008) Single-particle tracking: Connecting the dots. Nat Methods 5(8):671–672.

22. Feng Y, Goree J, Liu B (2007) Accurate particle position measurement from images.Rev Sci Instrum 78(5):053704.

23. Nobach H, Honkanen M (2005) Two-dimensional Gaussian regression for sub-pixeldisplacement estimation in particle image velocimetry or particle position estimationin particle tracking velocimetry. Exp Fluids 38:511–515.

24. Gao Y, Kilfoil ML (2009) Accurate detection and complete tracking of large pop-ulations of features in three dimensions. Opt Express 17(6):4685–4704.

25. Crocker JC, Weeks ER (2016) Explanation of tracking macros. Available at www.physics.emory.edu/faculty/weeks//idl/tracking.html.

26. Crocker JC, Hoffman BD (2007) Multiple-particle tracking and two-point micro-rheology in cells. Methods Cell Biol 83:141–178.

27. Cui B, Diamant H, Lin B, Rice SA (2004) Anomalous hydrodynamic interaction in aquasi-two-dimensional suspension. Phys Rev Lett 92(25 Pt 1):258301–258304.

28. Shannon CE (1949) Communication in the presence of noise. Proc Inst Radio Eng 37:10–21.

29. Verma R, Crocker JC, Lubensky TC, Yodh AG (2000) Attractions between hard colloidalspheres in semiflexible polymer solutions. Macromolecules 33:177–186.

30. Burov S, et al. (2013) Distribution of directional change as a signature of complexdynamics. Proc Natl Acad Sci USA 110(49):19689–19694.

31. Kay SM (1993) Fundamentals of Statistical Signal Processing: Estimation Theory(Prentice Hall, Englewood Cliffs, NJ), Vol 1.

32. Wernet MP, Pline A (1993) Particle displacement tracking technique and Cramer-Raolower bound error in centroid estimates from CCD imagery. Exp Fluids 15:295–307.

33. Ober RJ, Ram S, Ward ES (2004) Localization accuracy in single-molecule microscopy.Biophys J 86(2):1185–1200.

34. Smith CS, Joseph N, Rieger B, Lidke KA (2010) Fast, single-molecule localization thatachieves theoretically minimum uncertainty. Nat Methods 7(5):373–375.

35. Small AR, Parthasarathy R (2014) Superresolution localization methods. Annu RevPhys Chem 65:107–125.

36. Small A, Stahlheber S (2014) Fluorophore localization algorithms for super-resolutionmicroscopy. Nat Methods 11(3):267–279.

37. Weigel AV, Simon B, Tamkun MM, Krapf D (2011) Ergodic and nonergodic processescoexist in the plasma membrane as observed by single-molecule tracking. Proc NatlAcad Sci USA 108(16):6438–6443.

38. Tabei SMA, et al. (2013) Intracellular transport of insulin granules is a subordinatedrandom walk. Proc Natl Acad Sci USA 110(13):4911–4916.

39. Caswell TA, Zhang Z, Gardel ML, Nagel SR (2013) Observation and characterization ofthe vestige of the jamming transition in a thermal three-dimensional system. Phys RevE Stat Nonlin Soft Matter Phys 87(1):012303.

40. Gai M, et al. (2001) Location accuracy limitations for CCD cameras. Astron Astrophys367:362–370.

226 | www.pnas.org/cgi/doi/10.1073/pnas.1619104114 Burov et al.

Dow

nloa

ded

by g

uest

on

July

1, 2

020