Board-level TGV packaging defect detection method and system, medium and electronic equipment

By correcting the image to be tested using feature points and translation affine transformation method in plate-level TGV package defect detection, the problem of low efficiency and accuracy of existing detection methods is solved, and fast and accurate defect detection is achieved.

CN119579493APending Publication Date: 2025-03-07BEIJING ZHAOWEI XINYUAN COMM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411451244.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing board-level TGV packaging defect detection methods have low efficiency and accuracy, which cannot meet the needs of production line use.

Method used

By obtaining the image to be tested and the standard template images, the characteristic points on the standard template images are determined, and the target points are found in the image to be tested. The pixel point positions are corrected through translation and affine transformation methods, and the pixel value difference is extracted to obtain defect detection results.

Benefits of technology

It realizes the rapid and accurate detection of defects on the image to be tested, improves detection efficiency and accuracy, and can meet the testing needs of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579493A_ABST
    Figure CN119579493A_ABST
Patent Text Reader

Abstract

The invention provides a board-level TGV packaging defect detection method and system, a medium and electronic equipment, and relates to the technical field of through hole detection, and the method comprises the steps: obtaining a to-be-detected image and a standard template image, and determining feature points on the standard template image; obtaining position information of the feature points, finding a target point in the to-be-detected image according to the position information, and searching all pixel points within a second preset range from the target point one by one until a feature positioning kernel having the same pixel value distribution as the feature points is found; obtaining the position deviation of the feature positioning kernel and the feature points, and correcting the position of each pixel point in the to-be-detected image in combination with a translation method and an affine transformation method to obtain a target image; and extracting a pixel value difference of pixel points corresponding to the target image and the standard template image to obtain a first defect detection result. The problem that an existing detection method is low in efficiency and accuracy is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of through-hole detection, and in particular to a board-level TGV packaging defect detection method, system, medium and electronic equipment. Background Art

[0002] Through-glass via (TGV) technology is widely used in 3D packaging glass substrates, AM-MiniLED glass substrates, glass-based microfluidic chips, electronic cigarette filters, glass atomizers, etc. In order to improve the transmission efficiency of 3D packaging, the integration density of products is constantly increasing, requiring the wafer TGV size to develop in a more micro-nano direction, which has raised new issues for processing technology and detection methods.

[0003] The existing surface defect inspection method mainly relies on manual work. However, manual inspection is inefficient and inaccurate, and cannot meet the needs of production lines. At the same time, manual inspection is time-consuming and labor-intensive, inefficient, cumbersome, and highly subjective, and is affected by the mood of the person, the quality of eyesight, ambient light, and the different judgment standards of different human eyes. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a board-level TGV package defect detection method, system, medium and electronic equipment, which solve the problems of low efficiency and accuracy in the existing detection methods.

[0005] At least one embodiment of the present invention provides a board-level TGV package defect detection method, comprising:

[0006] Acquire an image to be tested and a standard template image, and determine a feature point on the standard template image, wherein the feature point is characterized as a point with a preset number of points within a first preset range having a pixel value different from the feature point, with the feature point as the center;

[0007] Obtaining position information of the feature point in the standard template image, finding a target point in the image to be tested according to the position information, and searching all pixel points within a second preset range from the target point one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel;

[0008] Obtaining a position deviation between the feature positioning kernel and the feature point, and correcting the position of each pixel point in the image to be measured according to the position deviation in combination with a translation method and an affine transformation method to obtain a target image;

[0009] The pixel value difference between each pixel point corresponding to the target image and the standard template image is extracted to obtain a first defect detection result.

[0010] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0011] By taking a point as the center on the standard template image and having a preset number of points with different pixel values ​​from the feature point within a first preset range as the feature point, and finding the target point at the same position on the image to be tested, and then searching one by one for all pixel points within a second preset range from the target point, until a point with the same pixel value distribution as the feature point within the first preset range is found as the feature positioning kernel, at this time, the position difference between the feature positioning kernel and the feature point can be accurately characterized as the position difference between the standard template image and the image to be tested;

[0012] Subsequently, by correcting the position of each pixel point in the image to be tested according to the position deviation, combined with the translation method and the affine transformation method, the target image can be obtained. The target image corresponds to each pixel point of the standard template image one by one. At this time, the pixel value difference between the target image and the standard template image corresponding to each pixel point is extracted, and then the first defect detection result can be obtained. The defects existing in the image to be tested can be quickly and accurately displayed through the first detection result.

[0013] In one embodiment of a board-level TGV package defect detection method provided by the present invention, the method further includes:

[0014] Based on the adaptive threshold method, all holes in the image to be tested are extracted to obtain a mask image to be tested;

[0015] Determine the roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness values ​​are characterized by the degree of fit with a standard circle;

[0016] The comparison result of all the roundness values ​​with the preset standard values ​​is used as the second defect detection result.

[0017] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0018] By measuring the roundness value of the holes in the mask image to be tested and comparing it with the preset standard value, it can be quickly detected and determined whether the roundness of the holes in the image to be tested meets the standard.

[0019] In one embodiment of a board-level TGV package defect detection method provided by the present invention, all holes in the image to be tested are extracted based on an adaptive threshold method to obtain a mask image to be tested, including:

[0020] Taking an area within a preset range from the edge of the image to be measured as an edge area;

[0021] Using the image to be tested after removing the edge area as an initial mask image;

[0022] Based on the adaptive threshold method, all holes in the initial mask image are extracted to obtain the mask image to be tested.

[0023] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0024] The present invention performs the step of extracting all holes in the image to be tested after removing the edge area of ​​the image to be tested. This method can avoid the corresponding holes and their defects being adhered to the background when extracting the holes, thereby affecting the detection accuracy.

[0025] In one embodiment of a board-level TGV package defect detection method provided by the present invention, determining the roundness values ​​corresponding to all holes in the mask image to be tested includes:

[0026] For each hole, the short axis and the long axis of the hole are obtained, and the ratio of the short axis to the long axis is used as the roundness data.

[0027] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0028] The prior art usually obtains the area and perimeter of the hole by fitting, and then determines the roundness data of the hole to be detected based on the relationship between the area and the perimeter. However, the above method has poor accuracy in actual application and cannot find holes with smaller defects.

[0029] The roundness data obtained by the detection method provided by the present invention, on the one hand, greatly simplifies the calculation process and improves the calculation speed, and at the same time provides a kind of roundness data that can more clearly show the smoothness of the hole.

[0030] In one embodiment of a board-level TGV package defect detection method provided by the present invention, the method further includes:

[0031] Each of the long axes is used as the aperture corresponding to each hole, and the comparison result between each of the apertures and the preset aperture is used as the third defect detection result.

[0032] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0033] Through the above method, the comparison result between each aperture and the preset aperture can also be used as the third defect detection result to determine whether there is a defect in the aperture size of the hole in the image to be tested.

[0034] In one embodiment of a board-level TGV package defect detection method provided by the present invention, determining feature points on the standard template image includes:

[0035] Divide the standard template image into multiple regions, and find a feature point corresponding to each region by using a fast corner point detection method;

[0036] Acquiring position information of the feature point in the standard template image, finding a target point in the image to be tested according to the position information, and searching all pixel points within a second preset range from the target point one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel, including:

[0037] A first coordinate system is established in the standard template image, and a second coordinate system is established in the image to be tested, wherein the first coordinate system and the second coordinate system have the same position distribution in their respective images, and for each of the feature points, a second coordinate having the same coordinate in the second coordinate system is found according to the first coordinate of the feature point in the first coordinate system, and all pixel points within a second preset range from the second coordinate are searched one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as an initial positioning kernel;

[0038] For each initial positioning kernel, based on the initial positioning kernel, a normalized correlation coefficient matching method is used to determine the similarity between the standard template image and the image to be tested;

[0039] The initial positioning kernel corresponding to the largest similarity among all similarities is used as the feature positioning kernel.

[0040] The technical solution disclosed in the present invention has at least the following beneficial effects:

[0041] Through the above method, after dividing different areas to obtain multiple feature points, multiple target points and multiple initial positioning kernels, the similarity between the standard template image and the image to be tested is determined by the normalized correlation coefficient matching method. By finding the initial positioning kernel corresponding to the highest similarity as the feature positioning kernel, the detection calculation accuracy of the method can be improved.

[0042] At least one embodiment of the present invention further provides a board-level TGV package defect detection system, comprising:

[0043] A feature point acquisition module acquires the image to be tested and the standard template image, and determines the feature points on the standard template image, wherein the feature points are characterized as points with a preset number of points within a first preset range having different pixel values ​​from the feature points, with the feature point as the center;

[0044] A feature positioning kernel acquisition module is used to acquire the position information of the feature point in the standard template image, find the target point in the image to be tested according to the position information, and search all the pixel points within the second preset range from the target point one by one until a point with the same pixel value distribution as the feature point within the first preset range is found as the feature positioning kernel;

[0045] A correction module, which obtains the position deviation between the feature positioning kernel and the feature point, and corrects the position of each pixel point in the image to be measured according to the position deviation by combining the translation method and the affine transformation method to obtain a target image;

[0046] The detection module extracts the pixel value difference between the target image and the standard template image corresponding to each pixel point to obtain a first defect detection result.

[0047] In one embodiment of a board-level TGV package defect detection system provided by the present invention, the system further includes:

[0048] A hole detection module extracts all holes in the image to be tested based on an adaptive threshold method to obtain a mask image to be tested;

[0049] A comparison module, for determining roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness value is characterized by a degree of fit with a standard circle;

[0050] The detection module further includes: taking the comparison result of all the roundness values ​​with the preset standard values ​​as the second defect detection result.

[0051] The present invention also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the above-mentioned board-level TGV packaging defect detection method.

[0052] The present invention also provides an electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor implements the above-mentioned board-level TGV packaging defect detection method when executing the program. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of a process of a board-level TGV packaging defect detection method according to the present invention;

[0054] Figure 2 It is a schematic diagram of feature point extraction according to the present invention;

[0055] Figure 3 The image is obtained by dividing the standard template image into 15 regions according to the present invention;

[0056] Figure 4 The distribution diagram of 15 characteristic points extracted by the present invention;

[0057] Figure 5 It is a schematic diagram of the edge area of ​​the present invention;

[0058] Figure 6 is the initial mask image;

[0059] Figure 7 It is a schematic diagram of roundness data;

[0060] Figure 8 is a schematic diagram of aperture data;

[0061] Fig. 9 It is a comparison diagram of the standard template image, the image to be tested and the difference result image;

[0062] Fig.10 is a comparison diagram of another set of standard template images, the image to be tested and the difference result image;

[0063] Fig.11 The present invention is a flow chart of a board-level TGV packaging defect detection system. DETAILED DESCRIPTION

[0064] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0065] Furthermore, those skilled in the art may combine and associate different embodiments or examples and features of different embodiments or examples described in this specification without mutual contradiction.

[0066] The present invention provides a board-level TGV packaging defect detection method, please refer to Figure 1 As shown, including:

[0067] Obtain the image to be tested and the standard template image, and determine the feature points on the standard template image, wherein the feature points are characterized as points with a preset number of points having different pixel values ​​from the feature points within a first preset range with the feature point as the center; Figure 2 Take point P in the figure as an example for schematic illustration, the feature point is taken as the center, wherein the first preset range is within the range of 3 pixel points, the preset points refer to 12 points, then the points within the first preset range that have the preset points with different pixel values ​​from the feature point refer to the pixel values ​​of the pixel points in the area surrounded by the point P as the center and the 3 pixel points as the radius, more than 12 pixel values ​​are different from the pixel values ​​corresponding to the point P, then the point P is considered to be a feature point;

[0068] The above standard template images can be referenced Figure 3As shown, it refers to the surface image obtained on a glass substrate without any through-glass hole defects under normal process. It should be understood that the difference between the image to be tested and the standard template image is only in a small part of defects. The image to be tested and the standard template image are basically consistent except for the above-mentioned small part of defects.

[0069] Obtaining the position information of the feature point in the standard template image, finding the target point in the image to be tested according to the position information, searching all the pixel points within the second preset range from the target point one by one until a point with the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel; the position information may be coordinate information, or a position distribution state, etc.;

[0070] Obtaining a position deviation between the feature positioning kernel and the feature point, and correcting the position of each pixel point in the image to be measured according to the position deviation in combination with a translation method and an affine transformation method to obtain a target image;

[0071] The correction process is:

[0072] The affine transformation matrix (M) is a 2*3 floating point matrix that represents the affine transformation from the original point set to the target point set. This matrix can be used to affine transform the original image or point set to align it with the target image or point set.

[0073] An example of the value of the affine transformation matrix M is: [[1.0.53333333-6.66666667][-0.21.60.]].

[0074] M[0,0]: indicates the scaling in the x direction. If it is greater than 1, it means a zoom-in operation is performed; if it is less than 1, it means a zoom-out operation is performed; if it is equal to 1, it means no zoom-in operation is performed.

[0075] M[0,1]: represents the vertical shear parameter, which is used together with M[1,0] to calculate the rotation angle.

[0076] M[0,2]: represents translation in the x direction.

[0077] M[1,0]: represents the horizontal shear parameter, which is used together with M[1,1] to calculate the rotation angle.

[0078] M[1,1]: indicates the scaling in the y direction. If it is greater than 1, it means a zoom-in operation has been performed; if it is less than 1, it means a zoom-out operation has been performed; if it is equal to 1, it means no zoom-in operation has been performed.

[0079] M[1,2]: represents translation in the y direction.

[0080] The calculation process of M is:

[0081]

[0082] Convert the linear equation system into matrix form A*X=B, and use the least squares method to solve the matrix X so that A*X is as close to B as possible. Based on the solved matrix X, construct the estimated affine transformation matrix M:

[0083] Then, the least squares method is used to find an optimal affine transformation matrix so that the original point set is as close to the target point set as possible after transformation. By minimizing the sum of squares of the residuals, an optimal estimation result can be obtained. Then, the image to be tested is subjected to affine transformation and translation based on the translation method to obtain the image to be tested with the same position as the standard template image.

[0084] The pixel value difference between each pixel point corresponding to the target image and the standard template image is extracted to obtain a first defect detection result.

[0085] Among them, extracting the pixel value difference of each pixel point corresponding to the target image and the standard template image refers to performing a subtraction operation on the target image and the standard template image, that is, calculating the pixel value difference point by point. The difference result can be referred to Fig. 9 and Fig.10 As shown, Fig. 9 The leftmost image in the figure is the standard template image. Fig. 9 The image in the middle is part of the target image. Fig. 9 The image on the far right in is the difference result image. Similarly, Fig.10 The leftmost image in is a part of the target image. Fig.10 The image in the middle is the standard template image. Fig.10 The image on the far right is the difference result image; then the difference result image is analyzed to obtain the first defect detection results of the image to be tested, such as missed holes, porosity, poor graphics, surface defects (scratches, cracks, broken edges, foreign matter, etc.).

[0086] By taking a point as the center on the standard template image and having a preset number of points with different pixel values ​​from the feature point within a first preset range as the feature point, and finding the target point at the same position on the image to be tested, and then searching one by one for all pixel points within a second preset range from the target point, until a point with the same pixel value distribution as the feature point within the first preset range is found as the feature positioning kernel, at this time, the position difference between the feature positioning kernel and the feature point can be accurately characterized as the position difference between the standard template image and the image to be tested;

[0087] Subsequently, by correcting the position of each pixel point in the image to be tested according to the position deviation, combined with the translation method and the affine transformation method, the target image can be obtained. The target image corresponds to each pixel point of the standard template image one by one. At this time, the pixel value difference between the target image and the standard template image corresponding to each pixel point is extracted, and then the first defect detection result can be obtained. The defects existing in the image to be tested can be quickly and accurately displayed through the first detection result.

[0088] Specifically, the method further includes:

[0089] The area within a preset range from the edge of the image to be tested is taken as the edge area. The edge area can refer to Figure 5 As shown;

[0090] The image to be tested after removing the edge area is used as an initial mask image. The initial mask image can refer to Figure 6 As shown,

[0091] Based on the adaptive threshold method, all holes in the initial mask image are extracted to obtain a mask image to be tested;

[0092] The specific process of detection and extraction using the adaptive threshold method includes: the idea of ​​adaptive threshold is not to calculate the threshold of the global image, but to calculate the local threshold according to the brightness distribution of different regions of the image, so different thresholds can be adaptively calculated for different regions of the image, so it is called adaptive threshold method.

[0093] It is suitable for defect segmentation of grayscale uneven images; the algorithm assumes that image pixels can be divided into background and objects according to the threshold. Then, the optimal threshold is calculated to distinguish the two types of pixels so that the distinction between the two types of pixels is maximized, where:

[0094]

[0095] N1+N2=M×N

[0096] ω1+ω2=1

[0097] μ=μ1×ω1+μ2×ω2

[0098] g=ω1×(μ-μ1) 2 +ω2×(μ-μ2) 2

[0099] The maximum value of the variance between classes is obtained by traversal method, which is used as the required separation threshold.

[0100] Assume that the background of the initial mask image is dark;

[0101] N1: the number of pixels whose grayscale is greater than the threshold T;

[0102] N2: The number of pixels whose grayscale is less than the threshold T;

[0103] M*N: image size;

[0104] ω1: The ratio of target pixels to the entire image;

[0105] ω2: The ratio of background pixels to the entire image;

[0106] μ1: average grayscale of target pixels;

[0107] μ2: average grayscale of background pixels;

[0108] μ: the total average grayscale of the image;

[0109] g: between-class variance;

[0110] Determine the roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness values ​​are characterized by the degree of fit with a standard circle;

[0111] The comparison result of all the roundness values ​​with the preset standard values ​​is used as the second defect detection result.

[0112] By measuring the roundness value of the holes in the mask image to be tested and comparing it with the preset standard value, it can be quickly detected and determined whether the roundness of the holes in the image to be tested meets the standard.

[0113] At the same time, this method performs the step of extracting all holes in the image to be tested after removing the edge area of ​​the image to be tested. This method can avoid the corresponding holes and their defects being adhered to the background when extracting the holes, thereby affecting the detection accuracy.

[0114] Specifically, determining the roundness values ​​corresponding to all holes in the mask image to be tested includes:

[0115] For each hole, the short axis and the long axis of the hole are obtained, and the ratio of the short axis to the long axis is used as the roundness data.

[0116] The prior art usually obtains the area and perimeter of the hole by fitting, and then determines the roundness data of the hole to be detected based on the relationship between the area and the perimeter. However, the above method has poor accuracy in actual application and cannot find holes with smaller defects.

[0117] The roundness data obtained by the detection method provided by the present invention greatly simplifies the calculation process and improves the calculation speed. At the same time, it provides a roundness data that can more clearly show the smoothness of the hole. The obtained roundness data is referenced Figure 7As shown;

[0118] Obviously, from the results of the roundness data, it can be seen that the measured roundness data is distributed between 0.96 and 1. It can be seen that different round holes correspond to different roundness data, and the distribution of roundness data fluctuates within a range of 0.04.

[0119] Specifically, the method further includes:

[0120] Each of the long axes is used as the aperture corresponding to each hole, and the comparison result between each of the apertures and the preset aperture is used as the third defect detection result.

[0121] By using the above method, the comparison result of each aperture with the preset aperture can also be used as the third defect detection result to determine whether there is a defect in the aperture size of the hole in the image to be tested, wherein the obtained aperture data is referenced to Figure 8 As shown, it can be seen that the measured aperture values ​​are distributed between 58um and 61um. It can be seen that different circular holes correspond to different aperture values, and the aperture distribution fluctuates by 3um.

[0122] Specifically, determining the feature points on the standard template image includes:

[0123] The standard template image is divided into multiple regions, such as Figure 3 As shown, in this embodiment, 15 regions are divided as an example for schematic illustration, and a feature point corresponding to each region is found by a fast corner point detection method;

[0124] Since there may be multiple feature points in each area, one of the feature points is randomly selected to represent the feature point of the area. That is, there are 15 feature points on a standard template image, and the distribution of the 15 feature points is as follows: Figure 4 As shown;

[0125] At this time, the position information of the feature point in the standard template image is obtained, and according to the position information, the target point is found in the image to be tested, and all pixel points within the second preset range from the target point are searched one by one until a point with the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel, which includes:

[0126] A first coordinate system is established in the standard template image, and a second coordinate system is established in the image to be tested, wherein the first coordinate system and the second coordinate system have the same position distribution in their respective images, and for each of the feature points, a second coordinate having the same coordinate in the second coordinate system is found according to the first coordinate of the feature point in the first coordinate system, and all pixel points within a second preset range from the second coordinate are searched one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as an initial positioning kernel;

[0127] For each initial positioning kernel, based on the initial positioning kernel, a normalized correlation coefficient matching method is used to determine the similarity between the standard template image and the image to be tested;

[0128] The above-mentioned normalized correlation coefficient matching method is an image processing technique used to find the part of an image that best matches another template image. This method determines the similarity between the image to be tested and the standard template image by calculating the normalized correlation coefficient between the two.

[0129] The initial positioning kernel corresponding to the largest similarity among all similarities is used as the feature positioning kernel.

[0130] Through the above method, after dividing different areas to obtain multiple feature points, multiple target points and multiple initial positioning kernels, the similarity between the standard template image and the image to be tested is determined by the normalized correlation coefficient matching method. By finding the initial positioning kernel corresponding to the highest similarity as the feature positioning kernel, the detection calculation accuracy of the method can be improved.

[0131] The present invention also provides a board-level TGV packaging defect detection system, please refer to Fig.11 As shown, including:

[0132] A feature point acquisition module acquires the image to be tested and the standard template image, and determines the feature points on the standard template image, wherein the feature points are characterized as points with a preset number of points within a first preset range having different pixel values ​​from the feature points, with the feature point as the center;

[0133] A feature positioning kernel acquisition module is used to acquire the position information of the feature point in the standard template image, find the target point in the image to be tested according to the position information, and search all the pixel points within the second preset range from the target point one by one until a point with the same pixel value distribution as the feature point within the first preset range is found as the feature positioning kernel;

[0134] A correction module, which obtains the position deviation between the feature positioning kernel and the feature point, and corrects the position of each pixel point in the image to be measured according to the position deviation by combining the translation method and the affine transformation method to obtain a target image;

[0135] The detection module extracts the pixel value difference between the target image and the standard template image corresponding to each pixel point to obtain a first defect detection result.

[0136] Furthermore, the system also includes:

[0137] A hole detection module extracts all holes in the image to be tested based on an adaptive threshold method to obtain a mask image to be tested;

[0138] A comparison module, for determining roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness value is characterized by a degree of fit with a standard circle;

[0139] The detection module further includes: taking the comparison result of all the roundness values ​​with the preset standard values ​​as the second defect detection result.

[0140] Further, the hole detection module includes:

[0141] An edge extraction unit, which takes an area within a preset range from the edge of the image to be measured as an edge area;

[0142] An initial mask extraction unit, which uses the image to be tested after removing the edge area as an initial mask image;

[0143] The mask extraction unit to be tested extracts all holes in the initial mask image based on an adaptive threshold method to obtain the mask image to be tested.

[0144] Furthermore, the comparison module includes:

[0145] For each hole, the short axis and the long axis of the hole are obtained, and the ratio of the short axis to the long axis is used as the roundness data.

[0146] Furthermore, the comparison module also includes:

[0147] Each of the long axes is used as the aperture corresponding to each hole, and the comparison result between each of the apertures and the preset aperture is used as the third defect detection result.

[0148] Furthermore, the feature point acquisition module includes:

[0149] Divide the standard template image into multiple regions, and find a feature point corresponding to each region by using a fast corner point detection method;

[0150] At this time, the feature positioning kernel acquisition module includes:

[0151] A first coordinate system is established in the standard template image, and a second coordinate system is established in the image to be tested, wherein the first coordinate system and the second coordinate system have the same position distribution in their respective images, and for each of the feature points, a second coordinate having the same coordinate in the second coordinate system is found according to the first coordinate of the feature point in the first coordinate system, and all pixel points within a second preset range from the second coordinate are searched one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as an initial positioning kernel;

[0152] For each initial positioning kernel, based on the initial positioning kernel, a normalized correlation coefficient matching method is used to determine the similarity between the standard template image and the image to be tested;

[0153] The initial positioning kernel corresponding to the largest similarity among all similarities is used as the feature positioning kernel.

[0154] The present invention also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the above-mentioned board-level TGV packaging defect detection method.

[0155] The present invention also provides an electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor implements the above-mentioned board-level TGV packaging defect detection method when executing the program.

[0156] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A board-level TGV package defect detection method, characterized in that: include: Acquire an image to be tested and a standard template image, and determine a feature point on the standard template image, wherein the feature point is characterized as a point with a preset number of points within a first preset range having a pixel value different from the feature point, with the feature point as the center; Obtaining position information of the feature point in the standard template image, finding a target point in the image to be tested according to the position information, and searching all pixel points within a second preset range from the target point one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel; Obtaining a position deviation between the feature positioning kernel and the feature point, and correcting the position of each pixel point in the image to be measured according to the position deviation in combination with a translation method and an affine transformation method to obtain a target image; The pixel value difference between each pixel point corresponding to the target image and the standard template image is extracted to obtain a first defect detection result.

2. A board-level TGV package defect detection method according to claim 1, characterized in that: Also includes: Based on the adaptive threshold method, all holes in the image to be tested are extracted to obtain a mask image to be tested; Determine the roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness values ​​are characterized by the degree of fit with a standard circle; The comparison result of all the roundness values ​​with the preset standard values ​​is used as the second defect detection result.

3. A board-level TGV package defect detection method according to claim 2, characterized in that: Based on the adaptive threshold method, all holes in the image to be tested are extracted to obtain a mask image to be tested, including: Taking an area within a preset range from the edge of the image to be measured as an edge area; Using the image to be tested after removing the edge area as an initial mask image; Based on the adaptive threshold method, all holes in the initial mask image are extracted to obtain the mask image to be tested.

4. A board-level TGV package defect detection method according to claim 3, characterized in that: Determining the roundness values ​​corresponding to all holes in the mask image to be tested, including: For each hole, the short axis and the long axis of the hole are obtained, and the ratio of the short axis to the long axis is used as the roundness data.

5. A board-level TGV package defect detection method according to claim 4, characterized in that: Also includes: Each of the long axes is used as the aperture corresponding to each hole, and the comparison result between each of the apertures and the preset aperture is used as the third defect detection result.

6. A board-level TGV package defect detection method according to any one of claims 1 to 5, characterized in that: Determining feature points on the standard template image includes: Divide the standard template image into multiple regions, and find a feature point corresponding to each region by using a fast corner point detection method; Acquiring position information of the feature point in the standard template image, finding a target point in the image to be tested according to the position information, and searching all pixel points within a second preset range from the target point one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as a feature positioning kernel, including: A first coordinate system is established in the standard template image, and a second coordinate system is established in the image to be tested, wherein the first coordinate system and the second coordinate system have the same position distribution in their respective images, and for each of the feature points, a second coordinate having the same coordinate in the second coordinate system is found according to the first coordinate of the feature point in the first coordinate system, and all pixel points within a second preset range from the second coordinate are searched one by one until a point having the same pixel value distribution as the feature point within the first preset range is found as an initial positioning kernel; For each initial positioning kernel, based on the initial positioning kernel, a normalized correlation coefficient matching method is used to determine the similarity between the standard template image and the image to be tested; The initial positioning kernel corresponding to the largest similarity among all similarities is used as the feature positioning kernel.

7. A board-level TGV packaging defect detection system, characterized in that: include: A feature point acquisition module acquires the image to be tested and the standard template image, and determines the feature points on the standard template image, wherein the feature points are characterized as points with a preset number of points within a first preset range having different pixel values ​​from the feature points, with the feature point as the center; A feature positioning kernel acquisition module is used to acquire the position information of the feature point in the standard template image, find the target point in the image to be tested according to the position information, and search all the pixel points within the second preset range from the target point one by one until a point with the same pixel value distribution as the feature point within the first preset range is found as the feature positioning kernel; A correction module, which obtains the position deviation between the feature positioning kernel and the feature point, and corrects the position of each pixel point in the image to be measured according to the position deviation by combining the translation method and the affine transformation method to obtain a target image; The detection module extracts the pixel value difference between the target image and the standard template image corresponding to each pixel point to obtain a first defect detection result.

8. A board-level TGV packaging defect detection system according to claim 7, characterized in that: Also includes: A hole detection module extracts all holes in the image to be tested based on an adaptive threshold method to obtain a mask image to be tested; A comparison module, for determining roundness values ​​corresponding to all holes in the mask image to be tested, wherein the roundness value is characterized by a degree of fit with a standard circle; The detection module further includes: taking the comparison result of all the roundness values ​​with the preset standard values ​​as the second defect detection result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes a board-level TGV packaging defect detection method as described in any one of claims 1 to 6.

10. An electronic device comprising a memory, a processor, and a program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the board-level TGV packaging defect detection method according to any one of claims 1 to 6 is implemented.