• No results found

Existing software for particle tracking

as being point-like, only a few pixels in diameter in the captured video image. Software created for PIV is not always ideal for colloidal studies, where the objects of interest can be much larger. For this reason, in this chapter I will focus on software that has been written specifically with colloidal studies in mind. At the end of the chapter, I review work on the study into particle dynamics in a Mathieu beam carried out by myself and my colleague, Carlos Lopez-Mariscal. This work led to a published paper, Orbital angular momentum transfer in helical Mathieu beams[5], and was the first work to be published from our group that used my tracking software. Over the next two chapters, we will see that the study of particle motion in novel beams constituted a large part of the work I have performed during my time at St Andrews and that the development of robust tracking software has helped enormously throughout these studies.

3.2

Existing software for particle tracking

Several particle tracking routines suited to colloidal studies are freely available in the public domain. A comparative study of the effectiveness of some different tracking routines, both free and commercial, has been published by Carter et al. [6]. For tracking fluorescent particles, a quantitative, comparative study has been performed by Cheezumet al.[7].

In the colloidal community, the most popular software for tracking particles from video sequences is probably that developed by John Crocker and David Grier in 1996 [8]. Their IDL program has since been expanded by Weeks [9] and has been given a new user inter- face by Smith [10]. Blair and Dufresne have implemented their routines in the MatLab programming environment [11] while Levy [12] has produced a Java-based solution using improvements suggested in 2005 by Sbalzarini and Koumoutsakos [13].

3.2.1

Local intensity maxima method

In this section I will briefly outline how the Crocker program and its derivatives work, because while they are all excellent for tracking particles with a high degree of accuracy, the approach has some shortcomings and a discussion is necessary in order to explain why I was motivated to write my own particle tracking software.

The Crocker approach has five distinct stages. In its first phase of operation the program processes the images in the video sequence to remove various artifacts. Re-sampling of the images is required to account for the fact that computer pixels are square and CCD pixels are generally rectangular, because the third phase of the program assumes the particles being tracked are spherical and have a rotationally symmetric profile. As we will see later, my program does not require particles to be spherical to accurately track their position, and so this phase is not required. The Crocker algorithm is good at establishing particle positions with sub-pixel accuracy, however in order for the program to perform effectively, the images must be preemptively spatial frequency filtered to remove both long-wavelength intensity variations due to uneven illumination across the sample and short-wavelength random noise that occurs during digitization in both the CCD camera and the frame grabber. This phase can be time consuming. If nanometer-scale sub-pixel accuracy is not essential, my program performs extremely well without requiring any pre-processing of the images at all. What is more, I found that my approach was so robust that for some experiments, such as studies of particle dynamics in a Bessel beam (chapter 4), I did not even need to fully filter out the illuminating laser light. This was incredibly useful because it allowed direct comparison of the particle trajectories with the image of the Bessel beam formed on the CCD surface.

Figure 3.1: The phases of image processing required by the Crocker approach to particle tracking [8]: (a) original image (after resampling), (b) image after spatial filtering and (c) after grayscale dilation has been applied. These time-consuming steps are not essential using my software.

The second phase of the Crocker program tags a pixel in the image as a possible particle location if no other pixel is brighter within a user-defined radius. The drawback of using this approach is that the physical characteristics of the imaging system must be chosen so that the particles appear to have a bright core (or, alternatively, a very dark core, in which

3.2. Existing software for particle tracking 64

case the image negative can be used). In reality, it may not always be the case that all of the particles under scrutiny meet this criterion. My approach does not place stringent rules on the appearance of the particles and so could be more useful under certain experimental circumstances where the Crocker imaging requirements are difficult to meet.

Assuming the particles have a bright core, to further restrict matches the Crocker algo- rithm requires that the particles’ intensity maxima must exceed a certain threshold value. The paper quotes the upper 30th percentile of the brightness of the entire image as the requirement for a candidate pixel. Finally, a grayscale dilation of each image is performed to establish which of the remaining bright pixels are the optimum candidates for particle positions (figure 3.1).

While the brightest candidate pixel in a locality is a good estimate for the centre of the sphere, sub-pixel accuracy can be achieved with a third phase of processing. If the candidate pixel is defined as having a position (x, y) in the image and is assumed to be close to the true location of the sphere (x0, y0), then a refined estimate for the sphere location

(x0, y0) = (x+ǫx, y+ǫy) can be calculated, where

   ǫx ǫy   = 1 m0 X i2+j2≤w2    i j   A(x+i, y+j) (3.1)

andA(x, y) is the pixel value at location (x, y) in the image. The normalising factor

m0= X

i2+j2≤w2

A(x+i, y+j) (3.2)

represents the integrated brightness over a sphere’s image after grayscale dilation. It is claimed that particles can be tracked laterally with an accuracy of 0.05 pixels, corresponding to an uncertainty of 10nmin the focal plane. Once sub-pixel positions have been established, a fourth phase then discriminates false particles by comparingm0 with a second moment m2, defined as m2= 1 m0 X i2+j2≤w2 i2+j2 A(x+i, y+j) (3.3)

particle in relative to the focal plane, facilitating three-dimensional tracking. The authors claim that particles can be tracked inzwith 10% of the accuracy of the lateral tracking. This method of measuring depth is only slightly more sophisticated than a previous suggestion by Kepler and Fraden [14] where particle depth is estimated by comparing the integrated intensity over the area of the particle’s image directly with a calibration table of values recorded at known particle heights.

The fifth and final stage of the Crocker program involves linking the established particle locations together to create independent trajectories over the video sequence for each particle under scrutiny. This linking phase is generally similar to the method employed in my program, which is discussed in more detail in section 3.4.7.

3.2.2

Particle tracking using rotational symmetry

Mats Kvarnstrom, a Swedish mathematician, has recently proposed a novel method for estimating the positions of spherical colloidal particles in the image plane [15]. His technique first requires a general method, such as the initial phases of the Crocker algorithm, to establish approximate particle locations. To achieve sub-pixel accuracy his solution is to then examine the region around the candidate pixel for the centre of maximum rotational symmetry. It is stated that this technique can establish transverse particle positions to between 0.02 and 0.10 pixels (corresponding to 3.6nm to 18nm) with the exact degree of accuracy depending on the particles’ positions relative to the focal plane.

This method is well-suited to tracking particles in three dimensions, because although the particles’ appearance can change as they move in or out of the focal plane, they retain a rotationally symmetric profile. Estimates of particle depth are obtained by comparing particle radial profiles with a series of templates recorded at known depths. Kvarnstrom suggests an uncertainty in the depth measurement of±2µm, which is larger than the un- certainties associated with the method suggested by Crocker [8]. An interesting aspect of using this method is its ability to estimate the positions of particles that have been partially occluded. As an example, in a system where particles are not confined to a two-dimensional plane, occlusion can happen as a second, higher particle drifts across the particle under scrutiny. The Crocker approach is not designed to cope with this kind of scenario, and my