Tire qualification detection method based on LBP
Technical Field
The invention relates to the technical field of tire detection, in particular to a tire qualification detection method based on LBP.
Background
A qualified tire requires a plurality of processes, wherein tire damage, air bubbles, steel bar breakage, uneven arrangement of steel bars, and the like are important defects affecting the quality of the tire. In the conventional tire manufacturing process, the damage condition of the tire and the breakage condition of the reinforcing steel bar are mostly detected by manual observation. The staff judges whether the tire is qualified or not through manual experience according to the X-ray film of the tire. The following problems exist in the artificial tire detection: firstly, manpower is consumed, and detection workers need to rotate every 20 minutes due to long-term detection errors facing the screen; secondly, human factors can be generated by manual detection, and some subjective factors are in the human factors.
Therefore, how to provide a tire inspection method with high inspection efficiency and reduced subjective factor influence is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
In view of this, the invention provides a tire qualification testing method based on LBP, which adopts an artificial intelligence method to realize tire testing, and because the tire X-ray film includes the texture features such as the outline of the steel bar, the tire pattern, and the like, and the LBP feature extraction technology has many advantages in the aspect of texture feature extraction, the LBP is adopted to extract the texture features, and the tire qualification testing is realized, thereby not only reducing the influence of artificial subjective factors on the testing result, but also greatly improving the testing efficiency.
In order to achieve the above purpose, the invention provides the following technical scheme:
a tire qualification detection method based on LBP comprises the following specific steps:
s1: reading and detecting a tire X-ray film, and determining the tire model according to the size of the tire X-ray film;
s2: cutting the tire X-ray film according to the tire model determined in the S1;
s3: and (5) classifying the cut tire X-ray films according to the S2, and returning a tire qualification detection result.
Preferably, in the above-mentioned method for testing tire qualification based on LBP, the method for determining the tire model number in S1 includes:
s11: setting the size s of a tire X-ray film as M X N, wherein M is the width pixel value of the X-ray film, and N is the height pixel value of the X-ray film;
s12: and comparing the similarity of the sizes of the M and the N and the X-ray film of the known tire to determine the type class of the s. ( It is to be understood that: currently, tire manufacturers produce a total of four models of tires 1500 x 6100,3000 x 9000, 1500 x 5100, 1600 x 4500 )
Preferably, in the above mentioned method for inspecting tire qualification based on LBP, the X-ray film of the tire is cut into four parts in S2: left edge, shoulder, tread, right edge.
Preferably, in the above method for inspecting the tire qualification based on LBP, the method for inspecting the qualification of the cut tire X-ray film in S3 includes:
s31: constructing a training set and a test set according to different parts;
s32: separately training samples of different portions of a tire X-ray film using the LBP method;
s33: and (4) performing qualification detection on each part of the X-ray film of the tire in a sliding window mode.
Preferably, in the tire qualification testing method based on LBP described above, in S31, the four portions of the tire X-ray film are divided by using a sliding window, where the divided blocks are squares with a size of w × w pixels, and w has a value range of [200,300], where the step length of sliding the sliding window is S pixels, and the value range of S is [180,280]; a training set and a test set are constructed.
Preferably, in the above method for testing tire qualification based on LBP, the sample method of training X-ray film of tire by LBP method in S32 includes:
s321: (1) Inputting training sample images in a training set, and extracting texture features of the training sample images by using sampled-LBP;
s322: calculating an image characteristic value by the texture characteristic through a kernel calculation formula; the training sample comprises m pictures, wherein m is a finite integer larger than 1000, and the distance between the m pictures is calculated through a nuclear calculation formula; by Chi 2 As a distance to measure two feature vectors, i.e. two images, F and F', n is the dimension 255 of the texture feature:
m by m distance matrix, each row element of the distance matrix represents the characteristic vector of the ith image;
s323: and classifying the training sample images by using a support vector machine to obtain the classification result of the training sample images.
Preferably, in the above method for detecting tire acceptability based on LBP, the method for extracting texture features of an image using sampled-LBP in S321 includes:
s3211: let a pixel point of the image be (x)
c ,y
c ) The binary description of the LBP characteristic value is defined as:
wherein, g
p Is the gray value of the adjacent pixel, g
c Is the central pixel grey value and p is the number of adjacent pixels.
S3212: by pixel point (x) c ,y c ) Taking the values of P =8 adjacent pixels in a circle with the radius of R =1 as the center of the circle, arranging the values into eight-bit binary data in the clockwise direction, and representing the eight-bit binary data as integer data.
S3213: and obtaining the texture characteristics after obtaining the LBP value of the training sample image.
Preferably, in the above method for detecting tire qualification based on LBP, the step S33 of detecting qualification using a sliding window includes:
s331: the horizontal direction step length of the sliding window is width = Xpx, the vertical direction step length is height = Xpx, and the detection sequence formed after the sliding window is { P1, P2, \8230;, pn }.
S332: the extraction detects the textural features of each sequence Pi.
S333: and calculating the distances between the Pi and the m training samples to serve as an m-dimensional feature vector of the Pi, and judging whether the Pi is qualified by using the SVM.
S334: if the Pi detection is unqualified, stopping continuously judging the picture and determining that the picture is unqualified; otherwise, the subsequent sequence is continuously detected until the detection is finished.
According to the technical scheme, compared with the prior art, the tire qualification detection method based on the LBP is provided, the tire detection is realized by adopting an artificial intelligence method, the tire X-ray film comprises the texture characteristics such as the outline of a steel bar and tire patterns, the LBP characteristic extraction technology has many advantages in the aspect of texture characteristic extraction, the texture characteristics are extracted by adopting the LBP, the tire qualification detection is realized, the influence of artificial subjective factors on the detection result is reduced, and the detection efficiency is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic diagram of the sliding window segmentation of the present invention;
FIG. 3 is a schematic view of a tire inspection X-ray film of the present invention;
FIG. 4 is a schematic diagram of the tire of the present invention after detecting X-ray cutting.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a tire qualification detection method based on LBP, which adopts an artificial intelligence method to realize tire detection, and adopts LBP to extract texture characteristics and realize tire qualification detection, thereby reducing the influence of artificial subjective factors on detection results and greatly improving the detection efficiency.
As shown in fig. 1, a tire qualification testing method based on LBP is characterized by comprising the following specific steps:
s1: reading and detecting a tire X-ray film, and determining the tire model according to the size of the tire X-ray film;
the method for determining the model number of the tire comprises the following steps:
s11: setting the size s of a tire X-ray film as M X N, wherein M is the width pixel value of the X-ray film, and N is the height pixel value of the X-ray film;
s12: comparing the similarity of the sizes of the M and the N with the sizes of the X-ray films of the known tires, and determining the type class of the s; s2: cutting the tire X-ray film according to the tire model determined in the S1; the tire X-ray film was cut into four sections: left edge, shoulder, tread, right edge.
S3: classifying the cut tire X-ray films according to the S2, and returning a tire qualification detection result;
the method for detecting the qualification of the cut tire X-ray film comprises the following steps:
s31: constructing a training set and a test set according to different parts; dividing four parts of the tire X-ray film by a sliding window mode, wherein the divided square blocks are w pixels by w, and the value range of w is [200,300], the sliding step length of the sliding window is s pixels, and the value range of s is [180,280]; a training set and a test set are constructed.
S32: respectively training samples of different parts of the X-ray film of the tire by using an LBP method; the sample method for training each tire X-ray film by using the LBP method comprises the following steps:
s321: (1) Inputting training sample images in a training set, and extracting texture features of the training sample images by using sampled-LBP; the method for extracting the texture features of the training sample image by using sampled-LBP comprises the following steps:
s3211: let a pixel point of the image be (x) c ,y c ) The binary description of the LBP characteristic value is defined as:
wherein, g
p Is the gray value of the adjacent pixel, g
c Is the central pixel gray scale value, and p is the number of adjacent pixels.
S3212: by pixel point (x) c ,y c ) Taking the values of P =8 adjacent pixels in a circle with the radius of R =1 as the center of the circle, arranging the values into eight-bit binary data in the clockwise direction, and representing the eight-bit binary data as integer data.
S3213: and obtaining the texture characteristics after obtaining the LBP value of the training sample image.
S322: calculating an image characteristic value by the texture characteristic through a kernel calculation formula; the training sample comprises m pictures, wherein m is a finite integer larger than 1000, and the distance between the m pictures is calculated through a nuclear calculation formula; by Chi 2 As a distance measuring two feature vectors, i.e., two images, F and F', n is the dimension 255 of the texture feature:
m by m distance matrix, each row element of the distance matrix represents the characteristic vector of the ith image;
s323: and classifying the training sample images by using a support vector machine to obtain the classification result of the training sample images.
S33: and (4) performing qualification detection on each part of the X-ray film of the tire in a sliding window mode.
The qualification testing by using the sliding window comprises the following steps:
s331: the step length of the sliding window in the horizontal direction is width = Xpx, the step length of the sliding window in the vertical direction is height = Xpx, and a detection sequence formed after the sliding window is { P1, P2, \8230;, pn };
s332: the texture features of each test sequence Pi are extracted.
S333: and calculating the distances between the Pi and the m training sample sets to serve as m-dimensional feature vectors of the Pi, and judging whether the Pi is qualified by using the SVM.
S334: if the Pi detection is unqualified, the continuous judgment of the picture is stopped, and the picture is determined to be unqualified; otherwise, the subsequent sequence is continuously detected until the detection is finished.
As shown in fig. 2, assuming a 10 × 10 square grid, if the grid is divided into 3 × 3 small square grids, the step size is 2, a is the first cut and B is the second cut during the sliding process; the same operational sliding is also in the vertical direction.
FIG. 3 is an X-ray film for inspecting a tire, and FIG. 4 is a left edge A and a left edge B of a tire tread of each of four parts after cutting; c, shoulder part; d right edge.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.