High-precision BGA chip pose detection method and related device
By using centroid and convex hull vertex matching combined with principal component analysis and circle fitting algorithm in BGA chip position detection, the problem of insufficient accuracy and stability in the prior art is solved, and a fast and high-precision BGA chip position is achieved. Test.
Patent Information
- Application Number
- CN202411168502.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing BGA chip position detection methods have insufficient accuracy and stability in accurate positioning, especially for small or irregularly arranged components, traditional rectangular fitting and template matching technologies are difficult to meet the needs of high precision and rapid detection.
Using high-precision BGA chip pose detection method, the original grayscale image is obtained for preprocessing, the pin edge is extracted and the center of mass is calculated, and the convex hull vertices are used to match the rough rotation angle, combined with principal component analysis and circle fitting algorithm to achieve accurate rotation Calculation of angles.
It realizes fast and high-precision detection of BGA chip position, which is suitable for different pin arrangement methods, overcomes the problems of long calculation time and difficult to ensure detection accuracy.
Smart Images

Figure CN119048597A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of chip positioning technology and visual inspection technology, and specifically relates to a high-precision BGA chip posture detection method and related devices. Background Art
[0002] As the scale of integrated circuits increases, the forms of chip packaging become more and more complex. IC chips are developing towards smaller sizes, finer pins and tighter pin spacing. The quality of chip mounting is directly related to the performance of electronic equipment. BGA (ball grid array) packaging components with higher integration and better performance are increasingly widely used in electronic circuits. The input and output ends of BGA packaged chips use round ball solder joints instead of epitaxial pins. BGA chips are very important in mounting components and are the core components on the PCB of electronic products. The unit price of this small and powerful chip is much higher than that of single-function resistors, capacitors, and some QFP and SOP chips that can realize simple functions. Therefore, after mounting, accurate positioning of the chip is a basic requirement to ensure that electronic products can work properly.
[0003] In traditional BGA component posture detection, rectangle fitting and template matching techniques are usually used, but these methods have some limitations. The rectangle fitting method is favored because of its simple operation and fast speed, but it may not ensure the accuracy and stability of detection because it relies on fewer feature points. This method may not be applicable to small BGA components or irregularly arranged components. The template matching method can provide more stable detection results to a certain extent, but its operation is more complicated, the demand for computing resources is higher, and its detection accuracy is difficult to guarantee.
[0004] At present, the pose detection of BGA components mostly adopts the method of point set registration. However, the BGA component detection method using feature point set registration still has the following problems: multi-pin chips often take longer to process when positioning, and it is difficult to obtain stable feature points for spherical pins. For BGA components, if the centroid of the contour point set is directly used as the feature point set, there will be problems of poor stability and insufficient accuracy; if the center of all pins is extracted as the matching point set, it will cost a lot of resources and time.
[0005] Specifically, Figure 1The figure shows an original grayscale image of the bottom package of a BGA chip. The pins used for identification appear as white circular patterns under a symmetrical strip light source, and all pins are distributed in a grid array. The simplest method is to use a fitting method to estimate the pose information. However, when the component is relatively small, the number of feature points that can be used for fitting is small, and the stability and accuracy of the fitting results cannot be guaranteed. Although the use of template matching to detect pose can improve the accuracy and stability of the detection results, it is necessary to consider the angle rotation and the scaling in the X and Y directions. Template making will affect the detection accuracy, and the algorithm has a large time complexity, which cannot meet the needs of fast positioning of the placement machine. If the traditional feature point set registration method is used, although it can improve the resource requirements of template matching to a certain extent, in actual applications, the BGA pins are arranged in many forms and in large numbers, and there are problems such as difficulty in obtaining stable feature points and serious time consumption when registering feature points. It is also difficult to simultaneously meet the requirements of the placement machine for high precision and high efficiency. Summary of the invention
[0006] In order to overcome the deficiencies of the above-mentioned prior art, the object of the present invention is to provide a high-precision BGA chip posture detection method and related devices, which can realize fast and high-precision detection of the BGA chip posture.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0008] A high-precision BGA chip posture detection method includes the following process:
[0009] Get the original grayscale image of the bottom package of the BGA chip;
[0010] Preprocessing the original grayscale image to obtain a pin edge map;
[0011] Numbering the pins of the BGA chip on the pin edge diagram to obtain a pin edge numbering diagram;
[0012] Calculate the centroid of each pin in the pin edge numbering diagram and analyze the shape of the pin edge to obtain a pin centroid point diagram after shape analysis;
[0013] Extract the convex hull vertices on the pin centroid point diagram after shape analysis to obtain the pin centroid positioning point diagram;
[0014] Matching the pin centroid positioning point map with the pre-established first-type template point set to obtain a rough rotation angle of the BGA chip; the first-type template point set is the vertices of the convex hull of the point set composed of the ideal pin circle centers;
[0015] According to the pre-established second-category template point set and the pin centroid point diagram, the precise rotation angle of the BGA chip is calculated using the rough rotation angle, thereby realizing the BGA chip posture detection. The second-category template point set is a point set composed of several pin circle centers randomly selected on each side of the outermost edge of the BGA chip.
[0016] Preferably, when the original grayscale image is preprocessed to obtain a pin edge map:
[0017] The original grayscale image is subjected to median filtering for noise reduction, and then the chip pins are segmented using OTSU threshold segmentation, and the pin edges are detected using the Canny edge operator to obtain a pin edge map.
[0018] Preferably, when the pins of the BGA chip are numbered on the pin edge diagram to obtain the pin edge numbering diagram:
[0019] The connected domain analysis method based on 8-neighborhood traversal is used to extract all pin edges and number them. When extracting pin edges, the threshold range of the number of pin edge pixels is set. The rules are as follows:
[0020] P std =round(2*π*R*P e )
[0021] Among them, P std The value is the pixel perimeter of each pin in pixel calibration, P e is the calibrated pixel equivalent, and R is the actual radius size of each pin of the BGA chip.
[0022] Preferably, the centroid of each pin is calculated in the pin edge numbering diagram and the shape of the pin edge is analyzed to obtain the pin centroid point diagram after shape analysis:
[0023] The weighted average method is used to obtain the centroid of each pin of the chip. While calculating the centroid of each pin edge, the shape of the pin edge is analyzed through principal component analysis to obtain the pin centroid point diagram after shape analysis.
[0024] Among them, when analyzing the shape of the pin edge through principal component analysis, the principal component analysis algorithm is used to perform data dimensionality reduction analysis on the numbered pin edge to obtain the first principal component eigenvector and the second principal component eigenvector, and the ratio of the second principal component eigenvector to the first principal component eigenvector is set as the non-roundness measure P, the normal pin threshold range is set to 0.8-1, the pin reference mark threshold range is set to 0.45-0.55, and the defective pin threshold range is set to 0-0.45 and 0.55-0.8.
[0025] Preferably, the pin centroid positioning point map is matched with the pre-established first-class template point set to obtain a rough rotation angle of the BGA chip, and the convex hull vertices are extracted from the pin centroid point map and the point set, and the convex hull vertices and the first-class template point set are decomposed by SVD to obtain a rough rotation angle of the BGA chip, wherein when the convex hull vertices are extracted from the pin centroid point map and the point set, the convex hull vertices are extracted by an improved convex hull detection algorithm, and the improved convex hull detection algorithm includes the following process:
[0026] Selection of reference point: determine the point with the smallest ordinate value in the point set, then find the point with the smallest abscissa value in the neighborhood of the ordinate value, and update the point as the reference point;
[0027] Convex hull detection: Sort all points in the point set according to their polar angles and distances from the reference point and perform boundary judgment to obtain the convex hull;
[0028] Convex hull screening: Convex hull screening is performed based on the judgment condition of whether the angle between any point and two adjacent points is within the π neighborhood. If the angle is within the π neighborhood, the arbitrary point is excluded; if the angle is not within the π neighborhood, the arbitrary point is retained.
[0029] Preferably, when the precise rotation angle of the BGA chip is obtained by using a rough rotation angle according to the pre-established second type template point set and the pin centroid point diagram:
[0030] After the second type of template point set is rotated according to the rough rotation angle of the chip, it is matched with the pin centroid point map to obtain the pin centroid corresponding to the outermost part of the BGA chip. The centroid is replaced with the fitting circle center through the circle fitting algorithm. Finally, the second type of template point set is matched with the corresponding peripheral pin circle center point set and the ICP point set to obtain the final precise rotation angle of the chip.
[0031] Preferably, the first type of template point set and the second type of template point set are both selected according to a BGA chip data manual.
[0032] The present invention also provides a high-precision BGA chip posture detection system, comprising:
[0033] Image acquisition unit: used to acquire the original grayscale image of the bottom package of the BGA chip;
[0034] Preprocessing unit: used for preprocessing the original grayscale image to obtain a pin edge map;
[0035] Numbering unit: used for numbering the pins of the BGA chip on the pin edge diagram to obtain a pin edge numbering diagram;
[0036] The first calculation unit is used to calculate the centroid of each pin in the pin edge numbering diagram and analyze the shape of the pin edge to obtain a pin centroid point diagram after shape analysis;
[0037] Extraction unit: used to extract convex hull vertices on the pin centroid point diagram after shape analysis to obtain the pin centroid positioning point diagram;
[0038] Matching unit: used to match the pin centroid positioning point map with the pre-established first type template point set to obtain a rough rotation angle of the BGA chip; the first type template point set is the convex hull vertices of the point set composed of the ideal pin circle centers;
[0039] The second calculation unit is used to calculate the precise rotation angle of the BGA chip based on the pre-established second-type template point set and the pin centroid point diagram, using the rough rotation angle, thereby realizing the BGA chip posture detection. The second-type template point set is a point set composed of several pin circle centers randomly selected on each side of the outermost edge of the BGA chip.
[0040] The present invention also provides an electronic device, comprising:
[0041] one or more processors;
[0042] a storage device having one or more programs stored thereon;
[0043] When the one or more programs are executed by the one or more processors, the one or more processors implement the high-precision BGA chip posture detection method of the present invention as described above.
[0044] The present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the high-precision BGA chip posture detection method of the present invention as described above.
[0045] The present invention has the following beneficial effects:
[0046] In the present invention, two types of template point sets are pre-established for BGA chips through the chip data manual, the pins are processed and equivalently converted into the pin centroid point set after the shape principal component analysis, and the centroid positioning point set composed of convex hull vertices is matched with the first type of template point set to quickly calculate the rough rotation angle of the chip; then the second type of template point set is rotated by a rough angle to obtain the peripheral corresponding pins in the centroid point set, and the corresponding pins that meet the shape analysis are fitted with a circle to update the centroid to the center of the circle, and then the second type of template point set is matched with the second type of template point set to calculate the precise rotation angle of the chip, thereby realizing high-precision detection of the BGA chip posture. The method of the above process of the present invention has universal applicability to BGA chips with different pin arrangements, and the detection speed is fast and the accuracy is high, thereby overcoming the problems of long calculation time and difficult to ensure detection accuracy due to a large number of pins and different pin arrangements. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 The original grayscale image of the bottom package of the BGA chip obtained in the embodiment of the present invention;
[0049] Figure 2 A schematic diagram of a process for detecting the posture of a BGA chip according to an embodiment of the present invention;
[0050] Figure 3 A first type of template point set constructed according to a chip data manual in an embodiment of the present invention;
[0051] Figure 4 The second type of template point set constructed according to the chip data manual in the embodiment of the present invention;
[0052] Figure 5 The chip pin centroid positioning point and its pin edge corresponding diagram extracted in the embodiment of the present invention;
[0053] Figure 6 The extracted peripheral pin feature points and the corresponding pin outline diagram in the embodiment of the present invention; DETAILED DESCRIPTION
[0054] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0055] This embodiment uses Figure 1The components shown are objects, and this embodiment is described with respect to the problem of fast and high-precision posture detection of BGA components.
[0056] A first aspect of an embodiment of the present invention provides a high-precision BGA chip posture detection method, the method flow is as follows: Figure 2 As shown, the following steps are included:
[0057] S1. Pre-establish two types of chip template point sets:
[0058] There are many kinds of pin arrangements for BGA chips, and the number of pins ranges from dozens to hundreds. If the center of all pins is extracted as matching feature points, the time complexity of pose detection will increase. Therefore, point set matching of pins at special positions on BGA chips is constructed. The two types of pre-established template point sets are selected and established according to the BGA chip data manual, such as Figure 3 , the first type of template point set is the convex hull vertices of the point set composed of the ideal pin circle centers; Figure 4 The second type of template point set is a point set consisting of several pin circle centers randomly selected on each side of the outermost edge of the chip, see Figure 6 .
[0059] S2. Obtain the original grayscale image of the BGA chip, the chip pin segmentation map, and the pin edge map.
[0060] The original grayscale image of the bottom of the BGA chip to be inspected is collected by an industrial camera. Due to the presence of noise and the uneven grayscale value of the surface of the white metal spherical pin due to light and oxidation, the original grayscale image is obtained through a preprocessing step to obtain the pin edge image.
[0061] In the preprocessing operation, a 5*5 median filter operator is used for filtering and denoising, and then the OTSU adaptive threshold segmentation algorithm is used to segment the chip pins from the filtered image, and a 5*5 Canny edge operator is used to detect the pin edges, where the first threshold and the second threshold in edge detection are set to 50 and 120, respectively.
[0062] S3. Number all the pins of the chip on the pin edge diagram
[0063] The connected domain analysis method based on 8-neighborhood traversal is used to extract all pin edges and number the pins to obtain a pin edge numbering map. When extracting the pin edge, in order to prevent interference such as impurity noise, the pin edge pixel count threshold range is set, and the rules are as follows:
[0064] P std =round(2*π*R*P e )
[0065] The pixel size of the pin in the image to be inspected is calculated based on the camera calibrated pixel equivalent and the actual size of the solder ball in the chip data sheet. std The value is the pixel perimeter of each pin in pixel calibration, P e is the calibrated pixel equivalent, and R is the actual radius size of each pin of the chip. It can achieve universal applicability of pin contour extraction in BGA posture detection of different sizes or different image acquisition conditions, and can remove tiny noise points and impurity interference points.
[0066] S4. Replace the chip pins with the pin centroid point diagram
[0067] For each chip pin edge after numbering, the centroid of each chip pin is calculated by weighted average method according to the serial number to obtain the pin centroid point diagram. While calculating the centroid of each pin edge, the shape of the pin edge is analyzed by principal component analysis.
[0068] The principal component analysis reduces the dimension of the data by calculating the covariance matrix of each contour point set, and solves the covariance matrix to obtain two eigenvectors, namely the first principal component eigenvector and the second principal component eigenvector. The largest eigenvalue is selected as the first principal component, and the relatively small eigenvalue is selected as the second principal component; the two principal components capture the most significant changes in the contour point set, which indicates that the point set data changes mainly occur in these two directions.
[0069] According to the characteristics of the principal component analysis algorithm mentioned above, if it is a triangle, the two principal components will differ by more than two times, but if it is approximately a circle, the two principal components are considered to be close (the ratio of the second principal component to the first principal component will be greater than 0.8 and less than 1). The pin shape is judged by the change in the two directions in which the pin contour point set changes most obviously in the data.
[0070] The ratio of the second principal component to the first principal component is set as the non-circularity measure P, the threshold range of normal pins is set to 0.8-1, the threshold range of the triangular pin reference mark is set to 0.45-0.55, and the threshold range of defective pins belongs to other value ranges (i.e. 0-0.45 and 0.55-0.8). The centroid of each pin of the chip is obtained by the weighted average method of the points on the edge of each pin, and the centroid point set of the chip pin is obtained, and the edges of all numbered pins are marked according to the P value mark.
[0071] S5. Extract the convex hull vertices from the pin centroid to obtain the centroid positioning point map
[0072] Extract the convex hull vertices from the pin centroid point map and the point set, and decompose the convex hull vertices and the first type of template point set through SVD to obtain the rough rotation angle of the chip. The pin centroid point map replaces the chip pins, but the number of pin centroids is large. If all are extracted as feature points, it will not only reduce the accuracy of pin position replacement, but also increase the computational complexity for point set matching; so first extract the pin centroid positioning point map that can represent the chip centroid point map from the pin centroid point map, the purpose is to quickly obtain a rough shape angle of the chip, in which the convex hull vertices of the pin centroid point map are selected as the pin centroid positioning point map (see Figure 5 ), by using the improved convex hull detection algorithm Graham algorithm.
[0073] The Graham algorithm is an efficient algorithm for calculating the convex hull of a set of points. The convex hull is the smallest convex polygon of a set of points, that is, all points are located inside or on the boundary of the polygon, and all points are stored counterclockwise according to the polygon outside the point set. However, the traditional Graham algorithm is very simple in selecting reference points, and only considers the smallest x-coordinate or y-coordinate value of the point. However, in the case of slight angle offsets, inappropriate reference points may be selected, thus affecting the extraction of matching feature points; at the same time, the traditional Graham algorithm only considers whether it is a convex point when screening convex points, but for the more regularly arranged BGA pin centroid point set, there may be slight angle changes, and more points that are not positioning feature points will be extracted;
[0074] Based on the above two problems, the present invention improves the traditional Graham algorithm for the centroid of the BGA pin array. The improved convex hull detection algorithm includes the following process:
[0075] Selection of reference point: determine the point with the smallest y value in the vertical coordinate in the point set, then find the point with the smallest x value in the vertical coordinate y value neighborhood, and update this point as the reference point;
[0076] Convex hull detection: Sort all points in the point set according to their polar angles and distances from the reference point and perform boundary judgment to obtain the convex hull;
[0077] Convex hull screening: Convex hull screening is performed based on the judgment condition of whether the angle between any point and two adjacent points is within the π neighborhood. If the angle is within the π neighborhood, the arbitrary point is excluded; if the angle is not within the π neighborhood, the arbitrary point is retained.
[0078] Specifically, in this embodiment, the improvement of reference point selection and the rules of convex hull screening are as follows:
[0079] p s =min{p i →y}&&min{p s →x}∈[p s →y-ε,ps →y+ε]
[0080] θ∈[π-δ,π]
[0081] Among them, p s is the coordinate of the reference point, p i are the coordinates of any point in the pin centroid set, ε is the half-width of the neighborhood selected by the marker point, which is set to 5 pixels in height; θ is the vector angle formed by any two points a and b in the salient point set and the standard point s, and δ is the angle error value of the salient point screening, which is set to 5°.
[0082] S6. Calculate the precise chip rotation angle based on the second type of template point set
[0083] Because the first type of template point set and the pin centroid positioning point map of S5 use a small number of BGA chip pins and use the pin centroid (poor position accuracy), this method can only obtain a rough chip rotation angle, so an additional step of precise angle detection is added.
[0084] First, the second type of template point set is rotated according to the rough rotation angle of the chip, and then matched with the pin centroid point map of S4 to obtain the pin centroid point corresponding to the second type of template point set (including the pin edge number and the mark according to the P value in S4). Only normal pins meet the requirements, and then the original pin centroid is replaced with the fitting circle center through the circle fitting algorithm. Finally, the second type of template point set and the corresponding peripheral pin circle center point set are matched by the ICP point set matching algorithm to obtain the final precise rotation angle of the chip.
[0085] In order to reasonably arrange the computational complexity, improve the pin position accuracy and eliminate defective pins, the circle fitting algorithm is adaptive iterative reweighted least squares, and the pin center of mass is replaced by the pin fitting circle center. The number of fitting iterations k is determined according to the non-circularity measure P. The defective pin is the case of a smaller P value. The smaller P is, the more iterations k are, and the maximum k is 5. The weight function used is the Huber weight function w i (δ):
[0086]
[0087] The parameter γ is the clipping function. The median of the distance from the fitting point to the center of the fitting circle in the last cycle is divided by 0.675 and then multiplied by 2. i | is the distance from point i to the center of the current fitted circle.
[0088] The weighted least squares problem for the kth iteration can be expressed as:
[0089] e i =(x i-a) 2 +(y i -b) 2 -r 2
[0090]
[0091] Here, let the parameters of the circle be (a, b, r), (a, b) are the coordinates of the center of the circle, and r is the radius. i For the residuals of the data points, is the weight of the kth iteration.
[0092] Only the pin edges corresponding to the second type of template point set and within the P value range are adaptively iterated to fit the circle, which reduces the computational complexity and improves the pin position accuracy, making the fitting circle more consistent with the actual situation.
[0093] It can be seen from the above scheme that this embodiment proposes a connected domain analysis algorithm based on principal component analysis according to BGA chips with different pin arrangements, which can greatly reduce the interference of impurity noise and defective pins, thereby obtaining a more stable and realistic spherical pin contour; for the high-precision matching feature point extraction algorithm of the BGA pin array, an adaptive iterative reweighted least squares circle fitting algorithm is proposed, which can stably obtain a high-precision circle center point set of peripheral pins. It overcomes the problem that it is difficult to obtain stable feature points in BGA chip posture detection, and the large number of pins leads to long calculation time and difficulty in ensuring detection accuracy.
[0094] The present invention also provides a high-precision BGA chip posture detection system based on the above, the system comprising:
[0095] Image acquisition unit: used to acquire the original grayscale image of the bottom package of the BGA chip;
[0096] Preprocessing unit: used for preprocessing the original grayscale image to obtain a pin edge map;
[0097] Numbering unit: used for numbering the pins of the BGA chip on the pin edge diagram to obtain a pin edge numbering diagram;
[0098] The first calculation unit is used to calculate the centroid of each pin in the pin edge numbering diagram and analyze the shape of the pin edge to obtain a pin centroid point diagram after shape analysis;
[0099] Extraction unit: used to extract convex hull vertices on the pin centroid point diagram after shape analysis to obtain the pin centroid positioning point diagram;
[0100] Matching unit: used to match the pin centroid positioning point map with the pre-established first-class template point set to obtain the rough rotation angle of the BGA chip;
[0101] The second calculation unit is used to calculate the precise rotation angle of the BGA chip based on the pre-established second type template point set and the pin centroid point diagram using the rough rotation angle, thereby realizing the BGA chip posture detection.
[0102] The embodiments of the present invention also provide corresponding electronic devices and computer-readable storage media for implementing the solutions provided by the embodiments of the present invention.
[0103] Among them, the device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes, so that the device executes the high-precision BGA chip posture detection method described in any embodiment of the present application.
[0104] The storage medium stores a computer program, wherein the computer program, when executed by the processor, implements the high-precision BGA chip posture detection method described in any embodiment of the present application.
[0105] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited thereto. After considering the specification and practicing the invention disclosed herein, those skilled in the art will easily think of other embodiments of the present invention. Within the technical concept of the present invention, the technical solution of the present invention can be subjected to a variety of simple modifications, including the combination of various specific technical features in any suitable manner. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. However, these simple modifications and combinations should also be regarded as the contents disclosed by the present invention, and all belong to the protection scope of the present invention.
Claims
1. A high-precision BGA chip posture detection method, characterized in that: The process includes the following: Get the original grayscale image of the bottom package of the BGA chip; Preprocessing the original grayscale image to obtain a pin edge map; Numbering the pins of the BGA chip on the pin edge diagram to obtain a pin edge numbering diagram; Calculate the centroid of each pin in the pin edge numbering diagram and analyze the shape of the pin edge to obtain a pin centroid point diagram after shape analysis; Extract the convex hull vertices on the pin centroid point diagram after shape analysis to obtain the pin centroid positioning point diagram; Match the pin centroid positioning point map with the pre-established first-category template point set to obtain a rough rotation angle of the BGA chip; The first type of template point set is the vertices of the convex hull of the point set consisting of the centers of the ideal pin circles; According to the pre-established second-category template point set and the pin centroid point diagram, the precise rotation angle of the BGA chip is calculated using the rough rotation angle, thereby realizing the BGA chip posture detection. The second-category template point set is a point set composed of several pin circle centers randomly selected on each side of the outermost edge of the BGA chip.
2. A high-precision BGA chip posture detection method according to claim 1, characterized in that: When the original grayscale image is preprocessed to obtain a pin edge map: The original grayscale image is subjected to median filtering for noise reduction, and then the chip pins are segmented using OTSU threshold segmentation, and the pin edges are detected using the Canny edge operator to obtain a pin edge map.
3. A high-precision BGA chip posture detection method according to claim 1, characterized in that: When the pins of the BGA chip are numbered on the pin edge diagram to obtain a pin edge numbering diagram: The connected domain analysis method based on 8-neighborhood traversal is used to extract all pin edges and number them. When extracting pin edges, the threshold range of the number of pin edge pixels is set. The rules are as follows: P std =round(2*π*R*P e ) Among them, P std The value is the pixel perimeter of each pin in pixel calibration, P e is the calibrated pixel equivalent, and R is the actual radius size of each pin of the BGA chip.
4. A high-precision BGA chip posture detection method according to claim 1, characterized in that: In the pin edge numbering diagram, the centroid of each pin is calculated and the shape of the pin edge is analyzed to obtain the pin centroid point diagram after shape analysis: The weighted average method is used to obtain the centroid of each pin of the chip. While calculating the centroid of each pin edge, the shape of the pin edge is analyzed through principal component analysis to obtain the pin centroid point diagram after shape analysis. Among them, when analyzing the shape of the pin edge through principal component analysis, the principal component analysis algorithm is used to perform data dimensionality reduction analysis on the numbered pin edge to obtain the first principal component eigenvector and the second principal component eigenvector, and the ratio of the second principal component eigenvector to the first principal component eigenvector is set as the non-roundness measure P, the normal pin threshold range is set to 0.8-1, the pin reference mark threshold range is set to 0.45-0.55, and the defective pin threshold range is set to 0-0.45 and 0.55-0.
8.
5. A high-precision BGA chip posture detection method according to claim 1, characterized in that: The pin centroid positioning point map is matched with the pre-established first-class template point set to obtain a rough rotation angle of the BGA chip, and the convex hull vertices are extracted from the pin centroid point map and the point set, and the convex hull vertices and the first-class template point set are decomposed by SVD to obtain a rough rotation angle of the BGA chip, wherein when the convex hull vertices are extracted from the pin centroid point map and the point set, the convex hull vertices are extracted by an improved convex hull detection algorithm, and the improved convex hull detection algorithm includes the following process: Selection of reference point: determine the point with the smallest ordinate value in the point set, then find the point with the smallest abscissa value in the neighborhood of the ordinate value, and update the point as the reference point; Convex hull detection: Sort all points in the point set according to their polar angles and distances from the reference point and perform boundary judgment to obtain the convex hull; Convex hull screening: Convex hull screening is performed based on the judgment condition of whether the angle between any point and two adjacent points is within the π neighborhood. If the angle is within the π neighborhood, the arbitrary point is excluded; if the angle is not within the π neighborhood, the arbitrary point is retained.
6. A high-precision BGA chip posture detection method according to claim 1, characterized in that: According to the pre-established second type template point set and pin centroid point diagram, the precise rotation angle of the BGA chip is obtained by using the rough rotation angle: After the second type of template point set is rotated according to the rough rotation angle of the chip, it is matched with the pin centroid point map to obtain the pin centroid corresponding to the outermost part of the BGA chip. The centroid is replaced with the fitting circle center through the circle fitting algorithm. Finally, the second type of template point set is matched with the corresponding peripheral pin circle center point set and the ICP point set to obtain the final precise rotation angle of the chip.
7. A high-precision BGA chip posture detection method according to claim 1, characterized in that: The first type of template point set and the second type of template point set are both selected according to the BGA chip data manual.
8. A high-precision BGA chip posture detection system, characterized in that: include: Image acquisition unit: used to acquire the original grayscale image of the bottom package of the BGA chip; Preprocessing unit: used for preprocessing the original grayscale image to obtain a pin edge map; Numbering unit: used for numbering the pins of the BGA chip on the pin edge diagram to obtain a pin edge numbering diagram; The first calculation unit is used to calculate the centroid of each pin in the pin edge numbering diagram and analyze the shape of the pin edge to obtain a pin centroid point diagram after shape analysis; Extraction unit: used to extract convex hull vertices on the pin centroid point diagram after shape analysis to obtain the pin centroid positioning point diagram; Matching unit: used to match the pin centroid positioning point map with the pre-established first-class template point set to obtain the rough rotation angle of the BGA chip; The first type of template point set is the vertices of the convex hull of the point set consisting of the centers of the ideal pin circles; The second calculation unit is used to calculate the precise rotation angle of the BGA chip based on the pre-established second-type template point set and the pin centroid point diagram, using the rough rotation angle, thereby realizing the BGA chip posture detection. The second-type template point set is a point set composed of several pin circle centers randomly selected on each side of the outermost edge of the BGA chip.
9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the high-precision BGA chip posture detection method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the high-precision BGA chip posture detection method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Solder ball positioning and parameter identification method for ball grid array pin chip
CN105184770A
Patch element positioning identification method based on minimum enclosing rectangle
CN105809705A
Fast tilt correction method for QFN chip pin image
CN110992326A
Semiconductor device pin size detection method and device, and storage medium
CN115439523A
BGA element identification and positioning method and system based on machine vision, and storage medium
CN117392226A
