[go: up one dir, main page]

CN114119577B - Detection method of leaky cable buckle in high-speed railway tunnel - Google Patents

Detection method of leaky cable buckle in high-speed railway tunnel Download PDF

Info

Publication number
CN114119577B
CN114119577B CN202111449917.6A CN202111449917A CN114119577B CN 114119577 B CN114119577 B CN 114119577B CN 202111449917 A CN202111449917 A CN 202111449917A CN 114119577 B CN114119577 B CN 114119577B
Authority
CN
China
Prior art keywords
gradient
feature
sampling
pixel
continuous
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111449917.6A
Other languages
Chinese (zh)
Other versions
CN114119577A (en
Inventor
张云佐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZHUHAI HANSEN TECHNOLOGY CO LTD
Original Assignee
Shijiazhuang Tiedao University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shijiazhuang Tiedao University filed Critical Shijiazhuang Tiedao University
Priority to CN202111449917.6A priority Critical patent/CN114119577B/en
Publication of CN114119577A publication Critical patent/CN114119577A/en
Application granted granted Critical
Publication of CN114119577B publication Critical patent/CN114119577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Algebra (AREA)
  • Computational Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a high-speed railway tunnel cable leakage buckle detection method, and relates to the technical field of image detection methods. The detection method comprises the following steps: improving a CS-LBP algorithm and calculating gradient direction characteristics of a high-speed railway tunnel cable leakage buckle image sampling circle domain one by one to obtain a complete primary gradient direction characteristic diagram; performing two continuous downsampling on the feature map and extracting continuous gradient features of the two sampled images respectively; and (3) connecting the two groups of gradient features in series to serve as descriptors, and completing the classification work of the fault buckle images by using the SVM. The method can improve the feature extraction efficiency, reduce the latitude of the description sub-features and more accurately reflect the outline features of the leaky cable buckle.

Description

高铁隧道漏缆卡扣检测方法Detection method of leaky cable buckle in high-speed railway tunnel

技术领域technical field

本发明涉及图像处理方法技术领域,尤其涉及一种高铁隧道漏缆卡扣检测方法。The invention relates to the technical field of image processing methods, in particular to a method for detecting leaky cable buckles in high-speed railway tunnels.

背景技术Background technique

目前铁路运输仍然是解决我国人口转移和物资输送的主要交通方式,特别是随着运载量的不断加大,保障铁路通信系统的正常工作就显得尤为重要。山区隧道段的通信网络主要通过覆盖泄漏电缆来实现,通常将漏缆悬挂在隧道壁上,并用专门的卡扣将其固定。高速列车经过隧道时产生的气压和能力波会对卡扣造成影响,同时潮湿的地质环境也会加速卡扣出现松动甚至脱离的现象。漏缆卡扣的主要检测手段是人工定点定期逐一排查,这种检测方式不仅严重受制于环境因素和人为因素,还存在极大的安全隐患。随着近些年来铁路隧道里程的不断增加,这种传统的排查方法已很难再满足实际的需要,实现漏缆卡扣的自动化检测成为发展的必然趋势。结合计算机视觉的漏缆卡扣检测技术主要有以下两个环节:首先需要在列车的窗口处安置一台高速摄像机,随列车采集在隧道运行过程中拍摄的全段画面;再用计算机处理漏缆卡扣数据,逐帧提取特征,完成卡扣的检查工作。当前数据采集部分已经实现,但检测部分仍旧停留在人工回放视频排查故障的阶段。现有技术中出现的基于局部二值模式的深度挖掘算法和多特征融合算法也存在描述子针对性不强且特征维度过高的问题。At present, railway transportation is still the main mode of transportation to solve the problem of population transfer and material transportation in our country, especially as the carrying capacity continues to increase, it is particularly important to ensure the normal operation of the railway communication system. The communication network in the mountainous tunnel section is mainly realized by covering the leaky cable, which is usually hung on the tunnel wall and fixed with a special buckle. The air pressure and energy waves generated when the high-speed train passes through the tunnel will affect the buckle, and the wet geological environment will also accelerate the loosening or even detachment of the buckle. The main detection method for leaky cable buckles is manual fixed-point regular inspection one by one. This detection method is not only severely restricted by environmental factors and human factors, but also has great potential safety hazards. With the increasing mileage of railway tunnels in recent years, it is difficult for this traditional inspection method to meet the actual needs, and it has become an inevitable trend to realize the automatic detection of leaky cable snaps. The leaky cable buckle detection technology combined with computer vision mainly has the following two links: first, a high-speed camera needs to be placed at the window of the train, and the entire section of the picture taken during the tunnel operation is collected along with the train; then the leaky cable is processed by the computer Snap data, extract features frame by frame, and complete snap inspection. At present, the data acquisition part has been realized, but the detection part is still in the stage of manual playback video troubleshooting. The local binary pattern-based deep mining algorithm and multi-feature fusion algorithm that appear in the prior art also have the problem that the descriptor is not well targeted and the feature dimension is too high.

发明内容Contents of the invention

本发明所要解决的技术问题是如何提供一种能够提高特征提取效率,降低描述子特征纬度,能更准确的反应漏缆卡扣的轮廓特征的高铁隧道漏缆卡扣检测方法。The technical problem to be solved by the present invention is how to provide a high-speed railway tunnel leaky cable buckle detection method that can improve the feature extraction efficiency, reduce the feature latitude of the descriptor, and reflect the profile features of the leaky cable buckle more accurately.

为解决上述技术问题,本发明所采取的技术方案是:一种高铁隧道漏缆卡扣检测方法,其特征在于包括如下步骤:In order to solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for detecting the buckling of leaky cables in high-speed railway tunnels, which is characterized in that it comprises the following steps:

改进CS-LBP算法并逐一计算高铁隧道漏缆卡扣图像采样圆域的梯度方向特征,得到完整的初步梯度方向特征图;Improve the CS-LBP algorithm and calculate the gradient direction characteristics of the image sampling circle of the leaky cable buckle of the high-speed railway tunnel one by one, and obtain a complete preliminary gradient direction feature map;

在此特征图上进行两次连续的下采样并分别提取这两幅采样图像的连续梯度特征;Perform two continuous downsampling on this feature map and extract the continuous gradient features of the two sampled images respectively;

将这两组梯度特征串联作为描述子,用SVM完成故障卡扣图像的分类工作。The two groups of gradient features are connected in series as descriptors, and SVM is used to complete the classification of fault snap images.

进一步的技术方案在于,改进CS-LBP算法如下:A further technical solution is to improve the CS-LBP algorithm as follows:

图像采样圆域内取采样个数P=8,采样半径R=1,阈值T=10;用双线性插值法先确定圆形邻域内所有采样点的灰度值;再依次计算每组中心对称采样点的灰度差值;最后比较灰度差值与阈值T的大小关系,以此确定梯度的方向。The number of samples in the image sampling circle is P=8, the sampling radius is R=1, and the threshold T=10; the gray value of all sampling points in the circular neighborhood is first determined by bilinear interpolation method; and then each group of centrosymmetric The gray level difference of the sampling point; finally, compare the relationship between the gray level difference and the threshold T to determine the direction of the gradient.

进一步的技术方案在于:若灰度差值的绝对值大于阈值T,则将灰度值大的采样点对应的计数位标记为1,此计数位便是这组采样像素对的梯度方向;同时将灰度值小的采样点对应的计数位标记为0;若灰度差值的绝对值不大于阈值T,则两个采样点对应的计数位都标记为0,表示这组采样像素对没有梯度,对整幅高斯滤波后的图像重复上述运算,得到完整的初步梯度方向特征图,每个像素的取值都唯一对应了一种由八位二进制数字0或1构成的一维数组。A further technical solution is: if the absolute value of the grayscale difference is greater than the threshold T, then the counting bit corresponding to the sampling point with a large grayscale value is marked as 1, and this counting bit is the gradient direction of this group of sampling pixel pairs; Mark the count bit corresponding to the sampling point with a small gray value as 0; if the absolute value of the gray difference value is not greater than the threshold T, the count bits corresponding to the two sampling points are marked as 0, indicating that this group of sampling pixel pairs has no Gradient, repeat the above operation on the entire Gaussian filtered image to obtain a complete preliminary gradient direction feature map, and the value of each pixel uniquely corresponds to a one-dimensional array composed of eight binary numbers 0 or 1.

进一步的技术方案在于,关键梯度特征的计算方法如下:A further technical solution is that the calculation method of key gradient features is as follows:

采用关键梯度方向来表示像素块的整体梯度趋势,按梯度方位图进行排序,逆时针方向分布的数字1~8分别对应了8个梯度方向,将像素块内所有像素的二进制像素值按相同的计数位逐一累加后,计数和最大的计数位就是该像素块的关键梯度方向。The key gradient direction is used to represent the overall gradient trend of the pixel block, sorted according to the gradient azimuth map, and the numbers 1 to 8 distributed in the counterclockwise direction correspond to 8 gradient directions respectively, and the binary pixel values of all pixels in the pixel block are divided into the same After the count bits are accumulated one by one, the count and the largest count bit are the key gradient direction of the pixel block.

进一步的技术方案在于:Cell单元是由a、b、c、d四个像素组成的像素块,获取此Cell的关键梯度方向特征的方法如下:A further technical solution is: a Cell unit is a pixel block composed of four pixels a, b, c, and d, and the method for obtaining the key gradient direction feature of this Cell is as follows:

首先用改进后的CS-LBP算法依次计算这四个像素对应的一维数组像素值;再将这四个一维像素值按相同的计数位逐一累加,以出现计数方向最多的梯度方向为关键梯度方向;最后得到该Cell的梯度方向以及该关键梯度方向的输出编码值,计算公式定义如下:First, the improved CS-LBP algorithm is used to sequentially calculate the one-dimensional array pixel values corresponding to these four pixels; then the four one-dimensional pixel values are accumulated one by one according to the same counting position, and the gradient direction with the most counting direction is the key Gradient direction; finally get the gradient direction of the Cell and the output encoding value of the key gradient direction, the calculation formula is defined as follows:

Xi=[xi1,xi2,…xij…,xim]X i =[x i1 ,x i2 ,…x ij …,x im ]

Figure BDA0003385020970000031
Figure BDA0003385020970000031

Figure BDA0003385020970000032
Figure BDA0003385020970000032

其中Xi表示一维数组,Y表示Cell结构内所有一维数组Xi的累加,xij∈{0,1},i∈{1,n},j∈{1,m},i和j都为整数;函数max_id(Y)表示输出一维数组Y中最大值所对应的位置,即此时最大值的列坐标j;对整幅初步梯度方向特征图重复以上步骤,取步长stride为2,于是得到第一次下采样后的梯度特征图;Where X i represents a one-dimensional array, Y represents the accumulation of all one-dimensional arrays X i in the Cell structure, x ij ∈ {0, 1}, i ∈ {1, n}, j ∈ {1, m}, i and j Both are integers; the function max_id(Y) indicates the position corresponding to the maximum value in the output one-dimensional array Y, that is, the column coordinate j of the maximum value at this time; repeat the above steps for the entire preliminary gradient direction feature map, and take the stride as 2, so the gradient feature map after the first downsampling is obtained;

在第一次下采样后的特征图上再进行一次相同的迭代,得到第二次下采样特征图。The same iteration is performed on the feature map after the first downsampling to obtain the second downsampling feature map.

进一步的技术方案在于:Cell结构的长宽设定为2×2,通道数为8,滑动步长stride为2,这样既能方便连续梯度特征提取时相关参数的设定,同时每一层下采样特征图的长和宽都与传统LBP及其变体算法得到的最小分区子图像的尺寸成倍数关系。The further technical solution is: the length and width of the Cell structure are set to 2×2, the number of channels is 8, and the sliding step size is 2, which can facilitate the setting of relevant parameters during continuous gradient feature extraction, and at the same time The length and width of the sampling feature map are proportional to the size of the smallest partition sub-image obtained by the traditional LBP and its variant algorithms.

进一步的技术方案在于:在采样特征图上提取连续梯度特征时定义3×3的窗口为一个Block,通道数为8,滑动步长为1。A further technical solution is to define a 3×3 window as a block when extracting continuous gradient features on the sampling feature map, the number of channels is 8, and the sliding step is 1.

进一步的技术方案在于:在Block内按梯度方位图的逆时针方向做环形排序,统计所有基准通道和相邻通道非中心像素的最大连续序列长度,首先逐一确定存在中心像素的通道并以此通道为基准,如果所有通道都不存在中心像素则该Block不输出连续梯度特征。The further technical solution is: in the block, perform circular sorting in the counterclockwise direction of the gradient azimuth map, count the maximum continuous sequence length of non-central pixels of all reference channels and adjacent channels, first determine the channels with central pixels one by one and use this channel As a benchmark, if there is no central pixel in all channels, the Block does not output continuous gradient features.

进一步的技术方案在于:连续梯度特征的计算步骤和限制条件包括如下三点:A further technical solution is: the calculation steps and constraints of the continuous gradient feature include the following three points:

在8通道的Block内先确定存在中心像素的通道,若都不存在中心像素,则不输出特征;In the 8-channel Block, first determine the channel with the central pixel, and if there is no central pixel, the feature will not be output;

以存在中心像素的通道为基准,判断其邻域内最大连续序列大长度是否不小于3,若不满足则不输出特征;Based on the channel with the central pixel, judge whether the maximum continuous sequence length in its neighborhood is not less than 3, and if not, then do not output the feature;

分别统计与基准通道相邻的通道的最大连续序列长度,连续梯度特征输出的编码形式为基准通道编号和三个相应通道的最大连续序列长度,该策略的编码总个数为768种。The maximum continuous sequence length of the channel adjacent to the reference channel is counted separately. The encoding form of the continuous gradient feature output is the reference channel number and the maximum continuous sequence length of the three corresponding channels. The total number of encodings of this strategy is 768.

采用上述技术方案所产生的有益效果在于:本申请所述方法相较于现有技术的显著优势是通过连续的下采样特征图实现了卡扣轮廓特征的尺度变换,在很大程度上提高了特征提取效率,也起到降低描述子特征纬度的作用。同时连续梯度特征也能更准确的反应漏缆卡扣的轮廓特征,特别是拐点和边线处的梯度信息,在高铁隧道场景中区分故障卡扣图像有较好的检测效果。The beneficial effect of adopting the above technical solution is that the method described in this application has a significant advantage compared with the prior art in that the scale transformation of the buckle contour features is realized through continuous down-sampling feature maps, which greatly improves the The efficiency of feature extraction also plays a role in reducing the latitude of descriptor features. At the same time, the continuous gradient feature can also more accurately reflect the contour features of the leaky cable buckle, especially the gradient information at the inflection point and the sideline, and has a better detection effect in distinguishing faulty buckle images in the high-speed rail tunnel scene.

附图说明Description of drawings

下面结合附图和具体实施方式对本发明作进一步详细的说明。The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

图1是本发明实施例中LBP和CS-LBP采样方式图;Fig. 1 is LBP and CS-LBP sampling mode diagram in the embodiment of the present invention;

图2是本发明实施例中计算初步梯度方向图;Fig. 2 is the calculation preliminary gradient direction figure in the embodiment of the present invention;

图3a是本发明实施例中梯度方位图;Figure 3a is a gradient orientation diagram in an embodiment of the present invention;

图3b是本发明实施例中Cell结构图;Fig. 3b is a Cell structure diagram in the embodiment of the present invention;

图4是本发明实施例中计算关键梯度图;Fig. 4 is the calculation key gradient figure in the embodiment of the present invention;

图5是本发明实施例中下采样过程图;Fig. 5 is a downsampling process diagram in the embodiment of the present invention;

图6是本发明实施例中计算连续梯度特征图;Fig. 6 is the characteristic map of calculating continuous gradient in the embodiment of the present invention;

图7是本发明实施例所述方法的实验流程图;Fig. 7 is the experimental flowchart of the method described in the embodiment of the present invention;

图8是本发明实施例中ROC曲线图;Fig. 8 is the ROC curve figure in the embodiment of the present invention;

图9是本发明实施例所述方法的流程图;Fig. 9 is a flow chart of the method described in the embodiment of the present invention;

具体实施方式Detailed ways

下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是本发明还可以采用其他不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似推广,因此本发明不受下面公开的具体实施例的限制。In the following description, a lot of specific details are set forth in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described here, and those skilled in the art can do it without departing from the meaning of the present invention. By analogy, the present invention is therefore not limited to the specific examples disclosed below.

如图9所示,总体的,本发明实施例公开了一种多尺度连续梯度特征的高铁隧道漏缆卡扣检测方法,所述方法包括如下步骤:As shown in Figure 9, in general, the embodiment of the present invention discloses a method for detecting leaky cable snapping of a high-speed railway tunnel with multi-scale continuous gradient features, and the method includes the following steps:

首先改进CS-LBP算法并逐一计算采样圆域的梯度方向特征,得到完整的初步梯度方向特征图;然后在此特征图上进行两次连续的下采样并分别提取这两幅采样图像的连续梯度特征;最后将这两组梯度特征串联作为描述子,用SVM完成故障卡扣图像的分类工作。First, improve the CS-LBP algorithm and calculate the gradient direction features of the sampling circle one by one to obtain a complete preliminary gradient direction feature map; then perform two consecutive downsampling on this feature map and extract the continuous gradients of the two sampled images respectively features; finally, the two sets of gradient features are concatenated as descriptors, and SVM is used to complete the classification of fault snap images.

所述方法能够实现卡扣轮廓特征的尺度变换并有效降低描述子的特征维度,通过提取连续的梯度特来征提高图像的分类准确率。实验对比了CS-LBP、HOG等多种变体算法的检测情况,结果表明所述方法所提算法的召回率和精准度分别达到了0.923和0.857,相较于这几种对比算法有明显的优势。The method can realize the scale transformation of the buckle contour feature and effectively reduce the feature dimension of the descriptor, and improve the classification accuracy of the image by extracting continuous gradient features. The experiment compares the detection of various variant algorithms such as CS-LBP and HOG. The results show that the recall rate and precision of the algorithm proposed by the method reach 0.923 and 0.857, respectively. Compared with these comparison algorithms, there are obvious differences. Advantage.

下面结合具体步骤对上述方法进行详细说明The above method will be described in detail below in conjunction with specific steps

改进CS-LBP算法Improved CS-LBP Algorithm

传统的LBP和CS-LBP:Traditional LBP and CS-LBP:

传统的LBP描述子最初由Ojala等人提出,因其能敏锐捕获细致纹理之间的灰度差异,同时还具有较好的旋转不变性和灰度不变性,至今仍被广泛应用于人脸识别和纹理分类领域。算法的核心思想是在以R为半径的圆形邻域内,比较中心像素与邻域内P个采样像素点之间灰度值的大小,再利用布尔函数计算出仅包含0和1的一串二进制序列,最后按统一顺序转换成十进制的LBP编码值,相应的计算公式为:The traditional LBP descriptor was originally proposed by Ojala et al. It is still widely used in face recognition because it can keenly capture the grayscale difference between fine textures, and also has good rotation invariance and grayscale invariance. and texture classification domains. The core idea of the algorithm is to compare the gray value between the center pixel and P sampling pixels in the neighborhood in a circular neighborhood with R as the radius, and then use the Boolean function to calculate a string of binary numbers containing only 0 and 1 Sequence, and finally converted into decimal LBP coded values in a unified order, the corresponding calculation formula is:

Figure BDA0003385020970000051
Figure BDA0003385020970000051

Figure BDA0003385020970000052
Figure BDA0003385020970000052

ni表示圆形邻域上第i个采样点的灰度值,其大小可以用双线性插值法来确定,nc表示中心像素的灰度值。为了增强LBP描述子在空间方向上的表述能力,Heikkila等人提出了CS-LBP描述子,取代了LBP关于编码邻域采样点与中心像素差值信息的方式,仅针对四组径向分布的中心对称采样点进行编码,相应的计算公式变为:n i represents the gray value of the ith sampling point on the circular neighborhood, its size can be determined by bilinear interpolation, n c represents the gray value of the central pixel. In order to enhance the expression ability of the LBP descriptor in the spatial direction, Heikkila et al. proposed the CS-LBP descriptor, which replaced the LBP method of encoding the difference information between the neighborhood sampling points and the central pixel, and only for four groups of radially distributed The centrosymmetric sampling points are encoded, and the corresponding calculation formula becomes:

Figure BDA0003385020970000061
Figure BDA0003385020970000061

Figure BDA0003385020970000062
Figure BDA0003385020970000062

需要对比多组实验的特征提取效果,才能对上述公式(4)中的阈值T有一个较好的评估。通常可以根据输入图像的全局灰度情况或者邻域采样像素的灰度情况来确定,所述方法选择CS-LBP算子作为改进的基础模型主要有以下三方面原因:It is necessary to compare the feature extraction effects of multiple groups of experiments in order to have a better evaluation of the threshold T in the above formula (4). Usually it can be determined according to the global grayscale of the input image or the grayscale of the neighborhood sampled pixels. The method chooses the CS-LBP operator as the improved basic model mainly for the following three reasons:

1)在相同采样个数和采样半径的条件下,如图1所示,CS-LBP编码的特征向量更紧凑,描述子的特征维度也远低于LBP。1) Under the same sampling number and sampling radius, as shown in Figure 1, the feature vector encoded by CS-LBP is more compact, and the feature dimension of the descriptor is much lower than that of LBP.

2)CS-LBP继承了LBP良好的纹理特性,同时还拓展了四组径向分布的梯度差分信息。2) CS-LBP inherits the good texture characteristics of LBP, and at the same time expands four groups of radially distributed gradient difference information.

3)CS-LBP在处理图像的平缓区域能够有更强的稳定性,许多关于图像匹配的实验也证明了CS-LBP算子比单独使用梯度算子或者幅值算子有更好的鲁棒性。3) CS-LBP can have stronger stability in the gentle area of the processing image. Many experiments on image matching have also proved that the CS-LBP operator is more robust than using the gradient operator or the amplitude operator alone. sex.

提升CS-LBP的方向性:Improve the directionality of CS-LBP:

传统的CS-LBP只说明了采样圆域内的某个直径方向或者某些直径方向存在梯度差,却并没有明确指出梯度的方向究竟在那一侧。所以所述方法在此基础上保留了CS-LBP关于比较中心对称采样点灰度差值的编码方式,但同时必须明确标识出每组中心对称采样点灰度值高的那一侧,以获取更具体的梯度方向信息,即二进制编码位数扩展到了8位。而作为此环节输出的初步梯度方向特征图,也不再将像素值进行十进制转换,而是直接输出编码方式的二进制形式。The traditional CS-LBP only shows that there is a gradient difference in a certain diameter direction or some diameter directions in the sampling circle, but it does not clearly indicate which side the gradient direction is on. Therefore, on this basis, the method retains the CS-LBP coding method for comparing the gray value of the centrally symmetrical sampling points, but at the same time must clearly identify the side with the higher gray value of each group of centrally symmetrical sampling points to obtain More specific gradient direction information, that is, the number of binary codes has been extended to 8 bits. As the preliminary gradient direction feature map output in this link, the pixel value is no longer converted to decimal, but the binary form of the encoding method is directly output.

图2为采用改进的CS-LBP算法计算初步梯度方向的过程,圆域内取采样个数P=8,采样半径R=1,阈值T=10。用双线性插值法先确定圆形邻域内所有采样点的灰度值;再依次计算每组中心对称采样点的灰度差值;最后比较差值与阈值T的大小关系,以此确定梯度的方向。若绝对值大于阈值T,则将灰度值大的采样点对应的计数位标记为1,此计数位便是这组采样像素对的梯度方向。同时将灰度值小的采样点对应的计数位标记为0。若绝对值不大于阈值T,则两个采样点对应的计数位都标记为0,表示这组采样像素对没有梯度。经计算可得出图2中只存在45°、90°、315°这三个梯度方向,所以只将这三个方向对应的计数位标记为1,其余方向位均标记为0。于是从0°开始以逆时针方向进行编码,10000110即为所求的二进制编码值。对整幅高斯滤波后的图像重复上述运算,得到完整的初步梯度方向特征图,每个像素的取值都唯一对应了一种由八位二进制数字0或1构成的一维数组。Figure 2 shows the process of calculating the preliminary gradient direction using the improved CS-LBP algorithm. The number of samples in the circle is P=8, the sampling radius R=1, and the threshold T=10. Use the bilinear interpolation method to first determine the gray value of all sampling points in the circular neighborhood; then calculate the gray value difference of each group of centrally symmetrical sampling points in turn; finally compare the relationship between the difference and the threshold T to determine the gradient direction. If the absolute value is greater than the threshold T, the count bit corresponding to the sampling point with a large gray value is marked as 1, and the count bit is the gradient direction of this group of sampling pixel pairs. At the same time, the count bit corresponding to the sampling point with a small gray value is marked as 0. If the absolute value is not greater than the threshold T, the count bits corresponding to the two sampling points are marked as 0, indicating that this group of sampling pixel pairs has no gradient. After calculation, it can be concluded that there are only three gradient directions of 45°, 90°, and 315° in Figure 2, so only the count bits corresponding to these three directions are marked as 1, and the other direction bits are all marked as 0. Therefore, starting from 0°, it is coded counterclockwise, and 10000110 is the binary code value sought. Repeat the above operations on the entire Gaussian filtered image to obtain a complete preliminary gradient direction feature map. The value of each pixel uniquely corresponds to a one-dimensional array composed of eight binary numbers 0 or 1.

梯度方向特征图:Gradient direction feature map:

得到的初步梯度方向特征图中,每一个一维数组像素值都有81(34)种二进制排布形式,如果直接在此特征图上提取连续梯度特征,所得到的描述子特征维度会过于庞大,所以所述方法提出了一种有效的降维模式,一方面能减少二进制像素值排布形式的总数,另一方面还能实现特征图的尺度变换。In the obtained preliminary gradient direction feature map, each one-dimensional array pixel value has 81 (3 4 ) binary arrangements. If the continuous gradient feature is directly extracted from this feature map, the obtained descriptor feature dimension will be too large. Therefore, the described method proposes an effective dimension reduction mode, which can reduce the total number of binary pixel value arrangements on the one hand, and realize the scale transformation of the feature map on the other hand.

采用关键梯度方向来表示像素块的整体梯度趋势,目的是将原本单个像素的81种取值转换为像素块的8种有效取值,方便对连续梯度特征进行编码。按图3a的梯度方位图进行排序,逆时针方向分布的数字1~8分别对应了8个梯度方向,将像素块内所有像素的二进制像素值按相同的计数位逐一累加后,计数和最大的计数位就是该像素块的关键梯度方向。图3b中的Cell单元是由a、b、c、d四个像素组成的像素块,以获取此Cell的关键梯度方向特征为例,图4为关键梯度的计算过程。首先用改进后的CS-LBP算法依次计算这四个像素对应的一维数组像素值;再将这四个一维像素值按相同的计数位逐一累加,可以发现90°方向的计数最多,出现了四次;最后得到该Cell的梯度方向为90°,即关键梯度方向的输出编码值为2,计算公式定义如下:The key gradient direction is used to represent the overall gradient trend of the pixel block. The purpose is to convert the original 81 values of a single pixel into 8 effective values of the pixel block, which is convenient for encoding continuous gradient features. Sorting according to the gradient azimuth map in Figure 3a, the numbers 1 to 8 distributed in the counterclockwise direction correspond to 8 gradient directions respectively, and after accumulating the binary pixel values of all pixels in the pixel block according to the same count bit one by one, the count sum is the largest The counting bit is the key gradient direction of the pixel block. The Cell unit in Figure 3b is a pixel block composed of four pixels a, b, c, and d. Taking the key gradient direction feature of this Cell as an example, Figure 4 shows the calculation process of the key gradient. First, the improved CS-LBP algorithm is used to sequentially calculate the one-dimensional array pixel values corresponding to these four pixels; and then the four one-dimensional pixel values are accumulated one by one according to the same counting position, and it can be found that the count in the 90° direction is the largest, and the Four times; finally, the gradient direction of the Cell is 90°, that is, the output code value of the key gradient direction is 2, and the calculation formula is defined as follows:

Xi=[xi1,xi2,…xij…,xim] (5)X i =[x i1 ,x i2 ,…x ij …,x im ] (5)

Figure BDA0003385020970000081
Figure BDA0003385020970000081

Figure BDA0003385020970000082
Figure BDA0003385020970000082

其中Xi表示一维数组,Y表示Cell结构内所有一维数组Xi的累加,xij∈{0,1},i∈{1,n},j∈{1,m},i和j都为整数。函数max_id(Y)表示输出一维数组Y中最大值所对应的位置,即此时最大值的列坐标j。对整幅初步梯度方向特征图重复以上步骤,取步长stride为2,于是得到第一次下采样后的梯度特征图。Where X i represents a one-dimensional array, Y represents the accumulation of all one-dimensional arrays X i in the Cell structure, x ij ∈ {0, 1}, i ∈ {1, n}, j ∈ {1, m}, i and j are all integers. The function max_id(Y) indicates the position corresponding to the maximum value in the output one-dimensional array Y, that is, the column coordinate j of the maximum value at this time. Repeat the above steps for the entire preliminary gradient direction feature map, take the stride as 2, and then obtain the gradient feature map after the first downsampling.

在第一次下采样后的特征图上再进行一次相同的迭代,得到第二次下采样特征图。Cell结构的长宽设定为2×2,通道数为8,滑动步长stride为2,这样既能方便连续梯度特征提取时相关参数的设定,同时每一层下采样特征图的长和宽都与传统LBP及其变体算法得到的最小分区子图像的尺寸成倍数关系,便于比较。另外也与深度学习中的最大值池化不同,这里是针对值抑制。图5是下采样过程的输出结果示意图,除了输入图像是单通道的灰度图像之外,其它环节的特征图都是8通道,并且每个通道都分别代表了图3a中的一个梯度方向。在经过尺度变换后,目标轮廓处的典型梯度特征会被保留,反而一些变化不明显的拐点、边线,以及噪声会在下采样过程中被去掉。The same iteration is performed on the feature map after the first downsampling to obtain the second downsampling feature map. The length and width of the Cell structure are set to 2×2, the number of channels is 8, and the sliding step size is 2, which not only facilitates the setting of relevant parameters during continuous gradient feature extraction, but also the length and The width is in multiples of the size of the smallest partition sub-image obtained by the traditional LBP and its variant algorithms, which is convenient for comparison. In addition, it is also different from the maximum pooling in deep learning, here is for value suppression. Figure 5 is a schematic diagram of the output results of the downsampling process. Except for the input image is a single-channel grayscale image, the feature maps of other links are 8-channel, and each channel represents a gradient direction in Figure 3a. After scale transformation, the typical gradient features at the target contour will be preserved, but some inflection points, edges, and noise that do not change significantly will be removed during the downsampling process.

连续梯度特征:Continuous gradient features:

LBP的一些深度挖掘算子以及该系列的融合特征算子,基本只针对局部采样点的灰度差值做纹理特性分析,存在明显的局限性。所以所述方法分别在两次下采样后的特征图上提取连续梯度特征,通过目标轮廓在拐点和边线处的梯度变化关系提升描述子的质量。为了与下采样过程中的Cell单元区分,在采样特征图上提取连续梯度特征时定义3×3的窗口为一个Block,通道数为8,滑动步长为1。之所以处理单元选择3×3是因为8个领域采样点都与中心采样点相邻,能更好的反应梯度连续这一关键特性,同时也更符合编码的习惯。Some deep mining operators of LBP and this series of fusion feature operators basically only analyze the texture characteristics of the gray value difference of local sampling points, which has obvious limitations. Therefore, the method extracts continuous gradient features on the feature map after twice downsampling, and improves the quality of the descriptor through the gradient change relationship of the target contour at the inflection point and the edge. In order to distinguish it from the Cell unit in the downsampling process, a 3×3 window is defined as a Block when extracting continuous gradient features on the sampling feature map, the number of channels is 8, and the sliding step is 1. The reason why the processing unit chooses 3×3 is because the 8 field sampling points are adjacent to the central sampling point, which can better reflect the key feature of gradient continuity, and is more in line with coding habits.

在Block内按梯度方位图的逆时针方向做环形排序,统计所有基准通道和相邻通道非中心像素的最大连续序列长度。首先逐一确定存在中心像素的通道并以此通道为基准,如果所有通道都不存在中心像素则该Block不输出连续梯度特征。图6中只有通道2、4存在中心像素,所以只针对这两个通道进行特征提取。通道2中自身的8个邻域采样像素最大的连续序列长度为4,相邻的通道1最大连续序列长度为1,通道3最大连续序列长度为2,于是得到通道2的连续梯度特征,编码结果为2412,其含义表示为以通道2为基准,通道2、1、3的最大连续序列长度分别为4、1、2。由于通道4自身的最大连续序列长度小于3,所以该通道也不输出特征。将连续梯度特征的计算步骤和限制条件总结为以下三点:Perform circular sorting in the counterclockwise direction of the gradient orientation map in the block, and count the maximum continuous sequence length of non-center pixels of all reference channels and adjacent channels. First, determine the channel with the central pixel one by one and use this channel as a reference. If there is no central pixel in all channels, the block will not output continuous gradient features. In Figure 6, only channels 2 and 4 have central pixels, so feature extraction is only performed on these two channels. The maximum continuous sequence length of the 8 neighboring sampling pixels in channel 2 is 4, the maximum continuous sequence length of adjacent channel 1 is 1, and the maximum continuous sequence length of channel 3 is 2, so the continuous gradient feature of channel 2 is obtained, and the encoding The result is 2412, which means that based on channel 2, the maximum continuous sequence lengths of channels 2, 1, and 3 are 4, 1, and 2, respectively. Since the maximum continuous sequence length of channel 4 itself is less than 3, this channel also does not output features. The calculation steps and constraints of continuous gradient features are summarized into the following three points:

1)在8通道的Block内先确定存在中心像素的通道,若都不存在中心像素,则不输出特征。1) In the 8-channel Block, first determine the channel with the central pixel, if there is no central pixel, no feature is output.

2)以存在中心像素的通道为基准,判断其邻域内最大连续序列大长度是否不小于3,若不满足则不输出特征。2) Based on the channel with the central pixel, judge whether the maximum continuous sequence length in its neighborhood is not less than 3, and if not, then do not output the feature.

3)分别统计与基准通道相邻的通道的最大连续序列长度,连续梯度特征输出的编码形式为基准通道编号和三个相应通道的最大连续序列长度,该策略的编码总个数为768种。3) Count the maximum continuous sequence lengths of the channels adjacent to the reference channel respectively. The encoding form of the continuous gradient feature output is the reference channel number and the maximum continuous sequence length of the three corresponding channels. The total number of encodings for this strategy is 768.

实验过程:experiment procedure:

实验运行环境所采用的CPU为Intel Xeon E5-2697 v2、运行内存为98GB、硬盘存储空间为8TB。漏缆卡扣图像数据用双线CMOS相机全程跟车拍摄,其中故障卡扣图像195张,正常卡扣图像900张,取输入图像数据集的70%作为训练集,剩下的30%作为测试集。图7简述了从原始数据中获取连续梯度特征,再到用SVM完成故障卡扣检测任务的完整流程。预处理后输入图像的尺寸变为256×256,提取初步梯度方向特征和连续梯度特征的基本单元为3×3,两次下采样的基本单元为2×2。The CPU used in the experimental running environment is Intel Xeon E5-2697 v2, the running memory is 98GB, and the hard disk storage space is 8TB. Leaky cable buckle image data is taken with a two-line CMOS camera throughout the whole process, including 195 faulty buckle images and 900 normal buckle images. 70% of the input image data set is used as a training set, and the remaining 30% is used as a test set. Figure 7 briefly describes the complete process from obtaining continuous gradient features from raw data to using SVM to complete the fault snap detection task. After preprocessing, the size of the input image becomes 256×256, the basic unit for extracting preliminary gradient direction features and continuous gradient features is 3×3, and the basic unit for twice downsampling is 2×2.

计算自适应阈值T:Calculate the adaptive threshold T:

为了获得合适的阈值T,先从数据集中分别挑选了5~6张全局灰度均值分布在不同区间的图像共50张,通过实验的方法来分析灰度与阈值的对应关系。用9×9的高斯滤波器对原始输入图片进行预处理,然后比较它们各自在不同阈值条件下初步梯度方向特征图的成像效果,在满足以下两点要求的前提下,阈值T应尽可能的大。In order to obtain a suitable threshold T, a total of 50 images with 5-6 global gray mean values distributed in different intervals were selected from the data set, and the corresponding relationship between gray and threshold was analyzed through experiments. Use a 9×9 Gaussian filter to preprocess the original input image, and then compare the imaging effects of their preliminary gradient direction feature maps under different threshold conditions. Under the premise of meeting the following two requirements, the threshold T should be as large as possible big.

1)必须保证初步梯度方向特征图能完整清晰的显示漏缆卡扣的轮廓。1) It must be ensured that the preliminary gradient direction feature map can completely and clearly show the outline of the leaky cable buckle.

2)在一定程度上能过滤隧道墙壁的背景噪声。2) To a certain extent, it can filter the background noise of the tunnel wall.

表1不同灰度-阈值的成像效果分析Table 1 Analysis of imaging effects of different gray levels-thresholds

Figure BDA0003385020970000101
Figure BDA0003385020970000101

为了方便比对不同灰度与阈值的成像效果,将全局灰度均值分成8个区间,分别对应了8个阈值等级。表格1列出了部分卡扣图像在不同阈值情况下的初步梯度方向特征图的成像效果,具体的计算公式为:In order to facilitate the comparison of the imaging effects of different gray levels and thresholds, the global mean gray level is divided into 8 intervals, corresponding to 8 threshold levels. Table 1 lists the imaging effect of the preliminary gradient direction feature map of some snapping images under different thresholds. The specific calculation formula is:

Figure BDA0003385020970000102
Figure BDA0003385020970000102

当全局灰度均值处于80~220之间时,采用取整函数计算相应的阈值T;灰度均值小于80,为最低阈值等级T=4;灰度均值大于220,为最高阈值等级T=11。根据公式(8)对输入图像采用改进的CS-LBP算法逐一计算初步梯度方向特征,得到相应的初步梯度方向特征图。When the global average gray value is between 80 and 220, use the rounding function to calculate the corresponding threshold T; if the average gray value is less than 80, it is the lowest threshold level T=4; if the average gray value is greater than 220, it is the highest threshold level T=11 . According to the formula (8), the improved CS-LBP algorithm is used to calculate the preliminary gradient direction features one by one for the input image, and the corresponding preliminary gradient direction feature map is obtained.

计算连续梯度特征:Compute continuous gradient features:

部分典型特征例如漏缆卡扣的拐点或者边线在第三次下采样的特征图中表现的并不明显,或者大量连续梯度特征在第三次及以后的采样特征图上都不再表达,所以在实验过程中只进行了两次下采样。分别对两次下采样后的特征图提取连续梯度特征并将这两组连续梯度特征进行串联,得到最终的融合特征描述子,特征维度为1536,不用再对图像进行分块处理。Some typical features such as the inflection point or edge of the leaky cable buckle are not obvious in the feature map of the third downsampling, or a large number of continuous gradient features are no longer expressed in the feature map of the third and subsequent sampling, so Downsampling was performed only twice during the experiment. The continuous gradient features are extracted from the feature maps after twice downsampling respectively, and the two sets of continuous gradient features are concatenated to obtain the final fusion feature descriptor with a feature dimension of 1536, and there is no need to divide the image into blocks.

实验结果及分析:Experimental results and analysis:

实验采用召回率Recall、精准度Precision、描述子的特征维度Bin和AUC数值作为检测结果的评价指标。其中Recall和Precision分别是指被正确判断为故障的卡扣占所有故障卡扣的比重,以及被正确判断为故障的卡扣占所有被判断为故障卡扣的比重,具体计算公式为:The experiment uses the recall rate Recall, precision precision, feature dimension Bin and AUC value of the descriptor as the evaluation indicators of the detection results. Among them, Recall and Precision respectively refer to the proportion of buckles correctly judged as faults to all faulty buckles, and the percentage of buckles correctly judged as faults to all buckles judged to be faulty, respectively. The specific calculation formula is:

Figure BDA0003385020970000111
Figure BDA0003385020970000111

Figure BDA0003385020970000112
Figure BDA0003385020970000112

为了证明所述方法算法提取漏缆卡扣轮廓特征具有优越性,还分别与CS-LBP、HOG等多种变体算法进行比较,得到了表格2的实验结果,这几种对比算法的参数设定情况如下:In order to prove the superiority of the method algorithm in extracting the profile features of leaky cable clips, it is also compared with various variant algorithms such as CS-LBP and HOG, and the experimental results in Table 2 are obtained. The parameter settings of these comparison algorithms The situation is as follows:

1)LBP采样半径R为1,采样个数P为8,用双线性插值法进行采样。实验中需对图像进行4×4无重叠划分,描述子的特征维度为4096。1) LBP sampling radius R is 1, sampling number P is 8, and bilinear interpolation method is used for sampling. In the experiment, the image needs to be divided into 4×4 without overlapping, and the feature dimension of the descriptor is 4096.

2)

Figure BDA0003385020970000113
(完备的二值模式)用双线性插值法进行采样,采样半径R=1,采样个数P=8。每一个采样圆域内的局部符号算子CLBP_S和局部幅值算子CLBP_M均使用旋转不变均匀模式编码。实验中该方法对图像进行4×4无重叠划分,每个分区子图像的特征维度为2(P+2)2=200,输出的描述子特征维度为3200,在后面的表格和图中将以CLBP代指该方法。2)
Figure BDA0003385020970000113
(Complete binary mode) Sampling is performed by bilinear interpolation method, sampling radius R=1, sampling number P=8. The local sign operator CLBP_S and the local magnitude operator CLBP_M in each sampling circle are encoded using the rotation-invariant uniform mode. In the experiment, this method divides the image into 4×4 without overlapping. The feature dimension of each sub-image is 2(P+2) 2 =200, and the output descriptor feature dimension is 3200. In the following tables and figures, This method is denoted by CLBP.

3)HOG特征采用最近邻插值法先将输入图像的尺寸缩小到128×128,然后再进行特征提取。其中Cell为8×8,Block为16×16,Stride为16,每个Block单位中梯度分量的bins为9,所以输出描述子的特征维度为2304。3) HOG features use the nearest neighbor interpolation method to first reduce the size of the input image to 128×128, and then perform feature extraction. The Cell is 8×8, the Block is 16×16, and the Stride is 16. The bins of the gradient component in each Block unit are 9, so the feature dimension of the output descriptor is 2304.

(4)TPLBP和ARCS-LBP都采用双线性插值法进行采样,采样半径R=1,采样个数P=8,实验中需对图像进行4×4无重叠划分,描述子的特征维度都为4096。(4) Both TPLBP and ARCS-LBP use bilinear interpolation method for sampling, the sampling radius R=1, the number of samples P=8, the image needs to be divided into 4×4 without overlapping in the experiment, and the feature dimensions of the descriptors are both for 4096.

5)HOG_LBP和HOG_CLBP是指将先前得到的HOG描述子分别与LBP描述子和CLBP描述子进行串连,得到二者的融合特征,相应描述子的特征维度直接累加。5) HOG_LBP and HOG_CLBP refer to concatenating the previously obtained HOG descriptor with the LBP descriptor and CLBP descriptor respectively to obtain the fusion features of the two, and the feature dimensions of the corresponding descriptors are directly accumulated.

通过表格2的检测结果对比以及图8的ROC曲线图,可以看出所述方法所提的多尺度连续梯度特征算法MSG-LBP在漏缆卡扣的检测结果上表现出显著优势。其中Recall和Precision分别达到了0.923和0.857,在ROC曲线中MSG-LBP的AUC数值也是最高。即便HOG_LBP的融合特征能够使Recall达到0.889,但Precision却只有0.615,这说明有大量的正常卡扣被误判为故障卡扣。MSG-LBP描述子没有对图像进行分块处理,但第一层下采样的特征图与图像进行2×2划分的最小分区子图像的尺寸一致,第二层下采样的特征图与图像进行4×4划分的最小分区子图像的尺寸一致,这在很大程度上减少了特征提取的计算量。实验中的两次下采样特征图不仅包含了卡扣轮廓特征的关键梯度信息,还实现了卡扣轮廓特征的尺度变换。多尺度连续梯度特征描述子的维度要比大部分该系列的深度挖掘描述子以及融合特征描述子的纬度低,检测能力也明显要强。Through the comparison of the detection results in Table 2 and the ROC curve in Figure 8, it can be seen that the multi-scale continuous gradient feature algorithm MSG-LBP proposed by the method has a significant advantage in the detection results of leaky cable buckles. Among them, Recall and Precision reached 0.923 and 0.857 respectively, and the AUC value of MSG-LBP is also the highest in the ROC curve. Even though the fusion feature of HOG_LBP can make the Recall reach 0.889, the Precision is only 0.615, which shows that a large number of normal snaps are misjudged as faulty snaps. The MSG-LBP descriptor does not divide the image into blocks, but the feature map of the first layer of downsampling is consistent with the size of the smallest partition sub-image of the image divided by 2×2, and the feature map of the second layer of downsampling is 4 The sub-images of the smallest partition divided by ×4 have the same size, which greatly reduces the computational load of feature extraction. The two downsampled feature maps in the experiment not only contain the key gradient information of the snap contour feature, but also realize the scale transformation of the snap contour feature. The dimensionality of the multi-scale continuous gradient feature descriptor is lower than that of most of the deep mining descriptors and fusion feature descriptors of this series, and the detection ability is obviously stronger.

表2检测结果对比Table 2 Comparison of test results

Figure BDA0003385020970000121
Figure BDA0003385020970000121

综上,所述方法相较于该系列算法的显著优势是通过连续的下采样特征图实现了卡扣轮廓特征的尺度变换,在很大程度上提高了特征提取效率,也起到降低描述子特征纬度的作用。同时连续梯度特征也能更准确的反应漏缆卡扣的轮廓特征,特别是拐点和边线处的梯度信息。In summary, the significant advantage of the described method compared with this series of algorithms is that the scale transformation of the buckle contour features is realized through continuous downsampling feature maps, which greatly improves the feature extraction efficiency and also reduces the number of descriptors. The role of feature latitude. At the same time, the continuous gradient feature can also more accurately reflect the contour features of the leaky cable buckle, especially the gradient information at the inflection point and the edge.

Claims (7)

1.一种高铁隧道漏缆卡扣检测方法,其特征在于包括如下步骤:1. A high-speed rail tunnel leaky cable buckle detection method is characterized in that comprising the steps: 改进CS-LBP算法并逐一计算高铁隧道漏缆卡扣图像采样圆域的梯度方向特征,得到完整的初步梯度方向特征图;Improve the CS-LBP algorithm and calculate the gradient direction characteristics of the image sampling circle of the leaky cable buckle of the high-speed railway tunnel one by one, and obtain a complete preliminary gradient direction feature map; 改进的CS-LBP算法的步骤为:图像采样圆域内取采样个数P=8,采样半径R=1,阈值T=10;用双线性插值法先确定圆形邻域内所有采样点的灰度值;再依次计算每组中心对称采样点的灰度差值;最后比较灰度差值与阈值T的大小关系,以此确定梯度的方向;The steps of the improved CS-LBP algorithm are as follows: the number of samples in the image sampling circle is P=8, the sampling radius R=1, and the threshold T=10; the gray values of all sampling points in the circular neighborhood are first determined by bilinear interpolation method. Then calculate the gray level difference of each group of centrally symmetrical sampling points in turn; finally compare the relationship between the gray level difference and the threshold T to determine the direction of the gradient; 若灰度差值的绝对值大于阈值T,则将灰度值大的采样点对应的计数位标记为1,此计数位便是这组采样像素对的梯度方向;同时将灰度值小的采样点对应的计数位标记为0;若灰度差值的绝对值不大于阈值T,则两个采样点对应的计数位都标记为0,表示这组采样像素对没有梯度,对整幅高斯滤波后的图像重复上述运算,得到完整的初步梯度方向特征图,每个像素的取值都唯一对应了一种由八位二进制数字0或1构成的一维数组;If the absolute value of the grayscale difference is greater than the threshold T, the counting bit corresponding to the sampling point with a large grayscale value is marked as 1, and this counting bit is the gradient direction of this group of sampling pixel pairs; at the same time, the grayscale value is small The count bit corresponding to the sampling point is marked as 0; if the absolute value of the gray difference value is not greater than the threshold T, the count bit corresponding to the two sampling points is marked as 0, indicating that this group of sampling pixel pairs has no gradient, and the entire Gaussian The filtered image repeats the above operations to obtain a complete preliminary gradient direction feature map, and the value of each pixel uniquely corresponds to a one-dimensional array composed of eight binary numbers 0 or 1; 在此特征图上进行两次连续的下采样并分别提取这两幅采样图像的连续梯度特征;Perform two continuous downsampling on this feature map and extract the continuous gradient features of the two sampled images respectively; 将这两组梯度特征串联作为描述子,用SVM完成故障卡扣图像的分类工作。The two groups of gradient features are connected in series as descriptors, and SVM is used to complete the classification of fault snap images. 2.如权利要求1所述的高铁隧道漏缆卡扣检测方法,其特征在于:关键梯度特征的计算方法如下:2. The high-speed rail tunnel leaky cable buckle detection method as claimed in claim 1, is characterized in that: the calculation method of key gradient feature is as follows: 采用关键梯度方向来表示像素块的整体梯度趋势,按梯度方位图进行排序,逆时针方向分布的数字1~8分别对应了8个梯度方向,将像素块内所有像素的二进制像素值按相同的计数位逐一累加后,计数和最大的计数位就是该像素块的关键梯度方向。The key gradient direction is used to represent the overall gradient trend of the pixel block, sorted according to the gradient azimuth map, and the numbers 1~8 distributed in the counterclockwise direction correspond to 8 gradient directions respectively, and the binary pixel values of all pixels in the pixel block are divided into the same After the count bits are accumulated one by one, the count and the largest count bit are the key gradient direction of the pixel block. 3.如权利要求2所述的高铁隧道漏缆卡扣检测方法,其特征在于,Cell单元是由a、b、c、d四个像素组成的像素块,获取此Cell的关键梯度方向特征的方法如下:3. the high-speed rail tunnel leaky cable buckle detection method as claimed in claim 2, is characterized in that, Cell unit is the pixel block that is made up of a, b, c, d four pixels, obtains the key gradient direction characteristic of this Cell Methods as below: 首先用改进后的CS-LBP算法依次计算这四个像素对应的一维数组像素值;再将这四个一维像素值按相同的计数位逐一累加,以出现计数方向最多的梯度方向为关键梯度方向;最后得到该Cell的梯度方向以及该关键梯度方向的输出编码值,计算公式定义如下:First, the improved CS-LBP algorithm is used to sequentially calculate the one-dimensional array pixel values corresponding to these four pixels; then the four one-dimensional pixel values are accumulated one by one according to the same counting position, and the gradient direction with the most counting direction is the key Gradient direction; finally get the gradient direction of the Cell and the output encoding value of the key gradient direction, the calculation formula is defined as follows:
Figure QLYQS_1
Figure QLYQS_1
,
其中X i 表示一维数组,Y表示Cell结构内所有一维数组X i 的累加,x ij ∈{0,1},i ∈{1,n},j ∈{1,m},ij都为整数;函数
Figure QLYQS_2
表示输出一维数组Y中最大值所对应的位置,即此时最大值的列坐标j;对整幅初步梯度方向特征图重复以上步骤,取步长stride为2,于是得到第一次下采样后的梯度特征图;
Where X i represents a one-dimensional array, Y represents the accumulation of all one-dimensional arrays X i in the Cell structure, x ij ∈ {0, 1}, i ∈ {1, n}, j ∈ {1, m}, i and j are all integers; the function
Figure QLYQS_2
Indicates the position corresponding to the maximum value in the output one-dimensional array Y , that is, the column coordinate j of the maximum value at this time; repeat the above steps for the entire preliminary gradient direction feature map, and take the stride as 2, so the first downsampling is obtained After the gradient feature map;
在第一次下采样后的特征图上再进行一次相同的迭代,得到第二次下采样特征图。The same iteration is performed on the feature map after the first downsampling to obtain the second downsampling feature map.
4.如权利要求3所述的高铁隧道漏缆卡扣检测方法,其特征在于:Cell结构的长宽设定为2×2,通道数为8,滑动步长stride为2,这样既能方便连续梯度特征提取时相关参数的设定,同时每一层下采样特征图的长和宽都与传统LBP及其变体算法得到的最小分区子图像的尺寸成倍数关系。4. The method for detecting leaky cable snaps in high-speed railway tunnels as claimed in claim 3, characterized in that: the length and width of the Cell structure are set to 2×2, the number of channels is 8, and the sliding step stride is 2, which can facilitate The setting of relevant parameters during continuous gradient feature extraction, and the length and width of each layer of downsampled feature maps are in multiples of the size of the smallest sub-image obtained by traditional LBP and its variant algorithms. 5.如权利要求1所述的高铁隧道漏缆卡扣检测方法,其特征在于:在采样特征图上提取连续梯度特征时定义3×3的窗口为一个Block,通道数为8,滑动步长为1。5. The high-speed railway tunnel leaky cable buckle detection method as claimed in claim 1, characterized in that: when extracting continuous gradient features on the sampling feature map, define a 3 × 3 window as a Block, the number of channels is 8, and the sliding step is is 1. 6.如权利要求5所述的高铁隧道漏缆卡扣检测方法,其特征在于:在Block内按梯度方位图的逆时针方向做环形排序,统计所有基准通道和相邻通道非中心像素的最大连续序列长度,首先逐一确定存在中心像素的通道并以此通道为基准,如果所有通道都不存在中心像素则该Block不输出连续梯度特征。6. The high-speed rail tunnel leaky cable buckle detection method as claimed in claim 5, characterized in that: in the Block, do circular sorting in the counterclockwise direction of the gradient azimuth map, and count the maximum values of all reference channels and adjacent channel non-central pixels For the length of the continuous sequence, first determine the channel with the central pixel one by one and use this channel as a reference. If there is no central pixel in all channels, the block will not output continuous gradient features. 7.如权利要求5所述的高铁隧道漏缆卡扣检测方法,其特征在于:连续梯度特征的计算步骤和限制条件包括如下三点:7. The high-speed rail tunnel leaky cable buckle detection method as claimed in claim 5, characterized in that: the calculation steps and limiting conditions of the continuous gradient feature include the following three points: 在8通道的Block内先确定存在中心像素的通道,若都不存在中心像素,则不输出特征;In the 8-channel Block, first determine the channel with the central pixel, and if there is no central pixel, the feature will not be output; 以存在中心像素的通道为基准,判断其邻域内最大连续序列大长度是否不小于3,若不满足则不输出特征;Based on the channel with the central pixel, judge whether the maximum continuous sequence length in its neighborhood is not less than 3, and if not, then do not output the feature; 分别统计与基准通道相邻的通道的最大连续序列长度,连续梯度特征输出的编码形式为基准通道编号和三个相应通道的最大连续序列长度,该策略的编码总个数为768种。The maximum continuous sequence length of the channel adjacent to the reference channel is counted separately. The encoding form of the continuous gradient feature output is the reference channel number and the maximum continuous sequence length of the three corresponding channels. The total number of encodings of this strategy is 768.
CN202111449917.6A 2021-11-30 2021-11-30 Detection method of leaky cable buckle in high-speed railway tunnel Active CN114119577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111449917.6A CN114119577B (en) 2021-11-30 2021-11-30 Detection method of leaky cable buckle in high-speed railway tunnel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111449917.6A CN114119577B (en) 2021-11-30 2021-11-30 Detection method of leaky cable buckle in high-speed railway tunnel

Publications (2)

Publication Number Publication Date
CN114119577A CN114119577A (en) 2022-03-01
CN114119577B true CN114119577B (en) 2023-06-23

Family

ID=80368884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111449917.6A Active CN114119577B (en) 2021-11-30 2021-11-30 Detection method of leaky cable buckle in high-speed railway tunnel

Country Status (1)

Country Link
CN (1) CN114119577B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115100202B (en) * 2022-08-25 2022-11-11 聊城市宏伟电器有限公司 Cable quality detection method based on image processing

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093226A (en) * 2012-12-20 2013-05-08 华南理工大学 Construction method of RATMIC descriptor for image feature processing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855634B (en) * 2011-06-28 2017-03-22 中兴通讯股份有限公司 Image detection method and image detection device
CN102324030B (en) * 2011-09-09 2013-11-06 广州灵视信息科技有限公司 Target tracking method and system based on image block characteristics
CN105404857A (en) * 2015-11-04 2016-03-16 北京联合大学 Infrared-based night intelligent vehicle front pedestrian detection method
CN107315990B (en) * 2017-05-04 2021-08-13 深圳市美好幸福生活安全系统有限公司 A Pedestrian Detection Algorithm Based on XCS-LBP Features

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093226A (en) * 2012-12-20 2013-05-08 华南理工大学 Construction method of RATMIC descriptor for image feature processing

Also Published As

Publication number Publication date
CN114119577A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN111598860B (en) Lithium battery defect detection method based on yolov3 network embedded in self-attention gate module
CN110263666B (en) Action detection method based on asymmetric multi-stream
CN107038416B (en) A Pedestrian Detection Method Based on Improved HOG Feature of Binary Image
CN114140462A (en) Bearing wear degree evaluation method based on image processing
CN113313149B (en) A Dishes Recognition Method Based on Attention Mechanism and Metric Learning
CN107092884B (en) Rapid coarse-fine cascade pedestrian detection method
CN109178831B (en) A kind of belt conveyor longitudinal tear detection method
CN111507206B (en) Finger vein identification method based on multi-scale local feature fusion
CN114332650B (en) Remote sensing image road identification method and system
CN112819753B (en) Building change detection method and device, intelligent terminal and storage medium
CN109325507A (en) An Image Classification Algorithm and System Combining Superpixel Saliency Features and HOG Features
CN113487610B (en) Herpes image recognition method and device, computer equipment and storage medium
CN112819000A (en) Streetscape image semantic segmentation system, streetscape image semantic segmentation method, electronic equipment and computer readable medium
CN107704867A (en) Based on the image characteristic point error hiding elimination method for weighing the factor in a kind of vision positioning
CN115345859A (en) Intelligent detection method, device, equipment and storage medium for image of tunnel seepage water
CN114463715A (en) A method of lane line detection
CN114565753B (en) A method for identifying small targets of drones based on improved YOLOv4 network
CN116188756A (en) Instrument angle correction and indication recognition method based on deep learning
CN108460320A (en) Based on the monitor video accident detection method for improving unit analysis
CN111462090A (en) Multi-scale image target detection method
CN106886763A (en) The system and method for real-time detection face
CN117593295A (en) Nondestructive testing method for production defects of mobile phone data line
CN114119577B (en) Detection method of leaky cable buckle in high-speed railway tunnel
CN118711038A (en) Automatic quality inspection method and system for inverter assembly based on improved YOLOv8 detection algorithm
CN114399681B (en) Power energy equipment identification method, device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20250617

Address after: Room 2703, Maoye Center, No.1 Chaoyang South Street, Dongfeng Road Sub district Office, Jingxiu District, Baoding City, Hebei Province, 071000

Patentee after: Hebei Ruxiang Information Technology Co.,Ltd.

Country or region after: China

Address before: 050000 17 North East Ring Road, Shijiazhuang, Hebei

Patentee before: SHIJIAZHUANG TIEDAO University

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250620

Address after: 519000 new green science and Technology Industrial Park, Doumen District, Zhuhai, Guangdong

Patentee after: Zhuhai Hansen Technology Co.,Ltd.

Country or region after: China

Address before: Room 2703, Maoye Center, No.1 Chaoyang South Street, Dongfeng Road Sub district Office, Jingxiu District, Baoding City, Hebei Province, 071000

Patentee before: Hebei Ruxiang Information Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right