## 2 Algorithm
### Second Step: Particle Identification and Matching  
The image subtraction procedure is the foundation of determining the position of active particles. If the two patches of a moving particle are entirely separate, which is common in low-frequency measurement on a simple and transparent background, it is easy to obtain the position and size of a particle based on image binarization (Figure 3a). The high-frequency measurement will lead to the overlap of two patches (shown in Figure 3b). Direct binarization of the subtracted image entails bias errors for determining particle position, diameter and the displacement between two images (Figure 3b). To solve the overlapping induced problem, we propose a prediction-confirmation approach as follows. First, image-subtraction between image P1 and P2 and subsequent binarization of the subtracted image (P3) yields two centroids in two frames for one active particle, as shown in Figure 4a-c, respectively. These two centroids shown in Figure 4c represent real particle centers in the classic two-step methods. However, they act only as a reference prediction in this method. Second, all the particles within a distance of 1.5 times particle diameter to the centroid recognized in the first image are identified, and their centers can be obtained by direct binarization of P1 shown as blue rounds in Figure 4a,b. The red square in Figure 4a,b represents the searching area of identifying the centroids. The searching distance is determined by frequency and particle shape, which should be slightly larger than the possible maximum distance between two images. As particles cannot move over 1 diameter based on the experimental condition in this paper, the distance should be set as 1 diameter. Moreover, considering irregular shape, 1 diameter may not cover one whole particle, then 1.5 times diameter is  
Figure 3: Sketch of moving particles in two successive frames with (**a**) low frequency, and (**b**) high frequency. The dashed and solid circles represent particles in the first and second frames, respectively. The solid round represents a real particle center, and the circle is the particle centroid based on the subtraction procedure. Figure 2: (**a**) Raw image and (**b**) pre-processed image. selected. The nearest position is then determined to be the real centroid of an active particle. The blue rounds are the re-recognized centroid of the particle, which are closer to the real center of particles. Once the information of position and size of moving particles are available in each frame, these particles can be matched in consecutive images through Kalman filter. Specific steps are as follows. (1) Calculation of the cross-correlation coefficients \(\mathrm{Cv}\). The diagnostic windows, \(W_{1}\) in the first frame and \(W_{2}\) in the second frame, are identical in size, equal to the major axis of the particle(white square in Figure 4). The accurate centroid makes sure that the diagnostic window includes the most particle information and little background gray value. It improves the accuracy of the cross-correlation. \(W_{1}\) is centered around \((x_{1},y_{1})\), and \(W_{2}\) is centered around the variates \((x_{2},y_{2})\) where  
\[x_{2}\in[x_{1}-dx,x_{1}+dx],y_{2}\in[y_{1},y_{1}+dy] \tag{1}\]  
in which \(dx\) and \(dy\) represent variable distances from the center of \((x_{1},y_{1})\) in spanwise and streamwise directions, respectively. By varying the center position, a series of \(W_{2}\) can be obtained and the corresponding gray correlation coefficients \(Cv\) between \(W_{1}\) and \(W_{2}\) are calculated. The maximum values of \(dx\) and \(dy\) are determined by the maximum distance of moving particles between two successive images in two directions, written as \(aD\) and \(bD\) separately. The factors \(a\) and \(b\) depend on frequency \(f\), camera resolution \(R\), particle velocity \(U\) and, particle diameter \(D\). As the average particle displacement in streamwise is restricted to less than one particle diameter, i.e., \((U\!\!/\! )R<1D\), then \(a=1\).