CN109934135B - Rail foreign matter detection method based on low-rank matrix decomposition - Google Patents
Rail foreign matter detection method based on low-rank matrix decomposition 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
- foreign matter
- rank matrix
- 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
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)
1. A rail foreign matter detection method based on low-rank matrix decomposition is characterized by comprising the following steps: comprises the following steps of (a) carrying out,
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; screening the obtained straight line group according to the correlation between the length of the rail and the included angle of the straight line between the rail and the sleeper, calculating the edge straight line of the rail, obtaining a rail area according to the constraint condition of the distance between the straight lines, processing the rail area as an interested area, and dividing the rail area;
step two, sequentially taking the rail areas for processing, extracting pixel vectors from the rail areas along the direction of the crosstie for the left straight line of each rail edge, clustering pixel vector groups, separating the pixel vector groups into two subsets and forming corresponding classification matrixes;
step three, carrying out low-rank matrix decomposition on the classification matrixes under respective types to obtain a low-rank matrix; obtaining a matrix E, namely foreground target foreign matter information, by subtracting the classification matrix and the low-rank matrix;
and fourthly, preprocessing the matrix E, wherein the preprocessing comprises filtering operation and threshold segmentation, and positioning and returning a result obtained after the threshold segmentation to the original image so as to determine the position of the foreign matter in the original image and finish the rail foreign matter detection.
2. The method for detecting foreign objects on a railway track based on low rank matrix decomposition as claimed in claim 1, wherein: the second step is specifically that the first step is,
sequentially processing 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,…,vkK is the number of pixel vectors; for vector set { v, v2,…,vkThe cluster is 2 subsets, denoted m1,m2,…,mpAnd { n }1,n2,…,nqP and q respectively represent the number of pixel vectors in the two subsets, and p + q is equal to 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)。
3. the method for detecting foreign objects on a railway track based on low rank matrix decomposition as claimed in claim 2, wherein: the clustering adopts a Kmeans clustering method.
4. The method for detecting foreign objects on a railway track based on low rank matrix decomposition as claimed in claim 1, wherein: and the low-rank matrix decomposition in the step three adopts an accelerated near-end gradient algorithm, an iterative threshold algorithm, a dual algorithm, an augmented Lagrange multiplier method or an alternate direction method.
5. The method for detecting foreign objects on a railway track based on low rank matrix decomposition as claimed in claim 1, wherein: the concrete process of the step four is as follows:
traversing the elements in the matrix E, assigning a minimum pixel value in a 3 x 3 grid to a 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 jth column is Eij
Eij=255,if Eij>threshold
Eij=0,if Eij≤threshold
Wherein the pixel value is 255 elements, namely representing the detected foreign matter; the positions of foreign matter information in Dz and Ds are calculated by searching the line number with the pixel value of 255 in the matrix E and are returned to the original image, so that the effects of foreign matter detection and positioning are achieved;
the pixel vectors in each subset form a corresponding matrix DzAnd DsThe row vector of (2).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910151851.9A CN109934135B (en) | 2019-02-28 | 2019-02-28 | Rail foreign matter detection method based on low-rank matrix decomposition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910151851.9A CN109934135B (en) | 2019-02-28 | 2019-02-28 | Rail foreign matter detection method based on low-rank matrix decomposition |
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 | Rail foreign matter detection method based on low-rank matrix decomposition |
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 | 北京航空航天大学 | Weak supervision learning-based rail foreign matter detection method and system under empty base view angle |
CN112329604B (en) * | 2020-11-03 | 2022-09-20 | 浙江大学 | Multi-modal emotion analysis method based on multi-dimensional 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 |
WO2018104460A1 (en) * | 2016-12-07 | 2018-06-14 | Siemens Aktiengesellschaft | Method, device and track-bound vehicle, in particular a rail vehicle, for identifying dangerous situations in the track-bound traffic system, in particular in the railway traffic system |
-
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) | Rail foreign matter detection method based on low-rank matrix decomposition | |
Liu et al. | A review of applications of visual inspection technology based on image processing in the railway industry | |
Anand et al. | Crack-pot: Autonomous road crack and pothole detection | |
CN110254468B (en) | Intelligent online detection device and detection method for track surface defects | |
CN106778705B (en) | Pedestrian individual segmentation method and device | |
DE102011117585B4 (en) | Systems and methods for tracking objects | |
CN103810505B (en) | Vehicles identifications method and system based on multiple layer description | |
CN109238756B (en) | Dynamic image detection equipment and detection method for freight car operation fault | |
CN109489584B (en) | Tunnel clearance detection system and tunnel clearance identification method based on 3D technology | |
CN103745224A (en) | Image-based railway contact net bird-nest abnormal condition detection method | |
CN111768417B (en) | Railway wagon overrun detection method based on monocular vision 3D reconstruction technology | |
CN115482195B (en) | Train part deformation detection method based on three-dimensional point cloud | |
CN105260744A (en) | Automatic on-line diagnosis method for freight train coupler tail cotter position faults and system | |
CN113639685B (en) | Displacement detection method, device, equipment and storage medium | |
Zhao et al. | Image-based comprehensive maintenance and inspection method for bridges using deep learning | |
CN111008574A (en) | Key person track analysis method based on body shape recognition technology | |
CN106023076A (en) | Splicing method for panoramic graph and method for detecting defect state of guard railing of high-speed railway | |
CN111127381B (en) | Non-parallel detection method for pantograph slide plate | |
CN115719475B (en) | Three-stage trackside equipment fault automatic detection method based on deep learning | |
CN115527170A (en) | Method and system for identifying closing fault of door stopper handle of automatic freight car derailing brake device | |
CN102214290A (en) | License plate positioning method and license plate positioning template training method | |
CN107506753B (en) | Multi-vehicle tracking method for dynamic video monitoring | |
CN115546223A (en) | Method and system for detecting loss of fastening bolt of equipment under train | |
Chen et al. | RailSegVITNet: A lightweight VIT-based real-time track surface segmentation network for improving railroad safety | |
CN117763423A (en) | Intelligent automobile laser radar point cloud anomaly detection method based on deep learning |
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 |