## 1 Introduction  
Sediment transport in fluvial streams is an important topic in hydraulic and environmental engineering [1; 2; 3]. Though, it has drawn wide attention for over a century, the physics of bed-load motion at grain scale remains challenging to experimental efforts due to the excessive difficulty in instrumentation in such complex turbulence-particle-bed interaction [4; 5; 6; 7]. In recent years, the image-based sediment particle tracking methods have been proved repeatedly as a powerful quantitative tool for measuring kinematic parameters concerning bed-load transport at the grain scale, including particle velocity, flight length, entrainment/deposition rate, and the transport rate [8; 9; 10; 11; 12; 13; 14]. RGB-D sensors can also be used for measuring the surface of dry granular flows [15; 16]. Early researchers applied the particle tracking velocimetry (PTV) from the flow field measurement community directly to track particles at grain scale [17]. However, traditional PTV can identify the speed of particles, but not track the particle individual trajectories. The trajectory of sediment particles is the basis for obtaining many important variables in sediment dynamics, such as the number of active particles, particle velocity, length and duration of trajectory, distributions of entrainment, deposition and gliding particles. Most of the currently used particle trajectory tracking methods can be summarized as a two-step framework, i.e., identifies active particles in each image frame in the first step, and matches active particles between successive frames and obtains the Lagrangian paths in the second step [18; 19]. In the first step, the consecutive image subtraction and averaged-background subtraction are often used in changing background [19; 20; 21; 22] and static background [23; 24], respectively. In the second step, several algorithms have been developed for matching particles such as gray cross-correlation [13; 25], and the nearest neighbors minimal-distance method [23; 24; 26]. The two-step approach behaves effectively and efficiently for sparsely distributed particles measurement against transparent and uniform backgrounds, especially the side-view image or top-view image with a fixed bed [26; 27]. However, they usually perform poorly against complex background which usually is top-view image with mobile bed. The example is shown in Figure 1, which is an image from the experiment of bed-load regime with low transport intensity (the detail of the experiment is introduced in Section 4.1). There are three characteristics of this image: (i) moving particles are similar with static particles in shape and size; (ii) particles sparsely entrained and deposited from the bed; (iii) the background will change when particles entrained and deposited. When the channel bed composed of sediment with similar geometrical characteristics, the nearby particles in the background similar in shape may lead to mismatching when tracing the Lagrangian path of a sediment particle. The color points in Figure 1 shows the result of a typical two-step method, which marks the continuous sediment movement paths. The flow direction is from the bottom to the top. However, there are a large number of errors and missing Lagrangian paths in the results of these two-step methods by the naked-eyed verification. For example, some 'tracklets' (parts of entire trajectories) like 14#, 21#, 25#,29#, 39#, 56# and 74# (highlighted in white rectangle in Figure 1) are the trajectory of the same sediment particle. Errors and missing Lagrangian paths by the two-step methods will eventually result in the wrong number of active particles and the wrong positions for the entrainment and deposition and then underestimated particle flight length and duration. The number of active particles \(N\) is defined as the number of active particles between two consecutive images within the local area. Particle velocity  
Figure 1: An example of a two-step method. is the ratio of displacement and sampling interval between two consecutive images.