CN110263867A - A kind of rail defects and failures classification method - Google Patents

A kind of rail defects and failures classification method Download PDF

Info

Publication number
CN110263867A
CN110263867A CN201910550796.0A CN201910550796A CN110263867A CN 110263867 A CN110263867 A CN 110263867A CN 201910550796 A CN201910550796 A CN 201910550796A CN 110263867 A CN110263867 A CN 110263867A
Authority
CN
China
Prior art keywords
hurt
image
failures
value
formula
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.)
Pending
Application number
CN201910550796.0A
Other languages
Chinese (zh)
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.)
Zhuzhou CRRC Times Electric Co Ltd
Original Assignee
Zhuzhou CSR Times Electric Co Ltd
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 Zhuzhou CSR Times Electric Co Ltd filed Critical Zhuzhou CSR Times Electric Co Ltd
Priority to CN201910550796.0A priority Critical patent/CN110263867A/en
Publication of CN110263867A publication Critical patent/CN110263867A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of rail defects and failures classification methods, comprising the following steps: the hurt image data based on calibration creates hurt picture library;Extract the characteristic value and composition characteristic vector of hurt image in hurt picture library;The feature vector of hurt image is normalized to [0,1] section;The feature vector of hurt image after normalized is subjected to PCA dimension-reduction treatment, feature vector after dimension-reduction treatment inputs in classifier as training sample set to be trained, obtain the optimal classification function of hurt image, then test sample collection input optimal classification function is tested, examines the classification accuracy of optimal classification function;Visualization output is carried out to the classification results of test sample collection.The technical issues of present invention is able to solve existing hurt method of discrimination in face of complex environment, can not include the decision rule of all hurts, can not identify so as to cause part hurt with rate of false alarm height and response time length, low efficiency.

Description

A kind of rail defects and failures classification method
Technical field
The present invention relates to technical field of image processing, classify more particularly, to a kind of rail defects and failures applied to rail examination Method, by selecting appropriate feature extraction algorithm and disaggregated model to can be realized higher classification accuracy.
Background technique
Rail-defect detector car is the engineering vehicles for being equipped with rail examination detection system, has automatic detection and identification The ability of hurt, widely used by major road bureau at home inside rail.Rail-defect detector car uses the flaw detection principle of ultrasonic wave, The energy converter for visiting in wheel (30 total) incidence angles degree by 6 launches ultrasonic wave, when encountering the barrier in rail, Ultrasonic pulse will be reflected off, and be received by energy converter.Energy converter passes to system processing and analysis after receiving, be finally System shows the data of acquisition and algorithm recognition result in the form of Type B figure.Abscissa indicates the scanning rail of probe in Type B figure Mark, ordinate indicate the propagation time (or distance) of ultrasonic wave, and the position of barrier can emit and connect according to energy converter in rail The time for receiving ultrasonic wave is positioned, and is shown in Type B figure in the form of grid, wherein different grid colors are indicated by not With the Obstacle Position after the energy converter positioning of angle.
If rail examination detection system is the brain of rail-defect detector car, then recognizer is then rail examination detection The neural unit of system.Rail examination detection system in actual use, since it uses fixed Decision Tree Rule Carry out sentencing wound, face complex environment, the rule for differentiating all hurts can not be included, thus cause part hurt can not identify with The high problem of rate of false alarm.Also, due to region sexual factor, during with manufacturer's AC regeneration, there are response time length, effect The problems such as rate is low.With II type inspection car of GTC80 collected data instance on the calibration line of Xinping, the wherein hurt on calibration line It sets manually.Attached drawing 1 and attached drawing 2 indicate that the B of the web of the rail through-hole on the rail of left and right at same position shows fragment samples, if algorithm is known Not Chu hurt, then can remember in hurt external application collimation mark.As shown in Fig. 1, algorithm not can recognize that the hurt, and algorithm is known in attached drawing 2 This hurt is not gone out.Its reason is that B shows image and is different from natural image, the former is interfered greatly by extraneous factor, even if detection is same The hurt of type is influenced by factors such as speed, centering situations, it will and cause ultrasonic propagation time inconsistent, therefore, it is difficult to Form the same grating image.In face of changing numerous grating images, once the variation of grating image is more than software itself Algorithm recognition rule, then be easy to appear fail to report, wrong report problem.
In the prior art, mainly related to the present patent application by following technical scheme:
The prior art was Harbin Institute (Weihai) of Technology in application on 01 10th, 2015, and in 07 month 2015 01 Day is open, the Chinese invention application " high-speed rail rail defects and failures classification method " of Publication No. CN104751169A.The patent application mentions A kind of high-speed rail rail defects and failures classification method has been supplied, time domain and the frequency domain office for damaging signal are extracted first with wavelet analysis method Portion's feature combines different compartments to establish three-dimensional tensor signal same measurement point, Data expansion to hyperspace is obtained non-negative Tensor is subsequently introduced singular value decomposition to non-negative using alternately iteration criterion of the least-squares algorithm as non-negative tensor resolution The initialization of tensor improves, and extracts hiding feature using improved non-negative tensor resolution method, is finally introducing the limit Habit machine algorithm realizes the real-time grading to rail defects and failures.The inventive method can accurately classify to rail defects and failures signal, mention The high speed and accuracy of hurt classification and there is preferable robustness.
Firstly, the prior art extracts vibration signal characteristics using wavelet analysis method, and use extreme learning machine (ELM) classify, feature extraction algorithm is relatively simple, and the feature extracted does not have representativeness.Secondly, prior art will Raw data set A points are two parts, small one and large one two datasets are obtained, wherein using biggish data set as training sample set B by lesser data set as test sample collection C, and does not carry out cross validation, and artificial training set and the test set of dividing is in the presence of master The property seen.Again, the speed of detection that the prior art is mainly based upon conventional ultrasound technology inspection car is unable to satisfy the hurt inspection of high-speed rail Speed requirement is surveyed, and conventional ultrasound technology inspection car has realized the detection speed of 80km/h, the detection for being able to satisfy high-speed rail hurt needs It asks.And the prior art only detects the hurt inside rail with vibration signal of the collection high-speed rail on rail, this mode exists Vibration signal disturbing factor is excessive, the technological deficiencies such as classification results inaccuracy.
Summary of the invention
In view of this, being differentiated the purpose of the present invention is to provide a kind of rail defects and failures classification method with solving existing hurt Method faces complex environment, can not include the decision rule of all hurts, can not identify and report by mistake so as to cause part hurt Rate height and response time length, the technological deficiency of low efficiency.
In order to achieve the above-mentioned object of the invention, the present invention specifically provides a kind of technology realization side of rail defects and failures classification method Case, rail defects and failures classification method, comprising the following steps:
S101) the hurt image data based on calibration creates hurt picture library;
S102 the characteristic value and composition characteristic vector of hurt image in hurt picture library) are extracted;
S104) feature vector of every class hurt image is trained, obtains the optimal classification function of hurt image;
S105) the feature vector input optimal classification function of unbred hurt image is tested;
S106 visualization output) is carried out to the class test result of hurt image.
Further, the method also includes following steps:
S1031 the feature vector of hurt image) is divided into training sample set and test sample collection.
Further, the method also includes following steps:
S1032 the feature vector of hurt image) is normalized to [0,1] section.
Preferably, the method also includes following steps:
S1033 the feature vector of the hurt image after normalized) is subjected to PCA dimension-reduction treatment, dimension-reduction treatment Feature vector afterwards is for training.
Further, the feature vector of every class hurt image is concentrated to training sample as classifier using support vector machines Be trained, and using the feature vector of untrained hurt image as test sample collection come inspection-classification device training after Model performance.
Further, in the step S101) in, for the concrete type of rail defects and failures, in the hurt picture number of calibration According to middle selection hurt image, and form hurt picture library.The feature vector of hurt image is hurt with rail in the training sample set Damage type label.The feature vector of hurt image does not have rail defects and failures type label in the test sample collection, but rail is hurt It is artificial known for damaging type.
Preferably, in the step S104) in, a part is randomly selected from every class hurt image as training sample Collection is trained, and the hurt image of remaining part is verified as test sample collection.When carrying out repeating to test again, then A part is randomly selected from every class hurt image to be trained, and the hurt image data of remaining part is verified.Such as This carries out cross validation several times, and test is mutually indepedent every time, the training sample set verified every time or test sample collection part It is overlapped, to assess the estimated performance of optimal classification function.
Further, after test sample collection being inputted optimization class function, the test sample collection label predicted leads to It crosses and the test sample collection label and artificial known label is formed into visual comparing result, judge whether classification results are quasi- with this Really.
Preferably, the hurt amount of images being trained is greater than the hurt amount of images verified.
Further, in the step S104) in, according to the training sample set of input, training sample set label, and it is arranged The variation range and step size of punishment parameter and radial base nuclear parameter are intersected by cross validation and grid dividing Verify the highest global optimum's punishment parameter of lower training sample set verifying classification accuracy and optimal radial base nuclear parameter.The overall situation is most Excellent punishment parameter and optimal radial base nuclear parameter calculate according to the following formula:
K(xiX)=exp [- (xi-x)2/2σ1 2]=exp [- g (xi-x)2]
Wherein, min, which is represented, minimizes, and ω is coefficient vector, and C is punishment parameter, §iFor slack variable, xiIt is hurt figure with x The feature vector of picture, K (xiIt x) is Radial basis kernel function, σ1, g be radial base nuclear parameter, i is that training sample set is numbered, and l is to instruct Practice sample set sum, exp is represented using natural constant e as the exponential function at bottom.
Further, in the step S104) in, optimization class function calculates according to the following formula:
In formula, sgn (x) represents sign function, and l is training sample set sum, and i is training sample set number, yiFor hurt The class label of image, aiFor Lagrangian, K (xiX) Radial basis kernel function is represented, dot product is represented, b is to offset to Amount.
Preferably, in the step S102) in, the algorithm that is combined by Tamura textural characteristics with local binary patterns Extract the characteristic value of hurt image.
Further, in the step S102) in, extract roughness, the contrast, direction in Tamura textural characteristics Property, line picture degree and roughly spend characteristic value.
The roughness features value F of hurt imagecrsIt extracts according to the following formula:
First according to formula 1) calculate hurt image in size be 2k×2kThe average brightness value A of pixel in the active window of pixelk (x′,y′)。
In formula, the pixel brightness value that (i ', j ') is put in g (i ', j ') deputy activity window determines that pixel is living by k The range of dynamic window, (x ', y ') represents some pixel in hurt image.
Then, according to formula 2) it calculates separately between the active window that each pixel does not overlap in the horizontal and vertical directions Mean luminance differences.
Ek,hRepresent the horizontal direction difference of the pixel, Ek,vRepresent the vertical direction difference of the pixel.For each Pixel selects suitable k value to make E value maximum, while the optimum size S of active window is arrangedbest(x ', y ')=2k
Finally, passing through formula 3) average value in whole picture hurt image is calculated to obtain the roughness features value of hurt image Fcrs:
In formula, m, n respectively represent the length and width of hurt image.
The contrast metric value F of hurt imageconIt extracts according to the following formula:
In formula, σ represents the standard variance of hurt gray value of image, μ4Represent four squares, σ2Represent hurt gray value of image Variance.
The direction characteristic value F of hurt imagedirIt extracts according to the following formula:
Firstly, the gradient vector at each pixel is calculated, according to formula 5) calculate the vector field homoemorphism | Δ G | and deflection θ.
In formula, ΔHAnd ΔVRespectively hurt image and two Prewitt operator convolution obtain both horizontally and vertically on Variable quantity, arctan () represents arctan function, and π represents pi.
Then, it is configured to the histogram H of expression θ valueD:
In formula, Hθ(k) represent and work as | Δ G | the quantity of pixel when >=T, (2k-1) pi/2 n≤θ≤(2k+1) pi/2 n, T are represented The threshold value of setting, n represent the quantification gradation of orientation angle.
Finally, calculating histogram HDThe acuity of middle peak value obtains the direction characteristic value F of hurt imagedir:
In formula, p represents histogram HDIn peak value, npThe quantity for representing peak value in histogram, for some peak value p, ωp Represent the quantized value range that the peak value includes, φpIt is ωpIn there are the quantized values of maximum histogram value.
The line picture degree characteristic value F of hurt imagelinIt extracts according to the following formula:
In formula, PDdRepresent the range points of n × n local direction co-occurrence matrix.
The rough degree characteristic value F of hurt imagerghIt extracts according to the following formula:
Frgh=Fcrs+Fcon 9)
In formula, FcrsRepresent the roughness features value of hurt image, FconRepresent the contrast metric value of hurt image.
Further, in the step S102) in, the local binary patterns feature of hurt image is extracted according to the following formula Value:
In formula, subscript riu2, which is represented, uses invariable rotary More General Form, ROR (LBPP,R, q) and it represents LBPP,RRing shift right Q, P is the quantity of circle shaped neighborhood region, and R is circular radius, U (LBPP,R) it is homogeneity measure, min, which is represented, to be minimized.
By implementing the technical solution for the rail defects and failures classification method that aforementioned present invention provides, have the following beneficial effects:
(1) rail defects and failures classification method of the present invention, by the way that image processing algorithm is applied to hurt identification neck inside rail Domain, and the algorithm is different from images match, neither similarity-rough set simply is carried out with the hurt template of known class, Hurt judgement is carried out not according to fixed rule, all rail defects and failures types can be included, it is accurate for the identification of hurt Rate is substantially improved, while the response time is short, high-efficient;
(2) rail defects and failures classification method of the present invention, using Tamura texture feature extraction+local binary feature extraction side The characteristic value that method extracts hurt image in hurt picture library is used for the training of classifier, can extract rail defects and failures figure more fully hereinafter The feature of picture, to realize more good, accurately classification;
(3) rail defects and failures classification method of the present invention, using the classifier trained based on hurt feature have specific aim with Variability can constantly carry out learning training according to the training set difference of offer, be suitble to the optimal of current training set to find Classifier;
(4) rail defects and failures classification method of the present invention, using training sample set and test sample collection cross-training and verifying, energy Enough subjectivities for eliminating artificial selection sample set are hurt experience and are added by sentencing the hurt checked in common detection operation and expert It adds and, gradually form the hurt picture library based on big data, classifier is trained with this, it is hereby achieved that more preferably classifying Verification and measurement ratio.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.It should be evident that the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other embodiments are obtained according to these attached drawings.
Fig. 1 is the prior art by a kind of collected Type B display hurt image schematic diagram of rail examination equipment;
Fig. 2 is the prior art by the collected another Type B display hurt image schematic diagram of rail examination equipment;
Fig. 3 is a kind of system structure diagram of specific embodiment of rail defects and failures sorter that the method for the present invention is based on;
Fig. 4 is the system structure frame for the rail defects and failures sorter another kind specific embodiment that the method for the present invention is based on Figure;
Fig. 5 is to carry out feature by local binary patterns in a kind of specific embodiment of rail defects and failures classification method of the present invention to mention Take the corresponding circular ring shape neighborhood schematic diagram of several difference P and R values;
Fig. 6 is hurt classifying and dividing optimal separating hyper plane in a kind of specific embodiment of rail defects and failures classification method of the present invention Schematic diagram;
Fig. 7 is a kind of program flow diagram of specific embodiment of rail defects and failures classification method of the present invention;
Fig. 8 is the program flow diagram of rail defects and failures classification method another kind specific embodiment of the present invention;
Fig. 9 is the schematic diagram of five quasi-representative hurt images in a kind of specific embodiment of rail defects and failures classification method of the present invention;
Figure 10 is the Tamura textural characteristics of hurt picture library in a kind of specific embodiment of rail defects and failures classification method of the present invention Image;
Figure 11 is hurt picture library in a kind of specific embodiment of rail defects and failures classification method of the present inventionPartial Feature Image;
Figure 12 is the schematic diagram of hurt classification results in a kind of specific embodiment of rail defects and failures classification method of the present invention;
Figure 13 is the result schematic diagram that the prior art identifies actual track by rail examination equipment;
Figure 14 is another result schematic diagram identified by rail examination equipment to actual track of the prior art;
Figure 15 is to be shown in a kind of embodiment using the result interface that rail defects and failures classification method of the present invention carries out hurt prediction It is intended to;
In figure: 1- hurt picture library establishes module, 2- characteristic extracting module, 3- hurt categorization module, and 4- classification results are shown Module, 5- data normalization module, 6- Data Dimensionality Reduction processing module, 21-Tamura texture feature extraction module, the part 22- two Value tag extraction module.
Specific embodiment
For the sake of quoting and understanding, will hereafter used in technical term, write a Chinese character in simplified form or abridge and be described below:
PCA:Principal Components Analysis, the abbreviation of principal component analysis;
SVM:Support Vector Machine, the abbreviation of support vector machines;
RBF:Radial Basis Function, the abbreviation of radial base.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical scheme in the embodiment of the invention is clearly and completely described.Obviously, described embodiment is only It is only a part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, the common skill in this field Art personnel all other embodiment obtained without creative efforts belongs to the model that the present invention protects It encloses.
As shown in attached drawing 3 to 12 and attached drawing 15, the specific embodiment of rail defects and failures classification method of the present invention is given, under The invention will be further described with reference to the drawings and specific embodiments in face.
Embodiment 1
As shown in Fig. 3, a kind of embodiment for the rail defects and failures sorter that the method for the present invention is based on, specifically includes: Hurt picture library establishes module 1, characteristic extracting module 2, hurt categorization module 3 and classification results display module 4.
Hurt picture library establishes module 1 and creates hurt picture library based on the hurt image data of calibration.
Characteristic extracting module 2 extracts the characteristic value and composition characteristic vector of hurt image in hurt picture library.
Hurt categorization module 3 is trained the feature vector of every class hurt image, obtains the optimal classification of hurt image Function, and the feature vector of unbred hurt image input optimal classification function is tested.
Classification results display module 4 carries out visualization output to the class test result of hurt image.
As shown in Fig. 4, rail defects and failures sorter, which still further comprises, is set to characteristic extracting module 2 and hurt classification The feature vector of hurt image is normalized to [0,1] area by the data normalization module 5 between module 3, data normalization module 5 Between.Rail defects and failures sorter further includes at the Data Dimensionality Reduction being set between data normalization module 5 and hurt categorization module 3 Module 6 is managed, Data Dimensionality Reduction processing module 6 carries out the feature vector of the hurt image after normalized at PCA dimensionality reduction Reason, the feature vector after dimension-reduction treatment are trained for exporting to hurt categorization module 3.
The feature vector for being input to the hurt image of hurt categorization module 3 is divided into training sample set and test sample Collection.The partition process of training sample set and test sample collection can be before data normalization and data dimension-reduction treatment, can also be with After data normalization and data dimension-reduction treatment.Hurt categorization module 3 is using support vector machines as classifier to training sample This concentrates the feature vector of every class hurt image to be trained, and using the feature vector of untrained hurt image as survey Examination sample set carrys out the model performance after the training of inspection-classification device.
Hurt picture library establishes the concrete type that module 1 is directed to rail defects and failures, and wound is chosen in the hurt image data of calibration Image is damaged, and forms hurt picture library.The feature vector of hurt image has rail defects and failures type label in training sample set.Test The feature vector of hurt image does not have rail defects and failures type label in sample set, but rail defects and failures type is artificial known.
Hurt categorization module 3 randomly selects a part from every class hurt image and is trained as training sample set, And the hurt image of remaining part is verified as test sample collection.When carrying out repeating to test again, then from every class hurt A part is respectively randomly selected in image to be trained, and the hurt image data of remaining part is verified.It so carries out several Secondary cross validation, test is mutually indepedent every time, and the training sample set or test sample collection verified every time partially overlap, with assessment The estimated performance of optimal classification function.
Training sample set, training sample set label of the hurt categorization module 3 according to input, and punishment parameter and radial direction are set The variation range and step size of base nuclear parameter obtain training sample under cross validation by cross validation and grid dividing The highest global optimum's punishment parameter of collection verifying classification accuracy and optimal radial base nuclear parameter.Global optimum's punishment parameter and most Excellent radial direction base nuclear parameter calculates according to the following formula:
K(xiX)=exp [- (xi-x)2/2σ1 2]=exp [- g (xi-x)2]
Wherein, min, which is represented, minimizes, and ω is coefficient vector, and C is punishment parameter, §iFor slack variable, xiIt is hurt figure with x The feature vector of picture, K (xiIt x) is Radial basis kernel function, σ1, g be radial base nuclear parameter, i is that training sample set is numbered, and l is to instruct Practice sample set sum, exp is represented using natural constant e as the exponential function at bottom.
The optimization class function of hurt categorization module 3 calculates according to the following formula:
In formula, sgn (x) represents sign function, and l is training sample set sum, and i is training sample set number, yiFor hurt The class label of image, aiFor Lagrangian, K (xiX) Radial basis kernel function is represented, dot product is represented, b is to offset to Amount.
After test sample collection inputs the optimization class function of hurt categorization module 3, the test sample collection mark predicted Label, the test sample collection label export to classification results display module 4 and artificial known label and form visual comparing result, Judge whether classification results are accurate with this.As a kind of preferable specific embodiment of the present invention, the hurt picture number being trained Amount is greater than the hurt amount of images verified.
Characteristic extracting module 2 includes Tamura texture feature extraction module 21 and local binary feature extraction module 22, and The characteristic value of hurt image is extracted using the algorithm that Tamura textural characteristics are combined with local binary patterns.
Tamura texture feature extraction module 21 extracts the roughness features value F of hurt image according to the following formulacrs:
First according to formula 1) calculate hurt image in size be 2k×2kThe average brightness value A of pixel in the active window of pixelk (x′,y′)。
In formula, the pixel brightness value that (i ', j ') is put in g (i ', j ') deputy activity window determines active window by k The range of mouth, (x ', y ') represents some pixel in hurt image.
Then, according to formula 2) it calculates separately between the active window that each pixel does not overlap in the horizontal and vertical directions Mean luminance differences.
Ek,hRepresent the horizontal direction difference of the pixel, Ek,vRepresent the vertical direction difference of the pixel.For each Pixel selects suitable k value to make E value maximum, while the optimum size S of active window is arrangedbest(x ', y ')=2k
Finally, passing through formula 3) average value in whole picture hurt image is calculated to obtain the roughness features value of hurt image Fcrs:
In formula, m, n respectively represent the length and width of hurt image.
Tamura texture feature extraction module 21 is according to formula 4) extract hurt image contrast metric value Fcon:
In formula, σ represents the standard variance of hurt gray value of image, μ4Represent four squares, σ2Represent hurt gray value of image Variance.
Tamura texture feature extraction module 21 extracts the direction characteristic value F of hurt image according to the following formuladir:
Firstly, the gradient vector at each pixel is calculated, according to formula 5) calculate the vector field homoemorphism | Δ G | and deflection θ.
In formula, ΔHAnd ΔVRespectively hurt image and two Prewitt operator convolution obtain both horizontally and vertically on Variable quantity, arctan () represents arctan function, and π represents pi.
Then, it is configured to the histogram H of expression θ valueD:
In formula, Hθ(k) represent and work as | Δ G | the quantity of pixel when >=T, (2k-1) pi/2 n≤θ≤(2k+1) pi/2 n, T are represented The threshold value of setting, n represent the quantification gradation of orientation angle.
Finally, calculating histogram HDThe acuity of middle peak value obtains the direction characteristic value F of hurt imagedir:
In formula, p represents histogram HDIn peak value, npThe quantity for representing peak value in histogram, for some peak value p, ωp Represent the quantized value range that the peak value includes, φpIt is ωpIn there are the quantized values of maximum histogram value.
Tamura texture feature extraction module 21 extracts the line picture degree characteristic value F of hurt image according to the following formulalin:
In formula, PDdRepresent the range points of n × n local direction co-occurrence matrix.
Tamura texture feature extraction module 21 extracts the rough degree characteristic value F of hurt image according to the following formulargh:
Frgh=Fcrs+Fcon 9)
In formula, FcrsRepresent the roughness features value of hurt image, FconRepresent the contrast metric value of hurt image.
Local binary characteristic extracting module 22 extracts the local binary patterns characteristic value of hurt image according to the following formula:
In formula, subscript riu2, which is represented, uses invariable rotary More General Form, ROR (LBPP, R, q) and it represents LBPP, RCirculation is right Q are moved, P is the quantity of circle shaped neighborhood region, and R is circular radius, U (LBPP,R) it is homogeneity measure, min, which is represented, to be minimized.
The rail defects and failures sorter based on image procossing that the present embodiment proposes is by having training sample set extraction Representative feature, and feature is trained, the optimum classifier for being suitble to current training sample set is found by verifying repeatedly, Both similarity mode simply was not carried out with the hurt template of known class, hurt is not carried out according to fixed rule and is sentenced yet It is disconnected, the organic unity of variability and flexibility is realized, accuracy and recognition speed to rail defects and failures classification greatly improved.
Embodiment 2
As shown in Fig. 7, a kind of embodiment of rail defects and failures classification method of the present invention, specifically includes the following steps:
S101) the hurt image data based on calibration creates hurt picture library;
S102 the characteristic value and composition characteristic vector of hurt image in hurt picture library) are extracted;
S104) feature vector of every class hurt image is trained, obtains the optimal classification function of hurt image;
S105) the feature vector input optimal classification function of unbred hurt image is tested;
S106 visualization output) is carried out to the class test result of hurt image.
As shown in Fig. 8, rail defects and failures classification method still further comprises step S1031), by the feature of hurt image to Amount is divided into training sample set and test sample collection.Rail defects and failures classification method further includes step S1032), it will by the step The feature vector of hurt image is normalized to [0,1] section.It is specifically exactly by training sample set feature vector and test sample Collection feature vector is normalized to [0,1] section, respectively obtains train_rail data set and test_rail data set.Normalization Exactly data to be treated are limited in after algorithm process in a certain range of needs.It is not only square by normalized Follow-up data processing, also fully ensured that algorithm operation when quickening convergence.
Rail defects and failures classification method still further comprises step S1033), it will be after normalized by the step The feature vector of hurt image carries out PCA dimension-reduction treatment, and the feature vector after dimension-reduction treatment is for training.Specifically, being exactly Train_rail data set and test_rail data set are input in pcaForSVM dimensionality reduction preconditioned functions, PCA drop is obtained Tie up pretreated training sample set train_pca and test sample collection test_pca.Data after dimension-reduction treatment can be with Realize the explanation degree to initial data 90%.Herein it should be strongly noted that step S1031) training sample set and survey Trying sample set partition process can also be in step S1032) normalized and step S1033) it carries out after PCA dimension-reduction treatment.
In step S101), for the concrete type of rail defects and failures, hurt figure is chosen in the hurt image data of calibration Picture, and form hurt picture library.The feature vector of hurt image has rail defects and failures type label in training sample set.Test sample The feature vector of hurt image is concentrated not have rail defects and failures type label, but rail defects and failures type is artificial known.
In step S102), hurt figure is extracted by the algorithm that Tamura textural characteristics are combined with local binary patterns The characteristic value of picture.
Feature extraction extracts useful data or information from image, obtains the non-image expression or description of image, such as Numerical value, vector sum symbol etc..The non-image expression or description extracted is characterized.The present embodiment is special using Tamura texture Local binary patterns of seeking peace extract feature, can extract the different classes of mostly important feature of difference, and cast out to classification simultaneously Feature without much contributions.
Tamura textural characteristics: Tamura textural characteristics have six kinds of essential attributes, are respectively as follows: roughness, contrast, direction Property, line picture degree, regularity and rough degree.The calculating of this six kinds of essential attributes is as follows:
Roughness features value is extracted: firstly, calculating size in hurt image is 2k×2kPixel in the active window of pixel Average brightness value, as shown in formula (1):
In formula (1), the pixel brightness value that (i ', j ') is put in g (i ', j ') deputy activity window determines activity by k The range of window, (x ', y ') represent some pixel in hurt image.
Then, it calculates separately average bright between the active window that each pixel does not overlap in the horizontal and vertical directions It is poor to spend, as shown in formula (2):
Ek,hRepresent the horizontal direction difference of the pixel, Ek,vRepresent the vertical direction difference of the pixel.For each Pixel selects suitable k value to make E value maximum, while the optimum size S of window is arrangedbest(x ', y ')=2k
Finally, can be obtained by the roughness F of hurt image by calculating the average value in entire imagecrs:
In formula (3), m, n respectively indicate the length and width of hurt image.
Contrast metric value is extracted: it is obtained by the statistics to pixel intensity distribution situation.It is calculated such as formula (4) institute Show:
In formula (4), σ represents the standard variance of hurt gray value of image, μ4Represent four squares, σ2Represent hurt image grayscale The variance of value.
Direction characteristic value is extracted: firstly, the gradient vector at each pixel is calculated, according to formula 5) calculate the vector field homoemorphism | Δ G | and deflection θ.
In formula (5), ΔHAnd ΔVThe respectively obtained horizontal and vertical side of hurt image and two Prewitt operator convolution Upward variable quantity, arctan () represent arctan function, and π represents pi.
Then, it is configured to the histogram H of expression θ valueD:
In formula (6), Hθ(k) represent and work as | Δ G | the quantity of pixel, T generation when >=T, (2k-1) pi/2 n≤θ≤(2k+1) pi/2 n The threshold value of table setting, n represent the quantification gradation of orientation angle.
Finally, calculating histogram HDThe acuity of middle peak value obtains the direction characteristic value F of hurt imagedir:
In formula (7), p represents histogram HDIn peak value, npThe quantity for representing peak value in histogram, for some peak value p, ωpRepresent the quantized value range that the peak value includes, φpIt is ωpIn there are the quantized values of maximum histogram value.
Line picture degree characteristics extraction: its calculating is as follows:
In formula (8), PDdRepresent the range points of n × n local direction co-occurrence matrix.
Regularity characteristics extraction: since image texture characteristic has erratic behavior, whole image is divided into more A subgraph and the variance for calculating each subgraph.4 characteristics of the present embodiment comprehensive sub-areas subgraph measure the rule of texture Whole degree.
Freg=1-r (σcrscondirlin) (9)
In formula (9), σxxxIndicate FxxxStandard deviation, r indicate normalization factor.
Rough degree characteristics extraction: its calculating is as follows:
Frgh=Fcrs+Fcon (10)
In the present embodiment, five kinds of essential attributes (not extracting regularity feature) in Tamura textural characteristics are chosen.
Local binary patterns feature extraction: part is carried out according to gray value of the gray value of center pixel to its neighborhood territory pixel Thresholding forms a binary pattern, thus centered on pixel response.The present embodiment uses the circular ring shape of any radius Neighborhood and unconventional 3 × 3 neighborhood.
In hurt gray level image, the circular ring shape neighborhood that a radius is R (R > 0), P (P > 0) a neighborhood territory pixel are defined It is uniformly distributed circumferentially, as shown in Fig. 5.In figure 5, the gray value not fallen on pixel center neighborhood can be by double Linear interpolation obtains.If the Local textural feature of neighborhood is T0, then T0 can be determined with the function of P+1 pixel in the neighborhood Justice, it may be assumed that
T0=t (gc,g0,…,gP-1) (11)
In formula (11), gcIt is the center pixel gray value of the neighborhood.gq(q=0,1 ..., P-1) it is P equidistant point corresponding It is distributed in using center pixel as the center of circle, radius is the gray value of the pixel on the circumference of R.
By the gray value g of central pixel pointcAs threshold value, binaryzation is carried out to the gray value of its neighborhood territory pixel point, such as formula (12) and shown in formula (13), wherein s (x) represents a sign function:
T0≈t(s(g0-gc),…,s(gP-1-gc)) (12)
Characterization Local textural feature can be obtained in the weighted sum that different location is carried out to obtained P bit LBP value:
Unsigned binary number after threshold calculations can generate 2 due to the initial bit and direction difference of selectionPKind mould The LBP of formulaP,R.And with the increase of neighborhood sample point number, the type of binary pattern can also be sharply increased.It is asked to solve this Topic and the influence for eliminating image rotation generation, the present embodiment propose the LBP describing mode of More General Form and invariable rotary:
In formula (15), subscript riu2 expression has used invariable rotary More General Form, ROR (LBPP,R, q) and it indicates LBPP,RIt follows Ring moves to right q.
In step S104), the spy of every class hurt image is concentrated to training sample as classifier using support vector machines Sign vector is trained, and is instructed using the feature vector of untrained hurt image as test sample collection come inspection-classification device Model performance after white silk.It is instructed more specifically, randomly selecting a part from every class hurt image as training sample set Practice, and the hurt image of remaining part is verified as test sample collection.Hurt when carrying out repeating to test again, then from every class A part is respectively randomly selected in damage image to be trained, and the hurt image data of remaining part is verified.If so carrying out Secondary cross validation is done, test is mutually indepedent every time, and the training sample set or test sample collection verified every time partially overlap, to comment Estimate the estimated performance of optimal classification function.
After test sample collection is inputted optimization class function, the test sample collection label predicted, by by the survey Examination sample set label and artificial known label form visual comparing result, judge whether classification results are accurate with this.As A kind of preferable specific embodiment of the present invention, the hurt amount of images being trained are greater than the hurt amount of images verified.
After extracting feature, divided using support vector machines (Support Vector Machine, SVM) as classifier Class.SVM belongs to supervised learning model, and by DUAL PROBLEMS OF VECTOR MAPPING into the space of a more higher-dimension, one is established in this space Largest interval hyperplane establishes two hyperplane parallel to each other in the two sides of hyperplane to separate data, if making two to put down The distance of row hyperplane maximizes, then is known as supporting vector corresponding to the vector of lowest distance value at this time.Between parallel hyperplane Distance is bigger, and the overall error of classifier is smaller.
The main thought of SVM is to establish a N-dimensional hyperplane as decision curved surface, so that the classification between positive and negative sample set Interval is maximized.Situation can be divided for two-dimensional linear, it is assumed that size is the training sample set { (x of li,yi), i=1,2 ..., L } it is made of two classes, if xi∈R(N)Belong to the 1st class, then marks the (y that is positivei=1).If belonging to the 2nd class, (the y that is negative is markedi=- 1).The target of study constructs a classification function, and test data is made to classify as correctly as possible.
Wherein, x indicates the feature vector of piece image, and y indicates that class label, i indicate the quantity of image.Such as: choosing 200 The feature vector of width image is trained, and is exactly that the training sample set (x that size is l=200 is made of five kinds of hurt typesi, yi), i=1,2 ..., 200 }, 0~40 is same class hurt, and 41~80 be again another kind of hurt.x1Indicate piece image Feature vector, i.e. 205 features, y1Indicate x1Belong to which kind of in five kinds of hurt types, xiFor the column vector of 205*1.
Optimal Separating Hyperplane if it exists:
ω x+b=0 (16)
So that:
Then claiming training set is linear separability, and ω x indicates vector ω ∈ R(N)With x ∈ R(N)Inner product.In formula (17), ω All standardized with b, makes to meet formula (16) apart from nearest data point with Optimal Separating Hyperplane in every class sample set.
If training sample set is not separated by hyperplane mistake, and away from the nearest sample set data of hyperplane and hyperplane it Between spacing it is maximum, then the hyperplane is optimal separating hyper plane, as shown in Fig. 6.
Assuming that x1For the supporting vector of the 1st class, x2For the supporting vector of the 2nd class, it may be assumed that
Then hyperplane interval are as follows:
Joint type (18) and formula (19) can obtain:
If seeking the largest interval of parallel hyperplane, that is, seek the maximum value of the formula (20) under conditions of meeting formula (17), i.e., | | ω | | minimum value, that is,(objective function) is converted objective function using method of Lagrange multipliers are as follows:
In formula (21), ωTω=| | ω | |2, aiFor Lagrangian and ai≥0.Partial derivative is asked to ω and b, thus may be used :
Formula (22) and formula (23) are substituted into formula (21) to obtain:
It can be seen that by formula (24), Lagrangian objective function contains only variable a at this timeiAs long as therefore passing through maximization Formula (24) finds out ai, ω just can be found out, the solution of b can also obtain optimization class function are as follows:
In formula (25), sgn (x) represents sign function, and l is training sample set sum, and i is training sample set number, yiFor The class label of hurt image, aiFor Lagrangian, dot product is represented, b is offset vector.
When training set linearly inseparable, kernel function K (xiIt x) will training sample by the nonlinear transformation of associated system This collection maps feature vectors make training sample be integrated into linear separability to high-dimensional feature space.
The present embodiment is using radial base (Radial Basis Function, RBF) kernel function:
K(xiX)=exp [- (xi-x)2/2σ1 2]=exp [- g (xi-x)2] (26)
In formula (26), xiIt is the feature vector of hurt image, K (x with xiIt x) is RBF kernel function, σ1, g be RBF core ginseng Number, exp are represented using natural constant e as the exponential function at bottom.σ1Smaller, the classification divided can be thinner, that is to say, that is more easy to cause Over-fitting.σ1Bigger, the classification divided can be thicker, leads to not come data separation.G is bigger, and supporting vector is fewer.G is smaller, Supporting vector is more.The number of supporting vector influences the speed of training with prediction.
Meanwhile slack variable § is addedii>=0), slack variable §iIt indicates to allow data point xiThe amount of deviation.If §iArbitrarily If big, then arbitrary hyperplane is all eligible, therefore, the next item up is added on original objective function, so that these §i's Summation also wants minimum:
In formula (27), min, which is represented, to be minimized, and ω is coefficient vector, and l is training sample set sum, and i is training sample set volume Number, §iFor slack variable.C is punishment parameter, (finds hyperplane interval maximum for controlling the two in objective function and guarantees Data point departure is minimum) between weight.C is bigger, and illustrating, which more can't stand, error occurs, is easy over-fitting.C is smaller, holds Easy poor fitting.C is excessive or too small, and generalization ability can be deteriorated.
Equally, formula (27) are converted using method of Lagrange multipliers are as follows:
In formula (28), riFor the Lagrange multiplier being newly added.
To ω, b and §iLocal derviation is sought, is obtained:
Formula (29), formula (30) and formula (31) are substituted into formula (28) to obtain:
Therefore, as long as a just can be found out by maximization formula (32)i, finally obtained optimization class function are as follows:
In formula (33), yiFor the class label of hurt image, aiFor Lagrangian, b is offset vector, sgn (x) generation Table sign function, K (xiX) Radial basis kernel function is represented.
3) in case where training set linearly inseparable, the realization of hurt image classification model mainly includes following step It is rapid:
1) parameter optimization: input training set train_pca, training set label train_rail_labels, setting punishment ginseng Number C (correlation formula:) and RBF nuclear parameter g (correlation formula: K (xiX)=exp [- xi-x)2/2 σ1 2]=exp [- g (xi-x)2]) variation range and step size obtain intersecting and test by cross validation and grid dividing It demonstrate,proves training sample set under meaning and verifies the highest global optimum's punishment parameter C and optimal RBF nuclear parameter g of classification accuracy.
2) it SVM training: input training set train_pca, training set label train_rail_labels and optimal punishes It is (related public to obtain model (i.e. optimization class function) with optimal parameter C to g training data by penalty parameter C and RBF nuclear parameter g Formula:)。
3) SVM is predicted: test set test_pca is inputted training pattern, the test set label ptest_ predicted It is formed visual comparing result with known label test_rail_labels by label, judges whether that classification is quasi- with this Really.
The classification process of SVM classifier is as shown in attached 7 and attached drawing 8.In attached drawing 7 and attached drawing 8, training sample set representations tool There is clear label, can be used for developing the set of eigenvectors of classifier.Test sample set representations without clear label, the training stage still It is not used, the set of eigenvectors of its classification accuracy is predicted for verifying classifier.It is noted that the label of test sample collection It is artificial known.
The process of classifier training is the process learnt, if classifier finds currently employed classification function and will cause point Class mistake, then the information that how should be corrected using mistake offer, so that it may so that classification function court is correctly oriented advance, such as This reciprocal process for forming iteration illustrates classification function if classification function and its parameter are fewer and fewer the case where making error It is gradually restraining, learning process is effective.
The process of classifier prediction is the process verified, if SVM classifier is by test set according to artificial known classification If classification is completed, then explanation achieves the desired results.Once determining that model is reliable according to classification accuracy, so that it may use The rail defects and failures that the model carries out actual track, which are classified, to be predicted.
Embodiment 3
The concrete application process and reality of the present embodiment combination above-described embodiment 1 and 2 pairs of rail defects and failures classification methods of the present invention It applies effect and carries out detailed analysis.
The hurt that five quasi-representatives are chosen in the multiclass hurt of rail carries out proof of algorithm, respectively rail head inclined hole, rail head Cross-drilled hole, screw hole lower-left crackle, web of the rail through-hole, rail bottom crescent moon wound, as shown in Fig. 9.It is each in nominal data for every class hurt Intercepting 50 Zhang great little is 512 pixels × 512 pixels image, so that one sum of composition is the hurt picture library of 250 images.For Convenient for test, A (1~50), B (51~100), C (101~150), D (151~200), E (201~250) class successively indicate attached Five class hurt images in Fig. 6 from left to right.
Using Tamura textural characteristics withThe algorithm combined extracts the characteristic value of five class hurt images, according to reality Border test result, the present embodiment are only chosen five kinds of essential attributes (not extracting regularity attribute) in Tamura textural characteristics, are adopted The characteristic value of 250 width images is extracted with feature extraction algorithm, each image is extracted 205 features and forms a feature vector, Attached drawing 10 and attached drawing 11 illustrate preceding 8 characteristic values in 205 feature vectors of 250 width images.Wherein, attached drawing 10 is Tamura textural characteristics, attached drawing 11 areFeature.Two kinds of characteristic attribute value rules hairs shown in the attached drawing 10 and attached drawing 11 It is existing,Attribute value there is stronger regularity, wherein the attribute value of C, D, E these three types hurt relatively, is not easy It distinguishes.And the difference that five attribute values of Tamura textural characteristics show all it is obvious that compensate for wellIt is special The deficiency of sign qualitatively illustrates that the embodiment of the present invention can preferably extract the feature of image using the method that the two combines.
According to cross validation rule, 80% in every class hurt feature is randomly selected for training (the feature of 40 images Vector), 20% for testing (feature vector of 10 images).Test is repeated several times, takes the average value of cross validation as most Whole classification results, can exclude the subjectivity artificially selected.As shown in the following table 1, table 2 and table 3, use is respectively shown Tamura textural characteristics useFeature and the svm classifier that 7 cross validations are carried out using the feature that the two combines As a result.In table 1- table 3, the result of each cross validation takes mean value that the accuracy rate of final classification result can be obtained, by 7 subseries As a result accuracy rate takes mean value that final total classification results accuracy rate can be obtained.By the accuracy rate of total classification results it is found that dividing Class effect most preferably use Tamura textural characteristics andThe embodiment for the svm classifier that the feature combined carries out, can Up to 99.71% classification accuracy.And individually using Tamura textural characteristics orThe effect that feature is classified is not Such as the former, quantitatively illustrate that the method combined using the two can more fully extract the feature of image, to realize good Classification.
The classification results of 1 Tamura textural characteristics of table
Table 2Classification results
3 Tamura textural characteristics of table withThe classification results combined
As shown in Fig. 12, the prediction result of SVM classifier after certain cross validation is illustrated, wherein abscissa table Show the test sample collection being made of the feature vector of 50 images, 1-10,11-20,21-30,31-40,41-50 respectively indicate from A, the feature vector of 10 images randomly selected in the feature vector of B, C, D, E class hurt image.Ordinate indicates test set Belong to A or B or C or D or E class.Circle mark indicates artificial known class label.* type mark indicates the svm classifier after study Prediction result of the device to test set classification.By attached drawing 12 it is found that having a width to be classified device mistake in A class hurt image is divided into B class wound Damage, classification accuracy 90%.B-E class hurt classification results are accurate, classification accuracy 100%.Therefore, this friendship can be obtained Fork verifying classification results are 98%.
The wound of actual track will be predicted using the hurt feature vector of calibration line as the SVM classifier after training sample set training Damage classification, the hurt information of actual track is as shown in attached drawing 13 and attached drawing 14.It is tested using 14 two examples of attached drawing 13 and attached drawing The accuracy of classifier prediction is demonstrate,proved, as a result as shown in Fig. 15.In attached drawing 15, classifier prediction class label with it is actual Hurt type is coincide, and illustrates that classifier is also capable of the hurt classification of success prediction actual track.
The specific embodiment of the invention proposes the rail defects and failures classification method based on image procossing, and this method has autonomous learn Habit ability, will not realize hurt classification according to fixed rule, and the quality of classification results is dependent on given training set and selected Classifier disaggregated model.Therefore, by selecting appropriate feature extraction algorithm and disaggregated model to be just able to achieve preferable classification Accuracy rate.And the specific embodiment of the invention extracts hurt using the algorithm that Tamura textural characteristics are combined with local binary patterns The characteristic value of image, and model training and Classification and Identification are carried out using SVM, training sample set and test sample collection cross-training and Artificial subjective interference is eliminated in verifying.It is normal that the rail defects and failures classification method of specific embodiment of the invention description has broken rail-defect detector car The hurt recognizer of rule, proposes the rail defects and failures sorting algorithm based on image procossing, shows the present invention by test result The technical solution of specific embodiment description realizes higher classification accuracy in terms of hurt image classification, leads for rail examination Domain provides new research direction.
Professional further appreciates that, the embodiment description in conjunction with disclosed in the specific embodiment of the invention Each exemplary unit and step, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly say The interchangeability of bright hardware and software generally describes each exemplary composition and step according to function in the above description Suddenly.It is implemented in hardware or software actually as these functions, the specific application and design depending on technical solution are about Beam condition.Professional technician can use different methods to achieve the described function each specific application, still Such implementation should not be considered as beyond the scope of the present invention.
Hardware can be directly used in method described in conjunction with the examples disclosed in this document or algorithm, processor executes The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, various programmable logic device, register, hard disk, removable magnetic In disk, CD-ROM or any other form of storage medium well known in the art.Execute the processor of software module Can be central processing unit (CPU), embeded processor, microcontroller (MCU), digital signal processor (DSP), single-chip microcontroller, System on chip (SOC), programmable logic device and any other form well known in the art have control, place Manage the device of function.
By implementing the technical solution of the rail defects and failures classification method of specific embodiment of the invention description, can generate as follows Technical effect:
(1) the rail defects and failures classification method of specific embodiment of the invention description, by the way that image processing algorithm is applied to steel Hurt identifies field inside rail, and the algorithm is different from images match, neither simply with the hurt template of known class Similarity-rough set is carried out, nor carrying out hurt judgement according to fixed rule, all rail defects and failures types can be included, it is right It is substantially improved in the recognition accuracy of hurt, while the response time is short, high-efficient;
(2) the rail defects and failures classification method of specific embodiment of the invention description, using Tamura texture feature extraction+part The characteristic value that the method that binary feature extracts extracts hurt image in hurt picture library is used for the training of classifier, can more comprehensively Ground extracts the feature of rail defects and failures image, to realize more good, accurately classification;
(3) the rail defects and failures classification method of specific embodiment of the invention description, using point trained based on hurt feature Appliances targetedly and variability, can be different according to the training set of offer and constantly carry out learning training, to find suitable The optimum classifier of current training set;
(4) the rail defects and failures classification method of specific embodiment of the invention description, using training sample set and test sample collection Cross-training and verifying can eliminate the subjectivity of artificial selection sample set, pass through the wound that will have been checked in common detection operation Damage and expert, which sentence, to be hurt experience and is added, and is gradually formed the hurt picture library based on big data, is trained classifier with this, so as to Obtain more preferably classification and Detection rate.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The above described is only a preferred embodiment of the present invention, being not intended to limit the present invention in any form.Though So the present invention is disclosed as above with preferred embodiment, and however, it is not intended to limit the invention.It is any to be familiar with those skilled in the art Member, in the case where not departing from Spirit Essence of the invention and technical solution, all using in the methods and techniques of the disclosure above Appearance makes many possible changes and modifications or equivalent example modified to equivalent change to technical solution of the present invention.Therefore, Anything that does not depart from the technical scheme of the invention are made to the above embodiment any simple according to the technical essence of the invention Modification, equivalent replacement, equivalence changes and modification still fall within the range of technical solution of the present invention protection.

Claims (14)

1. a kind of rail defects and failures classification method, which comprises the following steps:
S101) the hurt image data based on calibration creates hurt picture library;
S102 the characteristic value and composition characteristic vector of hurt image in hurt picture library) are extracted;
S104) feature vector of every class hurt image is trained, obtains the optimal classification function of hurt image;
S105) the feature vector input optimal classification function of unbred hurt image is tested;
S106 visualization output) is carried out to the class test result of hurt image.
2. rail defects and failures classification method according to claim 1, which is characterized in that the method also includes following steps:
S1031 the feature vector of hurt image) is divided into training sample set and test sample collection.
3. rail defects and failures classification method according to claim 2, which is characterized in that the method also includes following steps:
S1032 the feature vector of hurt image) is normalized to [0,1] section.
4. rail defects and failures classification method according to claim 3, which is characterized in that the method also includes following steps:
S1033 the feature vector of the hurt image after normalized) is subjected to PCA dimension-reduction treatment, after dimension-reduction treatment Feature vector is for training.
5. according to rail defects and failures classification method described in claim 2,3 or 4, it is characterised in that: use support vector machines conduct Classifier concentrates the feature vector of every class hurt image to be trained training sample, and utilizes untrained hurt image Feature vector carrys out the model performance after the training of inspection-classification device as test sample collection.
6. rail defects and failures classification method according to claim 5, it is characterised in that: in the step S101) in, for steel The concrete type of rail hurt chooses hurt image in the hurt image data of calibration, and forms hurt picture library;The trained sample The feature vector of this concentration hurt image has rail defects and failures type label;In the test sample collection feature of hurt image to Amount does not have rail defects and failures type label, but rail defects and failures type is artificial known.
7. according to rail defects and failures classification method described in claim 2,3,4 or 6, it is characterised in that: in the step S104) In, a part is randomly selected from every class hurt image to be trained as training sample set, and the hurt figure of remaining part As being verified as test sample collection;One is randomly selected when carrying out repeating to test again, then from every class hurt image Part is trained, and the hurt image data of remaining part is verified;Cross validation several times is so carried out, is tried every time It tests independently of each other, the training sample set or test sample collection verified every time partially overlap, to assess the prediction of optimal classification function Performance.
8. rail defects and failures classification method according to claim 7, it is characterised in that: the hurt amount of images being trained is big In the hurt amount of images verified.
9. according to rail defects and failures classification method described in claim 2,3,4,6 or 8, it is characterised in that: test sample collection is defeated After entering optimization class function, the test sample collection label predicted, by by the test sample collection label and manually known Label forms visual comparing result, judges whether classification results are accurate with this.
10. rail defects and failures classification method according to claim 9, which is characterized in that in the step S104) in, according to Training sample set, the training sample set label of input, and the variation range and step of punishment parameter and radial base nuclear parameter are set Into size, by cross validation and grid dividing, it is highest complete to obtain training sample set verifying classification accuracy under cross validation The optimal punishment parameter of office and optimal radial base nuclear parameter;Global optimum's punishment parameter and optimal radial base nuclear parameter are according to following public affairs Formula calculates:
K(xiX)=exp [- (xi-x)2/2σ1 2]=exp [- g (xi-x)2]
Wherein, min, which is represented, minimizes, and ω is coefficient vector, and C is punishment parameter, §iFor slack variable, xiIt is hurt image with x Feature vector, K (xiIt x) is Radial basis kernel function, σ1, g be radial base nuclear parameter, i is that training sample set is numbered, and l is to train sample This collection sum, exp are represented using natural constant e as the exponential function at bottom.
11. rail defects and failures classification method according to claim 10, which is characterized in that in the step S104) in, it is optimal Change classification function to calculate according to the following formula:
In formula, sgn (x) represents sign function, and l is training sample set sum, and i is training sample set number, yiFor hurt image Class label, aiFor Lagrangian, K (xiX) Radial basis kernel function is represented, dot product is represented, b is offset vector.
12. according to claim 1, rail defects and failures classification method described in 2,3,4,6,8,10 or 11, it is characterised in that: described Step S102) in, the characteristic value of hurt image is extracted by the algorithm that Tamura textural characteristics are combined with local binary patterns.
13. rail defects and failures classification method according to claim 12, which is characterized in that in the step S102) in, it extracts Roughness, contrast, directionality, line picture degree in Tamura textural characteristics and characteristic value is spent roughly;
The roughness features value F of hurt imagecrsIt extracts according to the following formula:
First according to formula 1) calculate hurt image in size be 2k×2kThe average brightness value A of pixel in the active window of pixelk(x ', y′);
In formula, the pixel brightness value that (i ', j ') is put in g (i ', j ') deputy activity window determines active window by k Range, (x ', y ') represent some pixel in hurt image;
Then, according to formula 2) calculate separately putting down between the active window that each pixel does not overlap in the horizontal and vertical directions Equal luminance difference;
EK, hRepresent the horizontal direction difference of the pixel, EK, vRepresent the vertical direction difference of the pixel;For each pixel Point selects suitable k value to make E value maximum, while the optimum size S of active window is arrangedbest(x ', y ')=2k
Finally, passing through formula 3) average value in whole picture hurt image is calculated to obtain the roughness features value F of hurt imagecrs:
In formula, m, n respectively represent the length and width of hurt image;
The contrast metric value F of hurt imageconIt extracts according to the following formula:
In formula, σ represents the standard variance of hurt gray value of image, μ4Represent four squares, σ2Represent the side of hurt gray value of image Difference;
The direction characteristic value F of hurt imagedirIt extracts according to the following formula:
Firstly, the gradient vector at each pixel is calculated, according to formula 5) calculate the vector field homoemorphism | Δ G | and deflection θ;
In formula, ΔHAnd ΔVRespectively hurt image and two Prewitt operator convolution obtain both horizontally and vertically on change Change amount, arctan () represent arctan function, and π represents pi;
Then, it is configured to the histogram H of expression θ valueD:
In formula, Hθ(k) represent and work as | Δ G | the quantity of pixel when >=T, (2k-1) pi/2 n≤θ≤(2k+1) pi/2 n, T represent setting Threshold value, n represent the quantification gradation of orientation angle;
Finally, calculating histogram HDThe acuity of middle peak value obtains the direction characteristic value F of hurt imagedir:
In formula, p represents histogram HDIn peak value, npThe quantity for representing peak value in histogram, for some peak value p, ωpIt represents The quantized value range that the peak value includes, φpIt is ωpIn there are the quantized values of maximum histogram value;
The line picture degree characteristic value F of hurt imagelinIt extracts according to the following formula:
In formula, PDdRepresent the range points of n × n local direction co-occurrence matrix;
The rough degree characteristic value F of hurt imagerghIt extracts according to the following formula:
Frgh=Fcrs+Fcon 9)
In formula, FcrsRepresent the roughness features value of hurt image, FconRepresent the contrast metric value of hurt image.
14. rail defects and failures classification method according to claim 12, which is characterized in that in the step S102) in, according to The local binary patterns characteristic value of following formula extraction hurt image:
In formula, subscript riu2, which is represented, uses invariable rotary More General Form, ROR (LBPP, R, q) represent LBPP, RRing shift right q, P For the quantity of circle shaped neighborhood region, R is circular radius, U (LBPP, R) it is homogeneity measure, min, which is represented, to be minimized.
CN201910550796.0A 2019-06-24 2019-06-24 A kind of rail defects and failures classification method Pending CN110263867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910550796.0A CN110263867A (en) 2019-06-24 2019-06-24 A kind of rail defects and failures classification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910550796.0A CN110263867A (en) 2019-06-24 2019-06-24 A kind of rail defects and failures classification method

Publications (1)

Publication Number Publication Date
CN110263867A true CN110263867A (en) 2019-09-20

Family

ID=67920956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910550796.0A Pending CN110263867A (en) 2019-06-24 2019-06-24 A kind of rail defects and failures classification method

Country Status (1)

Country Link
CN (1) CN110263867A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111624261A (en) * 2020-03-23 2020-09-04 梁帆 Method for detecting quality of ultrasonic signal data for steel rail flaw detection
CN111767897A (en) * 2020-07-14 2020-10-13 上海应用技术大学 Support vector machine-based steel rail crack defect identification method
CN114862743A (en) * 2021-02-04 2022-08-05 北京洞微科技发展有限公司 Method and system for determining rail damage based on convolutional neural network
CN116109638A (en) * 2023-04-13 2023-05-12 中铁四局集团有限公司 Rail break detection method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877064A (en) * 2009-04-30 2010-11-03 索尼株式会社 Image classification method and image classification device
CN102184419A (en) * 2011-04-13 2011-09-14 深圳市迈科龙影像技术有限公司 Pornographic image recognizing method based on sensitive parts detection
CN103487463A (en) * 2013-07-30 2014-01-01 中国标准化研究院 Honey detection method using grid optimization-based selection of parameters of support vector machine classifier
CN104751169A (en) * 2015-01-10 2015-07-01 哈尔滨工业大学(威海) Method for classifying rail failures of high-speed rail
CN107977621A (en) * 2017-11-29 2018-05-01 淮海工学院 Shipwreck identification model construction method, device, electronic equipment and storage medium
CN108198171A (en) * 2017-12-27 2018-06-22 大连理工大学 A kind of method of the operating status diagnosis based on server surface Warm status
CN108765412A (en) * 2018-06-08 2018-11-06 湖北工业大学 A kind of steel strip surface defect sorting technique
CN108921201A (en) * 2018-06-12 2018-11-30 河海大学 Dam defect identification and classification method based on feature combination with CNN
CN108961217A (en) * 2018-06-08 2018-12-07 南京大学 A kind of detection method of surface flaw based on positive example training
CN109241824A (en) * 2018-07-17 2019-01-18 东南大学 Black smoke vehicle intelligent control method based on code book and smooth conversion autoregression model
CN109785301A (en) * 2018-12-27 2019-05-21 北京交通大学 A kind of rail corrugation automatic identifying method and appraisal procedure based on image procossing

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877064A (en) * 2009-04-30 2010-11-03 索尼株式会社 Image classification method and image classification device
CN102184419A (en) * 2011-04-13 2011-09-14 深圳市迈科龙影像技术有限公司 Pornographic image recognizing method based on sensitive parts detection
CN103487463A (en) * 2013-07-30 2014-01-01 中国标准化研究院 Honey detection method using grid optimization-based selection of parameters of support vector machine classifier
CN104751169A (en) * 2015-01-10 2015-07-01 哈尔滨工业大学(威海) Method for classifying rail failures of high-speed rail
CN107977621A (en) * 2017-11-29 2018-05-01 淮海工学院 Shipwreck identification model construction method, device, electronic equipment and storage medium
CN108198171A (en) * 2017-12-27 2018-06-22 大连理工大学 A kind of method of the operating status diagnosis based on server surface Warm status
CN108765412A (en) * 2018-06-08 2018-11-06 湖北工业大学 A kind of steel strip surface defect sorting technique
CN108961217A (en) * 2018-06-08 2018-12-07 南京大学 A kind of detection method of surface flaw based on positive example training
CN108921201A (en) * 2018-06-12 2018-11-30 河海大学 Dam defect identification and classification method based on feature combination with CNN
CN109241824A (en) * 2018-07-17 2019-01-18 东南大学 Black smoke vehicle intelligent control method based on code book and smooth conversion autoregression model
CN109785301A (en) * 2018-12-27 2019-05-21 北京交通大学 A kind of rail corrugation automatic identifying method and appraisal procedure based on image procossing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李莹: "基于SVM的海面小目标检测的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
高隽: "《人工神经网络与自然计算研究进展》", 31 October 2004, 合肥工业大学出版社 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111624261A (en) * 2020-03-23 2020-09-04 梁帆 Method for detecting quality of ultrasonic signal data for steel rail flaw detection
CN111767897A (en) * 2020-07-14 2020-10-13 上海应用技术大学 Support vector machine-based steel rail crack defect identification method
CN111767897B (en) * 2020-07-14 2023-08-18 上海应用技术大学 Rail crack defect identification method based on support vector machine
CN114862743A (en) * 2021-02-04 2022-08-05 北京洞微科技发展有限公司 Method and system for determining rail damage based on convolutional neural network
CN116109638A (en) * 2023-04-13 2023-05-12 中铁四局集团有限公司 Rail break detection method and system

Similar Documents

Publication Publication Date Title
CN110246134A (en) A kind of rail defects and failures sorter
CN108830188B (en) Vehicle detection method based on deep learning
CN110263867A (en) A kind of rail defects and failures classification method
Eisenbach et al. How to get pavement distress detection ready for deep learning? A systematic approach
CN106295124B (en) The method of a variety of image detecting technique comprehensive analysis gene subgraph likelihood probability amounts
CN107133651B (en) The functional magnetic resonance imaging data classification method of subgraph is differentiated based on super-network
CN113592845A (en) Defect detection method and device for battery coating and storage medium
CN107590506A (en) A kind of complex device method for diagnosing faults of feature based processing
CN110378869A (en) A kind of rail fastening method for detecting abnormality of sample automatic marking
CN110033002A (en) Detection method of license plate based on multitask concatenated convolutional neural network
CN107064170A (en) One kind detection phone housing profile tolerance defect method
CN106446933A (en) Multi-target detection method based on context information
CN106778687A (en) Method for viewing points detecting based on local evaluation and global optimization
CN111402224B (en) Target identification method for power equipment
Mery Aluminum casting inspection using deep object detection methods and simulated ellipsoidal defects
CN110334594A (en) A kind of object detection method based on batch again YOLO algorithm of standardization processing
CN107886066A (en) A kind of pedestrian detection method based on improvement HOG SSLBP
US20220028068A1 (en) Multi-scale tumor cell detection and classification
CN103177266A (en) Intelligent stock pest identification system
CN110264454A (en) Cervical cancer tissues pathological image diagnostic method based on more hidden layer condition random fields
CN110660049A (en) Tire defect detection method based on deep learning
CN116740426A (en) Classification prediction system for functional magnetic resonance images
CN108805181B (en) Image classification device and method based on multi-classification model
CN106548195A (en) A kind of object detection method based on modified model HOG ULBP feature operators
CN110288577A (en) A kind of 3D realizes the control method and control device of multiple organ lesion integration

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190920