River flow velocity and discharge are fundamental parameters for characterizing hydrodynamic processes, flood control, water resource management, and ecological monitoring. Traditional measurement methods, such as mechanical current meters, electromagnetic sensors, and Acoustic Doppler Current Profilers (ADCP), offer reliable accuracy but are often limited by labor-intensive deployment, safety risks in high-flow conditions, and inability to achieve high-frequency continuous monitoring. In recent years, the integration of drone technology with video processing has emerged as a promising non-contact approach for surface velocity measurement. By analyzing the displacement of water surface textures or floating tracers captured from aerial imagery, drone technology enables rapid, safe, and flexible deployment. However, current applications still face significant challenges, including unstable feature points, difficulties in image distortion correction, and errors in pixel-to-world scale mapping. To address these issues, this study systematically improves the drone-based flow measurement method by optimizing flight parameters, enhancing feature point tracking algorithms, and establishing an accurate scale transformation model. The proposed method is validated through field experiments on the Hutuo River in Hebei Province. The results demonstrate that the improved drone technology achieves a mean relative error of 5.2% compared to ADCP measurements, significantly outperforming the traditional method’s 12.8%. This work provides an efficient and low-cost technical solution for hydrological monitoring of small and medium-sized rivers.
The core framework of the improved method consists of three key components: data acquisition optimization, enhanced Kanade-Lucas-Tomasi (KLT) feature tracking algorithm, and accurate velocity calculation with scale transformation. The technical workflow ensures robust surface velocity retrieval under complex river conditions.
Data Acquisition Optimization for Drone Technology
To minimize the effects of lens distortion, platform vibration, and oblique imaging on feature extraction and velocity inversion, we developed a standardized collection protocol based on drone technology. The DJI Phantom 4 RTK was selected as the aerial platform due to its real-time POS (Position and Orientation System) output, which improves the precision of exterior orientation elements for orthorectification and scale conversion. The camera captures 4K video at 3840×2160 pixels with a frame rate of 30 fps, clearly recording water surface textures and drift trajectories. The flight altitude was set to 50 m with the camera pointing vertically downward (90°), achieving a Ground Sampling Distance (GSD) of approximately 2.7 cm/pixel. This setup balances feature recognition capability and coverage of the river cross-section. The flight path was a straight line at constant speed with three-axis gimbal stabilization to avoid strong reflections and crosswinds, ensuring continuous and stable video sequences.
For accurate scaling of pixel displacement to real-world dimensions, four Ground Control Points (GCPs) were deployed on both riverbanks. Coordinates were surveyed using the Huace i80 RTK system with planar accuracy better than ±2 cm. The GCPs were constructed with PVC or checkerboard patterns to enhance corner detection. Combined with POS data, a joint adjustment significantly reduces scale errors, keeping velocity conversion deviations within an acceptable range. This data acquisition framework, powered by advanced drone technology, provides high-quality inputs for optical flow computation and velocity field inversion.
Improved KLT Feature Tracking Algorithm
The Kanade-Lucas-Tomasi algorithm is a classic sparse optical flow method that tracks feature points by minimizing grayscale intensity differences between consecutive frames under small displacement assumptions. However, rivers present weak textures, strong reflections, and occasional occlusions, leading to tracking failures. To enhance robustness, we introduced several improvements to the core KLT framework.
Adaptive Feature Point Extraction
We employ an improved Shi-Tomasi corner detector, where the corner response function is defined as:
$$
R = \min(\lambda_1, \lambda_2)
$$
where \( R \) is the corner response value used to evaluate feature saliency, and \( \lambda_1, \lambda_2 \) are the eigenvalues of the grayscale gradient covariance matrix within the image window. The threshold is adaptively adjusted based on water surface texture characteristics, ensuring stable feature extraction even in low-texture areas.
Pyramidal Optical Flow Tracking
A three-layer image pyramid is constructed. Tracking starts from the lowest resolution layer and progressively refines to the original resolution. This multi-resolution strategy effectively handles large displacements of feature points, improving tracking success under varying flow conditions.
Bidirectional Tracking Validation
We introduce a forward-backward tracking validation mechanism. The forward tracking is given by:
$$
P_t = \text{KLT}(P_{t-1})
$$
The backward validation is:
$$
P’_{t-1} = \text{KLT}^{-1}(P_t)
$$
Acceptance condition:
$$
\|P_{t-1} – P’_{t-1}\| < \varepsilon
$$
where \( P_t, P_{t-1} \) are image coordinates of the feature point at timestamps \( t \) and \( t-1 \), \( P’_{t-1} \) is the estimated coordinate from backward tracking, KLT and \( \text{KLT}^{-1} \) denote forward and backward tracking functions, and \( \varepsilon \) is a preset threshold (typically 1–2 pixels). This mechanism effectively eliminates false matches, enhancing tracking stability. The improved feature tracking algorithm significantly boosts the performance of drone technology in river surface velocity measurement.
Velocity Calculation and Scale Transformation Model
Camera Calibration and Distortion Correction
Zhang’s calibration method is used to determine intrinsic parameters and correct lens radial and tangential distortions. The correction model is:
$$
x_{\text{corrected}} = x(1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + 2p_1 xy + p_2 (r^2 + 2x^2)
$$
$$
y_{\text{corrected}} = y(1 + k_1 r^2 + k_2 r^4 + k_3 r^6) + 2p_2 xy + p_1 (r^2 + 2y^2)
$$
where \( x, y \) are distorted pixel coordinates, \( x_{\text{corrected}}, y_{\text{corrected}} \) are corrected coordinates, \( r \) is the radial distance, \( k_1, k_2, k_3 \) are radial distortion coefficients, and \( p_1, p_2 \) are tangential distortion coefficients.
Spatial Scale Transformation
Using the GCPs, we compute the homography matrix \( H \) via direct linear transformation to establish the relationship between image coordinates and real-world coordinates:
$$
\begin{bmatrix} X \\ Y \\ 1 \end{bmatrix} = H \times \begin{bmatrix} u \\ v \\ 1 \end{bmatrix}
$$
where \( u, v \) are pixel coordinates in the image, and \( X, Y \) are real-world planar coordinates. To compensate for water surface fluctuations and drone attitude changes, a scale correction factor \( k \) is introduced:
$$
k = \frac{H_{\text{nominal}}}{H_{\text{actual}}}
$$
where \( H_{\text{actual}} \) is the actual height of the drone above the water surface, and \( H_{\text{nominal}} \) is the nominal flight height. This factor reduces geometric bias caused by wave-induced altitude variations.
Surface Velocity Computation
The surface velocity for each tracked feature point is calculated from the actual displacement \( \Delta S \) and time interval \( \Delta t \):
$$
V = \frac{\Delta S}{\Delta t}
$$
where \( V \) is the surface velocity (m/s), \( \Delta t \) is the reciprocal of the video frame rate, and \( \Delta S \) is obtained from the difference of real-world coordinates between consecutive frames. The integration of these models with drone technology enables accurate derivation of river surface velocity fields.
Case Study: Hutuo River Experiment
The study site is located in the middle reach of the Hutuo River near Shijiazhuang City, Hebei Province. This river segment is characterized by a typical temperate continental monsoon climate with significant seasonal hydrological variations. The riverbed consists of medium-fine sand sediments with a relatively regular cross-section. The average river width is approximately 60 m, water depth about 1.5 m, and the measured surface velocity during the experiment ranged from 0.3 to 1.2 m/s. The water surface exhibited good texture for imaging and tracking, making it suitable for validating drone technology-based surface velocity measurements.
Data collection was conducted on July 15, 2023, from 10:00 to 12:00 under clear weather conditions with wind speed of 2–3 on the Beaufort scale. The flow was stable without significant surface disturbance. The DJI Phantom 4 RTK drone flew along a vertical flight path over the river, capturing 2 minutes of continuous 4K video. Simultaneously, ADCP measurements were taken along the same cross-section using a moving-boat method, obtaining five sets of valid velocity data as reference for validation. The detailed flight parameters and data acquisition information are summarized in Table 1.
| Parameter Category | Specific Parameter | Remarks |
|---|---|---|
| Platform | DJI Phantom 4 RTK | Built-in high-precision GNSS |
| Flight altitude | 50 m | Vertical distance above water |
| Camera angle | 90° (nadir) | Vertical downward |
| Frame rate | 30 fps | 30 frames per second |
| Resolution | 3840×2160 pixels | 4K ultra-high definition |
| GSD | 2.7 cm/pixel | Theoretical value |
| Video duration | 2 min | Effective measurement time |
| Number of GCPs | 4 | Symmetric deployment on both banks |
Experimental Design and Evaluation Metrics
To validate the performance of the improved KLT feature tracking algorithm in drone technology-based surface velocity retrieval, we designed a comparative experiment using the traditional KLT algorithm as baseline. The traditional method used fixed threshold for feature extraction without pyramidal tracking or bidirectional validation, making it prone to feature drift under weak texture and strong reflection conditions. The improved algorithm incorporates multi-scale pyramid optical flow, adaptive Shi-Tomasi threshold, bidirectional validation, and flow field smoothing. Both algorithms were applied to the same video sequence, and the results were compared against ADCP measurements as ground truth.
The evaluation system includes three aspects: feature tracking performance, velocity accuracy, and computational efficiency. Key metrics are tracking success rate (ratio of effective tracked points to initial points), mean pixel error, stability coefficient (standard deviation of displacement residuals), mean absolute error (MAE), root mean square error (RMSE), coefficient of determination (R²), Nash-Sutcliffe Efficiency (NSE), and mean relative error (MRE). Additionally, frame rate and memory usage are monitored to assess algorithm practicality. This comprehensive metric framework facilitates a thorough evaluation of the improved drone technology for flow measurement.

Results and Analysis
Feature Point Tracking Performance
As shown in Table 2, the improved algorithm extracted slightly fewer initial feature points (682 vs. 735) but achieved significantly more effective tracked points (593 vs. 412). The tracking success rate increased from 56.1% to 87.0%. The mean pixel error decreased by 57.1% from 2.8 to 1.2 pixels. The stability coefficient improved from 0.71 to 0.92, indicating enhanced robustness against reflection interference and weak textures. These improvements demonstrate that the enhanced KLT algorithm effectively suppresses false matches and maintains tracking continuity, which is essential for drone technology-based velocity measurement.
| Metric | Traditional KLT | Improved KLT | Improvement |
|---|---|---|---|
| Initial feature points | 735 | 682 | -7.2% |
| Effective tracked points | 412 | 593 | +43.9% |
| Tracking success rate (%) | 56.1 | 87.0 | +30.9% |
| Mean pixel error (px) | 2.8 | 1.2 | -57.1% |
| Stability coefficient | 0.71 | 0.92 | +29.6% |
Spatial Distribution of Surface Velocity Field
The reconstructed velocity field from the improved method shows that the highest velocities (1.1–1.2 m/s) occur in the central part of the river, gradually decreasing toward the banks to 0.3–0.5 m/s. This pattern is consistent with typical open-channel flow distribution. The vector directions align well with the main streamwise direction, and no anomalous vectors or reverse flows are observed, confirming the stability and physical plausibility of the velocity field derived from drone technology.
The cross-sectional velocity profile comparison (Figure in original paper, not shown here) indicates that the improved KLT method closely matches the ADCP measurements, especially in the mainstream zone between 15 m and 45 m. In contrast, the traditional KLT method overestimates velocities in the central region, likely due to false feature tracking leading to systematic bias. This further validates the advantage of the improved algorithm in maintaining accurate flow characteristics.
Velocity Accuracy and Error Analysis
Five sets of comparative experiments were conducted. The relative errors of the improved method are controlled within 3.4%–4.4%, with a mean of 3.8%, significantly lower than the traditional method’s mean of 11.3%. The traditional method shows a consistent overestimation, attributed to the lack of effective outlier rejection. The improved method’s results are much closer to ADCP ground truth, confirming its reliability in real river conditions. Table 3 summarizes the cross-sectional mean velocities for each test.
| Test No. | ADCP (m/s) | Improved (m/s) | RE (%) | Traditional (m/s) | RE (%) |
|---|---|---|---|---|---|
| 1 | 0.82 | 0.79 | 3.7 | 0.91 | 11.0 |
| 2 | 0.88 | 0.85 | 3.4 | 0.98 | 11.4 |
| 3 | 0.79 | 0.76 | 3.8 | 0.88 | 11.4 |
| 4 | 0.85 | 0.82 | 3.5 | 0.94 | 10.6 |
| 5 | 0.91 | 0.87 | 4.4 | 1.02 | 12.1 |
| Mean | 0.85 | 0.82 | 3.8 | 0.95 | 11.3 |
The overall accuracy statistics are presented in Table 4. The improved method achieves MAE of 0.043 m/s, RMSE of 0.052 m/s, R² of 0.93, NSE of 0.90, and MRE of 5.2%. All metrics satisfy the specifications for surface velocity measurement in hydrological standards. The NSE above 0.8 indicates excellent agreement between model predictions and observations. In contrast, the traditional method yields MRE of 12.8% and much lower NSE of 0.72, failing to meet the required accuracy.
| Accuracy Indicator | Improved Method | Traditional Method | Allowable Error |
|---|---|---|---|
| MAE (m/s) | 0.043 | 0.109 | <0.10 |
| RMSE (m/s) | 0.052 | 0.135 | <0.15 |
| R² | 0.93 | 0.78 | >0.85 |
| NSE | 0.90 | 0.72 | >0.80 |
| MRE (%) | 5.2 | 12.8 | <10 |
The error distribution histogram (not shown) further confirms that the improved method’s residuals are tightly clustered around zero with smaller spread, while the traditional method exhibits larger positive bias and wider dispersion. The scatter plot of estimated vs. observed velocities reveals a strong linear relationship with slope close to 1 for the improved method, whereas the traditional method shows systematic deviation.
Conclusion
This study presents an improved drone technology-based flow measurement method that addresses key limitations in feature tracking accuracy and geometric scaling. The enhanced KLT algorithm, incorporating adaptive feature extraction, pyramidal optical flow, and bidirectional validation, significantly boosts tracking success rate from 56.1% to 87.0% and reduces mean pixel error by 57.1%. The scale transformation model with correction factor effectively compensates for water surface fluctuations and drone attitude changes. Field validation on the Hutuo River demonstrates excellent agreement with ADCP measurements, achieving a mean relative error of only 5.2% compared to 12.8% for the traditional method. The improved method fully satisfies hydrological surveying standards for surface velocity measurement.
The proposed drone technology offers superior stability, robustness, and engineering applicability, providing a reliable non-contact solution for river monitoring. Future work will focus on expanding the validation to multiple river types, flow conditions, and weather scenarios to further generalize the method. The integration of real-time processing and autonomous navigation will also be explored to enhance operational efficiency.
