Sub-pixel-level detection method and application of packaged chip ball grid array
By employing a subpixel-level detection method, utilizing affine transformation and an improved Hampel weighted robust circle fitting, the problem of low recognition accuracy of ball grid array components was solved, achieving high-precision solder ball detection.
Patent Information
- Application Number
- CN202511351913.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In existing technologies, ball grid array components have low recognition accuracy, especially when solder balls are missing, making it difficult to achieve high-precision detection. Traditional pixel-level recognition algorithms cannot meet the high-precision requirements.
A subpixel-level detection method is adopted. By acquiring a binary solder ball array image, the solder ball region is extracted and the solder balls are screened. The image is rotated using affine transformation to make the solder ball array consistent with the coordinate system. Combined with an improved Hampel weighted robust circle fitting and a two-step search method, the accuracy of solder ball detection is improved.
It achieves sub-pixel level detection of ball grid arrays, improves the accuracy of solder ball detection, can accurately identify missing solder balls, and meets the requirements of high-precision detection.
Smart Images

Figure CN120852418A_ABST
Abstract
Description
Technical Field
[0001] This application relates to a subpixel-level detection method and application for ball grid arrays of packaged chips, belonging to the field of surface mount technology. Background Technology
[0002] Surface Mount Technology (SMT) is a technology that precisely mounts electronic components onto printed circuit boards. Visualizing the pin parameters and component layout in SMT equipment is crucial, especially for Ball Grid Array (BGA) components. Accurate identification of BGA components is challenging due to their diverse layouts and structures, particularly for those missing solder balls, where the technical methods for accurate identification become even more complex.
[0003] Traditional pixel-level BGA recognition algorithms focus on pixel-level edge accuracy, which cannot meet the technical requirements of high-precision detection applications. Summary of the Invention
[0004] To address the issue of low recognition accuracy in existing ball grid array components, this application provides a sub-pixel-level detection method and application for packaged chip ball grid arrays.
[0005] This application discloses a sub-pixel-level detection method for a packaged chip ball grid array, comprising:
[0006] Obtain a binarized solder ball array image of a ball grid array (BGA);
[0007] Extract all solder ball regions from the binarized solder ball array image, and filter all solder balls from the solder ball regions based on the geometric properties of the solder balls;
[0008] Extract the edge pixels of each solder ball, and determine the edge sub-pixels of each solder ball by the difference in grayscale values between each edge pixel and its adjacent pixels;
[0009] The center coordinates and radius of each solder ball are obtained based on the edge sub-pixel points of each solder ball;
[0010] The binary solder ball array image is rotated using an affine transformation method so that the row and column arrangement of the solder ball array in the rotated binary solder ball array image is consistent with the X-axis and Y-axis directions of the two-dimensional coordinate system, and the center coordinates of each solder ball are calculated as transformed center coordinates in the two-dimensional coordinate system.
[0011] Based on the transformed center coordinates and radius of each solder ball, the row and column positions of each solder ball are determined to complete the sub-pixel level detection of the BGA.
[0012] This application also provides an application of the sub-pixel level detection method based on the ball grid array of the packaged chip in the field of surface mount technology.
[0013] The beneficial effects of this application are as follows: The method described in this application accurately measures and aligns BGA solder balls through visual inspection. It extracts key size and shape features of the solder balls using connect region analysis and geometric screening methods. Furthermore, it proposes an interpolation method for estimating sub-pixel edge positions and an improved Hampel-weighted robust circle fitting method to enhance the fitting accuracy of the solder balls. This method also employs a solder ball alignment approach by searching for solder balls in both the X-axis and Y-axis directions, effectively improving solder ball detection accuracy and achieving sub-pixel-level detection of ball grid arrays. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the sub-pixel level detection method for the ball grid array of the packaged chip described in this application;
[0015] Figure 2 This is a schematic diagram of the specific process of the sub-pixel level detection method for the ball grid array of the packaged chip described in this application;
[0016] Figure 3 This is a schematic diagram of rotating a binary solder ball array image using an affine transformation method;
[0017] Figure 4 This is a schematic diagram of the solder ball extraction process. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0019] Specific Implementation Method 1: Combination Figure 1 , Figure 2 and Figure 4 As shown, this application provides a sub-pixel level detection method for a packaged chip ball grid array, including:
[0020] Obtain a binarized solder ball array image of a ball grid array (BGA);
[0021] Extract all solder ball regions from the binarized solder ball array image, and filter all solder balls from the solder ball regions based on the geometric properties of the solder balls;
[0022] Extract the edge pixels of each solder ball, and determine the edge sub-pixels of each solder ball by the difference in grayscale values between each edge pixel and its adjacent pixels;
[0023] The center coordinates and radius of each solder ball are obtained based on the edge sub-pixel points of each solder ball;
[0024] The binary solder ball array image is rotated using an affine transformation method so that the row and column arrangement of the solder ball array in the rotated binary solder ball array image is consistent with the X-axis and Y-axis directions of the two-dimensional coordinate system, and the center coordinates of each solder ball are calculated as transformed center coordinates in the two-dimensional coordinate system.
[0025] Based on the transformed center coordinates and radius of each solder ball, the row and column positions of each solder ball are determined to complete the sub-pixel level detection of the BGA.
[0026] In existing technologies, BGA detection and recognition rely on pixel-level image edges, lacking sub-pixel-level feature accuracy. Furthermore, the fitting process of existing methods does not consider the influence of outliers, leading to inaccuracies in fitting outlier edges and resulting in complex extracted BGA pin arrangements. This implementation mainly comprises three parts: sub-pixel edge detection, robust circle fitting, and BGA ball detection. First, it applies the edge contour to a third-order Taylor expansion and calculates the sub-pixel position based on pixel interpolation of grayscale relationships. Second, it proposes an improved Hampel weighted calculation method for circle fitting, improving robustness to interference and noise during solder ball detection. Third, it divides the BGA solder ball alignment process into X and Y directions, using a two-step search method to extract gap information and accurately calculate the spacing. Compared to existing technologies, this implementation improves detection accuracy to the sub-pixel level, optimizes edge pixel accuracy using a third-order Taylor expansion, enhances circle fitting accuracy using an improved Hampel weighted method, and achieves automatic BGA recognition using the proposed two-step search method. The Sobel operator is used to extract the edges of all solder balls. Taylor expansion fitting is applied to adjust local pixels, and sub-pixel edge positions are determined at image boundaries using differences in pixel grayscale values. A minimum objective function is constructed for the edge points of the solder balls based on the circle fitting formula. The Hampel weighting method is improved based on the local irregularity properties of the fitted points of the solder balls to obtain their coordinates and radii. A two-step search method in the XY directions is used to align the solder balls, calculate their spacing, and extract their positions.
[0027] In this embodiment, acquiring the binarized solder ball array image of the ball grid array (BGA) includes:
[0028] Acquire the initial solder ball array image of the BGA;
[0029] Based on the initial solder ball array image, a threshold segmentation method is used to obtain the binarized solder ball array image of the BGA.
[0030] As an example, combined Figure 4 As shown, the threshold segmentation method is the Otsu algorithm, also known as the maximum inter-class variance (OSTU) threshold segmentation method.
[0031] The extraction of all solder ball regions in the binarized solder ball array image includes:
[0032] All solder ball regions in the binarized solder ball array image are extracted through connected component analysis, specifically including:
[0033] For each pixel in the binary solder ball array image, the pixels that are sequentially connected to it are grouped into a connected component, and each connected component is a solder ball region.
[0034] The geometric properties of solder balls include area, circumscribed rectangle, and shape features; the process of filtering all solder balls from the solder ball region based on their geometric properties includes:
[0035] All solder balls that simultaneously meet the following conditions are obtained from the solder ball region:
[0036] The area of the solder ball is between the maximum area threshold and the minimum area threshold; the ratio of the area of the solder ball to the area of the circumscribed rectangle of the solder ball is greater than the set area ratio threshold; the roundness of the solder ball is between the minimum roundness threshold and the maximum roundness threshold; the roundness of the solder ball is the ratio of the width of the circumscribed rectangle of the solder ball to the height of the solder ball.
[0037] The set of all solder balls obtained after filtering is represented as follows: :
[0038]
[0039] In the formula Indicates solder ball, For the solder ball area, For the area of the solder ball, Minimum area threshold, The maximum area threshold, Let the area of the rectangle circumscribed by the solder ball be denoted as . The area ratio threshold, The width of the rectangle circumscribed in the solder ball. For solder ball height, The minimum threshold for circle measurement. This is the maximum threshold for circle measurement.
[0040] In this implementation, the regions extracted from the connected components are filtered according to the properties of the BGA solder balls. First, the area of the region (i.e., the number of pixels within the region) must be within a set upper and lower threshold range to remove regions that are too small or too large. Second, the aspect ratio of the region should be higher than a certain threshold, and the length and width values of the solder balls should be approximately the same. Finally, the shape of the region should be as close to a circle as possible, usually evaluated by calculating the roundness metric; the closer the roundness metric is to 1, the closer the region is to a circle. Therefore, by combining the constraints of area, aspect ratio, and roundness metric, solder ball regions that meet the specified criteria can be filtered.
[0041] Furthermore, sub-pixel edges are extracted using a third-order Taylor function. The Sobel operator is used to extract the edges of all solder balls, and Taylor expansion is applied to fit and adjust local pixels. By extending the Taylor expansion to the third order, the shape of the region gradient can be better estimated using a quadratic function.
[0042] The step of extracting the edge pixels of each solder ball and determining the sub-edge pixels of each solder ball based on the grayscale value difference between each edge pixel and its adjacent pixels includes:
[0043] The Sobel operator is used to extract the edge pixels of each solder ball, and the second and third derivatives of the Taylor expansion are calculated based on the difference in gray values between each edge pixel and its neighboring pixels. The edge sub-pixels of each solder ball are then determined based on the second and third derivatives.
[0044] For edge pixels of solder balls, the second derivative in the X direction is calculated using the gray value of the current edge pixel and the gray values of the two adjacent pixels in the positive X-axis direction; the third derivative in the X direction is calculated using the gray value of the current edge pixel and the gray values of the three adjacent pixels in the positive X-axis direction.
[0045] The second derivative in the Y direction is calculated using the grayscale value of the current edge pixel and the grayscale values of the two adjacent pixels in the positive Y-axis direction. The third derivative in the Y direction is calculated using the grayscale value of the current edge pixel and the grayscale values of the three adjacent pixels in the positive Y-axis direction. The second derivative in the X direction is expressed as... :
[0046] ,
[0047] In the formula These are the two-dimensional coordinates of the current edge pixel. This represents the grayscale value of the current edge pixel.
[0048] The third derivative in the X direction is expressed as: :
[0049] ;
[0050] Second derivative in the Y direction and the third derivative in the Y direction Similarly, we can conclude that:
[0051] ,
[0052] .
[0053] Compared with existing methods, this implementation adopts a third-order method, which includes more pixels in the fitting process, allows for more comprehensive use of the image's grayscale information, and makes the detected sub-pixel positions more accurate.
[0054] Determining the edge sub-pixel points of each solder ball includes:
[0055] The X-axis coordinate of the sub-pixel at the edge is determined by the difference between the X-axis coordinate of the current edge pixel and the ratio of the second derivative and the third derivative in the X-direction; the Y-axis coordinate of the sub-pixel at the edge is determined by the difference between the Y-axis coordinate of the current edge pixel and the ratio of the second derivative and the third derivative in the Y-direction.
[0056] The coordinates of the edge sub-pixel points are represented as :
[0057] ,Right now:
[0058] .
[0059] Furthermore, obtaining the center coordinates and radius of each solder ball based on the edge sub-pixel points of each solder ball includes:
[0060] Set the center coordinates and radius of the solder ball, and establish a fitting formula for the circle based on the sub-pixel points on the edge of the solder ball. Based on the fitting formula, establish an objective function to minimize the difference between the distance between the center coordinates and the sub-pixel points on the edge and the radius. Since the partial derivative of the objective function is 0, and a weight matrix is introduced, the expression for the solution of the center coordinates and radius is obtained.
[0061] An improved Hampel weighting method is used to calculate the weight of each edge sub-pixel: the fitting point error of the distance from each edge sub-pixel to the center of the circle and the radius is calculated, and the fitting point error of each fitting point is compared with the median absolute deviation multiple of all fitting point errors; the median absolute deviation is calculated based on all fitting point errors and the median function; the weight of each edge sub-pixel is adjusted according to the comparison results and the relationship between the fitting point error and the median function to determine the weight matrix; and the final solution of the center coordinates and radius is calculated from the expression of the solution of the center coordinates and radius.
[0062] The calculation of the center coordinates of each solder ball, after transformation in the two-dimensional coordinate system, includes:
[0063] The final solution for the center coordinates of each solder ball is calculated as the transformed center coordinates in the two-dimensional coordinate system.
[0064] The step of establishing the objective function based on the circle fitting formula includes:
[0065] The fitting formula for the circle is expanded to obtain the expanded form. The variables concerning the center coordinates and radius in the expanded form are replaced with intermediate variables to obtain the linear least squares expression for the circle. Based on the intermediate variables, an objective function is established to minimize the geometric distance between the square of the distance between the edge sub-pixel point and the center and the square of the radius.
[0066] To calculate the coordinates and radius of the solder ball using iterative weighted least squares, the first step is to construct a minimum objective function. The fitting formula for the circle is:
[0067] ,
[0068] In the formula Let the coordinates be the center of the circle. The radius is ;
[0069] Expanding, we obtain the linear least squares expression for the circle:
[0070] ;
[0071] set up , , ,in , and As an intermediate variable;
[0072] Establish the objective function :
[0073] ,
[0074] Assume there is Sub-pixel point at the edge We need to fit a subset of numbers, n = 1, 2, 3, ..., N. , and The matrices are as follows:
[0075] ; ; ;
[0076] in Value unknown, by The partial derivative is 0, which gives us Minimal approximate solution; introducing a weight matrix Iterative weighted least squares solution The expression is:
[0077] ,
[0078] In the formula for The matrix is used. The weighting calculation method reduces the impact of outlier data on the fitting results by adjusting the weights of the solder ball positions, thus obtaining a more accurate center and radius.
[0079] The method for calculating the weight of each edge sub-pixel includes:
[0080] The absolute value of the difference between the distance from the edge sub-pixel point to the center of the circle and the radius is used as the fitting point error;
[0081] The absolute deviation of the median is calculated by multiplying the absolute value of the difference between the fitting point error and the median function by the median function.
[0082] If the error of the fitted point is greater than the median absolute deviation multiple, the current edge sub-pixel point is regarded as an outlier. For outlier points: if the error of the fitted point is greater than the median function, its weight is the ratio of the median function to the fitted point error; if the error of the fitted point is not greater than the median function, its weight is the ratio of the fitted point error to the median function.
[0083] If the error of the fitted point is not greater than the absolute deviation multiple of the median, the weight of the current edge sub-pixel point is set to 1.
[0084] Error at each fitting point Median absolute deviation multiple of the error from all fitted points By comparing the data, we can determine whether the point is an outlier.
[0085] The fitting point error is expressed as... :
[0086] ,
[0087] Express the median absolute deviation multiple as: The median absolute deviation of the error for all fitted points is expressed as: :
[0088] ,
[0089] In the formula The multiplier value is determined experimentally: different multiplier values can be fitted on the point set containing abnormal solder balls, and the multiplier value with the smallest error in the experimental results is determined as the optimal multiplier value, for example, 3.5; It is a median function;
[0090] like Greater than Then, the current edge sub-pixel point is treated as an outlier and assigned a smaller weight: for outliers, further weighting is applied based on their error value and the median function. Relationship adjustment weights:
[0091] like Greater than Then the weights Updated to ;
[0092] like Less than or equal to Then the weights Updated to ;
[0093] like Less than or equal to This assigns a larger weight to the current edge sub-pixel, typically 1.
[0094] In this way, the weights of outlier points are adjusted based on their relative differences from the overall error distribution to more accurately reflect their impact on the overall data.
[0095] ,
[0096] according to Calculate the weight matrix And then calculate And then according to The final solution for the center coordinates and radius of the circle is obtained. This reduces the impact of local irregularities on the fitting results.
[0097] In BGA images, the rotation angle is attributed to factors such as suction pressure and angle. To properly align the solder balls, an affine transformation method is used to align the coordinates of all solder balls.
[0098] Combination Figure 3 As shown, the method for calculating the coordinates of the transformed center of the circle includes:
[0099] The rotation angle of the binary solder ball array image is determined by the circumscribed rectangle, which is obtained by boundary fitting of the coordinates of all sub-pixel points on the edge of the solder balls;
[0100] The coordinates of the center of the circle after the transformation are determined based on the coordinates of the rotation center and the rotation angle of the affine transformation.
[0101] Let the rotation angle be expressed as :
[0102] ,
[0103] In the formula These are the coordinates of the center of the circle after the transformation. These are the coordinates of the rotation center during the affine transformation.
[0104] The step of determining the row and column positions of each solder ball based on its transformed center coordinates and radius to complete the sub-pixel level detection of the BGA includes:
[0105] Based on the transformed center coordinates of each solder ball, the row and column sorting of the solder balls are determined along the X and Y axes, respectively. The distance between each row or column of solder balls is calculated. The solder balls are then screened, and the average row spacing or column spacing of the solder balls is calculated. Combined with the radius of the solder balls, the row and column positions of each solder ball are determined to complete the sub-pixel level detection of the BGA.
[0106] Two-step solder ball search method: The purpose of aligning solder balls is to determine the row and column arrangement of the solder balls and analyze the spacing caused by irregular ball layouts. Spacing refers to the distance between pins. Irregular ball layouts include missing balls in rows and columns, or missing balls in an entire row and column. This implementation proposes a two-step alignment method that includes spacing calculation and position determination, separating the solder ball arrangement into two different axes, namely X and Y. For illustration, the Y-axis is used to explain this method.
[0107] In this embodiment, the method for calculating the distance between adjacent solder balls along the X-axis and Y-axis directions is the same; the method for calculating the distance between adjacent solder balls along the Y-axis direction will be described as an example, including:
[0108] Based on the transformed center coordinates, a set of solder balls is obtained. The transformed center coordinates of all solder balls in the set are sorted in ascending order along the X-axis, resulting in an X-axis sorted set. A threshold for X-axis offset within the same column and a threshold between columns are set. Using the first solder ball in the X-axis sorted set as a reference, all solder balls are divided into multiple initial columns based on the inter-column threshold. Then, using the first solder ball in each initial column as a reference, points in each initial column whose distance from the reference solder ball exceeds the X-axis offset threshold are removed, resulting in the final column sort.
[0109] Next, calculate the Y-axis distance between adjacent solder balls in each column of the final column sorting to obtain the set of Y-axis distances between adjacent solder balls in each column. Compare the difference between any two Y-axis distances with a distance threshold, and determine the filtered solder ball columns based on the comparison results. Calculate the average distance between adjacent solder balls in the filtered solder ball columns.
[0110] When the number of solder balls is less than the threshold, it is considered an interference column caused by impurities and is removed.
[0111] The set of solder balls is represented as :
[0112] ;
[0113] The sorted set along the X-axis is represented as :
[0114] ,
[0115] In the formula, k, l, and m represent the solder ball serial numbers after being sorted in ascending order along the X-axis direction; Used to indicate that the positions of adjacent solder balls increase along the X-axis. express The X-axis coordinate of the center of the circle;
[0116] Set the inter-column threshold or inter-row threshold to As an example, select This yields the final column sorted set. :
[0117] h = 1, 2, 3, ..., H;
[0118] Final column sorted set There is no overlap between the solder balls in each column.
[0119] in For the H-th column of solder balls; for the h-th column of solder balls The calculation method is as follows:
[0120] ,
[0121] In the formula For the h-th column of solder balls The Tth solder ball;
[0122] The set D of the Y-axis distances between adjacent solder balls in each column is:
[0123] ,
[0124] In the formula This represents the distance between the p-th solder ball and the (p+1)-th solder ball in each column.
[0125] like e, g = 1, 2, 3, ..., p If the condition is met, the corresponding solder ball is retained; otherwise, the corresponding solder ball is removed, resulting in a filtered solder ball column.
[0126] The average row spacing between adjacent solder balls in the filtered solder ball column is expressed as follows: :
[0127] .
[0128] Methods for determining the row and column positions of solder balls include locating the solder balls within the selected columns:
[0129] The solder ball with the smallest Y-axis coordinate in the filtered solder ball column is taken as the first solder ball, and its row number is recorded as 0. The row number of the next adjacent solder ball is determined in turn: if the distance between the Y-axis coordinate of the next adjacent solder ball and the Y-axis coordinate of the current solder ball is less than the row inter-threshold, then the row number of the next adjacent solder ball is the same as the row number of the current solder ball, and it is considered that there are no missing rows; if the distance between the Y-axis coordinate of the next adjacent solder ball and the Y-axis coordinate of the current solder ball is greater than the row inter-threshold but less than the solder ball diameter, then it is considered that there is interference and the row number is not increased. The number of missing solder ball rows may be one or more rows. If the distance between two adjacent rows exceeds the radius, it is further subdivided according to the distance. If the distance between the Y-axis coordinate of the next adjacent solder ball and the Y-axis coordinate of the current solder ball is between the solder ball diameter and the average distance between rows, then the number of rows of the next adjacent solder ball is increased by 1 based on the number of rows of the current solder ball. If the distance between the Y-axis coordinate of the next adjacent solder ball and the Y-axis coordinate of the current solder ball is greater than or equal to the average distance between rows, then the number of rows of the next adjacent solder ball is determined by the relative relationship between the distance between the Y-axis coordinate of the next adjacent solder ball and the Y-axis coordinate of the current solder ball and the average distance of adjacent solder balls.
[0130] For the selected weld ball rows, the following is adopted: Let w represent the row number of the w-th solder ball, then the row number of the next adjacent solder ball is... for:
[0131] ,
[0132] In the formula This indicates the Y-axis coordinate of the current solder ball. The inter-row threshold, The threshold for the inter-row mean. .
[0133] The method for calculating the distance between adjacent solder balls along the X-axis is the same as the method along the Y-axis. After calculating the distance between adjacent solder balls along the X-axis, the process of determining the column position of the solder balls after row sorting is similar to the method for calculating the number of rows mentioned above, and will not be elaborated further.
[0134] Once the number of rows and columns of all solder balls is determined, they are integrated to complete the sub-pixel level detection of the ball grid array.
[0135] During the calculation process, the first solder ball can be... The position is initialized to 0, that is , This is the radius of the ball. The same method is used for the X-axis to obtain the spacing and solder ball positions in the X direction. Ultimately, the positions of the BGA solder balls can be detected. Specific Implementation
[0136] Step 1) Acquire images of the solder balls on the surface of the BGA chip using a high-resolution camera, and obtain a grayscale image by weighted averaging of the RGB three-channel pixels. The OTU (Otsu method) threshold segmentation algorithm is then used to binarize the image. This algorithm automatically calculates the optimal segmentation point of the image's grayscale histogram, effectively distinguishing the solder ball region from the background. After binarization, the resulting image is a black-and-white binary image, providing clearer foundational data for subsequent feature extraction and sub-pixel level localization steps.
[0137] Step 2) Extract all solder balls through connected component analysis, and filter all solder balls according to their geometric properties.
[0138] The connected component analysis operation involves traversing each pixel, checking if it is connected to surrounding pixels, and grouping connected pixels into a connected component. Since the image has already been binarized, the solder balls are considered the target region, defined as pixels with a value greater than 255. The geometric properties of each connected component include area, bounding box, shape features, and centroid. Since BGA images contain noise, these properties are used to filter out noise. Figure 4 The solder ball extraction process is described. By combining region, rectangular, and circular constraints, target regions that meet specific shape and size requirements can be effectively filtered from complex BGA images.
[0139] Step 3) Use the Sobel operator to extract the edges of all solder balls. The Sobel operator detects edges by calculating the gradient of each pixel in the image. Apply Taylor expansion fitting to adjust the local boundary pixels, extending the Taylor expansion to the third order. Perform subpixel interpolation to obtain subpixel edge images of all solder balls.
[0140] In the third-order Taylor expansion, the second and third derivatives provide more detailed features of image changes, especially when sub-pixel level details exist, enabling more accurate capture of edge variation trends. Compared to some existing interpolation methods, such as bilinear interpolation, this implementation uses a sub-pixel interpolation method with Taylor expansion, which includes more pixels in the fitting process, allowing for a more comprehensive use of the image's grayscale information.
[0141] Step 4) Construct the minimum objective function for the edge points of the solder ball according to the fitting formula of the circle. Based on the local irregularity properties of the fitted points of the solder ball, improve the Hampel weighted method to obtain the coordinates and radius of the solder ball.
[0142] In SMT (Surface Mount Technology), median points are used to replace outliers to improve the stability of solder ball fitting. When using the median point method, not only the average deviation of the points is considered, but also the median value of points within a local region is taken into account, thereby reducing the impact of local irregularities on the fitting results. This method can better adapt to different solder ball shapes and sizes, ensuring the stability and high accuracy of circle fitting.
[0143] Step 5) Apply an affine transformation to the angled BGA image to obtain the corrected solder ball positions. In the BGA image, the rotation angle is attributed to factors such as suction pressure and angle. To correctly align the solder balls, an affine transformation method is used, with the following effect: Figure 3 Before the transformation, the rotation angle of the BGA needs to be determined by the circumscribed rectangle. The circumscribed rectangle is obtained by boundary fitting of the coordinates of all solder ball edge points in the solder ball image. The tilt angle of the circumscribed rectangle is the rotation angle of the BGA chip. The core formula of the affine transformation is based on the rotation matrix, which can accurately transform the solder ball coordinates.
[0144] Step 6) Propose a two-step search method in the XY direction to align the solder balls, calculate the spacing between the solder balls, and extract the location of the solder balls.
[0145] The purpose of aligning solder balls is to determine the row and column arrangement of the solder balls and analyze the spacing caused by irregular ball layouts. Spacing refers to the distance between pins. For irregular ball layouts, such as missing balls in rows and columns, or missing balls in an entire row and column, a two-step alignment method involving spacing calculation and position determination is used to separate the solder ball arrangement into two different axes, namely X and Y.
[0146] This application provides a subpixel precision method for detecting edges in serialized images. It uses a third-order Taylor expansion subpixel interpolation method to extract higher precision edges and improves the accuracy of circle fitting by improving Hampel's circle fitting method. The proposed two-step search method can automatically identify BGA locations, and finally, high-precision BGA detection is achieved using a good algorithm framework.
[0147] Specific Implementation Method Two: Application of the sub-pixel level detection method for ball grid arrays of packaged chips as described in Specific Implementation Method One in the field of surface mount technology.
[0148] While this application has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of this application. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of this application as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A sub-pixel-level detection method for a packaged chip ball grid array, characterized in that, include: Obtain a binarized solder ball array image of a ball grid array (BGA); Extract all solder ball regions from the binarized solder ball array image, and filter all solder balls from the solder ball regions based on the geometric properties of the solder balls; Extract the edge pixels of each solder ball, and determine the edge sub-pixels of each solder ball by the difference in grayscale values between each edge pixel and its adjacent pixels; The center coordinates and radius of each solder ball are obtained based on the edge sub-pixel points of each solder ball; The binary solder ball array image is rotated using an affine transformation method so that the row and column arrangement of the solder ball array in the rotated binary solder ball array image is consistent with the X-axis and Y-axis directions of the two-dimensional coordinate system, and the center coordinates of each solder ball are calculated as transformed center coordinates in the two-dimensional coordinate system. Based on the transformed center coordinates and radius of each solder ball, the row and column positions of each solder ball are determined to complete the sub-pixel level detection of the BGA.
2. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 1, characterized in that, The extraction of all solder ball regions in the binarized solder ball array image includes: All solder ball regions in the binarized solder ball array image are extracted through connected component analysis, specifically including: For each pixel in the binary solder ball array image, the pixels that are sequentially connected to it are grouped into a connected component, and each connected component is a solder ball region.
3. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 1, characterized in that, The geometric properties of a solder ball include its area, circumscribed rectangle, and shape features; The process of filtering all solder balls from the solder ball region based on their geometric properties includes: All solder balls that simultaneously meet the following conditions are obtained from the solder ball region: The area of the solder ball is between the maximum area threshold and the minimum area threshold; the ratio of the area of the solder ball to the area of the circumscribed rectangle of the solder ball is greater than the set area ratio threshold; the roundness of the solder ball is between the minimum roundness threshold and the maximum roundness threshold; the roundness of the solder ball is the ratio of the width of the circumscribed rectangle of the solder ball to the height of the solder ball.
4. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 2, characterized in that, The step of extracting the edge pixels of each solder ball and determining the sub-edge pixels of each solder ball based on the grayscale value difference between each edge pixel and its adjacent pixels includes: The Sobel operator is used to extract the edge pixels of each solder ball, and the second and third derivatives of the Taylor expansion are calculated based on the difference in gray values between each edge pixel and its neighboring pixels. The edge sub-pixels of each solder ball are then determined based on the second and third derivatives.
5. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 4, characterized in that, For edge pixels of solder balls, the second derivative in the X direction is calculated using the gray value of the current edge pixel and the gray values of the two adjacent pixels in the positive X-axis direction; the third derivative in the X direction is calculated using the gray value of the current edge pixel and the gray values of the three adjacent pixels in the positive X-axis direction. The second derivative in the Y direction is calculated using the gray value of the current edge pixel and the gray values of two adjacent pixels in the positive Y-axis direction; the third derivative in the Y direction is calculated using the gray value of the current edge pixel and the gray values of three adjacent pixels in the positive Y-axis direction.
6. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 5, characterized in that, Determining the edge sub-pixel points of each solder ball includes: The X-axis coordinate of the sub-pixel at the edge is determined by the difference between the X-axis coordinate of the current edge pixel and the ratio of the second derivative and the third derivative in the X-direction; the Y-axis coordinate of the sub-pixel at the edge is determined by the difference between the Y-axis coordinate of the current edge pixel and the ratio of the second derivative and the third derivative in the Y-direction.
7. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 1, characterized in that, The process of obtaining the center coordinates and radius of each solder ball based on the edge sub-pixel points of each solder ball includes: Set the center coordinates and radius of the solder ball, and establish a fitting formula for the circle based on the sub-pixel points on the edge of the solder ball. Based on the fitting formula, establish an objective function to minimize the difference between the distance between the center coordinates and the sub-pixel points on the edge and the radius. Since the partial derivative of the objective function is 0, and a weight matrix is introduced, the expression for the solution of the center coordinates and radius is obtained. An improved Hampel weighting method is used to calculate the weight of each edge sub-pixel: the fitting point error of the distance from each edge sub-pixel to the center of the circle and the radius is calculated, and the fitting point error of each fitting point is compared with the median absolute deviation multiple of all fitting point errors; the median absolute deviation is calculated based on all fitting point errors and the median function; the weight of each edge sub-pixel is adjusted according to the comparison results and the relationship between the fitting point error and the median function to determine the weight matrix; and the final solution of the center coordinates and radius is calculated from the expression of the solution of the center coordinates and radius. The calculation of the center coordinates of each solder ball, after transformation in the two-dimensional coordinate system, includes: The final solution for the center coordinates of each solder ball is calculated as the transformed center coordinates in the two-dimensional coordinate system.
8. The sub-pixel level detection method for ball grid arrays of packaged chips according to claim 1, characterized in that, The step of determining the row and column positions of each solder ball based on its transformed center coordinates and radius to complete the sub-pixel level detection of the BGA includes: Based on the transformed center coordinates of each solder ball, the row and column sorting of the solder balls are determined along the X and Y axes, respectively. The distance between each row or column of solder balls is calculated. The solder balls are then screened, and the average row spacing or column spacing of the solder balls is calculated. Combined with the radius of the solder balls, the row and column positions of each solder ball are determined to complete the sub-pixel level detection of the BGA.
9. The sub-pixel level detection method for a ball grid array of a packaged chip according to claim 8, characterized in that, The methods for calculating the distance between adjacent solder balls along the X and Y axes are the same; the methods for calculating the distance between adjacent solder balls along the Y axis include: Based on the transformed center coordinates, a set of solder balls is obtained. The transformed center coordinates of all solder balls in the set are sorted in ascending order along the X-axis, resulting in an X-axis sorted set. A threshold for X-axis offset within the same column and a threshold between columns are set. Using the first solder ball in the X-axis sorted set as a reference, all solder balls are divided into multiple initial columns based on the inter-column threshold. Then, using the first solder ball in each initial column as a reference, points in each initial column whose distance from the reference solder ball exceeds the X-axis offset threshold are removed, resulting in the final column sort. Next, calculate the Y-axis distance between adjacent solder balls in each column of the final column sorting to obtain the set of Y-axis distances between adjacent solder balls in each column. Compare the difference between any two Y-axis distances with a distance threshold, and determine the filtered solder ball columns based on the comparison results. Calculate the average distance between adjacent solder balls in the filtered solder ball columns.
10. An application of a sub-pixel-level detection method, characterized in that, Application of the sub-pixel level detection method for packaged chip ball grid arrays as described in any one of claims 1 to 9 in the field of surface mount technology.
Citation Information
Patent Citations
Detection and positioning method used for spherical pin element
CN103745475A
Solder ball positioning and parameter identification method for ball grid array pin chip
CN105184770A
Circular center detection method based on Gaussian fitting sub-pixel edge detection and improved RANSAC algorithm
CN108986126A
Stamping part circular hole positioning and deformation detection method based on sub-pixel edge extraction
CN116542910A
BGA chip positioning and detecting method based on dot matrix fitting
CN117953062A