Heavy vehicle loads on urban bridges are one of the main reasons for the deterioration and damage of bridge performance. Traditional motion target detection algorithms suffer from a decrease in detection accuracy due to camera shake. This paper proposes a heavy vehicle recognition method based on the maximum structural similarity of images. A bridge field of view background model was established based on the time-domain median method, and the detected image and background model were divided into blocks. By searching for the maximum structural similarity near the corresponding block, this parameter is used as the basis for foreground/background classification to reduce the impact of camera shake. Fast Fourier transform algorithm was used to improve search speed for maximum structural similarity. Based on the vehicle’s outer envelope of a rectangular outer contour, the vehicle’s length, width, and height parameters were extracted, and sets of thresholds for heavy vehicle detection were set. The effectiveness of the proposed method was verified through the video of a certain elevated bridge. The results showed that, even with significant camera shake, the proposed method can still accurately identify heavy vehicles.
为削弱漂移现象的影响,通过在背景分块附近搜索结构相似度最大值,以该值对待检测分块进行前景/背景分类.令最大结构相似度为sm(k,i,j), Vbr(k,i,j)为背景模型 Vb(k,i-a,j-a)到 Vb(k,i+a,j+a)的矩形区域,则sm(k,i,j)为待检测分块 V (k,i,j)与矩形区域所有等尺寸窗口的最大结构相似度,可由 式(8)表示.
根据最大结构相似度sm(k,i,j)对待检测分块 V (k,i,j)进行前景/背景分类,并采用标志位记录 V (k,i,j)的分类状态.当sm(k,i,j)大于设定的阈值时, V (k,i,j)为背景,标志位取1;否则为前景,标志位取0.根据实际经验,阈值一般取0.5~0.7.如果某分块经计算不属于背景块,而周围8个分块都属于背景块,则该分块大概率也属于背景块,否则必然包含整辆车信息.由于每个分块的尺寸都偏小,一个分块包含整辆车信息的概率很低.因此,可对标志位进行中值滤波,根据滤波后的结果判断每个待检测分块的最终分类.
搜索最大结构相似度的过程以遍历搜索进行十分耗费时间,利用快速傅里叶变换对 V (k,i,j)和 Vbr(k,i,j)进行处理,大幅缩短运算时间[15],方法实现流程如表1所示.经验证,当图片高度、宽度和每个分块的边长分别取512、512、16时,采用MATLAB实现,由于各个分块之间互不依赖,可通过并行计算技术加快计算速度[16].
世界坐标系xyz代表车辆在真实世界的坐标系,在世界坐标系中定义长方体模型为 M (x, z, w, h, l).假设车辆沿着车道直线行驶,定义长方体朝向为道路方向,即世界坐标系z轴方向.(w, h, l)分别描述了长方体模型的宽度、高度、长度. 图片坐标系uv代表车辆投影在图片中的像素坐标系,以水平为u轴,竖直向下为v轴.图片中车辆区域包络线为 L,可通过取凸包计算.透视矩阵 H 代表世界坐标系中三维车辆与图片坐标系二维车辆投影的多对一映射关系,需要寻找6对以上对应点进行计算[17].对应点的坐标可借助全站仪等测量设备,测量事先在路面上布置的标记点,也可由标定车辆确定.
MH= homo-1{ H [homo( M )]}
式中: MH为长方体模型 M 在透视矩阵 H 的映射下在图片坐标中的投影,并根据图像边界进行了适当裁剪,以模拟车辆部分位于图像中的情况;homo( x )表示将坐标转换为齐次坐标[mxT, m]T,常取m为1;homo-1( x )表示将齐次坐标[kxT, k]T转换为坐标 x .
寻找描述车辆长宽高特征最佳的长方体模型等价于最小化包络线 LM与 L 的误差e( LM, L ).两包络线误差可通过面积交并比或者并集与交集面积差值计算.考虑到包络线为非规则闭合曲线,面积计算比较复杂,本文以均匀采样的方式对误差计算进行简化.采用极坐标描述闭合包络线,原点取车辆包络线 L 的中心mean( L ).从原点以角度θ发射采样射线,令射线与包络线 L 、 LM的交点分别为 μ (θ, L )、 μ (θ, LM).因包络线 L 是凸多边形,且发射点处于包络线 L 内部,故 μ (θ, L )唯一.对凸多边形包络线 LM而言,发射点有位于包络线外部或内部两种情况.当位于内部时, μ (θ, LM)唯一;当位于外部时, μ (θ, L )可能存在无解、一个解、两个解三种情况.射线的单次采样误差定义如下:
式中:d( μ (θ, LM), μ (θ, L ))表示点 μ (θ, LM)与 μ (θ, L )的欧拉距离;max(d( μ (θ, LM), μ (θ, L )))表示取所有交点的最大欧拉距离; LM为 MH的包络线,同样可通过取凸包计算;λ为常数,用于控制两包络线收敛.
结合某高架桥进行实例分析.图6为高架桥部分路段的场景图.图7(a)为从高架桥拍摄的视频,帧率为30 帧/s,相机抖动明显.图7(b)和图7(c)为相邻10帧的两张图片的差分图.在相机不抖动的情况下,差分图上应该只残留车辆信息,而图中车道线等背景信息残留较多.图7(d)中,选择图像右下角的栅栏进行分析,以模板匹配方法为基础,得到右下角栅栏在每一帧图像上的位置并给定阈值,将栅栏位置在相邻几帧图像上位置的差值与阈值比较,超出阈值则认为相机发生抖动,由此判断此图片发生了相机抖动.因为相机抖动剧烈,出现残影现象.抽取138张图片进行重车检测,选取AOI(area of interest)区域,如图7(e)所示,后续只对AOI区域进行处理.通过人工统计,位于AOI区域车辆数量为134辆,其中重车46辆.采用时域中值滤波法进行背景建模,建模帧数取20,帧数间距取10,模型效果如图7(f)所示,由于相机抖动影响,背景模型细节损失较为严重,白色车道线最为明显.
ZHANGJ Q, JINJ, WANGY F,et al. Study progress of intelligent inspection technology and equipment for highway bridge[J]. Journal of Highway and Transportation Research and Development,2023,40(1):1-27.(in Chinese)
[3]
LIM, HUANGT L, LIAOJ J,et al .WIM-based vehicle load models for urban highway bridge[J]. Latin American Journal of Solids and Structures,2020,17(5): e290.
CHENS S, ZHAOH, ZHUC Y,et al .Extreme value prediction of load effect of simply supported beam bridge under heavy vehicle load[J]. Journal of Huazhong University of Science and Technology (Natural Science Edition),2021,49(9):95-100.(in Chinese)
HANW S, YANJ Y, WUJ,et al .Extra-heavy truck load features and bridge dynamic response based on long-term traffic monitoring record[J].China Journal of Highway and Transport,2014,27(2):54-61.(in Chinese)
HES H, WANGA H, ZHUZ,et al. Research progress on intelligent detection technologies of highway bridges[J]. China Journal of Highway and Transport,2021,34(12): 12-24.(in Chinese)
LIH, ZHOUW S, OUJ P,et al .A study on system integration technique of intelligent monitoring systems for soundness of long-span bridges[J].China Civil Engineering Journal,2006,39(2):46-52.(in Chinese)
[14]
陶兴旺 .基于监测响应的桥梁车辆荷载识别[D].大连:大连海事大学,2019.
[15]
TAOX W. Load identification of bridge vehicles based on monitoring response[D]. Dalian:Dalian Maritime University,2019.(in Chinese)
SHAS Y, FENGW X, ZHANY W,et al .Service performance comparison of vibrating wire strain sensors for pipeline[J].Oil & Gas Storage and Transportation,2022,41(4):397-403.(in Chinese)
[18]
DONGC Z, CATBASF N. A review of computer vision-based structural health monitoring at local and global levels[J].Structural Health Monitoring,2021,20(2):692-743.
ZHANGK, YANGC K, ZHOUC P,et al .Review of moving target detection algorithms for UAV video images[J].Chinese Journal of Liquid Crystals and Displays,2019,34(1):98-109.(in Chinese)
[21]
唐俊义 .融合数字影像与结构响应的桥梁车辆荷载识别方法探索[D].重庆:重庆交通大学,2022.
[22]
TANGJ Y. Exploration of bridge vehicle load identification method integrating digital image and structural response[D]. Chongqing:Chongqing Jiaotong University,2022.(in Chinese)
[23]
WANGZ, BOVIKA C, SHEIKHH R,et al .Image quality assessment:from error visibility to structural similarity[J].IEEE Transactions on Image Processing,2004,13(4):600-612.
[24]
LIAOP S, CHENT S, CHUNGP .A fast algorithm for multilevel thresholding[J].Journal of Information Science and Engineering,2001, 17: 713-727.
BAZ N, ZHAOJ X, WUM T,et al .Simulation of near-fault ground motions in complex sites based on CPU-GPU heterogeneous parallelism by spectral element method[J]. Acta Seismologica Sinica,2022,44(1):182-193.(in Chinese)
[28]
HARTLEYR, ZISSERMANA. Multiple view geometry in computer vision[M]. 2nd ed. Cambridge,UK: Cambridge University Press, 2003.
[29]
ANDERSENE D, ROOSC, TERLAKYT. On implementing a primal-dual interior-point method for conic quadratic optimization[J].Mathematical Programming,2003,95(2): 249-277.
Limits of dimensions,axle load and masses for motor vehicles,trailers and combination vehicles:GB 1589—2016 [S].Beijing:Standards Press of China,2016.(in Chinese)