Defect detection labeling method and system for industrial image data

By using computer equipment to automatically identify and mark industrial image defects, the problem of high efficiency and low cost of manual inspection is solved, and efficient and low-cost defect detection is achieved.

CN115908339BActive Publication Date: 2025-10-17SHENZHEN ZHONGKE PRECISION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211509538.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-10-17
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

Existing industrial defect detection relies on manual inspection, which is inefficient and costly, and is not suitable for large-scale promotion.

Method used

Industrial images captured by peripheral devices are received through computer equipment to identify and locate defects, generate marked images and store them in documents to be confirmed, thus realizing automated inspection.

Benefits of technology

Reduce manual operations, improve detection efficiency, reduce costs, and improve industrial quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115908339B_ABST
    Figure CN115908339B_ABST
Patent Text Reader

Abstract

The application provides a defect detection labeling method and system for industrial image data. The method comprises the following steps: a computer device receives an industrial image, i.e., a first image, collected by a peripheral device; the computer device performs defect identification on the first image to determine whether the first image has a defect, and if the first image has a defect, the computer device locates the defect area according to the identification result; the computer device labels the defect area to obtain a second image, and stores the second image in a defect product document to be confirmed. The technical scheme provided by the application has the advantage of low cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of images and detection, in particular to a defect detection labeling method and system for industrial image data. BACKGROUND

[0002] There are many industrial image data, and there are many defect detections in the existing industry, such as welding detection. The current welding detection is based on manual detection. Such a detection method requires manual detection with relatively rich experience, and manual detection is low in efficiency and high in cost, which is not conducive to wide promotion. SUMMARY

[0003] The embodiment of the present application provides a defect detection labeling method and system for industrial image data, which detects defects of industrial image data and marks defect positions, realizes automatic detection, reduces manual work, and has the advantages of reducing cost.

[0004] In a first aspect, the embodiment of the present application provides a defect detection labeling method for industrial image data, which comprises the following steps:

[0005] The computer device receives an industrial image, i.e. a first image, collected by a peripheral device;

[0006] The computer device performs defect recognition on the first image to determine whether the first image has defects, and if the first image has defects, positions the defect area according to the recognition result;

[0007] The computer device marks the defect area to obtain a second image, and stores the second image in a defect product document to be confirmed.

[0008] In a second aspect, a defect detection labeling system for industrial image data is provided, which is applied to a computer device and comprises:

[0009] The communication unit is configured to receive an industrial image, i.e. a first image, collected by a peripheral device;

[0010] The recognition unit is configured to perform defect recognition on the first image to determine whether the first image has defects, and if the first image has defects, to position the defect area according to the recognition result; and to mark the defect area to obtain a second image, and to store the second image in a defect product document to be confirmed.

[0011] In a third aspect, a computer readable storage medium is provided, which stores a program for electronic data exchange, wherein the program enables a terminal to execute the method provided in the first aspect.

[0012] The embodiment of the present application has the following beneficial effects:

[0013] It can be seen that the technical scheme provided by the application calculates the industrial image, i.e., the first image, collected by the peripheral device by the computer device; the computer device performs defect identification on the first image to determine whether the first image has defects, and if the first image has defects, the defect area is located according to the identification result; the computer device marks the defect area to obtain a second image, and stores the second image in a defect product document to be confirmed. In this way, the above technical scheme can realize the collection of the industrial image in a remote manner, and after intelligent identification of the above image to determine whether there is a defect, a positioning operation is performed, and then marking is performed, so that it is convenient for manual review to view, improves the efficiency, the above scheme does not need manual operation, reduces the labor cost, improves the detection efficiency, has the advantages of low cost, improves the industrial quality and efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0015] Figure 1 It is a structural schematic diagram of a computer device

[0016] Figure 2 It is a flowchart of a defect detection and labeling method of industrial image data.

[0017] Figure 3 It is a black and white picture of a normal welding picture provided by the present application.

[0018] Figure 4 It is a black and white picture of a defect welding picture provided by the present application.

[0019] Figure 5 It is another black and white picture of a defect welding picture provided by the present application.

[0020] Figure 6 It is a structural schematic diagram of a defect detection and labeling system of industrial image data. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0022] The terms "first", "second", "third", and "fourth" and the like in the description and in the claims of the present application and the accompanying drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. The terms "comprises", "comprising", "includes", "including" and the like are to be construed open-ended, allowing for instances where there are equivalents to the recited elements and steps that are not recited n the claims or where additional steps or elements are incoiporated. For example, a process, method, article, or apparatus that "comprises" or "comprising" a list of steps or elements is not necessarily limited to only those steps or elements but can include additional steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

[0023] Reference herein to "an embodiment" means that a particular feature, structure, result or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification is not necessarily all referring to the same embodiment, nor is it necessarily referring to a separate or alternative embodiment, in isolation, to other embodiments. It will be explicitly understood by a person of ordinary skill in the art, explicitly and implicitly, that embodiments described herein can be combined with other embodiments.

[0024] Reference is made to Figure 1 , Figure 1 A computer device is provided, specifically, the computer device can be a computer device of an IOS, an Android, a Harmony, and the like operating system, of course, can also be a computer device of other systems, and the application does not limit the specific operating system. The computer device can be connected with other devices in a wireless manner, of course, can also be connected with other devices in a wired manner, and the computer device specifically can be a personal computer, a server, and the like.

[0025] The computer device can be connected with other peripheral devices, and the peripheral devices can be a camera, a digital camera, a smart phone, and the like device having an industrial image acquisition function, and the like. The industrial image of the technical scheme of the application is mainly for detecting defects of a welding image, and for detecting other types of images, this paper does not involve the detection of defects of other industrial images if not specially stated.

[0026] Reference is made to Figure 2 , Figure 2 A flowchart of a defect detection labeling method of industrial image data provided by the application is shown in FIG. 1, and the method comprises the following steps: Figure 2

[0027] Step S201, the computer device receives an industrial image, i.e., a first image, acquired by a peripheral device;

[0028] The first image can be a picture, of course, can also be a video, and the peripheral device can be a device in various forms, and the application does not limit the specific form of the peripheral device. The first image can be a welding image, i.e., an image having a weld.​

[0029] In step S202, the computer device determines whether the first image has defects by defect recognition, and if the first image has defects, the defect area is located according to the recognition result.

[0030] The defects can include pores, stacking, cracks, slag inclusion, etc., and can also be other welding defects. The present application mainly detects stacking or pore defects.

[0031] In step S203, the computer device marks the defect area to obtain a second image, and stores the second image in a defect product document to be confirmed.

[0032] The technical scheme provided by the present application includes the following steps: the computer device receives an industrial image, i.e., a first image, collected by a peripheral device; the computer device determines whether the first image has defects by defect recognition, and if the first image has defects, the defect area is located according to the recognition result; and the computer device marks the defect area to obtain a second image, and stores the second image in a defect product document to be confirmed. Thus, the above technical scheme can realize the collection of industrial images in a remote manner, and after intelligent recognition of the above images to determine whether there are defects, a positioning operation is performed, and then marking is performed, so that it is convenient for manual review to view, improving the efficiency. The above scheme does not require manual operation, reduces the labor cost, improves the detection efficiency, has the advantages of low cost, improved industrial quality and efficiency.

[0033] For example, the above method can further include the following steps:

[0034] If the first image does not have defects, the first image is sent to manual review.

[0035] For example, the implementation method of step S202 can include the following steps:

[0036] The computer device sets the first image as a black and white picture, identifies white and black pixel points in the black and white picture, determines continuous black pixel points as a black spot area, and counts n regions 1 in the black spot area with an area greater than an area threshold value. The shape of any one of the n regions 1 is determined whether it is a circle-like shape, if any one of the n regions 1 is a circle-like shape, it is determined that the first image has defects, and any one of the regions 1 with the circle-like shape is determined as a defect area.

[0037] For example, the above method of identifying whether the shape in the n regions 1 is a circle-like shape can include the following steps:

[0038] Extract one region 1 from n regions 1, determine the center point O of the region 1 through the center recognition algorithm, and use the center point O as the endpoint to emit multiple rays in the 360° direction to obtain multiple intersection points of the multiple rays with the edge of the region 1. Use the center point O at multiple foci to form multiple line segments, and calculate the variance of the multiple line segment values. If the variance is less than the variance threshold, determine that the region 1 is quasi-circular, otherwise it is determined to be non-quasi-circular. Traverse n regions 1 to determine at least one region 1 with a quasi-circular shape.

[0039] Black and white pictures Figure 3 、 Figure 4 ,for Figure 3 For qualified welding pictures, there is no welding hole, so there is no black sub-area that is circular. Figure 4 In a non-compliant weld image, a weld hole is present. This hole appears as a circular, dark area in a black and white image. The above technical solution replaces manual inspection with image processing. Detecting a circle-like area is achieved by using the characteristic of a circle: the distance from the center to the edge is roughly the same, meaning the variance is small. Therefore, the variance of the distance is calculated. A small variance indicates minimal variation, which indicates a weld hole and a failure.

[0040] For example, the implementation method of step S202 may specifically include:

[0041] The computer device sets the first image to a black and white image, identifies white pixels and black pixels in the black and white image, determines continuous white pixels as a white sub-region, and counts sub-regions in the white sub-region whose areas are greater than an area threshold to determine m regions 2; constructs multiple horizontal lines in the m regions 2, the multiple horizontal lines all intersect with the m regions 2, selects 2*m intersection points of one horizontal line and the m regions 2 from the multiple horizontal lines, calculates the distance between two adjacent intersection points in the 2m intersection points to obtain 2m-1 distance values, selects the five centermost values ​​from the 2m-1 distance values, and if the sizes of the five values ​​are set at intervals and the smaller two values ​​or three values ​​are within a set range, traverses the remaining horizontal lines of the multiple horizontal lines to determine whether the smaller two values ​​or three values ​​of the remaining horizontal lines are also within the set range; if the two values ​​or three values ​​are all within the set range, it is determined that the first image has a defect, and the region 2 corresponding to the five values ​​is determined as a defective region, and the defective region is marked.

[0042] The five most central values ​​selected from the above 2m-1 distance values ​​may include: m-2 ,value m-1 ,value m ,value m+1 ,value m+2; wherein the subscript is the order number of 2m-1 distance values, because the middle 5 values may correspond to the distance of 3 regions and the interval between each two of the 3 regions, so there may be 2 values in the smaller range, similarly, the middle 5 values may correspond to the distance of 2 regions and the interval between the 3 regions (i.e. the region in front or the region behind), so there may be 3 values in the smaller range.

[0043] As shown in Figure 5 , it is an unqualified picture, and such a picture is generally caused by the weld having a gap or having a stack.

[0044] Referring to Figure 6 , Figure 6 An industrial image data defect detection labeling system is provided, which is applied to a computer device and includes:

[0045] The communication unit 601 is configured to receive an industrial image, i.e. a first image, collected by a peripheral device.

[0046] The identification unit 602 is configured to perform defect identification on the first image to determine whether the first image has a defect, and if so, to locate the defect region according to the identification result; mark the defect region to obtain a second image, and store the second image in a defect product document to be confirmed.

[0047] In an example,

[0048] The identification unit is specifically configured to set the first image as a black-and-white picture, identify white and black pixel points in the black-and-white picture, determine continuous black pixel points as a black spot region, and count regions with an area greater than an area threshold in the black spot region as n regions 1; identify whether any one of the n regions 1 is a circle-like shape, and if so, determine that the first image has a defect, and determine any one of the regions with the circle-like shape as a defect region.

[0049] In an example,

[0050] The identification unit is specifically configured to extract one region 1 from the n regions 1, determine a center point O of the one region 1 through a center identification algorithm, emit a plurality of rays from the center point O as an end point to 360° directions, obtain a plurality of intersection points of the plurality of rays and an edge of the one region 1, form a plurality of line segments with the center point O and the plurality of intersection points, calculate a variance of the plurality of line segments, and if the variance is less than a variance threshold, determine that the one region 1 is a circle-like shape, otherwise, determine that the one region 1 is not a circle-like shape, and traverse the n regions 1 to determine at least one region 1 with the circle-like shape.

[0051] In an example,

[0052] The identification unit is specifically configured to set the first image as a black-and-white picture, identify white pixel points and black pixel points in the black-and-white picture, determine continuous white pixel points as a white sub-region, and determine sub-regions with an area greater than an area threshold in the white sub-region as m region 2; construct a plurality of horizontal lines on the m region 2, the plurality of horizontal lines intersect with the m region 2, select 1 horizontal line and 2*m intersection points of the m region 2 from the plurality of horizontal lines, calculate distances between adjacent two intersection points in the 2*m intersection points to obtain 2m-1 distance values, select 5 central values from the 2m-1 distance values, if the 5 values are respectively arranged at intervals, and the smaller 2 values or 3 values are within a set range, traverse the remaining horizontal lines of the plurality of horizontal lines to determine whether the smaller 2 values or 3 values of the remaining horizontal lines are also within the set range, if the 2 values or 3 values are both within the set range, determine that the first image has a defect, determine region 2 corresponding to the 5 values as a defect region, and mark the defect region.

[0053] For example, the identification unit in the embodiment of the present application can be used to perform the detailed scheme, optional scheme and the like of the embodiment as shown in Figure 2 The detailed scheme, optional scheme and the like of the embodiment as shown in

[0054] The embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all steps of any one of the defect detection and labeling methods of industrial image data described in the above method embodiments.

[0055] The embodiment of the present application further provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all steps of any one of the defect detection and labeling methods of industrial image data described in the above method embodiments.

[0056] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0057] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0058] In several embodiments provided in the present application, it should be understood that the disclosed apparatus can be implemented in other manners. For example, the division of the apparatus embodiments is merely illustrative, and the division of the units can be changed according to actual conditions, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, apparatuses or units, and can be in electrical, mechanical or other forms.

[0059] A person of ordinary skill in the art can understand that all or part of the steps in the above-mentioned embodiments of the various methods can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable memory, including a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

[0060] The above has introduced the embodiments of the present application in detail, and the principle and implementation mode of the present application have been described by applying specific examples; the above embodiment description is only for helping to understand the method of the present application and its core idea; meanwhile, for a person of ordinary skill in the art, according to the idea of the present application, the specific implementation mode and application range will have changes; in view of the above, the content of the present description should not be understood as a limitation on the present application.

Claims

1. A defect detection and annotation method for industrial image data, characterized in that: The method comprises the following steps: The computer device receives the industrial image, namely the first image, collected by the peripheral device; The computer device performs defect recognition on the first image to determine whether the first image has defects, and if so, locates the defective area based on the recognition result, specifically including: The computer device sets the first image to a black and white image, identifies white pixels and black pixels in the black and white image, determines consecutive black pixels as a sunspot region, and counts regions in the sunspot region whose areas are greater than an area threshold as n regions 1; identifies whether any region 1 of the n regions 1 has a quasi-circular shape; if any region 1 of the n regions 1 has a quasi-circular shape, determines that the first image has a defect, and determines the any region 1 with a quasi-circular shape as a defective region; The step of identifying whether the shapes in the n regions 1 are quasi-circular specifically includes: Extract one region 1 from n regions 1, determine the center point O of the region 1 using a center recognition algorithm, and use the center point O as an endpoint to emit multiple rays in 360° directions to obtain multiple intersection points of the multiple rays with the edge of the region 1. Use the center point O at multiple focal points to form multiple line segments. Calculate the variance of the multiple line segment values. If the variance is less than a variance threshold, determine that the region 1 is quasi-circular; otherwise, determine that it is non-quasi-circular. Traverse the n regions 1 to determine at least one region 1 with a quasi-circular shape. The computer device marks the defective area to obtain a second image, and stores the second image in the defective product document to be confirmed.

2. The method according to claim 1, characterized in that The computer device performs defect recognition on the first image to determine whether the first image has a defect, and if so, locates the defect area according to the recognition result, specifically including: The computer device sets the first image to a black and white image, identifies white pixels and black pixels in the black and white image, determines continuous white pixels as a white sub-region, counts sub-regions in the white sub-region whose areas are greater than an area threshold and determines them as m regions 2; constructs multiple horizontal lines in the m regions 2, and the multiple horizontal lines intersect with the m regions 2; selects one horizontal line from the multiple horizontal lines and intersects 2 of the m regions 2 m intersection points, calculate the distance between two adjacent intersection points among the 2m intersection points to obtain 2m-1 distance values, select the 5 most central values ​​from the 2m-1 distance values, if the sizes of the 5 values ​​are set as intervals, and the smaller 2 or 3 values ​​are within the set range, traverse the remaining horizontal lines of the multiple horizontal lines to determine whether the smaller 2 or 3 values ​​of the remaining horizontal lines are also within the set range, if both 2 or 3 values ​​are within the set range, determine that the first image has a defect, determine area 2 corresponding to the 5 values ​​as a defective area, and mark the defective area.

3. A defect detection and annotation system for industrial image data, characterized in that: The system is applied to a computer device, and the system includes: A communication unit, configured to receive an industrial image, namely a first image, collected by a peripheral device; an identification unit configured to perform defect identification on the first image to determine whether the first image has defects, and if so, locate the defective area based on the identification result; mark the defective area to obtain a second image, and store the second image in a defective product document to be confirmed; The recognition unit is specifically configured to set the first image to a black and white image, identify white pixels and black pixels in the black and white image, determine consecutive black pixels as a sunspot region, and count regions in the sunspot region whose areas are greater than an area threshold as n regions 1; identify whether any one of the n regions 1 is quasi-circular in shape; if any one of the n regions 1 is quasi-circular in shape, determine that the first image has a defect, and determine the any one of the regions 1 with a quasi-circular shape as a defective region; The recognition unit is specifically used to extract an area 1 from n areas 1, determine the center point O of an area 1 through a center recognition algorithm, emit multiple rays in a 360° direction with the center point O as the endpoint, obtain multiple intersection points of the multiple rays with the edge of an area 1, form multiple line segments with the center point O at multiple foci, calculate the variance of the multiple line segment values, and if the variance is less than a variance threshold, determine that the area 1 is quasi-circular, otherwise determine that it is non-quasi-circular, and traverse the n areas 1 to determine at least one area 1 with a quasi-circular shape.

4. The system according to claim 3, characterized in that The recognition unit is specifically used to set the first image to a black and white picture, identify white pixels and black pixels in the black and white picture, determine continuous white pixels as a white sub-region, count the sub-regions in the white sub-region whose areas are greater than the area threshold as m regions 2; construct multiple horizontal lines in the m regions 2, the multiple horizontal lines intersect with the m regions 2, select one horizontal line from the multiple horizontal lines and intersect with 2 of the m regions 2 m intersection points, calculate the distance between two adjacent intersection points among the 2m intersection points to obtain 2m-1 distance values, select the 5 most central values ​​from the 2m-1 distance values, if the sizes of the 5 values ​​are set as intervals, and the smaller 2 or 3 values ​​are within the set range, traverse the remaining horizontal lines of the multiple horizontal lines to determine whether the smaller 2 or 3 values ​​of the remaining horizontal lines are also within the set range, if both 2 or 3 values ​​are within the set range, determine that the first image has a defect, determine area 2 corresponding to the 5 values ​​as a defective area, and mark the defective area.

Citation Information

Patent Citations

  • Method and device for detecting defects

    CN108230321A