### Abstract

The moment method is an image analysis technique for subpixel estimation of particle positions. The total error in the calculated particle position includes effects of pixel locking and random noise in each pixel. Pixel locking, also known as peak locking, is an artifact where calculated particle positions are concentrated at certain locations relative to pixel edges. We report simulations to gain an understanding of the sources of error and their dependence on parameters the experimenter can control. We suggest an algorithm, and we find optimal parameters an experimenter can use to minimize total error and pixel locking. For a dusty plasma experiment, we find that a subpixel accuracy of or better can be attained. These results are also useful for improving particle position measurement and particle tracking velocimetry using video microscopy in fields including colloids, biology, and fluid mechanics.

The authors thank O. Arp and U. Konopka for providing codes and helpful discussions. They also thank R. Mutel, V. Nosenko, A. Piel, T. Sheridan, and E. Thomas, Jr. for helpful discussions. This work was supported by NASA and the U.S. Department of Energy.

I. INTRODUCTION

II. PIXEL LOCKING

III. MOMENT METHOD

IV. METHOD

A. Synthetic images

B. Errors in calculated particle positions

C. Parameters

V. RESULTS

A. Threshold

B. Spot radius

C. Intensity

D. Base line

VI. PRACTICAL PROCEDURE

VII. EXPERIMENTAL DEMONSTRATION

## Figures

Experimental bitmap images of a monolayer suspension of microspheres in a dusty plasma. Each bright spot corresponds to one particle. Here, (a) is of the original image from a digital camera and (b) is a magnified view, showing that a bright spot fills several pixels, while in (c) from an analog camera a bright spot fills about . Spot size depends on such factors as camera type and focusing. A particle’s position is calculated as the bright spot’s center; errors in this calculation are the topic of this article.

Experimental bitmap images of a monolayer suspension of microspheres in a dusty plasma. Each bright spot corresponds to one particle. Here, (a) is of the original image from a digital camera and (b) is a magnified view, showing that a bright spot fills several pixels, while in (c) from an analog camera a bright spot fills about . Spot size depends on such factors as camera type and focusing. A particle’s position is calculated as the bright spot’s center; errors in this calculation are the topic of this article.

Histogram of intensity values of pixels in the original experimental image of Fig. 1(a). The inset shows the same data with a logarithmic scale. The prominent peak, centered at , is due to noise in the camera.

Histogram of intensity values of pixels in the original experimental image of Fig. 1(a). The inset shows the same data with a logarithmic scale. The prominent peak, centered at , is due to noise in the camera.

Illustration of the method for calculating a subpixel map. First, a bitmap image (not shown here) is analyzed to yield a map (a) of particle positions. Second, the same positions are plotted relative to pixel edges in (b); these values are the fraction parts of the calculated positions. (c) An example subpixel map of particles, calculated from an experimental image [full view of Fig. 1(c)], reveals pixel locking as a tendency of calculated positions to be concentrated at favored positions including the center and edges of pixels.

Illustration of the method for calculating a subpixel map. First, a bitmap image (not shown here) is analyzed to yield a map (a) of particle positions. Second, the same positions are plotted relative to pixel edges in (b); these values are the fraction parts of the calculated positions. (c) An example subpixel map of particles, calculated from an experimental image [full view of Fig. 1(c)], reveals pixel locking as a tendency of calculated positions to be concentrated at favored positions including the center and edges of pixels.

Illustration of boundaries. In algorithms for calculating particle positions from a bitmap image, the first step is selecting the contiguous pixels to be used, as defined by a boundary (solid white line) that encloses them. The codes tested here differ only in the way they select boundaries. (a) In IMAGEJ, only contiguous pixels above a threshold are included in the boundary. (b) Code A and (c) code K use boundaries that are the smallest rectangles that enclose: all the contiguous pixels above the threshold in code A or the dashed contour produced by a 2D contour-plotting routine in code K.

Illustration of boundaries. In algorithms for calculating particle positions from a bitmap image, the first step is selecting the contiguous pixels to be used, as defined by a boundary (solid white line) that encloses them. The codes tested here differ only in the way they select boundaries. (a) In IMAGEJ, only contiguous pixels above a threshold are included in the boundary. (b) Code A and (c) code K use boundaries that are the smallest rectangles that enclose: all the contiguous pixels above the threshold in code A or the dashed contour produced by a 2D contour-plotting routine in code K.

Magnified images of bright spots. (a) Experimental image from a digital video camera. [(b) and (c)] Synthetic images, with a Gaussian profile centered on a known true position, here with two different spot radii. In generating synthetic images, we first choose the true position randomly and then calculate the intensity of each pixel using Eq. (5) so that it includes both signal and noise.

Magnified images of bright spots. (a) Experimental image from a digital video camera. [(b) and (c)] Synthetic images, with a Gaussian profile centered on a known true position, here with two different spot radii. In generating synthetic images, we first choose the true position randomly and then calculate the intensity of each pixel using Eq. (5) so that it includes both signal and noise.

The rms error of calculated positions as a function of the threshold . In general, errors increase with threshold, and superimposed on this increase is an oscillation. The rms errors are always calculated as in Eq. (6) using . (Here, units and intensity value units, corresponding to a total signal intensity . Also, .)

The rms error of calculated positions as a function of the threshold . In general, errors increase with threshold, and superimposed on this increase is an oscillation. The rms errors are always calculated as in Eq. (6) using . (Here, units and intensity value units, corresponding to a total signal intensity . Also, .)

Cause of oscillations. Boundaries, selected in the first step of IMAGEJ, enclose fewer pixels as the threshold is increased. Removing one pixel from the boundary causes a discrete jump in the calculated particle position in Eq. (2). As the threshold increases, there is a sequence of jumps, as the boundary becomes smaller, one pixel at a time. These jumps, in aggregate for many particles, lead to oscillations in the rms error as the threshold is varied, a phenomenon we term the boundary effect. The three columns correspond to three different true positions.

Cause of oscillations. Boundaries, selected in the first step of IMAGEJ, enclose fewer pixels as the threshold is increased. Removing one pixel from the boundary causes a discrete jump in the calculated particle position in Eq. (2). As the threshold increases, there is a sequence of jumps, as the boundary becomes smaller, one pixel at a time. These jumps, in aggregate for many particles, lead to oscillations in the rms error as the threshold is varied, a phenomenon we term the boundary effect. The three columns correspond to three different true positions.

Subpixel maps for randomly distributed true positions. The signature of pixel locking is generally more severe for higher thresholds. (Here, , , and .)

Subpixel maps for randomly distributed true positions. The signature of pixel locking is generally more severe for higher thresholds. (Here, , , and .)

Simulation of slight lens defocusing. The optimal range of spot size lies between two other ranges: for very small , errors worsen due to pixel saturation; for very large , they worsen due to random errors. For our parameters, these two ranges are for and , respectively. Oscillations in the optimal range arise from a boundary effect. (Here, , , and .)

Simulation of slight lens defocusing. The optimal range of spot size lies between two other ranges: for very small , errors worsen due to pixel saturation; for very large , they worsen due to random errors. For our parameters, these two ranges are for and , respectively. Oscillations in the optimal range arise from a boundary effect. (Here, , , and .)

The rms error as the intensity is varied, to simulate adjusting the illumination brightness, the exposure time, or the camera aperture. The main trend is that the error decreases with increasing intensity due to an improved signal-to-noise ratio (SNR), as indicated by solid curves; the opposite trend, indicated by dashed curves, is attributed to a pixel-locking effect that we term the pedestal effect. (Here, , , and .)

The rms error as the intensity is varied, to simulate adjusting the illumination brightness, the exposure time, or the camera aperture. The main trend is that the error decreases with increasing intensity due to an improved signal-to-noise ratio (SNR), as indicated by solid curves; the opposite trend, indicated by dashed curves, is attributed to a pixel-locking effect that we term the pedestal effect. (Here, , , and .)

Cross section of a bright spot, illustrating the “pedestal.” Pixels brighter than the threshold identify the boundary for IMAGEJ in the first step. In the second step, both shaded portions contribute to the calculated particle position if , i.e., if no base line is subtracted in Eq. (2). The lower shaded portion, marked “pedestal,” can heavily influence the calculated particle position. The pedestal can be reduced by choosing or eliminated altogether by choosing .

Cross section of a bright spot, illustrating the “pedestal.” Pixels brighter than the threshold identify the boundary for IMAGEJ in the first step. In the second step, both shaded portions contribute to the calculated particle position if , i.e., if no base line is subtracted in Eq. (2). The lower shaded portion, marked “pedestal,” can heavily influence the calculated particle position. The pedestal can be reduced by choosing or eliminated altogether by choosing .

Test of different base lines. The best choice to minimize rms error is subtracting a base line equal to the threshold in Eq. (2). (We used IMAGEJ and , , and .)

Test of different base lines. The best choice to minimize rms error is subtracting a base line equal to the threshold in Eq. (2). (We used IMAGEJ and , , and .)

Subpixel maps, using a base line for two different thresholds: (a) and (b) . Comparing these panels shows that the signature of pixel locking can be virtually eliminated, as in (a), by making the best choice of threshold as well as choosing . (Here, we used the same 100 000 images as in Fig. 8.)

Subpixel maps, using a base line for two different thresholds: (a) and (b) . Comparing these panels shows that the signature of pixel locking can be virtually eliminated, as in (a), by making the best choice of threshold as well as choosing . (Here, we used the same 100 000 images as in Fig. 8.)

Total error, using a base line . Comparing to Fig. 6 where , errors have been reduced. The lowest rms error that can be achieved with these images is 0.017, using the same optimal choice of parameters as in Fig. 13(a). We used the same 5000 images as in Fig. 6. (Here and in Fig. 13, we used IMAGEJ.)

Total error, using a base line . Comparing to Fig. 6 where , errors have been reduced. The lowest rms error that can be achieved with these images is 0.017, using the same optimal choice of parameters as in Fig. 13(a). We used the same 5000 images as in Fig. 6. (Here and in Fig. 13, we used IMAGEJ.)

Experimental bitmap images of a monolayer suspension of microspheres in a dusty plasma. Here, (a) is of the original image and (b) is a magnified view. A bright spot fills about . Compared to Fig. 1(a), the hardware was improved by slight lens defocusing.

Experimental bitmap images of a monolayer suspension of microspheres in a dusty plasma. Here, (a) is of the original image and (b) is a magnified view. A bright spot fills about . Compared to Fig. 1(a), the hardware was improved by slight lens defocusing.

Choosing the coarse range of threshold using experimental images. Counting the particles identified in 100 images, we choose the nearly flat portion as the coarse range. Outside this coarse range, many false particles appear at lower due to noise, while many true particles are missed at higher . Labels (a)–(h) identify thresholds used in Fig. 17.

Choosing the coarse range of threshold using experimental images. Counting the particles identified in 100 images, we choose the nearly flat portion as the coarse range. Outside this coarse range, many false particles appear at lower due to noise, while many true particles are missed at higher . Labels (a)–(h) identify thresholds used in Fig. 17.

Experimental subpixel maps for different thresholds within the coarse range. Here, (a) is an entire map and (b)–(h) show the lower left corner. We choose the lowest with a weak signature of pixel locking, 325. The signature is stronger for , with a concentration of calculated positions on pixel edges. Vastly better than Fig. 3(c), there is no obvious signature of pixel locking for . [Here, we used IMAGEJ with calculated from Eq. (7) and a dark-field image.]

Experimental subpixel maps for different thresholds within the coarse range. Here, (a) is an entire map and (b)–(h) show the lower left corner. We choose the lowest with a weak signature of pixel locking, 325. The signature is stronger for , with a concentration of calculated positions on pixel edges. Vastly better than Fig. 3(c), there is no obvious signature of pixel locking for . [Here, we used IMAGEJ with calculated from Eq. (7) and a dark-field image.]

Article metrics loading...

Full text loading...

Commenting has been disabled for this content