Resin plug hole feature extraction method and resin plug hole quality evaluation method based on GPU image processing
Through GPU-based image processing technology, efficient extraction and accurate analysis of resin plug hole characteristics is achieved, the problems of low efficiency and insufficient accuracy in traditional detection methods are solved, and an efficient quality evaluation system is established, which improves the quality control level of high-end electronic products.
Patent Information
- Application Number
- CN202510447392.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Traditional resin plug-in detection methods rely on artificial visual or CPU image processing, which have low efficiency, strong subjectivity, insufficient accuracy and inability to realize subpixel-level defect recognition, making it difficult to meet the quality control needs in the field of high-end electronic manufacturing.
Using a GPU image processing method, by building a GPU computing platform, image preprocessing and subpixel-level edge positioning are carried out, and combined with polynomial interpolation fitting and maximum interclass variance principle, precise positioning and defect identification of hole boundaries are achieved, and a resin plug-in quality evaluation system is established.
It realizes efficient extraction and accurate analysis of resin plug-in characteristics, significantly improves detection efficiency and accuracy, can determine the quality level of veneers in real time and provide process optimization data support, improving the reliability and yield of high-end electronic products.
Smart Images

Figure CN120374541A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical measurement, and particularly relates to a method for extracting resin plug hole features and a method for evaluating the quality of resin plug holes based on GPU image processing. Background Art
[0002] The resin plug hole technology is widely used in high-end electronic manufacturing fields such as high-density interconnect (HDI) boards, thick copper boards, and BGA packages, and its quality directly affects the reliability and performance of products. Traditional detection methods mainly rely on manual visual inspection or CPU-based 2D optical detection systems. Manual detection observes the plug hole filling state through a microscope or magnifying glass to identify defects such as bubbles and missed plugs; while automated detection systems usually use conventional image processing algorithms (such as threshold segmentation and edge detection) to roughly analyze the plug hole contour. In the prior art, some solutions attempt to combine machine learning for defect classification, but limited by computational efficiency, it is difficult to achieve real-time and high-precision full-frame detection. In addition, traditional methods are mostly based on pixel-level edge positioning, unable to meet the process requirements of sub-micron-level accuracy, especially insufficient in the identification of complex defects (such as micron-level bubbles and non-uniform depressions).
[0003] Traditional detection methods have significant limitations: firstly, manual detection is inefficient and subjective, the results are affected by the operator's experience, with poor repeatability, and it is difficult to meet the requirements of mass production; secondly, the image processing algorithm based on CPU is slow and unable to process high-resolution images in real time, resulting in insufficient detection coverage; thirdly, the prior art has insufficient recognition accuracy for sub-pixel-level defects (such as blurred hole boundaries and micron-level voids), and lacks a quantitative evaluation system, making it difficult to distinguish defects with similar morphologies (such as hole depressions and hole voids). In addition, traditional methods do not fully utilize the parallel computing advantages of GPUs and cannot achieve high-speed and high-precision full-automatic detection, restricting the quality control level in the high-end electronic manufacturing field. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for extracting resin plug hole features and a method for evaluating the quality of resin plug holes based on GPU image processing, so as to solve the technical problems that traditional resin plug hole detection methods rely on manual visual inspection or CPU image processing, have low efficiency, strong subjectivity, insufficient accuracy, and are unable to identify sub-pixel-level defects.
[0005] The present invention achieves the above purpose through the following technical solutions:
[0006] In the first aspect, the present invention proposes a method for extracting resin plug hole features based on GPU image processing, and the method includes the following steps:
[0007] S1. Set up and initialize the operating environment of the GPU to obtain a GPU computing platform. Use the GPU computing platform to receive the full-frame 2D image data of the board under test and the corresponding grayscale image.
[0008] S2. Denoise and enhance the edges of the grayscale image, and then extract pixel-level edge points.
[0009] S3. Perform circular contour analysis on the pixel-level edge points based on a contour extraction algorithm to obtain the set of integer-pixel contours of each resin plug hole.
[0010] S4. For each edge point in the set of integer-pixel contours, use a quadratic polynomial to fit the grayscale values within a neighborhood window of a set size, obtain the extreme points, and determine the hole boundary positions at the sub-pixel level to form a set of sub-pixel contours of the resin plug holes.
[0011] Further, in step S3, the circular contour analysis specifically is:
[0012] Use the scale invariant l 2 : 4πS = 1 to judge the pixel-level edge points, where l is the perimeter of the contour and S is the area of the contour, to obtain the set of integer-pixel contours of each resin plug hole.
[0013] Further, in step S4, for each edge point in the set of integer-pixel contours, using a quadratic polynomial to fit the grayscale values within a neighborhood window of a set size to obtain the extreme points includes:
[0014] Obtain the edge point (x0, y0), select a neighborhood window of a set number of pixels, and use a quadratic polynomial to fit the grayscale values. The expression is:
[0015] I(x, y) = a(x - x0) 2 + b(y - y0) 2 + c(x - x0)(y - y0)+ d(x - x0)+ e(y - y0)
[0016] where I(x, y) is the grayscale value at the coordinate (x, y) in the image, a and b are the second-order change coefficients of the grayscale value in the x and y directions respectively, c is the cross-change coefficient, and d and e are the first-order change coefficients in the x and y directions respectively.
[0017] Find the extreme points according to the partial derivative equations of the above polynomial. The expression is:
[0018]
[0019] where is the partial derivative with respect to x, is the partial derivative with respect to y;
[0020] Convert the above formula into a matrix formula to solve for Δx and Δy, and the expression is:
[0021]
[0022] x subpix = x0 + Δx
[0023] y subpix = y0 + Δy
[0024] where Δx is the solution of the partial derivative of x equal to 0, Δy is the solution of the partial derivative of y equal to 0, x subpix is the sub-pixel X coordinate, and y subpix is the sub-pixel Y coordinate.
[0025] Furthermore, before step S1, the method further includes: obtaining the full-frame 2D image data of the plate to be measured through an imaging system including a line-scan camera, an optical lens, and a light source box.
[0026] In a second aspect, the present invention proposes a method for evaluating the quality of resin plug holes, and the method includes the following steps:
[0027] S10. Obtain the sub-pixel contour set of each resin plug hole of the plate to be measured by using the resin plug hole feature extraction method as described above;
[0028] S11. Determine the segmentation threshold of the sub-pixel contour area range of each plug hole based on the principle of maximum between-class variance;
[0029] S12. Obtain the binary image within the sub-pixel boundary area, and record the segmentation area greater than the segmentation threshold as the bright area feature, and the segmentation area less than the segmentation threshold as the dark area feature;
[0030] S13. Extract the integer-pixel contours of the bright area and the dark area, perform step S4 to obtain the sub-pixel contours of the bright area and the dark area, and count the gray values within the sub-pixel contour areas of the bright area and the dark area;
[0031] S14. Fit the sub-pixel contours of the bright area and the dark area by the least squares method to obtain the fitted circle equation;
[0032] S15. According to the fitted circle equation and the actual sub-pixel contour boundary information of the bright area and the dark area, calculate the sum of squared residuals as the goodness of fit of the circle;
[0033] S16. Determine the hole bubble defect of the plate to be measured according to the gray value of the bright area and the goodness of fit, and determine the hole cavity defect and / or hole depression defect of the plate to be measured according to the gray value of the dark area and the goodness of fit;
[0034] S17. Calculate the number of defects on the board to be tested, obtain the global defect ratio of the board to be tested, and divide the board to be tested into regions to obtain the distribution information of different defects of resin plug holes in each region and the distribution information of regional defect ratios.
[0035] S18. Evaluate the process capability of the resin plug hole board manufacturing process of the board to be tested according to whether the distribution information of different defects and the distribution information of regional defect ratios of the board to be tested meet the consistent distribution law.
[0036] Further, in step S16, the determination of the hole bubble defect of the board to be tested according to the gray value and goodness of fit of the bright region includes:
[0037] Judge the gray value and goodness of fit of the bright region. If the gray value is greater than the set value and the goodness of fit is less than the set value, it is recorded as a hole bubble defect.
[0038] Further, in step S16, the determination of the hole cavity defect and / or hole depression defect of the board to be tested according to the gray value and goodness of fit of the dark region includes:
[0039] Judge the gray value and goodness of fit of the dark region. If the gray value is less than the corresponding set value and the goodness of fit is less than the corresponding set value, it is recorded as a hole cavity defect. If the gray value is less than the corresponding set value and the goodness of fit is greater than the corresponding set value, it is recorded as a hole depression defect.
[0040] Further, steps S10 - S18 are executed by a GPU computing platform, specifically including:
[0041] Load the image data into the GPU global memory of the GPU computing platform;
[0042] Call the GPU kernel function of the GPU computing platform to perform parallel processing of image segmentation, contour fitting, and defect analysis;
[0043] Return the analysis result to the host memory to generate a report.
[0044] Further, the GPU computing platform includes one or more GPU processors and the memory communicatively connected to the GPU processors. The memory is used to store the program instructions for executing the resin plug hole quality evaluation method described in any one of the above, and the GPU processors are used to execute the program instructions to implement the resin plug hole quality evaluation method.
[0045] The beneficial effects of the present invention are as follows:
[0046] 1. The present invention realizes the efficient extraction and accurate analysis of resin plug hole features through a GPU parallel computing platform, significantly improving the detection efficiency and accuracy. First, the sub-pixel edge localization technology is adopted, and the micron-level precise positioning of the hole boundary is achieved through polynomial interpolation fitting, solving the problem of insufficient detection accuracy of traditional pixel-level detection. Second, the image segmentation method based on the principle of maximum inter-class variance combined with the least squares circle fitting algorithm can accurately identify and distinguish complex defects such as hole bubbles, hole voids, and hole depressions, and the defect recognition accuracy is greatly improved.
[0047] 2. The intelligent quality evaluation system established by the present invention realizes the quantitative evaluation of resin plug hole quality and process feedback. By statistically analyzing the global distribution ratio and regional consistency characteristics of defects, it can not only determine the quality grade of the single board in real time, but also provide data support for process optimization. Compared with traditional manual inspection, this method eliminates the influence of subjective factors, and the detection results have high repeatability. This method can be widely applied to the quality control of high-end electronic products such as HDI boards and BGA packages, effectively preventing problems such as board explosion and false soldering caused by resin plug hole defects, significantly improving the reliability and yield rate of products, and having important industrial application value. Brief Description of the Drawings
[0048] Figure 1 It is a schematic flow chart of a resin plug hole feature extraction method based on GPU image processing proposed in Embodiment 1 of the present application;
[0049] Figure 2 It is a schematic flow chart of a resin plug hole quality evaluation method proposed in Embodiment 2 of the present application;
[0050] Figure 3 It is another schematic flow chart of a resin plug hole quality evaluation method proposed in Embodiment 2 of the present application. Detailed Description of the Embodiments
[0051] The following further describes the present application in detail with reference to the drawings. It is necessary to point out here that the following detailed embodiments are only used to further illustrate the present application and should not be construed as limiting the protection scope of the present application. Those skilled in the art can make some non-essential improvements and adjustments to the present application based on the above application content.
[0052] Embodiment 1
[0053] Combined with Figure 1 , this embodiment proposes a resin plug hole feature extraction method based on GPU image processing. Under a 2D optical inspection system, using the imaging system of a line scan camera, an optical lens, and a light source box, the automatic scanning and detection movement of the resin plug hole board to be measured is realized through a high-precision electromechanical control system, and the full-frame 2D image data of the board to be measured (resin plug hole board to be measured) is obtained. The method includes the following steps:
[0054] S1. Set up and initialize the operating environment of the GPU to obtain a GPU computing platform. Use the GPU computing platform to receive the full-frame 2D image data of the board under test and the corresponding grayscale image.
[0055] S2. Apply Gaussian blur to the grayscale image to reduce noise, and use an edge enhancement filter for edge features. Finally, obtain pixel-level edge points through a Canny edge detector.
[0056] S3. Perform circular contour analysis on the pixel-level edge points based on a contour extraction algorithm to obtain a set of integer-pixel contours for each resin plug hole.
[0057] Further preferably, in step S3, the circular contour analysis specifically is:
[0058] Use the scale invariant l 2 : 4πS = 1 to judge the pixel-level edge points, where l is the perimeter of the contour and S is the area of the contour, to obtain a set of integer-pixel contours for each resin plug hole.
[0059] S4. For each edge point (x0, y0) in the set of integer-pixel contours, use a quadratic polynomial to fit the grayscale value within a neighborhood window of a set size. Dynamically adjust the window size according to different aperture sizes (5×5 pixels for standard holes and 3×3 pixels for micro holes), obtain the extreme points, and determine the sub-pixel level hole boundary positions to form a set of sub-pixel contours of the resin plug holes.
[0060] In this embodiment, through the above sub-pixel positioning method for hole boundaries, by analyzing the integer-pixel boundaries of the plug holes, and performing polynomial interpolation near the hole boundaries, the extreme points of the interpolation function are used to determine the sub-pixel level hole boundary positions.
[0061] Further preferably, in step S4, for each edge point in the set of integer-pixel contours, using a quadratic polynomial to fit the grayscale value within a neighborhood window of a set size and obtaining the extreme points includes:
[0062] Obtain the edge point (x0, y0), select a neighborhood window of a set number of pixels, and use a quadratic polynomial to fit the grayscale value. The expression is:
[0063] I(x, y) = a(x - x0) 2 + b(y - y0) 2 + c(x - x0)(y - y0)+ d(x - x0)+ e(y - y0)
[0064] Wherein, I(x, y) is the grayscale value at the coordinate (x, y) in the image, a and b are the second-order variation coefficients of the grayscale value in the x and y directions respectively, c is the cross-variation coefficient, and d and e are the first-order variation coefficients in the x and y directions respectively;
[0065] Find the extreme points according to the partial derivative equations of the above polynomial, and the expression is:
[0066]
[0067] Wherein, is the partial derivative with respect to x, is the partial derivative with respect to y;
[0068] Convert the above formula into a matrix formula to solve for Δx and Δy, and the expression is:
[0069]
[0070] x subpix = x0 + Δx
[0071] y subpix = y0 + Δy
[0072] Wherein, Δx is the solution when the partial derivative with respect to x is equal to 0, Δy is the solution when the partial derivative with respect to y is equal to 0, x subpix is the sub-pixel X coordinate, and y subpix is the sub-pixel Y coordinate.
[0073] According to the above Embodiment 1, the above extraction method first uses a line-scan camera to obtain a full-frame 2D image of the plate to be measured. After image preprocessing on the GPU platform, an edge detection algorithm is used to extract pixel-level edge points; then, through quadratic polynomial fitting technology, the hole boundary is accurately located at the sub-pixel level, and the scale invariant of the circle is combined to analyze and screen the effective contours to form a set of plug hole contours with sub-pixel accuracy. Compared with the traditional manual detection and CPU image processing methods, the present invention utilizes the parallel computing advantage of the GPU, significantly improves the detection efficiency and positioning accuracy, effectively solves the problems of low efficiency, strong subjectivity and difficulty in realizing sub-pixel-level detection in the prior art, and provides a reliable data basis for subsequent defect identification and quality evaluation.
[0074] Embodiment 2
[0075] Combined with Figure 2 and Figure 3 , on the basis of the above Embodiment 1, this embodiment proposes a method for evaluating the quality of resin plug holes. This method is to judge the hole bubble defects, judge the hole depression and hole cavity, and evaluate the quality of the plug holes after the sub-pixel positioning of the hole boundary. The method includes the following steps:
[0076] S10. Obtain the sub-pixel contour set of each resin plug hole on the test board using the resin plug hole feature extraction method as in Example 1.
[0077] S11. Within the sub-pixel contour region of each plug hole, calculate the segmentation threshold of the hole region according to the principle of maximum inter-class variance. The principle is as follows: Calculate the cumulative mean M of the gray level K and the global mean MG of the image: Solve when is the largest, and the value of K is the required segmentation threshold.
[0078] S12. Obtain the binary image within the sub-pixel boundary region, and mark the segmentation region greater than the segmentation threshold as the bright region feature, and the segmentation region less than the segmentation threshold as the dark region feature.
[0079] S13. Extract the integer-pixel contours of the bright region and the dark region, perform step S4 to obtain the sub-pixel contours of the bright region and the dark region, and count the gray values within the sub-pixel contour regions of the bright region and the dark region.
[0080] S14. Fit the sub-pixel contours of the bright region and the dark region by the least squares method to obtain the fitting circle equation. More specifically, fit the center and radius of the sub-pixel contour of the bright region by the least squares method. The least squares fitting circle curve R 2 =(x - A) 2 +(y - B) 2 Expanding gives R 2 =x 2 +y 2 -2Ax - 2By + A 2 +B 2 , only need to solve the corresponding values of coefficients A, B, and R when V is the smallest in V = ∑(x 2 +y 2 -2Ax - 2By + A 2 +B 2 -R 2 ) 2 . By taking the partial derivative of the above formula, it is easy to obtain the coefficient result matrix, and solve the coefficient matrix equation to obtain the coefficients A, B, C, and D, corresponding to the fitting circle equation.
[0081] S15. According to the fitted circle equation and the actual boundary information of the sub-pixel contours of the bright region and the dark region, calculate the sum of squared residuals as the goodness of fit of the circle.
[0082] S16. Determine the hole bubble defects of the board to be tested based on the gray value and goodness of fit of the bright area, and determine the hole cavity defects and / or hole depression defects of the board to be tested based on the gray value and goodness of fit of the dark area. More specifically: Judge the gray value and goodness of fit of the bright area. If the gray value is greater than the set value and the goodness of fit is less than the set value, it is recorded as a hole bubble defect. Judge the gray value and goodness of fit of the dark area. If the gray value is less than the corresponding set value and the goodness of fit is less than the corresponding set value, it is recorded as a hole cavity defect. If the gray value is less than the corresponding set value and the goodness of fit is greater than the corresponding set value, it is recorded as a hole depression defect.
[0083] S17. Calculate the number of defects of the board to be tested, obtain the global defect ratio of the board to be tested, and divide the board to be tested into regions to obtain the distribution information of different defects of resin plug holes in each region and the distribution information of regional defect ratios.
[0084] S18. Evaluate the process capability of the resin plug hole board-making process of the board to be tested according to whether the distribution information of different defects of the board to be tested and the distribution information of regional defect ratios meet the consistency distribution law.
[0085] In specific implementation, first calculate the global defect rate based on the sub-pixel contour data to reflect the overall quality level of the board; secondly, generate a defect distribution heat map through spatial grid division to visually display the defect aggregation area for identifying local process anomalies; finally, combine the statistical process control method to output the process capability index to realize the quantitative evaluation of process stability.
[0086] In step S18, calculate the global percentage data of the number of each type of defect divided by the total number of resin plug holes * 100% to indicate the overall defect ratio of the current plug hole board. Divide the board to be tested into regions, and correspond the different defect data according to the divided regions, and the distribution of different defects of resin plug holes in each region can be obtained. The number of each type of defect in the region is divided by the total number of resin plug holes in the region * 100%; the distribution of regional defect ratios is obtained. According to the distribution of defect ratios of different types of defect data in each region, judge whether it meets the consistency distribution law, and the process capability of the current resin plug hole board-making process can be reflected.
[0087] In specific implementation, steps S10 - S18 are executed through a GPU computing platform, which specifically includes: loading the image data into the GPU global memory of the GPU computing platform; calling the GPU kernel function of the GPU computing platform to process image segmentation, contour fitting and defect analysis in parallel; returning the analysis result to the host memory to generate a report. The GPU computing platform includes one or more GPU processors and a memory communicatively connected to the GPU processor. The memory is used to store the program instructions for executing the resin plug hole quality evaluation method as described above, and the GPU processor is used to execute the program instructions to implement the resin plug hole quality evaluation method.
[0088] According to the above-mentioned Embodiment 2, the entire process of resin plug hole detection is accelerated through the GPU computing platform in the above evaluation method, which reflects the complete technical feasibility. The GPU execution process of steps S10 - S18 in Embodiment 2 corresponds to the GPU parallel processing model: First, the collected 2D image data is loaded into the GPU global memory, and specific kernel functions are written to perform image segmentation, contour fitting, and defect analysis in parallel, and finally the results are returned to the host memory to generate a report. Its technical key points are reflected in three aspects: 1) The task allocation mechanism based on the CUDA architecture realizes parallel processing of image data through thread blocks / grid blocks (for example, each thread processes a 128×128 pixel sub-image); 2) The design of dedicated kernel functions covers the entire algorithm chain from preprocessing to defect analysis; 3) The CPU - GPU collaborative architecture, where the GPU processor is responsible for computationally intensive tasks, and the memory stores program instructions to form a complete hardware solution. This design reduces the time consumption of sub-pixel feature extraction and quality evaluation by more than 90% compared with the traditional CPU solution, verifying the industrial practicability of the technical solution.
[0089] It can be understood that the accurate extraction of the plug hole geometric features is achieved through Embodiment 1, forming a sub-pixel contour set containing parameters such as the center coordinates and radius dimensions; these high-precision feature data are directly used as the input source for the quality evaluation in Embodiment 2. In Embodiment 2, based on this feature set, the in-hole area segmentation and defect classification are further implemented: Through the bright / dark area features divided by the maximum inter-class variance method, combined with the least squares circle fitting algorithm, the intelligent discrimination of defects such as bubbles, voids, and depressions is realized. The two embodiments form a progressive technical chain - Embodiment 1 solves the problem of "how to accurately measure", and Embodiment 2 solves the problem of "how to scientifically evaluate", jointly constructing a complete solution from feature extraction to quality assessment, significantly improving the automation degree and result reliability of resin plug hole detection.
[0090] Combined Figure 3 , the quality evaluation process of the present invention realizes efficient and automatic detection based on the GPU parallel computing architecture, and its core technical process can be divided into four stages: First, the geometric parameters (center coordinates, radius, etc.) of the plug hole are extracted through the sub-pixel contour set, and the size out-of-tolerance (oversized / undersized hole) is automatically determined in combination with the preset process standard; Secondly, based on the principle of maximum inter-class variance, the in-hole area is dynamically segmented, and after extracting the bright / dark area features, the least squares method is used to fit the actual contour, and the sum of squared residuals is calculated by comparing the fitted circle equation as the shape evaluation index; In the third stage, the intelligent classification of defects is realized by integrating the gray value and the shape index: Exemplarily, if the gray value of the bright area > 200 and the residual (sum of squared residuals) < 0.05mm 2 it is determined as a bubble defect, and if the gray value of the dark area < 100 and the residual < 0.08mm 2Judged as a cavity, residual > 0.15 mm 2 Judged as a depression; finally, spatial statistics are performed to calculate the global defect rate (total number of defects / total number of holes × 100%) and generate a heat map of the defect distribution in a 5×5 grid area. Exemplarily, when the defect rate of any grid exceeds 8% or the overall defect rate > 5%, a process alarm is triggered. This process is accelerated throughout by CUDA kernel functions, where the defect classification algorithm is optimized using parallel reduction, controlling the single-board evaluation time within 30 seconds and improving the efficiency by 15 times compared to traditional methods.
[0091] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part.
[0092] The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as solid state disks (SSDs)).
[0093] The above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for extracting resin plug hole features based on GPU image processing, characterized in that, The method includes the following steps: S1. Build and initialize the operating environment of the GPU to obtain a GPU computing platform, and use the GPU computing platform to receive the full-frame 2D image data of the board to be tested and the corresponding grayscale image; S2. Denoise and enhance the edges of the grayscale image, and then extract pixel-level edge points; S3. Perform circular contour analysis on the pixel-level edge points based on a contour extraction algorithm to obtain the set of integer-pixel contours of each resin plug hole; S4. For each edge point in the set of integer-pixel contours, use a quadratic polynomial to fit the grayscale values within a neighborhood window of a set size, obtain the extreme points, and determine the hole boundary positions at the sub-pixel level to form a set of sub-pixel contours of the resin plug holes.
2. The resin plug hole feature extraction method based on GPU image processing according to claim 1, wherein In step S3, the circular contour analysis is specifically as follows: Using the scale-invariant l of a circle 2 : 4πS = 1 is used to judge the pixel-level edge points, where l is the perimeter of the contour and S is the area of the contour, and the set of integer-pixel contours of each resin plug hole is obtained.
3. A method for resin plug hole feature extraction based on GPU image processing according to claim 1, characterized in that In step S4, for each edge point in the set of integer-pixel contours, using a quadratic polynomial to fit the grayscale values within a neighborhood window of a set size to obtain the extreme points includes: Obtain the edge point (x0, y0), select a neighborhood window of a set number of pixels, and use a quadratic polynomial to fit the grayscale values. The expression is: I(x,y) = a(x - x0) 2 + b(y - y0) 2 + c(x - x0)(y - y0)+ d(x - x0)+ e(y - y0) where I(x,y) is the gray value at the coordinate (x,y) in the image, a and b are the second-order change coefficients of the gray value in the x and y directions respectively, c is the cross-change coefficient, and d and e are the first-order change coefficients in the x and y directions respectively; Find the extreme points according to the partial derivative equations of the above polynomial. The expression is: Among them, is the partial derivative with respect to x, is the partial derivative with respect to y; Convert the above formula into a matrix formula to solve for Δx and Δy. The expression is: x subpix = x0 + Δx y subpix = y0 + Δy Among them, Δx is the solution of the partial derivative of x equal to 0, Δy is the solution of the partial derivative of y equal to 0, x subpix is the sub-pixel X coordinate, y subpix is the sub-pixel Y coordinate.
4. A resin plug hole feature extraction method based on GPU image processing according to claim 1, characterized in that Before step S1, the method further includes: obtaining the full-frame 2D image data of the board to be tested through an imaging system including a line-scan camera, an optical lens, and a light source box.
5. A method for evaluating the quality of resin plugging holes, characterized in that, The method includes the following steps: S10. Use the resin plug hole feature extraction method described in claim 1 to obtain the set of sub-pixel contours of each resin plug hole on the board to be tested; S11. Determine the segmentation threshold for the range of the sub-pixel contour region of each plug hole based on the principle of maximum inter-class variance; S12. Obtain the binary image within the sub-pixel boundary region, and mark the segmentation region greater than the segmentation threshold as the bright region feature, and the segmentation region less than the segmentation threshold as the dark region feature; S13. Extract the integer-pixel contours of the bright region and the dark region, perform step S4 to obtain the sub-pixel contours of the bright region and the dark region, and count the grayscale values within the sub-pixel contour regions of the bright region and the dark region; S14. Fit the sub-pixel contours of the bright region and the dark region by the least squares method to obtain the fitted circle equation; S15. According to the fitted circle equation and the actual boundary information of the sub-pixel contours of the bright region and the dark region, calculate the sum of squared residuals as the goodness of fit of the circle; S16. Determine the hole bubble defects on the board to be tested according to the grayscale value of the bright region and the goodness of fit, and determine the hole void defects and / or hole depression defects on the board to be tested according to the grayscale value of the dark region and the goodness of fit; S17. Calculate the number of defects on the board to be tested, obtain the global defect ratio of the board to be tested, and divide the board to be tested into regions to obtain the distribution information of different defects of the resin plug holes in each region and the distribution information of the regional defect ratios; S18. Evaluate the process capability of the resin plug hole board manufacturing process of the board to be tested according to whether the distribution information of different defects on the board to be tested and the distribution information of the regional defect ratios satisfy the consistent distribution law.
6. The resin plug hole quality evaluation method according to claim 5, wherein In step S16, determining the hole bubble defects of the board to be measured according to the gray value and goodness of fit of the bright region includes: Judging the gray value and goodness of fit of the bright region. If the gray value is greater than the set value and the goodness of fit is less than the set value, it is recorded as a hole bubble defect.
7. A method for evaluating the quality of resin plug holes according to claim 5, characterized in that, In step S16, determining the hole cavity defects and / or hole depression defects of the board to be measured according to the gray value and goodness of fit of the dark region includes: Judging the gray value and goodness of fit of the dark region. If the gray value is less than the corresponding set value and the goodness of fit is less than the corresponding set value, it is recorded as a hole cavity defect. If the gray value is less than the corresponding set value and the goodness of fit is greater than the corresponding set value, it is recorded as a hole depression defect.
8. The quality evaluation method of resin plugging holes according to claim 5, characterized in that Steps S10 - S18 are executed by a GPU computing platform, specifically including: Loading the image data into the GPU global memory of the GPU computing platform; Invoking the GPU kernel function of the GPU computing platform to parallel process image segmentation, contour fitting, and defect analysis; Returning the analysis result to the host memory to generate a report.
9. The resin plug hole quality evaluation method according to claim 8, characterized in that, The GPU computing platform includes one or more GPU processors and the memory communicatively connected to the GPU processors. The memory is used to store the program instructions for executing the resin plug hole quality evaluation method according to any one of claims 5 to 7. The GPU processor is used to execute the program instructions to implement the resin plug hole quality evaluation method.
Citation Information
Patent Citations
Feature vector-based fast and high-precision robustness matching method
CN102169581A
Gaussian fitting-based high-density circuit board circular hole sub-pixel detection method
CN107301636A
A via hole detection method of a flexible IC package substrate based on circular contour extraction
CN109671052A
Feature extraction and quality evaluation method of integrated chip carrier plate plug hole and related device
CN116026851A
Chip weld leg welding quality detection method and system
CN116309568A
Cited By
Mobile fire detection system and method
CN121214628A
PCB hole site defect detection method based on 2D line scanning and 3D-X ray fusion
CN122259611A