Disclosure of Invention
The invention aims to provide a light source positioning method and a system for a brake disc defect detection process, which are used for acquiring the defect detection requirement and the light source parameter of a brake disc and establishing an illumination model based on the defect detection requirement and the light source parameter. Dynamic information of the brake disc is input into the illumination model, a light source positioning vector output by the illumination model is obtained, a target light source is controlled to irradiate the brake disc according to the light source positioning vector, illumination is more proper, and the accuracy of subsequent defect detection is improved.
The embodiment of the invention provides a light source positioning method for a brake disc defect detection process, which comprises the following steps:
step 1, acquiring defect detection requirements of a brake disc;
step 2, acquiring light source parameters;
step 3, based on the defect detection requirement, establishing an illumination model according to the light source parameters;
step4, acquiring dynamic information of a brake disc;
and 5, determining a light source positioning vector according to the dynamic information and the illumination model, and positioning the light source according to the light source positioning vector.
Preferably, step 4, obtaining dynamic information of the brake disc includes:
positioning a brake disc based on a binarization algorithm to obtain positioning information;
and determining dynamic information of the brake disc according to the positioning information in the target moment.
Preferably, step1, obtaining a defect detection requirement of a brake disc comprises the following steps:
acquiring detection platform information for detecting defects of a brake disc;
Acquiring brake disc parameter information;
Obtaining defect type information to be detected;
And extracting a template based on the defect detection requirement, and determining the defect detection requirement according to the detection platform information, the brake disc parameter information and the defect type information.
Preferably, the step 2 of acquiring the light source parameters includes:
acquiring light source type information and layout information of a target light source;
acquiring adjustable parameter information of a target light source;
and the light source type information, the layout information and the adjustable parameter information are used as light source parameters together.
Preferably, step 3, based on defect detection requirements, establishes an illumination model according to light source parameters, including:
establishing a light source model according to the light source parameters;
acquiring first brake disc defect detection data;
screening the first brake disc defect detection data to determine second brake disc defect detection data, wherein the second brake disc defect detection data is consistent with the defect detection type of the defect detection requirement;
Training comprehensive judgment is carried out on the second brake disc defect detection data, and a target training sample is determined;
based on the target training sample, a lighting model is built according to the light source model.
Preferably, training comprehensive judgment is performed on the second brake disc defect detection data, and a target training sample is determined, including:
Extracting first detection demand characteristics based on second brake disc defect detection data;
extracting second detection requirement characteristics according to the defect detection requirements;
performing feature matching on the first detection demand feature and the second detection demand feature of the same detection demand feature type, determining a detection demand feature type with the feature matching being inconsistent, and taking the detection demand feature type as a missing detection demand feature type;
determining a characteristic fitting condition of the type of the missing detection demand characteristic;
Based on the characteristic fitting condition, judging whether characteristic fitting can be performed according to the first detection demand characteristic of the missing detection demand characteristic type and the second detection demand characteristic of the missing detection demand characteristic type;
and carrying out comprehensive training judgment and determining a target training sample according to different judgment results.
Preferably, determining the feature fitting condition of the missing detection demand feature type includes:
the first feature number of the first detection demand features of the missing detection demand feature type is larger than or equal to a preset first target number;
The second feature number of the second detection demand features of the missing detection demand feature type is larger than or equal to a preset second target number;
The sequence position of the first detection requirement feature or the second detection requirement feature, which is not matched with the feature, in the detection requirement feature sequence is not positioned at the head part of the sequence or at the tail part of the sequence;
The fitting feature of the sequence position N and the first detection requirement feature or the second detection requirement feature at the position N-1 in front of the sequence position meet a first continuous condition, wherein the first continuous condition is a characteristic value increasing and decreasing relation from the sequence position N-1 to the sequence position N-2, N is a positive integer larger than 2;
The fitting feature of the sequence position N and the first detection requirement feature or the second detection requirement feature at the position N+1 behind the sequence position meet a second continuous condition, wherein the second continuous condition is the characteristic value increasing and decreasing relation between the sequence position N+1 and the sequence position N+2.
Preferably, according to the difference of the judging results, performing training comprehensive judgment and determining a target training sample comprises:
If the first detection demand feature or the second detection demand feature of each missing detection demand feature type can be subjected to feature fitting, training is comprehensive, third brake disc defect detection data are determined according to feature fitting results, and the second brake disc defect detection data and the third brake disc defect detection data are taken as target training samples together;
and if the first detection demand characteristics or the second detection demand characteristics of the missing detection demand characteristic type cannot be subjected to characteristic fitting, carrying out sample supplement acquisition.
The embodiment of the invention provides a light source positioning system for a brake disc defect detection process, which further comprises:
and 6, acquiring a first projection light spot after the light source is positioned, and adjusting the light source parameters according to the first projection light spot.
Preferably, step 6, obtaining a first projection light spot after the light source is positioned, and adjusting the light source parameters according to the first projection light spot, includes:
acquiring information of overflow light spots projected by a first projection light spot behind a brake disc based on a photosensitive component of a detection platform preset on the brake disc;
characterizing the information of the overflowing light spot to obtain the characteristics of the overflowing light spot, wherein the characteristics of the overflowing light spot comprise the light intensity of the light spot and the shape of the light spot;
obtaining a standard light spot matrix;
Determining an overflow light spot matrix according to the overflow light spot characteristics based on the same construction rule of the standard light spot matrix;
Based on a preset matrix operation rule, determining an operation result matrix according to a standard light spot matrix and an overflow light spot matrix;
Splitting an operation result matrix according to a construction rule, and determining an operation result vector;
and determining a model control channel according to the operation result vector, inputting the model control channel, and adjusting the parameters of the light source.
The embodiment of the invention provides a light source positioning system for a brake disc defect detection process, which comprises the following components:
The defect detection requirement acquisition subsystem is used for acquiring the defect detection requirement of the brake disc;
the light source parameter acquisition subsystem is used for acquiring light source parameters;
the illumination model building subsystem is used for building an illumination model according to the light source parameters based on the defect detection requirements;
the dynamic information acquisition subsystem is used for acquiring dynamic information of the brake disc;
And the light source positioning subsystem is used for determining a light source positioning vector according to the dynamic information and the illumination model and performing light source positioning according to the light source positioning vector.
Preferably, the dynamic information acquisition subsystem comprises:
the positioning information acquisition module is used for positioning the brake disc based on a binarization algorithm and acquiring positioning information;
and the dynamic information determining module is used for determining the dynamic information of the brake disc according to the positioning information in the target moment.
The beneficial effects of the invention are as follows:
the method acquires the defect detection requirement and the light source parameter of the brake disc, and establishes an illumination model based on the defect detection requirement and the light source parameter. Dynamic information of the brake disc is input into the illumination model, a light source positioning vector output by the illumination model is obtained, a target light source is controlled to irradiate the brake disc according to the light source positioning vector, illumination is more proper, and the accuracy of subsequent defect detection is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objects and other advantages of the application may be realized and obtained by means of the instrumentalities particularly pointed out in the specification.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
The embodiment of the invention provides a light source positioning method used in a brake disc defect detection process, as shown in fig. 1, comprising the following steps:
The method comprises the steps of 1, obtaining defect detection requirements of a brake disc, wherein the defect detection requirements are information of which type of defects of the brake disc need to be detected, such as crack information of the brake disc with a certain specification on a conveyor belt;
Step 2, acquiring light source parameters, wherein the light source parameters are characteristics (such as intensity, color, wavelength, shape and size of the light source and the like) of a light source (such as a ball integral light source) for illuminating the brake disc;
Step 3, establishing an illumination model based on the defect detection requirement and according to the light source parameters, wherein the illumination model is an AI model for determining illumination parameters (such as light source postures, light control information and the like) meeting the defect detection requirement, and learning historical brake disc defect detection records based on a machine learning technology to obtain;
Step 4, acquiring dynamic information of the brake disc, wherein the dynamic information is the position information, the movement direction and the movement speed of the brake disc;
And 5, determining a light source positioning vector according to the dynamic information and the illumination model, and positioning the light source according to the light source positioning vector. The light source positioning vector is a description vector of the position and the direction when the light source shines and meets the detection requirement of the brake disc.
The working principle and the beneficial effects of the technical scheme are as follows:
the method acquires the defect detection requirement and the light source parameter of the brake disc, and establishes an illumination model based on the defect detection requirement and the light source parameter. Dynamic information of the brake disc is input into the illumination model, a light source positioning vector output by the illumination model is obtained, a target light source is controlled to irradiate the brake disc according to the light source positioning vector, illumination is more proper, and the accuracy of subsequent defect detection is improved.
In one embodiment, step4, obtaining dynamic information of the brake disc includes:
Positioning the brake disc based on a binarization algorithm to obtain positioning information, wherein the positioning information is the position of the brake disc on a detection platform;
and determining dynamic information of the brake disc according to the positioning information in the target moment. The target time is within 3 seconds after the brake disc is detected.
The working principle and the beneficial effects of the technical scheme are as follows:
According to the application, a binarization algorithm is introduced to position the brake disc, so that the positioning information is obtained, and the accuracy of the positioning information acquisition is improved. According to the positioning information in the target moment, the dynamic information of the brake disc is determined, and the accuracy of dynamic information acquisition is improved.
In one embodiment, step 1, obtaining a defect detection requirement of a brake disc includes:
Acquiring detection platform information for detecting the defects of the brake disc, wherein the detection platform information is related information of a device for assisting in detecting the brake disc, such as speed and conveying direction of a conveying belt and information of a camera for shooting the brake disc;
Acquiring brake disc parameter information, wherein the brake disc parameter information is specification parameters of a brake disc;
The method comprises the steps of obtaining defect type information to be detected, wherein the defect type information to be detected is what type of defect of a brake disc to be detected;
And extracting a template based on the defect detection requirement, and determining the defect detection requirement according to the detection platform information, the brake disc parameter information and the defect type information. The defect detection requirement extraction template is used for various information to contrast with the defect detection requirement extraction.
The working principle and the beneficial effects of the technical scheme are as follows:
According to the application, the defect detection requirement extraction template is introduced, and the defect detection requirement is determined according to the acquired detection platform information, brake disc parameter information and defect type information, so that the standardization of the acquisition of the defect detection requirement is improved.
In one embodiment, step 2, obtaining the light source parameters includes:
The method comprises the steps of obtaining light source type information and layout information of a target light source, wherein the target light source is a light source used for irradiating a brake disc so as to better extract defect information, the light source type information is information related to the light source type of the target light source, and the layout information is distribution information of an independent light emitting device of the target light source;
the method comprises the steps of obtaining adjustable parameter information of a target light source, wherein the adjustable parameter information is adjustable and adjustable range information;
and the light source type information, the layout information and the adjustable parameter information are used as light source parameters together.
The working principle and the beneficial effects of the technical scheme are as follows:
the application introduces the light source type information, the layout information and the adjustable parameter information of the target light source and jointly uses the light source type information, the layout information and the adjustable parameter information as the light source parameters, thereby improving the rationality of the light source parameters.
In one embodiment, step 3, based on the defect detection requirement, establishes an illumination model according to the light source parameters, including:
establishing a light source model according to the light source parameters, wherein the light source model is a data model for simulating illumination established based on the light source parameters;
The method comprises the steps of obtaining first brake disc defect detection data, wherein the first brake disc defect detection data is brake disc defect detection records obtained by big data;
screening the first brake disc defect detection data to determine second brake disc defect detection data, wherein the second brake disc defect detection data is consistent with the defect detection type of the defect detection requirement, and the defect detection type is the detected defect type, such as scratch;
Training comprehensive judgment is carried out on the second brake disc defect detection data, and a target training sample is determined;
based on the target training sample, a lighting model is built according to the light source model.
The working principle and the beneficial effects of the technical scheme are as follows:
The types of defect detection are different, and corresponding illumination strategies are also different, so that the defect detection data of the first brake disc obtained from the large data platform are not applicable, and the application establishes a light source model based on light source parameters to determine the defect detection data of the second brake disc consistent with the defect detection type of the defect detection requirement. Generally, the more comprehensive the training data, the better the effect of the model obtained by the final training, so that the second brake disc defect detection data is comprehensively judged by training, and the second brake disc defect detection data is judged to be comprehensive and directly used as a target training sample. If the training sample is judged to be incomplete, supplementing and redefining the target training sample. Based on the target training sample, a lighting model is built according to the light source model, and the training effect of the lighting model is improved.
In one embodiment, performing a training comprehensive decision on the second brake disc defect detection data to determine a target training sample includes:
Extracting a first detection demand characteristic based on the second brake disc defect detection data, wherein the first detection demand characteristic is characterized by fault detection demands in the second brake disc defect detection data, such as scratch detection, static detection and brake disc model number xxx;
Extracting a second detection requirement characteristic according to the defect detection requirement, wherein the second detection requirement characteristic is characterized representation of the defect detection requirement;
Carrying out feature matching on a first detection demand feature and a second detection demand feature of the same detection demand feature type, determining a detection demand feature type with non-conforming feature matching and taking the detection demand feature type as a missing detection demand feature type, wherein the detection demand feature type is a type of detection demand, such as detection of a brake disc with which specification and detection of which defect;
determining a characteristic fitting condition of the type of the missing detection required characteristic, wherein the characteristic fitting condition is a condition which needs to be met in order to enable the missing characteristic to be identified and learned by a model;
Judging whether feature fitting can be performed or not according to the first detection demand feature of the missing detection demand feature type and the second detection demand feature of the missing detection demand feature type based on feature fitting conditions, wherein the feature fitting is a process of attempting to estimate or simulate missing features in a model training process according to fitting conditions;
and carrying out comprehensive training judgment and determining a target training sample according to different judgment results.
The working principle and the beneficial effects of the technical scheme are as follows:
According to the method, the characteristics of the second brake disc defect detection data are extracted, the first detection requirement characteristics are obtained, the characteristics of the defect detection requirements are extracted, and the second detection requirement characteristics are extracted. And carrying out feature matching on the first detection demand feature and the second detection demand feature of the same detection demand feature type, and determining the missing detection demand feature type with the feature matching being inconsistent. And introducing feature fitting conditions of the type of the missing detection required features. And judging whether feature fitting can be performed or not based on the feature fitting conditions, and if so, determining a target training sample based on a fitting result and the initial sample. If not, the acquired sample and the initial sample are supplemented to determine a target training sample. The determination efficiency of the target training sample is improved.
In one embodiment, determining feature fit conditions for the missing detection demand feature type includes:
the first feature number of the first detection demand features of the missing detection demand feature type is larger than or equal to a preset first target number, wherein the first feature number is the feature number of the first detection demand features of the missing detection demand feature type;
The second feature number of the second detection demand features of the missing detection demand feature type is larger than or equal to a preset second target number, wherein the second feature number is the feature number of the second detection demand features of the missing detection demand feature type;
The sequence position of the first detection demand feature or the second detection demand feature which is not matched with the feature is not positioned at the sequence head part or the sequence tail part in the detection demand feature sequence, wherein the detection demand feature sequence is a feature sequence which is composed of the first detection demand feature or the second detection demand feature and comprises a sequential feature logic relationship and is formed by the first detection demand feature or the second detection demand feature of the missing detection demand feature type corresponding to the first detection demand feature or the second detection demand feature which is not matched with the feature;
The fitting feature of the sequence position N and the first detection requirement feature or the second detection requirement feature at the position N-1 in front of the sequence position meet a first continuous condition, wherein the first continuous condition is a characteristic value increasing and decreasing relation from the sequence position N-1 to the sequence position N-2, N is a positive integer larger than 2;
The fitting feature of the sequence position N and the first detection requirement feature or the second detection requirement feature at the position N+1 behind the sequence position meet a second continuous condition, wherein the second continuous condition is the characteristic value increasing and decreasing relation between the sequence position N+1 and the sequence position N+2.
The working principle and the beneficial effects of the technical scheme are as follows:
The method introduces feature fitting conditions of the missing detection demand feature types, wherein the feature fitting conditions specifically comprise that the number of first features of the first detection demand features of the missing detection demand feature types is larger than or equal to the first target number, the number of second features of the second detection demand features of the missing detection demand feature types is larger than or equal to the second target number, the basic data quantity of fitting data is guaranteed to meet the fitting requirement, and sequence positions of the first detection demand features or the second detection demand features, which are not consistent with feature matching, in a detection demand feature sequence are not located at the sequence head part nor at the sequence tail part, so that after fitting is completed, fitting features can be checked according to the relation between the features in front of and/or behind the sequence positions and the fitting features at the sequence positions, and the fitting process suitability is improved.
In one embodiment, according to the difference of the judging results, performing training comprehensive judgment and determining a target training sample comprises:
If the first detection demand feature or the second detection demand feature of each missing detection demand feature type can be subjected to feature fitting, training is comprehensive, third brake disc defect detection data are determined according to feature fitting results, and the second brake disc defect detection data and the third brake disc defect detection data are taken as target training samples together;
and if the first detection demand characteristics or the second detection demand characteristics of the missing detection demand characteristic type cannot be subjected to characteristic fitting, carrying out sample supplement acquisition.
The working principle and the beneficial effects of the technical scheme are as follows:
according to the application, whether the sample is required to be acquired in a supplementing way is determined adaptively according to different characteristic fitting results, so that the suitability of acquiring the target sample is improved.
The embodiment of the invention provides a light source positioning method used in a brake disc defect detection process, which further comprises the following steps:
and 6, acquiring a first projection light spot after the light source is positioned, and adjusting the light source parameters according to the first projection light spot. The first projection light spot is light projected on the brake disc by the light source, and when the light source parameters are adjusted according to the first projection light spot, the brightness and the irradiation position of the light source are required to be suitable.
The working principle and the beneficial effects of the technical scheme are as follows:
The first projection light spot after the light source is positioned is determined, and the light source parameters are adjusted according to the first projection light spot, so that the light source parameters are adjusted according to the light information actually reaching the brake disc surface, and the method is more reasonable.
In one embodiment, step 6, obtaining a first projected light spot after positioning the light source, and adjusting the light source parameter according to the first projected light spot includes:
Acquiring overflowing light spot information of a first projection light spot projected behind the brake disc based on a photosensitive component of a detection platform preset on the brake disc, wherein the overflowing light spot information is light spot information except light spots hitting the brake disc surface;
characterizing the information of the overflowing light spot to obtain the characteristics of the overflowing light spot, wherein the characteristics of the overflowing light spot comprise the light intensity of the light spot and the shape of the light spot;
the method comprises the steps of obtaining a standard light spot matrix, wherein the standard light spot matrix is a description matrix of ideal overflow light spot information determined based on a brake disc, such as a description matrix of how much nit brightness is achieved and what light spot shape is;
determining an overflow spot matrix based on the same construction rule of the standard spot matrix and according to the overflow spot characteristics, wherein the overflow spot matrix is a description vector of overflow spot information constructed based on the same construction rule of the standard spot matrix;
determining an operation result matrix according to a standard light spot matrix and an overflow light spot matrix based on a preset matrix operation rule, wherein the preset matrix operation rule is matrix subtraction;
Splitting the operation result matrix according to the construction rule to determine an operation result vector, wherein when the operation result vector is determined, how the operation result vector is spliced is determined according to the construction rule, and then splitting is performed;
And determining a model control channel according to the operation result vector, inputting the model control channel, and adjusting the parameters of the light source. The model control channel is a system interface of a control model for controlling the adjustment of the parameters of the light source.
The working principle and the beneficial effects of the technical scheme are as follows:
The application introduces a photosensitive element of a detection platform to detect the information of the overflowing light spot of the first projection light spot projected behind the brake disc, and characterizes the information of the overflowing light spot to obtain the light intensity of the light spot and the shape of the light spot (the characteristics of the overflowing light spot). Introducing a standard light spot matrix, constructing an overflow light spot matrix based on the same construction rule, subtracting the standard light spot matrix from the overflow light spot matrix, and determining an operation result matrix. And splitting the operation result matrix to determine an operation result vector. The operation result vector is input into the model control channel to adjust the light source parameters, so that the convenience of calculation and the accuracy of light source parameter adjustment are improved.
The embodiment of the invention provides a light source positioning system for a brake disc defect detection process, as shown in fig. 2, comprising:
the defect detection requirement acquisition subsystem 1 is used for acquiring the defect detection requirement of the brake disc;
a light source parameter acquisition subsystem 2 for acquiring light source parameters;
the illumination model building subsystem 3 is used for building an illumination model according to the light source parameters based on the defect detection requirements;
the dynamic information acquisition subsystem 4 is used for acquiring dynamic information of the brake disc;
the light source positioning subsystem 5 is used for determining a light source positioning vector according to the dynamic information and the illumination model and performing light source positioning according to the light source positioning vector.
In one embodiment, the dynamic information acquisition subsystem comprises:
the positioning information acquisition module is used for positioning the brake disc based on a binarization algorithm and acquiring positioning information;
and the dynamic information determining module is used for determining the dynamic information of the brake disc according to the positioning information in the target moment.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.