CN109934135B - A low-rank matrix factorization-based method for detecting foreign objects in railway tracks - Google Patents

A low-rank matrix factorization-based method for detecting foreign objects in railway tracks Download PDF

Info

Publication number
CN109934135B
CN109934135B CN201910151851.9A CN201910151851A CN109934135B CN 109934135 B CN109934135 B CN 109934135B CN 201910151851 A CN201910151851 A CN 201910151851A CN 109934135 B CN109934135 B CN 109934135B
Authority
CN
China
Prior art keywords
rail
low
matrix
rank matrix
pixel
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
CN201910151851.9A
Other languages
Chinese (zh)
Other versions
CN109934135A (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.)
Beihang University
Original Assignee
Beihang 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 Beihang University filed Critical Beihang University
Priority to CN201910151851.9A priority Critical patent/CN109934135B/en
Publication of CN109934135A publication Critical patent/CN109934135A/en
Application granted granted Critical
Publication of CN109934135B publication Critical patent/CN109934135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a rail foreign matter detection method based on low-rank matrix decomposition, and belongs to the technical field of computer vision. The implementation process comprises the following steps: 1) carrying out linear detection on the railway image aerial photographed by the unmanned aerial vehicle and screening the linear groups to find out the linear line at the edge of the rail and determine the area needing detection processing; 2) extracting pixel vectors from the rail area and clustering the pixel vectors, wherein the pixel vectors can be divided into two subsets of sleepers and stones; 3) performing low-rank matrix decomposition on a matrix formed by the two subsets, and performing difference on the matrix and the obtained low-rank matrix with background information to obtain a foreground matrix; 4) and (4) filtering and threshold segmentation are carried out on the foreground matrix, so that the position of the foreign matter in the rail can be determined. The method detects the foreign matters on the rail by using the low-rank matrix decomposition-based algorithm, utilizes the real-time returned pictures of space-based monitoring to quickly confirm the foreign matters, and can be used in the fields of railway safety monitoring and the like.

Description

Rail foreign matter detection method based on low-rank matrix decomposition
Technical Field
The invention belongs to the technical field of computer vision, relates to a digital image processing technology and a target detection technology, and particularly relates to a rail foreign matter detection method based on low-rank matrix decomposition.
Background
The rail foreign matter detection means measures for checking foreign matters in a rail area to ensure the running safety of a train. According to the relevant regulations of train safe running in China, foreign matters which harm normal running of trains cannot be found in railway line safety protection areas and adjacent areas thereof, so that property loss and safety accidents caused by collision of foreign matters due to untimely braking and overlong braking distance can be avoided because drivers can see the foreign matters in a short distance and then brake.
When a patrol inspector enters a rail without train running for overhauling, other articles such as a safety helmet, a working wrench and the like carried by the patrol inspector are likely to be left between the rails due to working properties, or train passengers throw foreign matters such as garbage out of a window, so that potential safety hazards of the train are caused.
In recent years, with the continuous development of the national unmanned aerial vehicle industry, an onboard lens carried by an unmanned aerial vehicle is often used for performing tasks such as abnormal monitoring of special areas and disaster patrol assistance. In the rail transit field, the railway is longer along the line, and long, the degree of difficulty is long when the manpower detects the rail and leaves over the foreign matter, consequently, carries out rail foreign matter detection in real time through unmanned aerial vehicle aerial photograph image, has very important auxiliary action to whether the train can go safely smoothly.
Disclosure of Invention
The invention provides a rail foreign matter detection method based on low-rank matrix decomposition, which is used for detecting foreign matters by using a method of solving a low-rank matrix through clustering and low-rank matrix decomposition by using the repeated characteristics of sleepers and stone periods between rails under the condition of obtaining a model for detection without learning any samples. Since the RGB values of the rail area crossties and the stone sub-areas have a repetitive periodicity, a natural clustering method can be used to separate the two types of areas into two subsets. And the abnormal target is classified in two subsets and is not similar to other components of the subsets. The image can be decomposed into a low-rank matrix containing most similar redundant information through low-rank matrix decomposition, and foreground objects containing abnormal object information can be stripped from the original subset by using a difference making method, so that the low-rank matrix decomposition can be carried out under each type by adopting the method to obtain foreign matter information.
Specifically, the invention provides a rail foreign matter detection method based on low-rank matrix decomposition, which comprises the following steps:
receiving an aerial image shot by an unmanned aerial vehicle carrying camera, inputting the aerial image into a computer, preprocessing the image, and then carrying out linear detection on the whole situation through a linear detection algorithm to obtain a linear group; and screening the obtained straight line group according to the correlation between the length of the rail and the straight line included angle between the rail and the sleeper, calculating a rail edge straight line, and dividing a rail area.
And step two, sequentially taking the rail areas for processing, extracting pixel vectors from the rail areas along the direction of the crosstie according to the left edge of each rail edge, clustering pixel vector groups by using the repeatability of potential stones and the crosstie areas, separating into a crosstie subset and a stone subset, and forming a corresponding classification matrix.
And thirdly, performing low-rank matrix decomposition on the classification matrix under respective types to obtain a low-rank matrix. And (4) subtracting the classification matrix and the low-rank matrix to obtain the foreground target foreign matter information.
And fourthly, performing basic image algorithm processing on the foreground target foreign matter information, wherein the basic image algorithm processing comprises filtering operation and threshold segmentation. And positioning the result after threshold segmentation and returning the result to the original image so as to determine the position of the foreign object in the original image and finish the rail foreign object detection.
The invention has the beneficial effects that:
at present, foreign matter detection is carried out on the basis of deep learning, but the method based on the deep learning needs to learn and train a large number of samples to obtain a model for detection, and once the conditions that unknown foreign matters, foreign matters have large jumping, actual foreign matters are not matched with the sample foreign matters and the like are met, missing detection and error detection occur, and instability of detection based on the deep learning is shown. Therefore, the invention provides a rail foreign matter detection algorithm based on low-rank matrix decomposition, which realizes the detection of all foreign matters on a rail by using a basic image processing algorithm on the premise of not needing any sample learning, and has better robustness.
Drawings
FIG. 1: a flow chart of a rail foreign matter detection method based on low-rank matrix decomposition;
FIG. 2: aerial photography rail original images based on a rail foreign matter detection method embodiment of low-rank matrix decomposition;
FIG. 3: a result chart of division of a linear detection rail area based on a rail foreign matter detection method embodiment of low rank matrix decomposition;
FIG. 4: a rail foreign matter detection result chart of the embodiment of the rail foreign matter detection method based on low-rank matrix decomposition.
Detailed Description
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The invention provides a rail foreign matter detection method based on low-rank matrix decomposition, which is specifically implemented as shown in a flow chart 1 and specifically comprises the following steps:
receiving an aerial image shot by an unmanned aerial vehicle carrying camera and inputting the aerial image into a computer. The method comprises the steps of preprocessing a received image, wherein the preprocessing comprises filtering operation and the like for reducing the influence of noise, and then carrying out line detection on the image overall by using a line detection algorithm to obtain a line group, wherein the line group comprises information such as a line equation, a line segment length, a starting point, an end point and the like. This line detection process is related to the spatial resolution, and the larger the spatial resolution, the more accurate the line obtained, but the larger the calculation amount.
And screening the obtained straight line group according to the trend of the rail in the image and the relevance of the included angle between the rail straight line and the sleeper straight line, calculating a rail edge straight line, and obtaining a rail area as an interested area according to the constraint condition of the distance between the straight lines for processing. Assuming that there are N resulting rail areas, the interest areas are also N.
Step two, sequentially processing the N rail areas, and recording the maximum width of each rail area as lNTaking each pixel point of the left straight line of the rail edge, and extracting the length l from the rail area along the direction of the sleeperNAnd form a set of vectors { v, v }2,…,vkAnd k is the number of pixel vectors. For vector set { v, v2,…,vkThe clustering is performed by adopting a Kmeans clustering method, and the clustering is respectively expressed as { m }1,m2,…,mpAnd { n }1,n2,…,nqAnd j, p and q respectively represent the number of pixel vectors in the two subsets, and p + q ═ k. Respectively forming a corresponding matrix D by the pixel vectors in each subsetzAnd DsThe row vector of (a), wherein:
Dz=[m1,m2,…,mp](1)
Ds=[n1,n2,…,nq](2)
step three, the obtained matrix D is subjected tozAnd DsAnd (3) performing low-rank matrix decomposition, and obtaining low-rank matrices A _ z and A _ s which have no high-frequency information interference and consistent background by adopting a Robust Principal Component Analysis (RPCA) method. The algorithm is selected to solve based on an accelerated near-end gradient algorithm (APG for short), and the specific process is as follows:
A) relaxing the constraint condition convex into a target function to obtain an augmented Lagrangian function;
B) performing approximation by using a quadratic model;
C) and (5) derivation and simplification are carried out, another unknown matrix is fixed, and the low-rank matrix A is solved.
For the low-rank matrix decomposition, an iterative threshold algorithm, a dual algorithm, an augmented Lagrange multiplier method alternate direction method and the like can also be adopted. Due to the extraction of the interested region and the division of the subset to which the pixel belongs in the first step and the second step, the operation amount is greatly reduced when the low-rank matrix decomposition is carried out, and the operation time is shortened.
Differencing matrix D and low rank matrix a:
E=D-A (3)
wherein D ═ Dz,Ds],A=[A_z,A_s]
And obtaining a matrix E which is provided with abnormal foreground object information and background information in the interested area is removed.
Preprocessing the matrix E, including minimum filtering operation and threshold segmentation, detecting and positioning the foreign matters, wherein the specific process is as follows:
and traversing the elements in the matrix E, assigning the minimum pixel value in a 3X 3 grid to the central pixel value to finish minimum filtering, and realizing the denoising effect of the high-frequency noise point.
Then, the matrix E is subjected to threshold segmentation, threshold is obtained by adaptive threshold segmentation, and the pixel value of the ith row and the ith column is Eij
Eij=255,ifEij>threshold
Eij=0,ifEij≤threshold
Wherein a pixel value of 255 elements may characterize a detected foreign object. By searching the line number with the pixel value of 255 in the matrix E, the positions of the foreign matter information in D _ z and D _ s can be calculated and returned to the original image, so that the effects of foreign matter detection and positioning are achieved.
The method can be used for detecting and positioning the foreign matters by taking an aerial image of the rail image, and has important significance for safe running of the train and reduction of manpower consumption.
Examples
In this embodiment, a representative rail foreign object image captured based on the air-based platform is taken as an example, as shown in fig. 2. And (3) carrying out linear detection on the source image, wherein the obtained result is shown in figure 3, and screening the calculated linear to extract the interested rail area.
Extracting pixel vectors from the region of interest, clustering, dividing the region of interest into two subsets of sleepers and stones, performing low-rank matrix decomposition on a matrix formed by the two subsets to obtain a low-rank matrix D, performing difference on the original matrix and the low-rank matrix to obtain a foreground matrix E, performing filtering and threshold segmentation on the foreground matrix to determine the position of a foreign object, and marking the position in a source image, wherein the experimental result is shown in fig. 4.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (5)

1.一种基于低秩矩阵分解的铁轨异物检测方法,其特征在于:包括如下步骤,1. a railway track foreign object detection method based on low-rank matrix decomposition, is characterized in that: comprise the steps, 步骤一、接收无人机搭载相机拍摄的航拍图像并输入计算机中,对图像进行预处理,然后通过直线检测算法对全局进行直线检测,得到直线组;根据铁轨长度以及铁轨和枕木之间的直线夹角的相关性对所求的直线组进行筛选,计算出铁轨边缘直线,并根据直线间距离的约束条件求出铁轨区域作为感兴趣区域进行处理,划分铁轨区域;Step 1: Receive the aerial image captured by the UAV equipped with the camera and input it into the computer, preprocess the image, and then use the straight line detection algorithm to detect the global line to obtain a line group; according to the length of the rail and the straight line between the rail and the sleeper The correlation of the included angle is used to screen the required straight line group to calculate the rail edge straight line, and according to the constraint condition of the distance between the straight lines, the rail area is obtained as the area of interest for processing, and the rail area is divided; 步骤二、依次取铁轨区域进行处理,针对每一个铁轨边缘的左侧直线,沿枕木方向向铁轨区域提取像素向量,对像素向量组进行聚类,分离成两个子集并构成对应分类矩阵;Step 2, taking the rail area for processing in turn, extracting pixel vectors from the rail area along the sleeper direction for the left straight line of each rail edge, clustering the pixel vector groups, separating them into two subsets and forming a corresponding classification matrix; 步骤三、对分类矩阵在各自类型下进行低秩矩阵分解,求出低秩矩阵;对分类矩阵和低秩矩阵作差求得矩阵E,即前景目标异物信息;Step 3: Perform low-rank matrix decomposition on the classification matrix under their respective types to obtain a low-rank matrix; make a difference between the classification matrix and the low-rank matrix to obtain a matrix E, that is, the foreign object information of the foreground target; 步骤四、对矩阵E进行预处理,预处理包括滤波运算和阈值分割,对阈值分割后的结果定位并返回原图像中,以此确定异物在原图像中所在位置,完成铁轨异物检测。Step 4: Preprocess the matrix E. The preprocessing includes filtering operations and threshold segmentation. The result of the threshold segmentation is located and returned to the original image, so as to determine the location of the foreign object in the original image and complete the rail foreign object detection. 2.根据权利要求1所述的一种基于低秩矩阵分解的铁轨异物检测方法,其特征在于:步骤二具体为,2. a kind of railway foreign object detection method based on low-rank matrix decomposition according to claim 1, is characterized in that: step 2 is specifically, 依次对N个铁轨区域进行处理,记每个铁轨区域最大宽度分别为lN,取铁轨边缘左侧直线的每一个像素点,沿枕木方向向铁轨区域提取长度为lN的像素向量并组成向量组{v,v2,…,vk},k为像素向量的个数;对向量组{v,v2,…,vk}聚类为2个子集,分别表示为{m1,m2,…,mp}和{n1,n2,…,nq},p和q分别表示两个子集中的像素向量的个数,并且有p+q=k;将每一个子集中的像素向量分别构成对应矩阵Dz和Ds的行向量,其中:Process the N rail areas in turn, record the maximum width of each rail area as l N , take each pixel point of the straight line on the left side of the rail edge, and extract a pixel vector with a length of l N from the rail area along the sleeper direction to form a vector The group {v, v 2 , ..., v k }, k is the number of pixel vectors; the vector group {v, v 2 , ..., v k } is clustered into 2 subsets, which are respectively expressed as {m 1 , m 2 , . _ _ The pixel vectors form the row vectors of the corresponding matrices D z and D s , respectively, where: Dz=[m1,m2,…,mp] (1)D z = [m 1 , m 2 , . . . , m p ] (1) Ds=[n1,n2,…,nq] (2)。D s = [n 1 , n 2 , . . . , n q ] (2). 3.根据权利要求2所述的一种基于低秩矩阵分解的铁轨异物检测方法,其特征在于:所述的聚类采用Kmeans聚类方法。3 . The method for detecting foreign objects on rails based on low-rank matrix decomposition according to claim 2 , wherein the clustering adopts Kmeans clustering method. 4 . 4.根据权利要求1所述的一种基于低秩矩阵分解的铁轨异物检测方法,其特征在于:步骤三中所述的对低秩矩阵分解采用加速近端梯度算法、迭代阈值算法、对偶算法、增广拉格朗日乘子法或交替方向方法。4. a kind of railway foreign object detection method based on low-rank matrix decomposition according to claim 1, is characterized in that: the low-rank matrix decomposition described in step 3 adopts accelerated proximal gradient algorithm, iterative threshold algorithm, dual algorithm , Augmented Lagrange Multiplier Method or Alternate Direction Method. 5.根据权利要求1所述的一种基于低秩矩阵分解的铁轨异物检测方法,其特征在于:步骤四具体过程如下:5. a kind of rail foreign body detection method based on low-rank matrix decomposition according to claim 1, is characterized in that: the concrete process of step 4 is as follows: 对矩阵E中的元素进行遍历,以3×3网格中最小像素值对中心像素值赋值完成最小值滤波,实现对高频噪声点的去噪效果;Traverse the elements in the matrix E, and complete the minimum value filtering by assigning the minimum pixel value in the 3×3 grid to the central pixel value to achieve the denoising effect on high-frequency noise points; 然后对矩阵E进行阈值分割,threshold为自适应法阈值分割所求得的阈值,第i行第j列的像素值为Eij Then perform threshold segmentation on the matrix E, the threshold is the threshold obtained by the adaptive threshold segmentation, and the pixel value of the i-th row and the j-th column is E ij Eij=255,if Eij>thresholdE ij = 255, if E ij >threshold Eij=0,if Eij≤thresholdE ij =0, if E ij ≤threshold 其中像素值为255元素即表征检测到的异物;通过对矩阵E中像素值为255的行数查找,计算得出异物信息在Dz和Ds中的位置并返回原图像中,达到异物检测和定位的效果;The pixel value of 255 elements represents the detected foreign body; by searching the number of rows with a pixel value of 255 in the matrix E, the position of the foreign body information in Dz and Ds is calculated and returned to the original image to achieve foreign body detection and positioning. Effect; 每一个子集中的像素向量分别构成对应矩阵Dz和Ds的行向量。The pixel vectors in each subset constitute the row vectors of the corresponding matrices D z and D s , respectively.
CN201910151851.9A 2019-02-28 2019-02-28 A low-rank matrix factorization-based method for detecting foreign objects in railway tracks Active CN109934135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910151851.9A CN109934135B (en) 2019-02-28 2019-02-28 A low-rank matrix factorization-based method for detecting foreign objects in railway tracks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910151851.9A CN109934135B (en) 2019-02-28 2019-02-28 A low-rank matrix factorization-based method for detecting foreign objects in railway tracks

Publications (2)

Publication Number Publication Date
CN109934135A CN109934135A (en) 2019-06-25
CN109934135B true CN109934135B (en) 2020-04-28

Family

ID=66986192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910151851.9A Active CN109934135B (en) 2019-02-28 2019-02-28 A low-rank matrix factorization-based method for detecting foreign objects in railway tracks

Country Status (1)

Country Link
CN (1) CN109934135B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582084B (en) * 2020-04-24 2022-07-08 北京航空航天大学 A method and system for detecting foreign objects on rails from a space-based perspective based on weakly supervised learning
CN112329604B (en) * 2020-11-03 2022-09-20 浙江大学 A Multimodal Sentiment Analysis Method Based on Multidimensional Low-Rank Decomposition
CN112488056B (en) * 2020-12-17 2024-08-23 上海媒智科技有限公司 Linear track foreign matter intrusion detection method and device based on computer vision
CN112989931B (en) * 2021-02-05 2022-10-18 广州华微明天软件技术有限公司 Intelligent identification method for foreign matters in subway rail

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745224A (en) * 2013-12-24 2014-04-23 西南交通大学 Image-based railway contact net bird-nest abnormal condition detection method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737252B (en) * 2012-06-01 2014-05-28 西南交通大学 Method for detecting faults caused by foreign body pollution between electrified railway insulator plates based on affine invariant moment
CN110023171A (en) * 2016-12-07 2019-07-16 西门子移动有限责任公司 Method for distinguishing, equipment and rail vehicle, especially rolling stock are known for the dangerous situation in rail traffic, especially in railway traffic

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103745224A (en) * 2013-12-24 2014-04-23 西南交通大学 Image-based railway contact net bird-nest abnormal condition detection method

Also Published As

Publication number Publication date
CN109934135A (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN109934135B (en) A low-rank matrix factorization-based method for detecting foreign objects in railway tracks
Liu et al. A review of applications of visual inspection technology based on image processing in the railway industry
Banić et al. Intelligent machine vision based railway infrastructure inspection and monitoring using UAV
Anand et al. Crack-pot: Autonomous road crack and pothole detection
CN110254468B (en) Intelligent online detection device and detection method for track surface defects
CN109101924B (en) A method for road traffic sign recognition based on machine learning
CN111079819B (en) Method for judging state of coupler knuckle pin of railway wagon based on image recognition and deep learning
Adu-Gyamfi et al. Automated vehicle recognition with deep convolutional neural networks
CN105260744B (en) The automatic on-line diagnostic method and system of a kind of goods train coupler yoke key position failure
CN103745224B (en) Image-based railway contact net bird-nest abnormal condition detection method
CN108615034A (en) A kind of licence plate recognition method that template matches are combined with neural network algorithm
CN103985182A (en) Automatic public transport passenger flow counting method and system
CN111539436B (en) Rail fastener positioning method based on straight template matching
CN110232362B (en) Ship size estimation method based on convolutional neural network and multi-feature fusion
CN111582084B (en) A method and system for detecting foreign objects on rails from a space-based perspective based on weakly supervised learning
Zhao et al. Image-based comprehensive maintenance and inspection method for bridges using deep learning
Zhang et al. End to end video segmentation for driving: Lane detection for autonomous car
CN111008574A (en) A Trajectory Analysis Method of Key Personnel Based on Body Recognition Technology
CN111079822A (en) Image recognition method for misalignment fault between the middle rubber of the axle box rubber pad and the upper and lower plates
CN103150550B (en) A kind of road pedestrian event detection method based on gripper path analysis
CN110782443A (en) Railway track defect detection method and system
CN113569756A (en) Abnormal behavior detection and positioning method, system, terminal equipment and readable storage medium
Du et al. Change detection: The framework of visual inspection system for railway plug defects
Wang et al. FarNet: An attention-aggregation network for long-range rail track point cloud segmentation
CN105761507B (en) A kind of vehicle count method based on three-dimensional track cluster

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