Identifying the optimal spatial distribution of tracers for optical sensing of stream surface ﬂow

. River monitoring is of particular interest as a so-ciety that faces increasingly complex water management issues. Emerging technologies have contributed to opening new avenues for improving our monitoring capabilities but have also generated new challenges for the harmonised use of devices and algorithms. In this context, optical-sensing techniques for stream surface ﬂow velocities are strongly inﬂuenced by tracer characteristics such as seeding density and their spatial distribution. Therefore, a principal research goal is the identiﬁcation of how these properties affect the accuracy of such methods. To this aim, numerical simulations were performed to consider different levels of tracer clustering, particle colour (in terms of greyscale intensity), seeding density, and background noise. Two widely used image-velocimetry algorithms were adopted: (i) particle-tracking velocimetry (PTV) and (ii) particle image velocimetry (PIV). A descriptor of the seeding characteristics (based on seeding density and tracer clustering) was introduced based on a newly developed metric called the Seeding Distribution This index


Introduction
Streamflow observations are of enormous importance for environmental protection and engineering practice in general (Anderson et al., 2006;Manfreda, 2018;Manfreda et al., 2020;Owe, 1985). Such observations are critical for many hydrological and hydraulic applications. In turn, these data contribute to the understanding of more complex processes such as flash flood dynamics (Perks et al., 2016), the interaction of fish upstream and downstream of dams (Strelnikova et al., 2020), sediment transport dynamics (Batalla and Vericat, 2009), and bridge scour (Manfreda et al., 2018a;Pizarro et al., 2017a).
Streamflow measurement campaigns are generally expensive and time-consuming, requiring the presence of highly qualified personnel and forward planning (Tauro et al., 2018). Such approaches are typically based on pointwise measurements performed with flowmeters or acoustic Doppler current profilers (ADCPs) that require the direct placement of the operators or devices into the water. On the one hand, this is necessary to provide a full description of the flow velocity profile, but on the other hand, these field methods might alter the measurements given the potential interaction of these elements with the flow. Additionally, these standard approaches can be challenging and sometimes impossible to perform under flood conditions, when operators and devices are unable to work in situ due to unfavourable circumstances.
A. Pizarro et al.: Identifying the optimal spatial distribution of tracers for optical sensing This issue has been partially dealt with by the use of noncontact approaches as a modern alternative for river flow monitoring. Progress in the development of non-contact approaches (such as image velocimetry, radars, and microwave systems) has been promising in recent years, opening the possibility for real-time, non-contact flow monitoring. In particular, advancements in image processing techniques have led to improvements of image-based approaches for surface flow velocity (SFV) estimation, and these developments have expanded the range of potential applications. Several techniques, such as particle-tracking velocimetry (PTV) and particle image velocimetry (PIV), have been proposed and applied in field campaigns to accurately estimate SFV from video acquisitions (Bechle et al., 2012;Huang et al., 2018;Tauro and Salvatori, 2017). In turn, videos can be recorded from different devices (fixed station located close to the river section of interest; cell phones; or onboard unmanned aerial systems, UASs), allowing an easy and portable way to estimate SFVs and, consequently, river discharge (Kinzel and Legleiter, 2019;Leitão et al., 2018;Manfreda et al., 2018b;Pearce et al., 2020;Perks et al., 2016;Tauro et al., 2015).
The PTV technique revolves around particle identification and tracking (Lloyd et al., 1995) that can be implemented through cross-correlation (Brevis et al., 2011;Lloyd et al., 1995) and relaxation (Wu and Pairman, 1995) among other methods. Additionally, particle trajectories can be reconstructed, adding valuable information to the analysis and making it possible to apply trajectory-based filters to ensure realistic trajectories (Eltner et al., 2020;Tauro et al., 2019). On the other hand, PIV recognises and tracks patterns (which can be a group of tracers within a discrete spatial portion of the water surface) instead of single tracers, which are tracked in PTV (Adrian, 1991(Adrian, , 2005Peterson et al., 2008;Raffel et al., 2018). As a consequence, PTV adopts an exclusively Lagrangian approach, while PIV employs an Eulerian one. This technique is also named LSPIV when it is applied to large scales and natural environments (Fujita et al., 1998).
The use of these techniques has been growing in recent years, but it is hard to quantify their accuracy at field scales. This difficulty can be attributed to (i) environmental conditions, which can both deteriorate and enhance the image quality during the acquisition period (Le Coz et al., 2010;Muste et al., 2008), and (ii) the characteristics of the tracers or features, such as colour, dimension, shape, seeding density, and their spatial distribution in the field of view (Dal Sasso et al., 2018Raffel et al., 2018). PTV and PIV need features to identify, match, and track to compute surface flow velocities. High seeding densities are, however, rare in natural environments, and, as a consequence, a common practice is the use of artificial tracers to increase the surface seeding in the field of view (Dal Sasso et al., 2018;Tauro et al., 2014. In this context, Fig. 1 shows three different real case study examples of natural and artificial seedings that tend to cluster. Remarkably, Fig. 1a reports high spatialclustering levels of tracers and complex structures during a flood event at the Tiber river in Italy , whereas Fig. 1b and c present the case when artificial seeding is introduced in the river system for image-velocimetry analysis (Detert et al., 2017;. More information about the mentioned case studies can be found elsewhere (Perks et al., 2020).
The spatial distribution of artificial tracers (hereafter called spatial clustering) is, however, operator-dependent and influenced by their experience, the type of material deployed, and the amount. External environmental and river conditions such as wind and turbulence are also important factors. This issue is extremely relevant for discharge estimates recovered through image-based approaches because velocity errors are transmitted to streamflow estimates. As a consequence, and even when using up-to-date approaches, monitoring complex flows and extreme flood events is still a challenge.
This paper aims to quantify the accuracy of SFV estimates under different seeding densities and spatial-clustering levels. To achieve this goal, the following objectives were proposed: (i) perform numerical simulations of synthetic tracers to produce 33 600 synthetic images with known seeding characteristics; (ii) using these synthetic images, derive a functional relationship between seeding densities, spatialclustering levels, and image-velocimetry errors under controlled conditions; (iii) analyse footage acquired from the Basento river to determine how variations in seeding characteristics such as seeding density and spatial clustering of tracers influence the image-velocimetry errors in a field environment. Finally, (iv) apply the function developed in (ii) to the Basento river to enable the selection of the optimal image frame sequence and minimise the velocity errors.
The rest of the paper is organised as follows: Sect. 2 presents the numerical framework for synthetic image generation; a description of the hydrological characteristics of the Basento case study, which is used as a proof of concept; and an outline of the PTV and PIV techniques adopted in the analysis. Section 3 analyses the effects of seeding density and spatial-clustering level on image-velocimetry results using the synthetically generated images and those of the Basento field case study. Section 4 presents the strengths and limitations of the research and framework adopted in this paper. Conclusions are provided in Sect. 5.

Numerical simulations
Numerical simulations were performed to test two different image-velocimetry algorithms under controlled conditions, minimising the effects of external disturbances. In particular, the influence of tracer or feature properties on the final errors was quantified. Synthetic tracers were randomly distributed in space with a unidirectional and constant velocity. They consist of uniform circular shapes with diam- Figure 1. Examples of moving and clustering structures on the water surface: (a) natural seeding during a flood event at the Tiber river, Italy ; (b, c) artificial seeding at low and intermediate flow conditions at Brenta river in Italy  and Murg river in Switzerland (Detert et al., 2017), respectively.
eter Dxp ≈ 10 px (pixels) and uniform white colour. Both diameters and colours -in greyscale intensity -were altered with white noise in order to consider more realistic configurations. Their spatial distribution was controlled by a generalised Poisson distribution (GPD) with an imposed numerical seeding density λ and spatial-clustering level υ.
The GPD was first introduced by Efron (1986), allowing the possibility to obtain point events randomly distributed in space with a given variance. The GPD has been used to model randomly distributed events in different studies and describe the spatial characteristics of the landscape and vegetation organisation across climatological gradients (e.g. Good et al., 2013;Manfreda et al., 2017). In this paper, the synthetic tracers are assumed to be randomly distributed in space with a mean number λS, where S is the considered area. As a consequence, the probability mass function that the random number of synthetic tracers N will be equal to a number n i is given by Eq. (1), where λS and υ determine the location and the shape of f GPD(λS) (n i ), and C GPD is an integration constant. Tracers moved with a constant numerically imposed velocity of 15 px per frame along the y axis and within a grid of 500 px × 500 px on a clear water background as representative of real environmental conditions. Tracer diameter was set to be larger than 2.5 px in order to avoid peak locking effects (Cardwell et al., 2011;Dal Sasso et al., 2018;Nobach et al., 2005). Typical tracer dimensions at laboratory and field scales motivated the choice of Dxp ≈ 10 px for imagevelocimetry experiments (Tauro et al., 2016).
Synthetic image sequences were generated by varying the number of tracers in the spatial domain, allowing the consideration of 14 different seeding densities ranging from 0.4 × 10 −5 ppp (particles per pixel) up to 1.0 × 10 −2 ppp. This range of variability was established based on the typical values adopted in field surveys  and numerical studies (Dal Sasso et al., 2018). Tracer colour (in terms of greyscale intensity) and diameter were altered (by introducing Gaussian white noise with standard deviations equal to 0.05 and 0.3, respectively) to simulate environmental signal noise such as possible changes in luminosity, brightness, and shadows. Figure 2 shows an example of synthetic images generated with different spatial-clustering levels and a fixed value of seeding density. In particular, the spatial distribution of tracers moves from an overdispersed organisation (υ = 0.5), through a Poisson random distribution (υ = 1) and an underdispersed one (υ = 100), to a super underdispersed distribution (υ = 200). Furthermore, each numerical experiment involved generating 20 images, and each configuration was run 10 times. The spatial-clustering level ranges from 0.5 to 200 (12 different values), and as a consequence, 33 600 synthetic images were generated (14 different λ, 12 different υ, 20 images per configuration, and each configuration 10 times).

Proof of concept: the Basento case study
A field survey on the Basento river (Basilicata region, southern Italy) was carried out to test the outcomes of numerical simulations under natural conditions. The cross section considered for the measurements is located in the upper portion of the basin (catchment area of about 127 km 2 ; Fig. 3). The main river flow characteristics at the time of video acquisition were (i) river discharge (0.61 m 3 s −1 ), (ii) maximum flow depth (0.38 m), (iii) river width (6.0 m), (iv) maximum surface flow velocity (0.68 m s −1 ), and (v) average surface flow velocity (0.40 m s −1 ). Data were acquired using a DJI Phantom 3 Professional Quadcopter (DJI, Shenzhen, China) equipped with an integrated 4k UHD (ultrahigh-definition) video-recording camera and a three-axis stabilised system. Video acquisition was performed using a Sony EXMOR 1/2.3 complementary metal oxide semi-  d, h). Fixed value of the seeding density λ = 2.02 × 10 −3 . The generation was carried out adopting a background in the images to provide more realistic conditions (a-d). Thereafter, images have been preprocessed to increase the contrast and better visualise tracers (e-h). conductor (CMOS) sensor, and a greyscale video was captured from the UAS platform with a resolution of 1920 px × 1080 px (i.e. full high definition, FHD). The frame rate was set to 24 frames per second (fps). Reference objects, useful for image scale calibration and stabilisation, were positioned at visible locations on the riverbanks. The calibration factor converting pixels to metres was estimated, taking into consideration those objects with known a priori dimensions. The ground sampling distance (GSD) was, therefore, computed as 0.005 m px −1 . Benchmark velocity measurements were performed using a current meter (SEBA F1, SEBA Hydrometrie GmbH & Co, Kaufbeuren, Germany) in the proximity of the water surface at 11 different locations across the river cross section. The accuracy of measurements was within 2 % of the measured values, corresponding to 0.001 and 0.013 m s −1 for the minimum and maximum velocities in question. The spanning distance between the respective measurements was 0.5 m. Each measurement was made over a fixed acquisition period of 30 s. River discharge was estimated according to ISO 748 (1997) using the velocity-area method. The cross section was divided into panels of equal width, and, for each panel, the velocity was measured at 20 %, 60 %, and 80 % of the panel depth. Artificial seeding was deployed onto the water surface, giving the possibility to create complex floating structures. Two operators were involved in the process, and artificial tracers made of wood chips were used to enhance particle seeding in the region of interest (ROI).
The videos captured with the UAS were first stabilised using an automatic feature selection method that identifies features in frame pairs, matching them to compute possible values of translation and rotation. The Features from Accelerated Segment Test (FAST) detection algorithm was applied to identify features in an ad hoc ROI. To improve the feature-matching accuracy at each step, the method utilises the random sample consensus (RANSAC) filter to remove unacceptable correspondences. The application of the stabilisation algorithm allowed the effects of camera movements to be reduced throughout the duration of the video. Planar errors considering differences in translation and rotation were computed, taking the first frame as the reference target. On average, the reduction due to the stabilisation process goes from 64 to 7 px for the Basento case study. Therefore, movement in the original video is reduced by around 89 %. The stabilisation algorithm does not require ground control points (GCPs) to be applied. Rather, it performs the detection of features automatically, making the stabilisation process a good alternative for unexperienced users.
The Basento river presented low-flow conditions, leading us to subsample the original video from 24 to 12 fps. The choice of the appropriate frame rate was made to ensure, on the one hand, a frame-by-frame displacement bigger than the particle dimensions and, on the other hand, to minimise the effects of camera movement between frame pairs on the calculation of surface velocity. The footage was acquired in greyscale, and a preprocessing procedure was applied using contrast-stretching techniques to enhance the visibility of the artificial tracers against the background. For this purpose, GIMP (the GNU Image Manipulation Program) was utilised to adjust brightness and contrast. This procedure eliminated a large amount of noise caused by external reflections, improving the number of tracers identified and thus cross-correlation in the ROI. Figure 3b shows a composite example of the original frame in greyscale, overlain by a preprocessed image covering the extent of the active channel (darker area overlapping the original frame).

Image-velocimetry analysis
PTV analyses were carried out by employing a commandline version of PTVLab software (Brevis et al., 2011) that was automated in order to handle the number of synthetic images. Tracer detection was performed using the particle Gaussian mask correlation method (Ohmi and Li, 2000). Parameters for particle diameter and reflectance intensity were set equal to 8 px and 70, respectively. Particle tracking was implemented using a cross-correlation algorithm (Wu and Pairman, 1995). The interrogation area (IA) was set at 20 px, cross-correlation threshold at 0.7, and neighbour similarity percentage at 25 %. PTV parameter settings were slightly modified under field conditions due to the differences between the numerical and field datasets. In particular, the average tracer dimension in the field conditions was estimated as 5 px, and therefore, the particle diameter was set equal to 4 px and the IA to 25 px.
PIV analyses were performed by employing a commandline version of PIVLab software (Thielicke and Stamhuis, 2014). The PIV algorithm was applied for both numerical and field analysis using the fast Fourier transform (FFT) with a three-pass standard correlation method (search and interrogation areas of 128 px × 64 px, 64 px × 32 px, and 32 px × 16 px and with 50 % overlap). Additionally, the 2 point × 3 point Gaussian fit was employed to estimate the subpixel displacement peak. These parameters were carefully chosen to ensure correct identification and tracking of synthetic tracers.
Finally, the quality of the results was determined by examining the magnitude of the errors that were computed as where u C is the computed velocity, and u R is the numerically imposed (numerical case taken as reference) or measured (field case) velocity.
3 Results and discussion

Numerical analysis
The performance of PTV and PIV tracking algorithms was assessed by the calculation of errors (considering the imposed numerical surface velocity) to test how the seeding density and spatial distribution of tracers influenced the final velocity estimates. No postprocessing method was applied to filter the spatio-temporal velocity results. The ROI was taken as the original dimension of the synthetic image generation, i.e. 500 px×500 px. The processing times, considering all the synthetically generated images, for PTV and PIV analyses were 18 548 and 4736 s, respectively. The same hardware (i7-8700 CPU at 3.20 GHz and 32 GB RAM) was used for both image-velocimetry analyses, leading to a fair comparison between them. PTV computing time was almost 4 times higher than PIV under the circumstances considered in this study. For all cases, PTV and PIV techniques systematically underestimated the imposed numerical velocity independently of the seeding density and spatial-clustering level under consideration. Consequently, only negative errors were observed with numerical results, in agreement with previously published work (Dal Sasso et al., 2018). This can be due to the use of a static background that may introduce sporadic zerovelocity vectors. Figure 4 shows the PTV and PIV error results with different values of seeding densities and spatialclustering levels. A comparison between PTV and PIV is shown in Fig. 4a, where each data point is associated with a colour that is scaled based on the numerically imposed seeding density adopted in the generation of synthetic images. A strong dependence between image-velocimetry results and seeding density was observed: errors can be reduced by increasing the seeding density. In all cases, PTV outperformed PIV under the synthetic conditions analysed in this study. These findings also support those of , who found that PTV outperformed PIV in two different field case studies (Brenta and Tiber rivers). It is, however, noteworthy that the results we present here refer to a single synthetic experiment that, although realistic, is not representative of any field condition. Therefore, further investigation with a larger set of idealised and field circumstances should be carried out to generalise the obtained results. Figure 4b shows the envelope error curves (and areas between them) for a range of seeding densities and level of spatial clustering ν. The blue and orange colours are associated with PTV and PIV error results, while dashed and solid lines are associated with ν = 0.5 and ν = 200, respectively. For the sake of simplicity, Fig. 4b only shows the extreme cases, when ν = 0.5 and ν = 200; nevertheless, all the other cases (with ν values between these two extremes) were confined within these envelope curves. Error results of both techniques were influenced by ν, with a higher spatialclustering level tending to deteriorate the accuracy of imagevelocimetry results, producing higher errors and associated variability across the range of seeding densities. When the sensitivities of PIV and PTV to changes in ν are compared, PIV is generally more sensitive than PTV, as demonstrated by the greater distance between ν = 0.5 and ν = 200 lines for a given seeding density and by the shaded orange area being greater than the blue. The minimum seeding density leading to the lowest errors (around 2 %-3 %) depended on ν. These errors were taken as reference values after which an asymptotic behaviour was observed. As a consequence, this minimum seeding density concept is termed reference seeding density in the rest of the paper. For instance, considering the PIV case, the reference seeding density values were 1.52 × 10 −3 and 1.02 × 10 −2 ppp for ν = 0.5 and ν = 200, respectively. The reference seeding density values for PTV were 1.02 × 10 −3 and 2.02 × 10 −3 ppp for ν = 0.5 and ν = 200, respectively.
These numerical results are useful to visualise more-indepth trends under controlled flow conditions, avoiding external disturbances. Results demonstrated that the minimum required seeding density to produce an error equal to or lower than 3 % differs slightly between the two techniques. We used this percentage as a reference error in order to derive a reference seeding density associated with a known error. It was observed that PIV required 1.52 × 10 −3 ppp, while PTV needed about 1.02 × 10 −3 ppp to reach the same error. Notably, seeding densities lower than 1.0×10 −3 ppp produced larger errors (larger than 3 %), and consequently, flows should be seeded at least at this density in field campaigns for optimal implementation of the methods. This practice should be adopted if at all possible since typical natural flows are not characterised by abundant transiting features, with maybe the exception of high flows. Furthermore, the effective seeding density (defined as the seeding that the algorithms are genuinely able to identify, match, and track) is always lower than the one transiting onto the water surface, and therefore, extra seeding is recommended practice. However, we are aware that this recommendation might not be practical in all conditions since fixed cameras can operate remotely without the necessity to be in person at the field site, and deploying material in wide channels or difficult-to-access areas might be challenging.
Following dimensional considerations, a model of the image-based errors can be formulated. Since the only variables considered in this study were the spatial-clustering level and the seeding density, it is hypothesised that these errors depend on only these variables. In functional form, this gives where f is a generic function, and ρ and ρ cν1 are the seeding density and the reference seeding density at ν = 1 (Poisson case taken as a reference). According to the Buckingham π theorem, Eq.
(3) can be rewritten in terms of dimensionless parameters as follows: The function f is usually considered as a multiplication of power laws (Buckingham, 1914;Evans, 1972;Melville and Sutherland, 1988;Pizarro et al., 2017b). In this study, we partially follow this approach and also hypothesise that the functional relationship f is described by a two-parameter exponential function: where the SDI (Seeding Distribution Index) is the multiplication of power laws, and c 1 , c 2 , k 1 , and k 2 are fitting coefficients. Model performance was quantified by means of the root mean square error (RMSE) and the Nash-Sutcliffe efficiency (NSE) for prediction of the image-velocimetry errors. In turn, the fitting coefficients were calibrated using the MATLAB genetic algorithm optimising RMSE. Table 1 summarises the results of the calibration process for both PTV and PIV, while Fig. 5 shows the image-velocimetry errors as a function of the SDI and observed versus computed errors. Figure 5 indicates that the SDI can correctly reproduce the main dynamics of the image-velocimetry errors, reporting low RMSE values in calibration (5.34 % and 5.77 % for PIV and PTV, respectively). A visual inspection of Fig. 5a and b shows that increasing SDI values leads to higher errors for both image-velocimetry techniques. Figure 5b and d also show that the predictive capacity of Eq. (5) is higher at low PTV and PIV error values. Even though PIV and PTV work differently, the fitted values in Eq. (5) were similar. Remarkably, k 1 and k 2 showed that the dimensionless SDI parameter can be approximated and used in practice as Furthermore, considering that the errors are minimised when the SDI takes low values, the SDI can be used in field conditions as a descriptor to choose the optimal portion of a video to analyse in order to minimise the errors in imagevelocimetry estimates as a function of seeding density and spatial-clustering level. This novel idea is explored in the next subsection, taking the Basento river as a proof-ofconcept case study.

Field campaign: the Basento case study
Outcomes of the numerical analysis were tested on a real case study in order to identify the best temporal window (i.e. a subset of the video sequence) for image-velocimetry analyses. The case study was selected due to the spatial distribution of tracers varying significantly during the recording period, making it subjective to manually select the optimal frames for analysis. Figure 6 displays a preprocessed frame with the location of the measuring points using standard field equipment (from L1 to L11). These surface flow velocity measurements were taken as reference velocities for PTV and PIV benchmarking. Figure 6b and c show a closeup of the ROI and the identification of transiting features, respectively. An example of identified features is presented in Fig. 6d. In this figure, the number of features, their relative positions, and associated areas were identified using an ad hoc algorithm developed by Dal Sasso et al. (2020). Moving features -that can be blobs, regions of uniform intensity, or local corners -are detected and processed to derive seeding properties (i.e. empirical seeding densities and spatial distribution of tracers) on a frame-by-frame basis even if shapes and dimensions of the tracers vary considerably. Using this approach, the empirical spatial-clustering level (i.e.  . This metric is normally measured to quantify whether a set of events are clustered or dispersed. Important to notice, D * is assumed as an estimator of ν due to their similar properties such as D * = ν = 1, which means features follow a Poisson distribution, while D * < 1(ν < 1) and D * > 1(ν > 1) follow an over-and underdispersed spatial distribution, respectively. Figure 7 shows a comprehensive overview of the seeding behaviour during the 200 frames considered for the analysis. Figure 7a and b present the seeding density in particles per pixel and the dispersion index D * computed as a function of the frame number. The minimum and maximum values for seeding density were 1.3 × 10 −4 and 2.9 × 10 −3 ppp, while those for the dispersion index were 4.1 and 57.3. Additionally, the estimated mean area of features (computed frame by frame and inside the ROI) varied between approximately 1.5 and 3.5 cm 2 .
The approach mentioned above made it possible to compute the SDI and correctly identify the worst and best part of the video for image-velocimetry analysis. A moving frame window length of 100 frames was arbitrarily chosen, on which an average dispersion index D * and seeding density were computed. This decision was motivated to increase the odds of populating the entire ROI with features. The empirical SDI was then calculated as SDI = D * 0.1 / ρ ρ cν1 , where D * and ρ are the average-in-100-frames dispersion index and seeding density, respectively. Figure 8a depicts the SDI as a function of the frame windows. Triangle markers correspond to the minimum and maximum values of the SDI and their respective locations (82-181 and 1-100, respectively). Figure 8a shows the particular case of PTV; nevertheless, PIV presented similar results. The locations of the minimum and maximum SDI values were, therefore, unaffected by the image-velocimetry technique under consideration.
Image-based velocity results were averaged in a block of 30 × 30 cm 2 for a fair comparison among PTV, PIV, and benchmark velocity values. The measuring locations corresponded with the centre of the blocks. Computed velocities across the cross section and reference velocities are reported in Fig. 8b. The blue and orange colours are associated with PTV and PIV results, respectively (same colours used within numerical results for consistency and fast visual comparison). Green squares are the velocities measured using the current meter. Notably, the measuring location L1 had no computed velocity values due to the lack of features tran-siting on this part of the ROI, whereas only PIV was able to compute velocities at L2. This issue can be explained due to the inherent property of PIV to identify and track nonseeded features such as ripples and other structures transiting on the water surface. Interestingly, and in agreement with numerical results, 80 % (frames 1-100) and 75 % (frames 82-182) of the computed velocity measuring locations underestimated the reference velocities using PTV. Similarly, results using PIV were 67 % and 78 %, respectively. Therefore, a close agreement was observed with the numerical results that systematically presented underestimations of computed velocities in comparison with the numerically imposed one. The computed errors using PTV and PIV on the total number of frames available were 23.93 % and 23.69 %, respectively. Moreover, adopting the optimal frame window ensured that image-velocimetry measurements were produced for a greater or equal proportion of the channel than that produced by using frames 1-100 (PTV: 72.7 % vs. 45.5 % of the channel width; PIV: 81.8 % vs. 81.8 %).
Both image-velocimetry approaches correctly captured the mean behaviour of velocities across the cross section. Table 2 presents summarised information of the average-in-100-frames seeding density and dispersion index as well as the initial and final frame used for image-velocimetry purposes. The SDI value is also presented as well as the absolute average error across the cross section. As expected from numerical analyses, an error reduction with respect to the worst scenario of about 15.9 % (PTV) and 16.1 % (PIV) was found in the Basento case study by employing the optimal frame window that minimises the SDI. It is therefore recommended that the SDI is used as a descriptor of the optimal portion of a video to analyse.  Finally, considering numerical findings, field image-based estimates presented larger errors in comparison with numerical results for the respective same values of the SDI (last two columns of Table 2). This is despite the average seeding density being relatively high (∼ 1.5 × 10 −3 ppp) and the average dispersion index being relatively low (∼ 20). Possible reasons for deteriorations in PTV and PIV estimates can be attributed to other variables such as video stabilisation issues, noise due to different environmental conditions (e.g. intermittent and different levels of illumination, water reflections, and presence of shadows), and different shapes and dimensions of features (stressing the matching and tracking process between consecutive frames). In this regard, Dal Sasso et al. (2020) recently introduced metrics for the quantification of seeding characteristics needed to enhance imagevelocimetry performances in rivers. Among them, the seeding density, spatial-clustering level, and coefficient of variation of tracers' dimensions were statistically significant pre-dictors of velocity estimation accuracy. These issues should be the subject of further investigation, along with the application of these ideas to case studies with very different field conditions, to assess the uncertainty of computed surface velocities and remote river flow estimates.

Strengths and limitations
One of the main strengths of this study is the introduction of the new dimensionless SDI, which combines seeding characteristics -seeding density and spatial clustering of tracersfor image-velocimetry purposes. A numerical framework of synthetically generated images was adopted to isolate seeding effects on the performance of PIV and PTV analysis. This numerical framework allowed the generation of moving tracers with the possibility to vary the seeding density and spatial clustering of tracers. Additionally, one field case study was used to test and validate numerical findings. However, among other limitations, the numerical framework considered a constant and unidirectional imposed velocity only. Besides, PIV and PTV were set to run using a single configuration (e.g. PIV used FFT with a three-pass correlation method and fixed search and interrogation areas rather than other combinations of them or an ensemble correlation method). The field case study was artificially seeded to enhance the identification and tracking of moving patterns on the water surface. Interestingly, the dispersion index D * was used as an empirical estimator of the numerical clustering level of tracers ν. D * and ν share some interesting properties, which are useful to characterise under-and overdispersed spatial distribution of tracers in practical applications. Finally, the errors computed using all frames available (frames 1-200) versus the optimal frame window (frames 82-181) were of the same order of magnitude even though the number of frames used with the SDI was half of the total available. As a consequence, the quality of the seeding characteristics seemed to be more critical than the duration of the footage. Of course, many other factors might affect the quality of the videos and, consequently, the performance of image-velocimetry estimates, but this assessment focuses specifically on the spatial distribution of tracers. In the field, other factors such as illumination conditions, shading on the scene, light reflections, presence of turbulent fluxes, and vibration of the camera, among others, could further affect overall quality of the analysis, and these should be the subject of further assessment.

Conclusions
In this paper, we investigated the performances of PTV and PIV for surface flow velocity estimation. Synthetic generation of 33 600 images was performed to test imagevelocimetry techniques under different levels of seeding density and tracer spatial clustering. In all numerical cases, velocity results systematically underestimated the imposed numerical velocity. A general trend was observed in which increasing the seeding density and decreasing the level of spatial clustering improved results. The main advantage of the numerical approach adopted is the controlled conditions in which the analyses can be conducted, minimising the effects of external disturbances. Based on numerical findings, seeding densities lower than 1.0 × 10 −3 ppp produced larger errors, and consequently, flows should be extra-seeded in field campaigns for optimal implementation of image-velocimetry methods. Additionally, the dimensionless SDI was introduced as a descriptor of the optimal portion of the video to analyse using the studied image-based techniques. Based on numerical results, the SDI can be approximated and used in practice as SDI = ν 0.1 / ρ ρ cν1 , where ν, ρ, and ρ cν1 are the spatial-clustering level, the seeding density, and the converging seeding density at ν = 1, respectively. A reduction in image-based errors was observed with lower values of the SDI.
The Basento field case study (located in southern Italy) was considered as a proof of concept of the proposed framework. Seeding characteristics were empirically estimated using a novel algorithm recently developed by the authors, opening the possibilities of more refined analyses. The number of features, relative positions, and associated areas were saved for the computation of the empirical seeding densities and spatial-clustering levels. The empirical SDI values were then computed, and two extreme cases were considered for velocimetry comparison purposes: (i) the one considering the maximum value of the SDI (worst case) and (ii) the one related to the minimum SDI (best case). Field results corroborated numerical findings, and an error reduction of about 15.9 % and 16.1 % was achieved for PTV and PIV approaches, respectively, by using the optimal frame window that minimises the SDI for the Basento case study.
Interestingly, field image-based estimates presented larger errors than numerical results for the respective same values of the SDI. Possible reasons for deteriorating PTV and PIV estimates can be attributed to other variables such as (i) video stabilisation issues; (ii) variable levels of illumination, water reflections, and presence of shadows; and (iii) different shapes and dimensions of seeding features, stressing the importance of the feature-matching and feature-tracking process between consecutive frames. Further assessment is required to evaluate the significance of these factors in contributing to the uncertainty in image-velocimetry estimates across a range of hydrological and environmental conditions. Code availability. The code used to compute the SDI as well as seeding metrics is available in Pizarro et al. (2020b) Author contributions. AP conceptualised the study, wrote the scripts, processed and analysed the data, and drafted the paper. SFDS analysed the field data. SM coordinated the research activities and defined the research project. SFDS, MTP, and SM contributed to the writing and reviewed the manuscript.
Competing interests. The authors declare that they have no conflict of interest.