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 PDFInfo
- 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
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 68
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 238000000354 decomposition reaction Methods 0.000 claims abstract description 28
- 239000013598 vector Substances 0.000 claims abstract description 22
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 15
- 230000011218 segmentation Effects 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims abstract description 10
- 238000001914 filtration Methods 0.000 claims abstract description 8
- 230000008569 process Effects 0.000 claims abstract description 6
- 241001669679 Eleotris Species 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 claims description 4
- 230000003190 augmentative effect Effects 0.000 claims description 3
- 230000003044 adaptive effect Effects 0.000 claims description 2
- 230000009977 dual effect Effects 0.000 claims description 2
- 239000004575 stone Substances 0.000 abstract description 6
- 238000012216 screening Methods 0.000 abstract description 4
- 238000012544 monitoring process Methods 0.000 abstract description 3
- 230000002159 abnormal effect Effects 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000513 principal component analysis Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002040 relaxant effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 230000003245 working effect Effects 0.000 description 1
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
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)
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)
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)
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)
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 |
-
2019
- 2019-02-28 CN CN201910151851.9A patent/CN109934135B/en active Active
Patent Citations (1)
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 |