A method, system, terminal and medium for identifying structural surface defects

By extracting the grayscale difference interval and morphological characteristics in the identification of structural surface defects and combining with a classifier for identification, the identification accuracy problem under the influence of material and environmental factors in the prior art is solved, and the adaptability and accuracy of identification are improved.

CN116485764BActive Publication Date: 2024-11-01中铁交通投资集团有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310465579.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2024-11-01
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In the identification of structural surface defects in the prior art, grayscale features are affected by material and environmental factors, resulting in low detection efficiency and reduced accuracy, making it difficult to adapt to detection in different materials and environments.

Method used

By obtaining the surface image of the engineering structure for grayscale processing, extracting background grayscale maps and grayscale features, determining the grayscale difference interval, and classifying and identifying them in combination with morphological features, filtering defect categories with overlapping degrees not less than the standard threshold, and improving the identification results accuracy.

Benefits of technology

It enhances the adaptability of structural surface defect recognition, reduces misidentification, improves the accuracy of defect recognition and the depth accuracy of morphological characteristics, and avoids incorrect judgments caused by abnormal pixels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116485764B_ABST
    Figure CN116485764B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, terminal and medium for identifying structural surface defects, and relates to the technical field of defect identification. The key points of the technical solution are: grayscale processing is performed on the surface image of the engineering structure to obtain a grayscale image; the background grayscale image and grayscale features are extracted from the grayscale image, and the grayscale difference interval of each pixel is determined based on the background grayscale image and the grayscale features; the morphological features are extracted from the grayscale image, and the morphological features are classified and identified by a classifier to obtain an initial defect identification result; the overlap between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category is determined; the defect category with the overlap not less than the standard threshold is screened out from the defect identification result to obtain the final defect identification result. The present invention can enhance the adaptability of structural surface defect identification, reduce the sample data of erroneous defect identification, and effectively improve the accuracy of erroneous identification of structural surface defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect recognition technology, and more specifically, to a method, system, terminal and medium for identifying defects on a structure surface. Background Art

[0002] Surface defect recognition refers to the detection of flaws on the surface of the object being inspected. Generally, the defects that are more frequently detected include color difference, dents, defects, spots, scratches, etc. It is widely used in surface quality inspection of engineering structures, walls, roads, structural layers and workpieces.

[0003] Surface defect recognition in the prior art is generally based on image processing technology, which extracts morphological features and grayscale features from the target image for classification and recognition. For surface defect detection of structural objects, its grayscale features are affected by factors such as structural material and acquisition environment. When using sample images of the same or similar materials for training, it can only be applied to surface defect detection of objects of the same type of material; when using sample images of multiple materials for training, it will lead to difficulty in classification training and low detection efficiency; in addition, the grayscale features of the same defect features under different acquisition environments such as ambient light and acquisition viewing angles are quite different, so directly applying the grayscale features extracted from the target image for classification and recognition will reduce the accuracy of defect classification and recognition to a certain extent.

[0004] Therefore, how to study and design a structural surface defect identification method, system, terminal and medium that can overcome the above-mentioned defects is a problem that we urgently need to solve. Summary of the invention

[0005] In order to solve the deficiencies in the prior art, the purpose of the present invention is to provide a method, system, terminal and medium for identifying structural surface defects, which can enhance the adaptability of structural surface defect identification, reduce the sample data of erroneous defect identification, and effectively improve the accuracy of erroneous identification of structural surface defects.

[0006] The above technical objectives of the present invention are achieved through the following technical solutions:

[0007] In a first aspect, a method for identifying structural surface defects is provided, comprising the following steps:

[0008] Acquire the surface image of the engineering structure, and perform grayscale processing on the surface image of the engineering structure to obtain a grayscale image;

[0009] Extracting the background grayscale image and grayscale features from the grayscale image, and determining the grayscale difference interval of each pixel point based on the background grayscale image and grayscale features;

[0010] Extract morphological features from the grayscale image, and use a classifier to classify and identify the morphological features to obtain the initial defect recognition results;

[0011] Determine the degree of overlap between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category;

[0012] The defect categories whose overlap is not less than the standard threshold are screened out from the defect recognition results to obtain the final defect recognition results.

[0013] Furthermore, the grayscale difference interval determination process is specifically as follows:

[0014] Determine the grayscale difference value corresponding to the same pixel point in the background grayscale image and the grayscale feature;

[0015] The ratio of the grayscale difference to the grayscale value of the corresponding pixel in the grayscale feature is taken as the first endpoint value;

[0016] The ratio of the grayscale difference to the grayscale value of the corresponding pixel in the background grayscale image is used as the second endpoint value;

[0017] The grayscale difference interval is determined by taking the first endpoint value and the second endpoint value as two endpoints.

[0018] Furthermore, the expression of the grayscale difference interval is:

[0019]

[0020] Among them, K i Represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

[0021] Furthermore, the expression of the grayscale difference interval is:

[0022]

[0023] Among them, K i Represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

[0024] Furthermore, the process of determining the overlap degree is specifically as follows:

[0025] Select sample images whose morphological features belong to the defect category;

[0026] The overlap coefficient is determined by the degree of overlap of the grayscale difference intervals between the pixel pairs that match the morphological features and the sample image;

[0027] The sum of the overlap coefficients of all pixel pairs is taken as the coincidence degree between the morphological features and the sample image.

[0028] Furthermore, the process of determining the overlap degree is specifically as follows:

[0029] Select sample images whose morphological features belong to the defect category;

[0030] The overlap coefficient is determined by the degree of overlap of the grayscale difference intervals between the pixel pairs that match the morphological features and the sample image;

[0031] The ratio of the number of pixel pairs whose overlap coefficient exceeds the coefficient threshold to the number of all pixel pairs is taken as the coincidence degree between the morphological feature and the sample image.

[0032] Furthermore, the calculation formula of the overlap coefficient is specifically:

[0033]

[0034] or,

[0035]

[0036] Among them, D j Represents the overlap coefficient between the morphological feature and the pixel pair j in the sample image; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the sample image; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the sample image.

[0037] In a second aspect, a structure surface defect recognition system is provided, comprising:

[0038] A grayscale processing module is used to obtain an engineering structure surface image and perform grayscale processing on the engineering structure surface image to obtain a grayscale image;

[0039] The difference analysis module is used to extract the background grayscale image and grayscale features from the grayscale image, and determine the grayscale difference interval of each pixel point based on the background grayscale image and grayscale features;

[0040] The defect classification module is used to extract morphological features from the grayscale image and classify and identify the morphological features using a classifier to obtain an initial defect recognition result;

[0041] A coincidence analysis module, used to determine the degree of coincidence between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category;

[0042] The defect screening module is used to screen out defect categories whose overlap is not less than a standard threshold from the defect identification results to obtain the final defect identification results.

[0043] In a third aspect, a computer terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for identifying structural surface defects as described in any one of the first aspects is implemented.

[0044] In a fourth aspect, a computer-readable medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement a method for identifying surface defects of a structure as described in any one of the first aspects.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. A method for identifying structural surface defects proposed in the present invention performs grayscale difference analysis on the background grayscale image and the grayscale feature, and after weakening the grayscale changes caused by different acquisition environments and materials, determines the grayscale difference interval mainly reflected by the depth of the morphological features, and then filters the defect categories with a coincidence degree less than the standard threshold in the initial defect recognition results, thereby reducing the misidentification of structural surface defects, which can enhance the adaptability of structural surface defect recognition, reduce the sample data of misidentified defects, and effectively improve the accuracy of misidentification of structural surface defects;

[0047] 2. The grayscale difference interval determined by the present invention can clearly reflect the difference between convex defects and concave defects, thereby improving the accuracy of the grayscale difference interval in representing the depth of morphological features;

[0048] 3. The present invention uses the overall overlap of pixel areas corresponding to morphological features as a verification standard for defect categories, which can avoid the situation where the defect category is misjudged due to individual abnormal pixels. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0050] Figure 1 is a flow chart of Embodiment 1 of the present invention;

[0051] Figure 2 It is a system block diagram in Example 2 of the present invention. DETAILED DESCRIPTION

[0052] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0053] Embodiment 1: A method for identifying surface defects of a structure, such as Figure 1 As shown, the following steps are included:

[0054] Step S1: acquiring an engineering structure surface image, and performing grayscale processing on the engineering structure surface image to obtain a grayscale image;

[0055] Step S2: extracting a background grayscale image and grayscale features from the grayscale image, and determining the grayscale difference interval of each pixel point based on the background grayscale image and the grayscale features;

[0056] Step S3: extracting morphological features from the grayscale image, and using a classifier to classify and identify the morphological features to obtain an initial defect recognition result;

[0057] Step S4: determining the degree of overlap between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category;

[0058] Step S5: Filter out defect categories whose overlap is not less than a standard threshold from the defect recognition results to obtain the final defect recognition results.

[0059] It should be noted that the background grayscale image can be extracted by using a region-based image segmentation method or an edge-based image segmentation method in combination with a grayscale histogram, and is not limited here.

[0060] In the present invention, grayscale features mainly refer to features related to grayscale distribution that are extracted when there is an obvious difference between the actual grayscale value of a pixel and the background grayscale value of the corresponding pixel in the background grayscale image. There is no need to perform grayscale difference interval analysis on areas where there are obviously no defects, thereby reducing the total amount of grayscale features extracted.

[0061] In this embodiment, the morphological features include one or more of the geometric characteristics, filling color, morphological distribution and morphological size of the defect part, and may also include grayscale values.

[0062] The process of determining the grayscale difference interval is specifically as follows: determine the grayscale difference corresponding to the same pixel in the background grayscale image and the grayscale feature; use the ratio of the grayscale difference to the grayscale value of the corresponding pixel in the grayscale feature as the first endpoint value; use the ratio of the grayscale difference to the grayscale value of the corresponding pixel in the background grayscale image as the second endpoint value; and determine the grayscale difference interval using the first endpoint value and the second endpoint value as two endpoints.

[0063] As an optional implementation, the grayscale difference interval is expressed as:

[0064]

[0065] Among them, Ki represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

[0066] For example, if the grayscale values ​​corresponding to a pixel in the grayscale feature and background grayscale images are 12dn and 6dn respectively, the calculated grayscale difference interval is [0.5, 1].

[0067] As another optional implementation, the grayscale difference interval is expressed as:

[0068]

[0069] Among them, K i Represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

[0070] Taking the grayscale feature and background grayscale images where the grayscale values ​​corresponding to a pixel are 12dn and 6dn respectively, the calculated grayscale difference range is [-1, -0.5].

[0071] According to the above two grayscale difference interval calculation methods, the absolute value of the specific value in the grayscale difference interval represents the grayscale difference, and the positive or negative value of the specific value can represent the direction of the grayscale difference such as concave or convex.

[0072] As an optional implementation, the process of determining the degree of overlap is specifically as follows: selecting a sample image to which the morphological feature belongs to a defect category; determining the overlap coefficient based on the degree of overlap of the grayscale difference intervals between the pixel pairs that match the morphological feature and the sample image; and taking the sum of the overlap coefficients of all pixel pairs as the degree of overlap between the morphological feature and the sample image.

[0073] For example, there are 5 pixel pairs that match the morphological feature and the sample image, and the overlapping coefficients corresponding to the 5 pixel pairs are 0.2, 0.3, 0.6, 0.7, and 0, respectively. Then the coincidence degree between the morphological feature and the sample image is 1.8.

[0074] As another optional implementation, the process of determining the degree of overlap is specifically as follows: selecting a sample image to which the morphological feature belongs to a defect category; determining the overlap coefficient based on the degree of overlap of the grayscale difference intervals between the pixel pairs that match the morphological feature and the sample image; and taking the ratio of the number of pixel pairs whose overlap coefficient exceeds a coefficient threshold to the number of all pixel pairs as the degree of overlap between the morphological feature and the sample image.

[0075] For another example, there are 5 pixel pairs that match the morphological features and the sample image, and the corresponding overlapping coefficients of the 5 pixel pairs are 0.2, 0.3, 0.6, 0.7, and 0, respectively. If the coefficient threshold is 0.4, the overlapping coefficients of the pixel pairs that exceed the coefficient threshold are only 0.6 and 0.7, and the overlap degree of the morphological features and the sample image is 40%.

[0076] The calculation formula of the overlap coefficient is as follows:

[0077]

[0078] or,

[0079]

[0080] Among them, D j Represents the overlap coefficient between the morphological feature and the pixel pair j in the sample image; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the sample image; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the sample image.

[0081] For example, if the grayscale difference ranges between the morphological feature and a certain pixel in the sample image are [0.3-0.6] and [0.4-0.7] respectively, the overlap coefficient is 0.5.

[0082] The present invention uses the overall overlap of pixel areas corresponding to the morphological features as a verification standard for defect categories, which can avoid the situation where the defect category is misjudged due to individual abnormal pixels.

[0083] Embodiment 2: A structure surface defect recognition system, the system is used to implement a structure surface defect recognition method described in embodiment 1, such as Figure 2 As shown, it includes a grayscale processing module, a difference analysis module, a defect classification module, a coincidence analysis module and a defect screening module.

[0084] Among them, the grayscale processing module is used to obtain the surface image of the engineering structure, and perform grayscale processing on the surface image of the engineering structure to obtain a grayscale image; the difference analysis module is used to extract the background grayscale image and grayscale features from the grayscale image, and determine the grayscale difference interval of each pixel point based on the background grayscale image and the grayscale features; the defect classification module is used to extract morphological features from the grayscale image, and use a classifier to classify and identify the morphological features to obtain the initial defect recognition result; the coincidence analysis module is used to determine the coincidence between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category; the defect screening module is used to screen out defect categories with a coincidence degree not less than the standard threshold from the defect recognition result to obtain the final defect recognition result.

[0085] Working principle: The present invention performs grayscale difference analysis on the background grayscale image and the grayscale features, and after weakening the grayscale changes caused by different acquisition environments and materials, determines the grayscale difference interval mainly reflected by the depth of morphological features, and then filters the defect categories with overlap less than the standard threshold in the initial defect recognition results, so as to reduce the misidentification of structural surface defects. This can enhance the adaptability of structural surface defect recognition, reduce the sample data of misidentified defects, and effectively improve the accuracy of misidentification of structural surface defects.

[0086] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0087] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0090] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for identifying structural surface defects, Its characteristics are: The following steps are involved: Acquire the surface image of the engineering structure, and perform grayscale processing on the surface image of the engineering structure to obtain a grayscale image; Extracting the background grayscale image and grayscale features from the grayscale image, and determining the grayscale difference interval of each pixel point based on the background grayscale image and grayscale features; Extract morphological features from the grayscale image, and use a classifier to classify and identify the morphological features to obtain the initial defect recognition results; Determine the degree of overlap between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category; Filter out defect categories whose overlap is not less than a standard threshold from the defect recognition results to obtain the final defect recognition results; The grayscale difference interval determination process is specifically as follows: Determine the grayscale difference value corresponding to the same pixel point in the background grayscale image and the grayscale feature; The ratio of the grayscale difference to the grayscale value of the corresponding pixel in the grayscale feature is taken as the first endpoint value; The ratio of the grayscale difference to the grayscale value of the corresponding pixel in the background grayscale image is used as the second endpoint value; Determine the grayscale difference interval using the first endpoint value and the second endpoint value as two endpoints; The process of determining the overlap degree is specifically as follows: Select sample images whose morphological features belong to the defect category; The overlap coefficient is determined by the degree of overlap of the grayscale difference intervals between the pixel pairs that match the morphological features and the sample image; The sum of the overlap coefficients of all pixel pairs is taken as the coincidence degree between the morphological feature and the sample image; or, the ratio of the number of pixel pairs whose overlap coefficient exceeds the coefficient threshold to the number of all pixel pairs is taken as the coincidence degree between the morphological feature and the sample image; The calculation formula of the overlap coefficient is specifically: or, Among them, D j Represents the overlap coefficient between the morphological feature and the pixel pair j in the sample image; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the morphological feature; Represents the front value of the grayscale difference interval corresponding to pixel pair j in the sample image; Represents the back-end value of the grayscale difference interval corresponding to pixel pair j in the sample image.

2. A method for identifying structural surface defects according to claim 1, Its characteristics are: The expression of the grayscale difference interval is: Among them, K i Represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

3. A method for identifying structural surface defects according to claim 1, Its characteristics are: The expression of the grayscale difference interval is: Among them, K i Represents the grayscale difference interval of pixel i; Represents the gray value of pixel i in the gray feature; Represents the grayscale value of pixel i in the background grayscale image.

4. A structural surface defect recognition system, Its characteristics are: The system is used to implement a method for identifying structural surface defects as described in any one of claims 1 to 3, comprising: A grayscale processing module is used to obtain an engineering structure surface image and perform grayscale processing on the engineering structure surface image to obtain a grayscale image; The difference analysis module is used to extract the background grayscale image and grayscale features from the grayscale image, and determine the grayscale difference interval of each pixel point based on the background grayscale image and grayscale features; The defect classification module is used to extract morphological features from the grayscale image and classify and identify the morphological features using a classifier to obtain an initial defect recognition result; A coincidence analysis module, used to determine the degree of coincidence between the grayscale difference interval in the pixel area corresponding to the morphological feature and the grayscale difference interval in the corresponding defect category; The defect screening module is used to screen out defect categories whose overlap is not less than a standard threshold from the defect identification results to obtain the final defect identification results.

5. A computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, Its characteristics are: When the processor executes the program, a method for identifying structural surface defects as described in any one of claims 1 to 3 is implemented.

6. A computer readable medium having a computer program stored thereon, Its characteristics are: The computer program is executed by a processor to implement a method for identifying structural surface defects as described in any one of claims 1 to 3.