作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (4): 60-67. doi: 10.19678/j.issn.1000-3428.0069244

• 智慧交通 • 上一篇    下一篇

复杂光照条件下基于光流的水运航道流速检测算法

杜田田1, 王晓龙2,*(), 何劲1   

  1. 1. 上海交通大学电子信息与电气工程学院, 上海 200240
    2. 上海华讯网络系统有限公司行业数智事业部, 上海 200127
  • 收稿日期:2024-01-16 出版日期:2024-04-15 发布日期:2024-04-22
  • 通讯作者: 王晓龙
  • 基金资助:
    国家重点研发计划(2023YFC3006700)

Optical-flow-based Waterway Velocity Detection Algorithm Under Complex Illumination Conditions

Tiantian DU1, Xiaolong WANG2,*(), Jing HE1   

  1. 1. School of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Shanghai 200240, China
    2. Industry Digital Intelligence Division, ECCOM Network System Co., Ltd., Shanghai 200127, China
  • Received:2024-01-16 Online:2024-04-15 Published:2024-04-22
  • Contact: Xiaolong WANG

摘要:

实时准确的河流表面流速数据是现代化水运调度和防洪的重要依据, 但传统的仪器测速法大多需要人工实地参与, 危险系数高且无法满足大规模系统部署的要求。相比之下, 图像测速法不需要直接接触河流, 可以依据摄相机获取的连续帧得到近乎实时的速度信息。然而, 光流估计作为当前主流的图像测速法, 是针对刚体运动提出的, 没有考虑流体本身的性质, 在河流表面等相似度高的场景中泛化能力较弱。为提高基于光流估计循环全对场变换(RAFT)模型的水流流速算法估算精度, 提出一种改进的光流估计测速方法。在特征提取部分增加卷积块注意力模块(CBAM), 增强其对河流表面波纹和示踪粒子运动的识别能力。通过优化光流迭代更新部分的损失函数, 引入能体现流体运动特征的角误差损失和旋度散度平滑损失, 并且为损失函数匹配随迭代次数呈指数增长的权重因子, 突出高次迭代结果对于整体结果的显著影响。为验证改进方法的有效性, 使用不同场景河流数据集对其进行性能评估, 结果表明, 该方法在复杂光学噪声场景下的平均相对误差为11.37%, 具有较好的鲁棒性, 能够生成更精准的表面速度空间分布图。

关键词: 河流表面流速, 光流估计, 循环全对场变换, 光照条件, 卷积块注意力模块, 复合损失函数

Abstract:

Real-time and accurate River Surface Velocity(RSV) data in rivers serve as crucial foundations for modern waterway dispatching and flood prevention. However, most traditional velocity measurement methods require manual field participation, which pose high risks and cannot satisfy the demands for large-scale system deployment. By contrast, image-based velocity measurement methods, which do not require direct contact with rivers, can provide near-real-time velocity information based on continuous frames captured by cameras. Nevertheless, optical flow estimation, as a mainstream image-based velocity measurement method, is designed for rigid object motion and lacks robustness in scenes with high similarity, such as river surfaces. To enhance the estimation accuracy of the water flow velocity algorithm based on the Recurrent All-Pairs Field Transformer(RAFT) model for optical flow estimation, a Convolutional Block Attention Module(CBAM) attention module is introduced in the feature extraction section. This module effectively improves the ability of the RAFT model to recognize river surface ripples and the movement of tracer particles. The loss functions in the optical flow iteration section are optimized by incorporating the angular error loss and divergence gradient smoothness loss, which reflect fluid motion characteristics. In addition, a weight factor that exponentially increases with the number of iterations is introduced to match the loss functions, emphasizing the significant effects that high-order iterations have on the overall results. Performance evaluations are conducted using river datasets from different scenarios to validate the effectiveness of the improved method. The results show that the proposed method yields an average relative error of 11.37% in complex optical noise scenarios, thus demonstrating good robustness and enabling the generation of more accurate spatial distribution maps of surface velocity.

Key words: River Surface Velocity(RSV), optical flow estimation, Recurrent All-Pairs Field Transformers(RAFT), illumination conditions, Convolutional Block Attention Module(CBAM), compound loss function