Multi-period steel rail damage data alignment method based on data mining
Technical Field
The invention relates to the field of rail transit and rail flaw detection, in particular to a multi-period rail flaw data alignment method.
Background
Current multicycle alignment relies primarily on manual mileage or GPS based direct alignment. And similar ultrasonic waveforms are found nearby the same mileage of the multicycle data manually based on mileage alignment, and the same damage is determined by combining knowledge of the flaw detection field. The defect alignment mode has the following characteristics: the systematic error caused by the alignment of mileage is large. The fault detection vehicle usually goes through the conditions of rollback, turnout and the like in the working process, and the odometer has the conditions of aging and the like, so that a large system error exists in mileage; alignment efficiency is low. The conventional multicycle alignment relies on manual dragging and waveform judgment of mileage, and is long in time consumption and low in accuracy; is greatly influenced by personnel subjective. The judgment of the similar waveforms is closely related to the judgment experience and domain knowledge of the analyst, and the alignment accuracy is greatly affected. Another manual alignment approach employs direct alignment based on the GPS distance between two points. The problem is that the GPS data has larger system errors, which results in lower alignment accuracy.
The multi-period flaw alignment method based on data mining can fully utilize GPS geographic information of flaws, and align corresponding flaw information after aligning the flaw detection vehicle tracks by adopting a characteristic-based image registration mode according to the characteristics of the flaw detection vehicle running tracks. Compared with the traditional manual mileage-based alignment mode, the method has the advantages that the geographical track characteristics are fully utilized by utilizing the data mining method, the damage can be aligned more accurately, and the accurate alignment can be that flaw detection analysis staff knows the development condition of the previous damage in the process of the operation, so that the working efficiency of the damage analysis staff is improved.
Disclosure of Invention
In view of the above, the present invention provides a multi-period defect data alignment method based on data mining to solve the above-mentioned drawbacks of the related art.
The invention is realized by adopting the following technical scheme.
The multi-period steel rail damage data alignment method based on data mining is characterized by comprising the following steps of:
s2, extracting shape feature points in the track image according to a Harris corner detection (Harris Corner Detection) algorithm. The main calculation steps of the Harris corner detection algorithm are as follows:
s21, calculating first-order Gaussian partial derivatives I of the image along the X direction and the Y direction x ,I y ;
S22, calculating I x 2 ,I y 2 ,I x *I y ;
S23, performing Gaussian blur operation on the three values in S22 to obtain S respectively xx ,S yy ,S xy ;
S24, defining M-sigma according to Harris matrix x ,Calculating two eigenvalues of matrix lambda 1 ,λ 2 ;
S25, according to R=det (M) -k (trace (M)) 2 The R value for each pixel is calculated. Wherein det (M) =λ 1 λ 2 ,trace(M)=λ 1 +λ 2 。
S26, performing non-maximum signal suppression (non-max value suppression) by using a window of n;
and S27, filtering the corner detection result by setting a threshold value, and extracting image feature points.
S31, taking a window of m×m around the feature points detected in S2, calculating a gradient direction for each pixel in the window, and using a direction having a duty ratio of p% or more as a main direction.
S32, taking the main direction calculated in S31 as an axis and taking the characteristic point as the center to take m 1 *m 1 And calculates the gradient magnitude and gradient direction for each pixel. And then weighting operation is carried out by using Gaussian window alignment. Finally at each (m 1 /2)*(m 1 And/2) drawing gradient histograms of eight directions on the window, and calculating the accumulated value of each gradient direction to form a seed point.
S33, describing each characteristic value by adopting surrounding seed points to form a corresponding SIFT characteristic vector.
S34, calculating the Euclidean distance of the SIFT feature vector, and taking the matching with the smallest Euclidean distance as the optimal matching. The two matched characteristic point matrixes are A and B respectively.
S4, calculating a homography matrix H (homography matrix) according to the point-to-point matching result, wherein the calculation formula is H=A -1 B。
S5, applying the homography matrix to all track points in the image, and carrying out transformation alignment on the whole image to obtain an aligned image;
s6, backtracking the corresponding GPS information and the corresponding damage information according to the aligned pictures. And calibrating the deviation mileage data according to the aligned injury information, so as to obtain the accurately aligned mileage information, and the method can be used for injury tracing.
The invention has the beneficial effects that:
the multi-period flaw alignment method based on data mining can fully utilize GPS geographic information of flaws, adopts an image registration mode based on characteristics according to the characteristics of the running track of the flaw detection vehicle, aligns the track of the flaw detection vehicle, and then performs high-precision alignment on corresponding flaw information to provide powerful support for multi-period flaw judgment.
Drawings
FIG. 1 is a flow diagram of a method for aligning multi-cycle rail damage data based on data mining;
fig. 2 and 3 are image feature points extracted from two flaw detection vehicle track diagrams with different periods according to Harris corner detection;
FIG. 4 is a graph of alignment results using feature-based image registration;
Detailed Description
The invention is further described by the following examples, which are given by way of illustration only and are not limiting of the scope of the invention.
As shown in fig. 1, a method for aligning multi-period steel rail damage data based on data mining is characterized by comprising the following steps:
s1, drawing GPS coordinates of a flaw detection vehicle track, and converting the GPS coordinates into a track image;
s2, extracting shape feature points in the track image according to a Harris corner detection (Harris Corner Detection) algorithm. The main calculation steps of the Harris corner detection algorithm are as follows:
s21, calculating first-order Gaussian partial derivatives I of the image along the X direction and the Y direction x ,I y ;
S22,Calculation I x 2 ,I y 2 ,I x *I y ;
S23, performing Gaussian blur operation on the three values in S22 to obtain S respectively xx ,S yy ,S xy ;
S24, defining M-sigma according to Harris matrix x ,Calculating two eigenvalues of matrix lambda 1 ,λ 2 ;
S25, according to R=det (M) -k (trace (M)) 2 The R value for each pixel is calculated. Wherein det (M) =λ 1 λ 2 ,trace(M)=λ 1 +λ 2 . K is taken to be 0.04 with the best effect when aligning the track of the flaw detection vehicle.
S26, performing non-maximum signal suppression (non-max value suppression) by using a window of n; when the flaw detection vehicle track is aligned, the value of the window is 3*3.
And S27, filtering the corner detection result by setting a threshold value, and extracting image feature points. The effect diagram of extracting and labeling the feature points of the two images is shown in fig. 2 and 3.
And S3, matching the shape feature points in the two images based on a SIFT algorithm. The method comprises the following specific steps:
s31, taking a 16×16 window around the feature points detected in S2, calculating a gradient direction for each pixel in the window, and using a direction having a duty ratio of 80% or more as a main direction.
And S32, taking the main direction calculated in the step S31 as an axis, taking a window of 16 x 16 by taking the characteristic points as the center, and calculating the gradient amplitude and the gradient direction of each pixel. And then weighting operation is carried out by using Gaussian window alignment. And finally, drawing gradient histograms of eight directions on each 8 x 8 window, and calculating the accumulated value of each gradient direction to form a seed point.
S33, describing each characteristic value by adopting surrounding seed points to form a corresponding SIFT characteristic vector.
S34, calculating the Euclidean distance of the SIFT feature vector, and taking the matching with the smallest Euclidean distance as the optimal matching. The two matched characteristic point matrixes are A and B respectively.
S4, calculating a homography matrix (Homography Matrix) according to the point-to-point matching result. When aligning the flaw detection vehicle track, a random sampling coincidence algorithm (Random Sample Consensus) is used for calculating a conversion matrix of the alignment points.
S5, applying the homography matrix to all track points in the image, and carrying out transformation alignment on the whole image. The aligned flaw detection vehicle track image is shown in fig. 4.
S6, backtracking the corresponding GPS information and the corresponding damage information according to the aligned pictures. And calibrating the deviation mileage data according to the aligned injury information, so as to obtain the accurately aligned mileage information, and the method can be used for injury tracing.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.