Material defect detection method, device, electronic equipment and storage medium

By judging and obtaining the panoramic outline of material defects, the problem of defect detection misjudgment across multiple material images in the existing technology is solved, and the detection accuracy is improved.

CN117740830BActive Publication Date: 2024-10-25SHANGHAI GANTU NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311764456.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2024-10-25
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

Existing material defect detection solutions cannot accurately calculate the size of defects across multiple material images, leading to misjudgments and making it impossible to determine whether defects should be rejected or accepted.

Method used

By judging whether the defect of the material to be inspected is a cross-defect, its panoramic outline is obtained, and the defect caliper is filtered according to the panoramic outline to complete the detection of cross-defects. The specific method includes processing the material image according to the preset raster template, identifying the intersection of the defect outline and the preset outline, splicing the defect outline to obtain the panoramic outline, and performing combined caliper filtering of length, width or area.

Benefits of technology

It effectively avoids the error of crossing defects being misjudged as acceptable, and improves the accuracy of material defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117740830B_ABST
    Figure CN117740830B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a material defect detection method, device, electronic device and storage medium. When determining that the defect of a material to be inspected is a cross-defect, the method calculates the panoramic outline of the defect of the material to be inspected, performs defect caliper filtering according to the panoramic outline of the defect of the material to be inspected, and completes the cross-defect detection, thereby effectively avoiding the problem that the cross-defect is actually a rejection defect but is misjudged as an acceptance defect, thereby improving the accuracy of material defect detection and being suitable for popularization and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of material defect detection, and in particular, to a material defect detection method, device, electronic equipment and storage medium. Background Art

[0002] At present, automatic visual inspection has been widely used in material defect detection. The materials here can be circuit boards, display modules, battery modules, etc. However, when the existing material defect detection scheme calibrates the detected defects to be accepted or rejected, there is a situation where the defect appears on two or more consecutive material images. Since the size of the material defect cannot be accurately calculated, it is impossible to determine whether the material defect should be rejected or accepted, and there is a misjudgment. Take the "solder mask scratch" defect as an example. This material defect appears continuously in Figure 1 and Figure 2 In the material image shown, the defect lengths are 2mm and 3.5mm respectively. If the defect gauge is set to a length > 5mm, it needs to be reported. Since 2mm and 3.5mm are both less than 5mm, Figure 1 and Figure 2 The defects in the caliper are filtered out and finally determined as acceptable defects. However, the actual length of the "weld shield scratch" defect should be Figure 1 and Figure 2 The sum of the lengths of the defects is 5.5mm. According to the set caliper rules, this defect should actually be a rejection defect, not an acceptance defect.

[0003] The above problems need to be solved urgently. Summary of the invention

[0004] In order to solve the related technical problems, the present invention provides a material defect detection method, device, electronic device and storage medium to solve the problems mentioned in the above background technology part.

[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a material defect detection method, the method comprising:

[0007] Determine whether the defect of the material to be inspected is a cross-defect; wherein the cross-defect refers to a material defect in which a defect crosses at least two material images;

[0008] If the result of the judgment is yes, then obtaining a panoramic outline of the defect of the material to be inspected;

[0009] Defect caliper filtering is performed according to the panoramic profile of the defects of the material to be inspected to complete the detection of cross-defects.

[0010] As an optional implementation manner, the determining whether the defect of the material to be inspected is a cross defect includes:

[0011] The material image is processed according to the preset raster template to generate a new material image.

[0012] As an optional implementation manner, the determining whether the defect of the material to be inspected is a cross defect includes:

[0013] Identify the defect contour in the new material image and the preset contour under the grid image template rule;

[0014] Determining whether the defect contour intersects with a preset contour;

[0015] If the judgment result is yes, then the defect of the material to be inspected is determined to be a cross defect;

[0016] If the judgment result is no, it is determined that the defect of the material to be inspected is not a cross defect.

[0017] As an optional implementation manner, the obtaining of the panoramic profile of the defect of the material to be inspected includes:

[0018] Acquire all material images spanned by the defects of the material to be inspected, i.e., target images;

[0019] The defects of the material to be inspected in the target image are spliced ​​to obtain a complete defect outline, that is, a panoramic outline, of the defects of the material to be inspected.

[0020] As an optional implementation manner, the step of acquiring all material images spanned by the defects of the material to be inspected, namely, the target image, includes:

[0021] Calculate the side position where the defect contour in the material image intersects with the preset contour;

[0022] The target image is determined according to the side position.

[0023] As an optional embodiment, the defect caliper includes but is not limited to any one of length, width, area or a combination thereof.

[0024] In a second aspect, an embodiment of the present invention provides a material defect detection device, which adopts the material defect detection method described in any one of the embodiments of the first aspect above, including:

[0025] A spanning defect judgment module is used to judge whether the defect of the material to be inspected is a spanning defect; wherein the spanning defect refers to a material defect in which a defect spans at least two material images;

[0026] A defect panoramic outline acquisition module, used for acquiring a panoramic outline of the defect of the material to be inspected when the defect of the material to be inspected is a cross defect;

[0027] The defect caliper filter module is used to filter the defect calipers according to the panoramic outline of the defects of the material to be inspected, so as to complete the detection of cross-defects.

[0028] As an optional implementation, the material defect detection device further includes:

[0029] The material image processing module is used to process the material image according to the preset raster image template to generate a new material image.

[0030] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory connected to the processor, wherein program data is stored in the memory, and the processor calls the program data stored in the memory to execute the material defect detection method as described in any one of the embodiments of the first aspect above.

[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the material defect detection method as described in any one of the embodiments of the first aspect above.

[0032] The technical solution proposed in the embodiment of the present invention solves the shortcomings of the existing material defect detection. When it is determined that the defect of the material to be inspected is a cross-defect, the panoramic outline of the defect of the material to be inspected is calculated, and the defect caliper filtering is performed according to the panoramic outline of the defect of the material to be inspected to complete the cross-defect detection, thereby effectively avoiding the problem that the cross-defect is actually a rejection defect but is mistakenly judged as an acceptance defect, thereby improving the accuracy of material defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate and understand the technical solutions in the embodiments of the present invention, the following briefly introduces the background technology of the present invention and the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the contents of the embodiments of the present invention and these drawings without paying any creative work.

[0034] Figure 1 It is the material image where the first part of the defect in the solder mask scratch defect is located;

[0035] Figure 2 It is the material image where the second part of the defect in the solder mask scratch defect is located;

[0036] Figure 3A schematic diagram of a material defect detection method provided in Example 1 of the present invention;

[0037] Figure 4 A schematic diagram of a material defect detection method flow chart provided in Embodiment 2 of the present invention;

[0038] Figure 5 Schematic diagram of two grid images in the prior art solution provided in the second embodiment of the present invention;

[0039] Figure 6 A partial schematic diagram of a panoramic image of an actual material board provided in the second embodiment of the present invention;

[0040] Figure 7 Schematic diagram of two new raster images with more than 2K pixels provided in the second embodiment of the present invention;

[0041] Figure 8 Schematic diagram of two new raster images of 2K pixels provided in the second embodiment of the present invention;

[0042] Fig. 9 This is a schematic diagram of the structure of a material defect detection device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0043] In order to make the technical problems solved by the present invention, the technical solutions adopted and the technical effects achieved clearer, the technical solutions of the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0044] Embodiment 1

[0045] Please refer to Figure 3 As stated, Figure 3 This is a schematic diagram of a material defect detection method provided in Embodiment 1 of the present invention. As shown in the figure, the material defect detection method 300 in this embodiment includes:

[0046] S301. Determine whether the defect of the material to be inspected is a cross-defect; wherein the cross-defect refers to a material defect in which a defect crosses at least two material images;

[0047] S302. If the result of the judgment is yes, a panoramic outline of the defect of the material to be inspected is obtained;

[0048] S303. Perform defect gauge filtering according to the panoramic profile of the defects of the material to be inspected, and complete the detection of cross-defects.

[0049] The material defect detection method 300 proposed in the embodiment of the present invention first determines whether the material defect to be inspected is a spanning defect. When it is determined that the material defect to be inspected is a spanning defect, the panoramic contour of the material defect to be inspected is calculated, and the defect caliper filtering is performed according to the panoramic contour of the material defect to be inspected to complete the spanning defect detection, thereby effectively avoiding the problem that the spanning defect is actually a rejection defect but is mistakenly judged as an acceptance defect, thereby improving the accuracy of material defect detection and solving the shortcomings of existing material defect detection.

[0050] Embodiment 2

[0051] Please refer to Figure 4 As stated, Figure 4 This is a schematic diagram of a material defect detection method flow chart provided in Embodiment 1 of the present invention. As shown in the figure, the material defect detection method 400 in this embodiment includes:

[0052] S401. Processing the material image according to a preset grid template to generate a new material image;

[0053] S402. Determine whether the defect of the material to be inspected is a cross-defect; wherein the cross-defect refers to a material defect in which a defect crosses at least two material images;

[0054] S403. If the result of the judgment is yes, obtaining a panoramic outline of the defect of the material to be inspected;

[0055] S404. Defect caliper filtering is performed according to the panoramic profile of the defects of the material to be inspected to complete the cross-defect detection.

[0056] In this embodiment, a new raster image generation method is adopted to process the material image according to a preset raster image template to generate a new material image. Figures 5 to 8 As shown, Figure 5 Schematic diagram of two grid images in the prior art solution provided in the second embodiment of the present invention, Figure 6 This is a partial schematic diagram of a panoramic image of an actual material board provided in the second embodiment of the present invention. Figure 7 Schematic diagram of two new raster images with more than 2K pixels provided in the second embodiment of the present invention, Figure 8 The schematic diagram of two new 2K pixel grid images provided in the second embodiment of the present invention can intuitively show that: Figure 5 and Figure 7 The difference is Figure 5 is to directly divide the panorama into raster images, and Figure 7 It is to expand the preset pixels around on the basis of equal division, that is, the adjacent edge areas of two adjacent raster images have the same content, but if Figure 6 Reference Figure 7 The average distribution method, Figure 7The pixels will exceed 2K. In order to maintain 2K pixels, in this embodiment, the material image is processed according to the preset grid image template, and the generated new grid image is shown in FIG. Figure 8 , the total number of equally divided raster images is greater, but the pixels remain at 2K pixels.

[0057] Exemplarily, the determining whether the defect of the material to be inspected is a cross-defect includes:

[0058] Identify the defect contour in the new material image and the preset contour under the grid image template rule;

[0059] Determining whether the defect contour intersects with a preset contour;

[0060] If the judgment result is yes, then the defect of the material to be inspected is determined to be a cross defect;

[0061] If the judgment result is no, it is determined that the defect of the material to be inspected is not a cross defect.

[0062] Exemplarily, the obtaining of the panoramic profile of the defect of the material to be inspected includes:

[0063] Acquire all material images spanned by the defects of the material to be inspected, i.e., target images;

[0064] The defects of the material to be inspected in the target image are spliced ​​to obtain a complete defect outline, that is, a panoramic outline, of the defects of the material to be inspected.

[0065] In this embodiment, the step of acquiring all material images spanned by the defects of the material to be inspected, namely, the target images, includes:

[0066] Calculate the side position where the defect contour in the material image intersects with the preset contour;

[0067] The target image is determined according to the side position.

[0068] In this embodiment, if the defect contour in the material image is consistent with the preset contour ( Figure 8 It should be noted that in practical applications, generally speaking, when the defect contour in the material image intersects with the preset contour on only one side, the adjacent side of the intersecting side is selected, and the corresponding target grid image is selected from the four adjacent grid images. Figure 8Right. In special cases, when the defect contour in the material image intersects with both sides of the preset contour (for example, an L-shaped defect), three material images need to be combined for calculation, and two corresponding target grid images are selected from four adjacent grid images (the defect contour exists in two intersecting rectangular areas (excluding overlapping square areas)). In rare cases, four-side set calculations are also required (rectangles, triangles, etc. at corner positions), and two corresponding target grid images are selected from four adjacent grid images, as well as diagonal grid images (the defect contour exists in two intersecting rectangular areas (including overlapping square areas)).

[0069] In this embodiment, after determining the target image according to the side position, the method further includes: identifying a defect contour in the target image (each target image in the target image set) and a preset contour under the grid image template rule.

[0070] In this embodiment, the defects of the material to be inspected in the target image are spliced ​​to obtain a complete defect outline of the defect of the material to be inspected, that is, a panoramic outline, including:

[0071] The splicing alignment points of the defect contours in each target image (the intersection points of the defect contour and the preset contour) are determined, and contour splicing is performed to obtain the complete defect contour of the defect in the material to be inspected, that is, the panoramic contour.

[0072] Exemplarily, the defect caliper includes but is not limited to any one of length, width, area or a combination thereof.

[0073] The material defect detection method 400 proposed in the embodiment of the present invention adopts a new grid map generation method, processes the material image according to a preset grid map template, and generates a new material image. By processing the new material image, it can be accurately determined whether the material defect to be inspected is a cross-defect, and the complete defect contour of the material defect to be inspected can be accurately calculated. The defect caliper is filtered according to the panoramic contour of the material defect to be inspected to complete the cross-defect detection, effectively avoiding the problem that the cross-defect is actually a rejection defect but is mistakenly judged as an acceptance defect, thereby improving the accuracy of material defect detection.

[0074] Embodiment 3

[0075] like Fig. 9 As shown, Fig. 9 This is a schematic diagram of the structure of a material defect detection device provided in Embodiment 2 of the present invention. As shown in the figure, the material defect detection device 900 in this embodiment adopts the material defect detection method (300, 400) described in any one of Embodiment 1 or Embodiment 2 above, including:

[0076] A spanning defect judgment module 902 is used to judge whether the defect of the material to be inspected is a spanning defect; wherein the spanning defect refers to a material defect in which a defect spans at least two material images;

[0077] A defect panoramic outline acquisition module 903 is used to acquire a panoramic outline of the defect of the material to be inspected when the defect of the material to be inspected is a cross defect;

[0078] The defect gauge filtering module 904 is used to perform defect gauge filtering according to the panoramic profile of the defects of the material to be inspected, so as to complete the detection of cross-defects.

[0079] Exemplarily, the material defect detection device 900 further includes:

[0080] The material image processing module 901 is used to process the material image according to a preset grid image template to generate a new material image.

[0081] Exemplarily, the cross-defect judgment module 902 is specifically used to: identify the defect contour in the new material image and the preset contour under the grid template rule; determine whether the defect contour intersects with the preset contour; if the judgment result is yes, determine that the defect of the material to be inspected is a cross-defect; if the judgment result is no, determine that the defect of the material to be inspected is not a cross-defect.

[0082] Exemplarily, the defect panoramic outline acquisition module 903 is specifically used to: acquire all material images spanned by the material defect to be inspected, i.e., the target image; splice the material defect to be inspected in the target image to obtain the complete defect outline of the material defect to be inspected, i.e., the panoramic outline. Wherein, acquiring all material images spanned by the material defect to be inspected, i.e., the target image, includes: calculating the side position where the defect outline in the material image intersects with the preset outline; and determining the target image according to the side position.

[0083] In this embodiment, if the side position where the defect contour in the material image intersects with the preset contour is on the right, it is necessary to collect the right adjacent grids for caliper filtering. It should be noted that in practical applications, generally speaking, when the defect contour in the material image intersects with the preset contour on only one side, the adjacent side of the intersecting side is selected, and the corresponding target grid image is selected from the four adjacent grid images. Figure 6Right. In special cases, when the defect contour in the material image intersects with both sides of the preset contour (for example, an L-shaped defect), three material images need to be combined for calculation, and two corresponding target grid images are selected from four adjacent grid images (the defect contour exists in two intersecting rectangular areas (excluding overlapping square areas)). In rare cases, four-side set calculations are also required (rectangles, triangles, etc. at corner positions), and two corresponding target grid images are selected from four adjacent grid images, as well as diagonal grid images (the defect contour exists in two intersecting rectangular areas (including overlapping square areas)).

[0084] In this embodiment, after determining the target image according to the side position, the method further includes: identifying a defect contour in the target image (each target image in the target image set) and a preset contour under the grid image template rule.

[0085] In this embodiment, the defect panoramic outline acquisition module 903 splices the defects of the material to be inspected in the target image to obtain a complete defect outline of the defect of the material to be inspected, that is, a panoramic outline, including:

[0086] The splicing alignment points of the defect contours in each target image (the intersection points of the defect contour and the preset contour) are determined, and contour splicing is performed to obtain the complete defect contour of the defect in the material to be inspected, that is, the panoramic contour.

[0087] Exemplarily, the defect caliper includes but is not limited to any one of length, width, area or a combination thereof.

[0088] The material defect detection device 900 proposed in the embodiment of the present invention adopts a new grid map generation method, processes the material image according to a preset grid map template, and generates a new material image. By processing the new material image, it can be accurately determined whether the material defect to be inspected is a cross-defect, and the complete defect contour of the material defect to be inspected can be accurately calculated. The defect caliper is filtered according to the panoramic contour of the material defect to be inspected to complete the cross-defect detection, effectively avoiding the problem that the cross-defect is actually a rejection defect but is mistakenly judged as an acceptance defect, thereby improving the accuracy of material defect detection.

[0089] Embodiment 4

[0090] An embodiment of the present invention provides an electronic device, comprising a processor and a memory connected to the processor, wherein program data is stored in the memory, and the processor calls the program data stored in the memory to execute the material defect detection method (300, 400) as described in any one of the above-mentioned embodiments 1 or 2.

[0091] The electronic device proposed in the embodiment of the present invention adopts a new grid image generation method, processes the material image according to a preset grid image template, and generates a new material image. By processing the new material image, it can be accurately determined whether the defect of the material to be inspected is a cross-defect, and the complete defect contour of the material defect to be inspected can be accurately calculated. The defect caliper is filtered according to the panoramic contour of the material defect to be inspected to complete the cross-defect detection, effectively avoiding the problem that the cross-defect is actually a rejection defect but is mistakenly judged as an acceptance defect, thereby improving the accuracy of material defect detection.

[0092] Embodiment 5

[0093] An embodiment of the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the material defect detection method (300, 400) as described in any one of the above-mentioned embodiments 1 or 2.

[0094] It should be noted that the above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0095] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A material defect detection method, characterized in that: include: Determining whether the defect of the material to be inspected is a spanning defect; wherein the spanning defect refers to a material defect in which a defect spans at least two material images, specifically comprising: processing the material image according to a preset raster image template to generate a new material image; identifying the defect contour in the new material image and the preset contour under the raster image template rule; determining whether the defect contour and the preset contour intersect; if the judgment result is yes, determining that the defect of the material to be inspected is a spanning defect; if the judgment result is no, determining that the defect of the material to be inspected is not a spanning defect; If the result of the judgment is yes, obtaining a panoramic outline of the defect of the material to be inspected; Defect caliper filtering is performed based on the panoramic profile of the defects of the material to be inspected to complete cross-defect detection.

2. The material defect detection method according to claim 1, characterized in that: The obtaining of a panoramic profile of the defect of the material to be inspected includes: Acquire all material images spanned by the defects of the material to be inspected, i.e., target images; The defects of the material to be inspected in the target image are spliced ​​to obtain a complete defect outline of the defect of the material to be inspected, that is, a panoramic outline.

3. The material defect detection method according to claim 2, characterized in that: The step of obtaining all material images spanned by the defects in the material to be inspected, i.e., target images, includes: Calculate the side position where the defect contour in the material image intersects with the preset contour; The target image is determined according to the side position.

4. The material defect detection method according to claim 1, characterized in that: The defect caliper includes but is not limited to any one of length, width, area or a combination thereof.

5. A material defect detection device, characterized in that: The device adopts the material defect detection method according to any one of claims 1 to 4, comprising: The material image processing module is used to process the material image according to the preset raster image template to generate a new material image; A spanning defect judgment module is used to judge whether the defect of the material to be inspected is a spanning defect; wherein the spanning defect refers to a material defect in which a defect spans at least two material images; the spanning defect judgment module is specifically used to identify the defect outline in the new material image and the preset outline under the grid image template rule; and judge whether the defect outline and the preset outline intersect; if the judgment result is yes, the material defect to be inspected is judged to be a spanning defect; if the judgment result is no, the material defect to be inspected is judged not to be a spanning defect; A defect panoramic outline acquisition module, configured to acquire a panoramic outline of the defect of the material to be inspected when the defect of the material to be inspected is a transverse defect; The defect caliper filtering module is used to filter the defect calipers according to the panoramic outline of the defects of the material to be inspected, so as to complete the detection of cross-defects.

6. An electronic device, characterized in that: The electronic device includes a processor and a memory connected to the processor, wherein program data is stored in the memory, and the processor calls the program data stored in the memory to execute the material defect detection method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the material defect detection method according to any one of claims 1 to 4.