## 2 Algorithm
### Third Step: Global Connection  
Based on the position and displacement of moving particles, it is easy to track them frame by frame to form a \"smooth chain\" for each moving particle. However, due to some imperfections such as the influence of moving bubbles and particle deformation due to rolling, the particle identification and matching procedure may fail, and as a result one complete chain may be falsely recognized as two or more sub-chains. These incomplete, sub-chains should be identified and connected; otherwise the flight time and flight length of a moving particle will be underestimated. [PERSON] et al. (2016) [23] have taken the global connection into account using Jonker-Volgenant algorithm [29]. The Jonker-Volgenant algorithm is more efficient in associating \"one-to-one\" relationship. However, it is difficult to decide whether the 'tracklet' is a broken or a complete one. In our experimental condition, particles move intermittently which means some 'tracklets' do not need to be associated. Commonly, a new chain entrained nearby a deposition chain. The Jonker-Volgenant algorithm may mismatching deposition 'tracklet' with a new entrained one. Hence, the global connection in this paper is more efficient which includes a pre-judgment of 'tracklet', associating broken chains with the NN algorithm and repairing the missing frames.  
A complete smooth chain typically exhibits minimal displacement at both ends. A broken chain, on the other hand, generally shows considerable displacement at either end. In the present study, most particles cannot move over one diameter between two consecutive frames. Hence, the criterion to determine complete or broken chain was set as one diameter.  
The broken chain also results in \"artificial deposition\" of a chain and entrainment of a \"new\" chain nearby in the next frames. Before reconnected broken chains by the NN algorithm, two threshold values in space and time should be set. When a \"new\" chain appears in the range of the average flight length \(L\) (the distance of one flight from entrainment to deposition) during the average flight time \(T\) (the duration of one flight), the nearest \"new\" chain and the present broken chain could be reconnected. Based on these characteristics, all the chains are checked, and the broken ones are connected through spline interpolation. Some short chains, usually fewer than one diameter, are identified as false chains and are directly deleted. The average flight time and flight length can be estimated by the empirical relationship published in the literature, e.g., [PERSON] et al. (2010) [11]. The proper frequency of this approach was discussed in the literature, e.g., [PERSON] et al. (2018) [32]. The higher limit of frequency should be specified to allow an active bed-load particle to move a \"discernable\" distance, preferably larger than a few pixels. Based on experience, the higher limit can be set as a product of particle velocity and image resolution. The low frequency may lead to mismatching of moving particles. As recommended by [PERSON] et al. (2018) [32], the lower limit of frequency is diverse of a tenth of flight duration.  
After above three procedures to reconnect broken chains, most \"artificial depositions\" can be reduced. However, some broken chains cannot be reconnected well. When a moving particle collides with the bed, the displacement between two successive images is often smaller than one diameter during this collision. Then if the particle was lost in the first two-step, this trajectory cannot be recognized as a broken chain. Hence, the collision of particles with bed cannot introduce new errors on this approach.  
Figure 7 shows the flow chart of the new algorithm, comprised of image pre-processing, image subtraction, image binarization, particle tracking, and global connection. The details of the flow chart are described above.