Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a steel structure defect identification system and method based on image analysis, which have the advantages of quickly and accurately identifying defects and the like, and solve the technical problems.
In order to achieve the aim, the invention provides the technical scheme that the steel structure defect identification system based on image analysis comprises a data acquisition module, an image data analysis module and a steel structure defect identification judgment module;
the data acquisition module comprises a region dividing unit and an image data acquisition unit, wherein the region labeling unit is used for acquiring abnormal points of the steel structure after ultrasonic detection, labeling the regions and transmitting the divided regions to the image data acquisition unit, and the image data acquisition unit is used for acquiring the image data of each region of the steel structure and the whole image data of the steel structure labeled in the region labeling unit;
the image data analysis module comprises an image blurring degree analysis unit, a region image analysis unit and an integral image analysis unit, wherein the image blurring degree analysis unit is used for analyzing the image data of each region of the steel structure in the image data acquisition unit, giving out a definition coefficient of each region, determining whether to re-shoot a region corresponding to the region based on the definition coefficient of each region, and the region image analysis unit is used for carrying out secondary analysis on the judged region and outputting a corresponding region image influence coefficient;
The steel structure defect identification judging module comprehensively calculates the steel structure to be detected based on all regional image influence coefficients to finally obtain a local defect influence coefficient, when the local defect influence coefficient exceeds a local defect threshold value, early warning is carried out, when the local defect influence coefficient does not exceed the local defect threshold value, the whole image analysis unit in the image data analysis module is called, the whole image data is analyzed, the whole image defect coefficient is output, and the steel structure defect identification judging module judges whether early warning is carried out or not based on the whole image defect coefficient.
As a preferred technical solution of the present invention, the specific expression of the image data obtaining unit for obtaining the image data of each region of the steel structure marked in the region marking unit is as follows:
TXSJ=[TSXJ1,…,TSXJi,…,TSXJI]
Wherein TXSJ denotes the region image dataset, TSXJ 1,…,TSXJi,…,TSXJI represent image data of the 1 st region,..+ -. Image data of the I th region, I is epsilon [1, I ], and the image data of the ith area is shot and acquired by the mobile shooting equipment.
As a preferred technical solution of the present invention, the image blur degree analysis unit is configured to analyze the image data of each region of the steel structure in the image data acquisition unit, and provide a sharpness coefficient of each region, and determine whether to re-photograph the corresponding region based on the sharpness coefficient of each region, where the specific steps are as follows:
a1, acquiring a shooting factor PSYZ i of shooting in an ith area;
A2, acquiring an image factor GRYZ i shot by an ith area;
And step A3, comprehensively calculating a definition coefficient QXXS i of the ith area, wherein the specific expression is as follows:
QXXSi=ω1*WJFSYZi+ω2*GRYZi
wherein ω 1 and ω 2 represent two weight coefficients summed to 1, respectively;
And step A4, judging whether the definition coefficient QXXS i of the ith area exceeds a definition threshold, if so, terminating the step A4, sending the image data TSXJ i of the ith area to an area image analysis unit, if not, re-shooting, setting the number of re-shooting of the ith area to be CP i =N, wherein N represents the execution number of the step A4, and when the number of re-shooting of the ith area to be CP i exceeds the maximum number of re-shooting.
As a preferable technical scheme of the invention, the data acquisition module also stores a proportion set of black areas after the steel structure original image of each area is subjected to graying treatment;
the specific steps for acquiring the shooting factor PSYZ i of the ith area shooting in the step A1 are as follows:
A1.1, reading the image data TSXj i of the ith area, and performing binarization processing on the image data TSXJ i of the ith area;
Step A1.2, obtaining the proportion MJZB i of all black areas of the ith area, and calculating the shooting factor PSYZ i of the shooting of the ith area, wherein the specific expression is as follows:
Where, | MJZB i-MJZBi,0 | denotes an absolute value of MJZB i-MJZBi,0, MJZB i,0 denotes a proportion of a black region of the i-th region stored in the set of the ratios, and MJZB i denotes a proportion of a black region of the i-th region.
As a preferred technical solution of the present invention, the specific steps for obtaining the image factor GRYZ i captured by the ith area in the step A2 are as follows:
Step A2.1, reading shaking times DDCS i of the mobile shooting device when shooting an ith area;
And step A2.2, calculating an image factor GRYZ i shot by the ith area, wherein the specific expression is as follows:
Where e denotes a natural constant, DDCS i denotes the number of times the mobile photographing apparatus shakes when photographing the i-th region, and σ denotes the number of balance factors avoiding the denominator being 0.
As a preferred technical solution of the present invention, the specific steps of the area image analysis unit for performing secondary analysis on the determined area and outputting the corresponding area image influence coefficient are as follows:
Step B1, reading image data TSXJ i of the ith area, cutting the image, and only reserving a steel structure area;
Step B2, recognizing the surface of the steel structure, and carrying out gray-scale treatment on the image data TSXJ i of the ith area;
Step B3, identifying all the pixel points in the non-black areas in the step B2, and clustering the adjacent non-black pixel points to obtain a plurality of clustered areas;
step B4, obtaining the area JX j of the minimum rectangular outline and the area YX j of the minimum closed circle outline of the jth clustering area;
Step B5, judging whether the smaller area of the minimum rectangular outline of the jth clustering area JX j and the minimum closed circle outline area YX j exceeds an area threshold value, judging the jth+1th clustering area if the smaller area is not exceeded, and storing the smaller area until all the clustering areas are judged to be completed, and calculating to obtain an area image influence coefficient QYYXXS i of the ith area, wherein the specific expression is as follows:
Wherein min { JX j,YXj } represents the smaller one of the area JX j of the smallest rectangular outline and the area YX j of the smallest closed circle outline of the jth cluster region, QYYXXS i represents the region image influence coefficient of the ith region, ZMJ represents the total area of the image after clipping, Representing the sum of the contour areas of the total J cluster region outputs, j.epsilon.1, J.
As a preferable technical scheme of the invention, the steel structure defect identification judging module carries out comprehensive calculation on the steel structure to be detected based on all the regional image influence coefficients to finally obtain the specific expression of the local defect influence coefficient as follows:
wherein JBQX denotes a local defect influence coefficient, Representing the summation of the region image influence coefficients for a total of I regions, I e 1, I.
As a preferred technical solution of the present invention, the step of analyzing the whole image data and outputting the defect coefficient of the whole image by the whole image analysis unit is as follows:
Step C1, acquiring integral image data of a steel structure, and respectively acquiring lengths of two sides of the steel structure;
and step C2, calculating a defect coefficient CYZ of the whole image of the steel structure, wherein the concrete expression is as follows:
Wherein, l a and l b respectively represent lengths of different sides of the steel structure, CYZ represents an integral image defect coefficient of the steel structure, and l a-lb represents an absolute value of l a-lb.
As a preferable technical scheme of the invention, the steel structure defect identification judging module judges whether to perform early warning based on the integral image defect coefficient, wherein the specific steps are that early warning is performed when the integral image defect coefficient CYZ of the steel structure exceeds the integral judgment threshold delta, and early warning is not performed when the integral image defect coefficient CYZ of the steel structure does not exceed the integral judgment threshold delta.
The invention also provides a steel structure defect identification method based on image analysis, which is based on the steel structure defect identification system based on image analysis and comprises the following steps:
step one, obtaining abnormal points of a steel structure after ultrasonic detection and marking areas;
Acquiring image data of each region of the marked steel structure and integral image data of the steel structure;
Analyzing the image data of each region of the steel structure, giving out the definition coefficient of each region, and determining whether to re-shoot the corresponding region based on the definition coefficient of each region;
Performing secondary analysis on the judged area and outputting a corresponding area image influence coefficient;
comprehensively calculating the steel structure to be detected based on all the regional image influence coefficients to finally obtain a local defect influence coefficient;
And step six, early warning is carried out when the local defect influence coefficient exceeds the local defect threshold value, and when the local defect influence coefficient does not exceed the local defect threshold value, the whole image data is analyzed, the whole image defect coefficient is output, and meanwhile, whether early warning is carried out or not is judged based on the whole image defect coefficient.
Compared with the prior art, the invention provides a steel structure defect identification system and method based on image analysis, which have the following beneficial effects:
According to the invention, the abnormal point positions of the steel structure after ultrasonic detection are obtained, region labeling is carried out, image shooting is carried out on the labeled regions, the definition coefficient of each region is given, whether the region corresponding to the region is re-shot or not is determined based on the definition coefficient of each region, the image influence coefficient and the local defect influence coefficient of the region corresponding to the region are analyzed and output, when the local defect influence coefficient exceeds the local defect threshold value, early warning is carried out, when the local defect influence coefficient does not exceed the local defect threshold value, the whole image data is analyzed, and whether early warning is carried out is judged based on the whole image defect coefficient, so that the recognition of the surface defects of the steel structure can be rapidly and accurately completed, the condition that the region which is not required to be detected and is caused by the whole image analysis occupies equipment calculation force is avoided, and the detection time is shortened.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-2, the steel structure defect recognition system based on image analysis includes a data acquisition module, an image data analysis module and a steel structure defect recognition judgment module;
The data acquisition module comprises a region dividing unit and an image data acquisition unit, wherein the region labeling unit is used for acquiring abnormal points of the steel structure after ultrasonic detection, labeling the regions and transmitting the divided regions to the image data acquisition unit, the image data acquisition unit is used for acquiring image data of each region of the steel structure labeled in the region labeling unit and integral image data of the steel structure, and the image data acquisition unit is used for acquiring the specific expression of the image data of each region of the steel structure labeled in the region labeling unit as follows:
TXSJ=[TSXJ1,…,TSXJi,…,TSXJI]
Wherein TXSJ represents an area image dataset, TSXJ 1,…,TSXJi,…,TSXJI represents image data of a1 st area, & gt, image data of an I th area, I epsilon [1, I ], and the image data of the I th area is photographed by a mobile photographing device, wherein the mobile photographing device can be a crawling robot or an unmanned aerial vehicle, and the image can be photographed after stabilization because the distance of a specific abnormal point is given by ultrasonic detection, and the crawling robot or the unmanned aerial vehicle can move to a target point position;
the image data analysis module comprises an image blurring degree analysis unit, a region image analysis unit and an integral image analysis unit, wherein the image blurring degree analysis unit is used for analyzing the image data of each region of the steel structure in the image data acquisition unit, giving out a definition coefficient of each region, determining whether to re-shoot the corresponding region or not based on the definition coefficient of each region, and the region image analysis unit is used for carrying out secondary analysis on the judged region and outputting a corresponding region image influence coefficient;
The image blurring degree analysis unit is used for analyzing the image data of each region of the steel structure in the image data acquisition unit, giving out the definition coefficient of each region, and determining whether to re-shoot the corresponding region based on the definition coefficient of each region, wherein the specific steps are as follows:
a1, acquiring a shooting factor PSYZ i of shooting in an ith area;
the specific steps for acquiring the shooting factor PSYZ i of the ith area shooting in the step A1 are as follows:
A1.1, reading the image data TSXJ i of the ith area, and performing binarization processing on the image data TSXJ i of the ith area;
Step A1.2, obtaining the proportion MJZB i of all black areas of the ith area, and calculating the shooting factor PSYZ i of the shooting of the ith area, wherein the specific expression is as follows:
Where, | MJZB i-MJZBi,0 | denotes an absolute value of MJZB i-MJZBi,0, MJZB i,0 denotes a proportion of a black region of the i-th region stored in the set of the ratios, and MJZB i denotes a proportion of a black region of the i-th region;
A2, acquiring an image factor GRYZ i shot by an ith area;
The specific steps for acquiring the image factor GRYZ i shot by the ith area in the step A2 are as follows:
Step A2.1, reading shaking times DDCS i of the mobile shooting device when shooting an ith area;
And step A2.2, calculating an image factor GRYZ i shot by the ith area, wherein the specific expression is as follows:
Wherein e represents a natural constant, DDCS i represents the shaking times of the mobile shooting device when shooting an ith area, and sigma represents a balance factor for avoiding denominator to be 0;
And step A3, comprehensively calculating a definition coefficient QXXS i of the ith area, wherein the specific expression is as follows:
QXXSi=ω1*WJFSYZi+ω2*GRYZi
wherein ω 1 and ω 2 represent two weight coefficients summed to 1, respectively;
And step A4, judging whether the definition coefficient QXXS i of the ith area exceeds a definition threshold, if so, terminating the step A4, sending the image data TSXJ i of the ith area to an area image analysis unit, if not, re-shooting, setting the number of re-shooting of the ith area to be CP i =N, wherein N represents the execution number of the step A4, and when the number of re-shooting of the ith area to be CP i exceeds the maximum number of re-shooting.
The data acquisition module also stores a proportion set of black areas after the steel structure original image of each area is subjected to gray processing;
The area image analysis unit is used for carrying out secondary analysis on the judged area and outputting the corresponding area image influence coefficient, and the specific steps are as follows:
Step B1, reading image data TSXJ i of the ith area, cutting the image, and only reserving a steel structure area;
Step B2, recognizing the surface of the steel structure, and carrying out gray-scale treatment on the image data TSXJ i of the ith area;
Step B3, identifying all the pixel points in the non-black areas in the step B2, and clustering the adjacent non-black pixel points to obtain a plurality of clustered areas;
step B4, obtaining the area JX j of the minimum rectangular outline and the area YX j of the minimum closed circle outline of the jth clustering area;
Step B5, judging whether the smaller area of the minimum rectangular outline of the jth clustering area JX j and the minimum closed circle outline area YX j exceeds an area threshold value, judging the jth+1th clustering area if the smaller area is not exceeded, and storing the smaller area until all the clustering areas are judged to be completed, and calculating to obtain an area image influence coefficient QYYXXS i of the ith area, wherein the specific expression is as follows:
Wherein min { JX j,YXj } represents the smaller one of the area JX j of the smallest rectangular outline and the area YX j of the smallest closed circle outline of the jth cluster region, QYYXXS i represents the region image influence coefficient of the ith region, ZMJ represents the total area of the image after clipping, Representing the sum of the contour areas of the total J cluster region outputs, j.epsilon.1, J.
The steel structure defect identification judging module comprehensively calculates a steel structure to be detected based on all regional image influence coefficients to finally obtain a local defect influence coefficient, when the local defect influence coefficient exceeds a local defect threshold value, early warning is carried out, when the local defect influence coefficient does not exceed the local defect threshold value, an integral image analysis unit in the image data analysis module is called, integral image data is analyzed, an integral image defect coefficient is output, and the steel structure defect identification judging module judges whether early warning is carried out or not based on the integral image defect coefficient;
The steel structure defect identification judging module carries out comprehensive calculation on the steel structure to be detected based on all the regional image influence coefficients to finally obtain the specific expression of the local defect influence coefficient as follows:
wherein JBQX denotes a local defect influence coefficient, The specific steps of summing the area image influence coefficients of the total I areas, I epsilon p1, I, analyzing the whole image data by the whole image analysis unit and outputting the whole image defect coefficients are as follows:
Step C1, acquiring integral image data of a steel structure, and respectively acquiring lengths of two sides of the steel structure;
and step C2, calculating a defect coefficient CYZ of the whole image of the steel structure, wherein the concrete expression is as follows:
Wherein, l a and l b respectively represent lengths of different sides of the steel structure, CYZ represents an integral image defect coefficient of the steel structure, and l a-lb represents an absolute value of l a-lb.
The steel structure defect identification judging module judges whether to perform early warning based on the integral image defect coefficient, namely, early warning is performed when the integral image defect coefficient CYZ of the steel structure exceeds the integral judging threshold delta, and early warning is not performed when the integral image defect coefficient CYZ of the steel structure does not exceed the integral judging threshold delta;
and when early warning is carried out, the shot pictures are sent to staff for checking, so that the staff can see the pictures.
Embodiment one:
In the implementation process, 2 abnormal results are obtained, and an unmanned aerial vehicle is adopted for shooting;
when the 1 st position is abnormal, the definition coefficient of the 1 st area is judged specifically as shown in the following table 1:
TABLE 1
| Parameters (parameters) |
Numerical value |
| MJZB1 |
80% |
| MJZB1,0 |
83% |
| DDCS1 |
0 |
| σ |
0.45 |
| ω1 |
0.56 |
| ω2 |
0.44 |
| Sharpness threshold |
0.90 |
PSYZ 1=1-0.036=0.963,GRYZ1 =0.891, wherein QXXS 1 =0.93132 >0.90 is calculated, the judgment is clear, 2 clusters are obtained through the regional image analysis unit, and specific parameters are shown in the following table 2;
TABLE 2
| Parameters (parameters) |
Numerical value |
| ZMJ |
122 |
| JX1 |
16 |
| YX1 |
12.56 |
| JX2 |
12 |
| YX2 |
28.27 |
At this time, QYYXXS 1 =0.201 was calculated;
when the 2 nd position is abnormal, the definition coefficient of the 2 nd area is judged specifically as shown in the following table 3:
TABLE 3 Table 3
| Parameters (parameters) |
Numerical value |
| MJZB2 |
85% |
| MJZB2,0 |
83% |
| DDCS2 |
0 |
| σ |
0.45 |
| ω1 |
0.56 |
| ω2 |
0.44 |
| Sharpness threshold |
0.90 |
PSYZ 2=0.976,GRYZ2 =0.891, wherein QXXS 2 =0.9386 >0.90 is calculated, the judgment is clear, 1 cluster is obtained through the regional image analysis unit, and specific parameters are shown in the following table 4;
TABLE 4 Table 4
| Parameters (parameters) |
Numerical value |
| ZMJ |
122 |
| JX1 |
13.5 |
| YX1 |
12.56 |
At this time, QYYXXS 2 =0.103 was calculated;
At the moment, JBQX =0.201+0.103=0.304 is judged for early warning, and the whole image data of the steel structure is not acquired at the moment, so that the identification of the surface defects of the steel structure can be rapidly and accurately finished, the condition that equipment calculation force is occupied by an area which is not required to be detected and is caused by the analysis of the whole image is avoided, and the detection time is shortened;
embodiment two:
In this embodiment, the local defect influence coefficient does not exceed the local defect threshold, at this time, the whole image data of the steel structure is obtained, and the lengths of two sides of the steel structure are respectively obtained as shown in table 5 below:
TABLE 5
| Parameters (parameters) |
Numerical value |
| la |
61 |
| lb |
63.5 |
| δ |
0.05 |
The defect coefficient CYZ=0.04 of the steel structure integral image does not exceed the integral judgment threshold delta, and early warning is not carried out at the moment;
The size of the threshold in the above embodiment is set for convenience of comparison, and the size of the threshold depends on the number of sample data and the number of cardinalities set for each group of sample data by a person skilled in the art, so long as the proportional relationship between the parameter and the quantized value is not affected, and the threshold can be determined by the person skilled in the art according to each sample data and the multiple experimental processes;
The invention also provides a steel structure defect identification method based on image analysis, which is based on the steel structure defect identification system based on image analysis and comprises the following steps:
step one, obtaining abnormal points of a steel structure after ultrasonic detection and marking areas;
Acquiring image data of each region of the marked steel structure and integral image data of the steel structure;
Analyzing the image data of each region of the steel structure, giving out the definition coefficient of each region, and determining whether to re-shoot the corresponding region based on the definition coefficient of each region;
Performing secondary analysis on the judged area and outputting a corresponding area image influence coefficient;
comprehensively calculating the steel structure to be detected based on all the regional image influence coefficients to finally obtain a local defect influence coefficient;
And step six, early warning is carried out when the local defect influence coefficient exceeds the local defect threshold value, and when the local defect influence coefficient does not exceed the local defect threshold value, the whole image data is analyzed, the whole image defect coefficient is output, and meanwhile, whether early warning is carried out or not is judged based on the whole image defect coefficient.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.