Detection method and system of BGA device

By acquiring the three-dimensional information and attitude transformation matrix of BGA devices to correct the detection range, the problems of slow speed and high cost of three-dimensional defect detection of BGA devices are solved, realizing fast, simple and efficient three-dimensional defect detection, and improving detection efficiency and accuracy.

CN121149026APending Publication Date: 2025-12-16SHENZHEN HUAHAN WEIYE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511090633.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, three-dimensional defect detection of BGA devices is slow, complex and costly, two-dimensional detection relies on manual review and is prone to errors, and three-dimensional detection methods are time-consuming and difficult to perform three-dimensional defect judgment quickly, simply and efficiently.

Method used

By acquiring the three-dimensional information of the BGA device, combining grayscale and depth images, and using the attitude transformation matrix to correct the detection range, automatic detection of sphere height, coplanarity, and warpage is achieved. A multi-dimensional information fusion method is used for comprehensive detection.

Benefits of technology

It enables rapid, simple, and efficient detection of three-dimensional defects in BGA devices, improving detection efficiency and accuracy, reducing manual intervention, and lowering detection costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121149026A_ABST
    Figure CN121149026A_ABST
Patent Text Reader

Abstract

A BGA device detection method and system are used for detecting three-dimensional defects of a BGA device. Obtaining a grayscale image and a depth image of the BGA device to be detected; obtaining an actual detection range according to the grayscale image; performing three-dimensional defect detection on the BGA device to be detected according to the actual detection range, wherein the three-dimensional defect detection comprises sphere height detection, coplanarity detection and warping degree detection; wherein each solder ball area is obtained according to the actual detection range, a ball height detection result of each solder ball is obtained in combination with a reference plane, and then a coplanarity detection result is obtained; obtaining an actual substrate edge according to the actual detection range, and obtaining a warping degree detection result according to the reference plane; or acquiring a plurality of sub-regions of the BGA device to be tested; and obtaining a warping degree detection result according to the average solder ball height of each sub-region. The three-dimensional form and location tolerance of the to-be-detected BGA device is detected based on the three-dimensional information of each pixel point in the to-be-detected BGA device, and the method is faster, simpler and more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of integrated circuit packaging and testing, and in particular to a BGA device detection method and system. BACKGROUND

[0002] In recent years, with the rapid growth of science and technology and industrial level, the demand for electronic products in daily life is becoming higher and higher, and the demand is also increasing. The ball grid array packaging tin ball BGA technology of integrated circuit chip to some extent improves the production speed of circuit board. With the development demand of precision packaging, the requirement for tin ball is also becoming more and more strict, and the detection speed of tin ball in BGA device has become a key factor restricting the development of the technology.

[0003] The existing measurement method usually divides two-dimensional vision and three-dimensional vision into positions for defect detection and analysis, and the structure design volume is large and the optical imaging optical design is complex. For the detection of BGA tin ball, although the two-dimensional camera can quickly obtain the planar image and preliminarily identify the defect, its limitation is that it cannot directly provide three-dimensional spatial information, such as the height, volume and shape distortion of the tin ball. Therefore, the two-dimensional detection result often needs to rely on manual review to supplement the judgment of three-dimensional dimension, which is usually realized by the naked eye or with the help of a microscope and other equipment to observe the solder ball. However, manual review is not only low in efficiency, but also subjective, easily affected by the experience of the operator, and also easy to cause eye fatigue of the operator, thereby increasing the risk of missed detection or misjudgment.

[0004] In addition, the recognition ability of two-dimensional image for complex defects (such as solder volume and tin ball surface quality) is limited; and the existing three-dimensional defect (such as warping) detection usually uses metallographic section and microscope observation method for analysis, but this method has long analysis time, complex process and high cost, so it is urgent to design a method which can quickly, simply and efficiently judge whether the BGA device has three-dimensional defects. SUMMARY

[0005] The technical problem solved by the present application is how to quickly, simply and efficiently detect three-dimensional defects of BGA devices.

[0006] According to a first aspect, in an embodiment, a BGA device detection method is provided, which is used for detecting three-dimensional defects of a BGA device, comprising:

[0007] obtaining three-dimensional information of a BGA device to be detected, the three-dimensional information comprising a gray scale image and a depth image of the BGA device to be detected;

[0008] obtaining an initial detection range of the BGA device to be detected according to the gray scale image;

[0009] According to the initial detection range, the center coordinate of the substrate in the BGA device to be detected and the real-time angle are obtained;

[0010] According to the center coordinate of the substrate in the BGA device to be detected and the real-time angle, the actual detection range of the BGA device to be detected is obtained;

[0011] According to the actual detection range of the BGA device to be detected, three-dimensional defect detection of the BGA device to be detected is performed, and the three-dimensional defect detection includes ball height detection, coplanarity detection, and warpage detection;

[0012] According to the actual detection range of the BGA device to be detected, each tin ball region in the BGA device to be detected is obtained; and according to each tin ball region in the BGA device to be detected and a reference plane, a ball height detection result of each tin ball is obtained.

[0013] According to the ball height detection result of each tin ball, a coplanarity detection result of the BGA device to be detected is obtained.

[0014] According to the actual detection range of the BGA device to be detected, an actual substrate edge is obtained; according to the coordinates of each pixel point in the actual substrate edge and the reference plane, a warpage detection result is obtained; or, the actual detection range of the BGA device to be detected is divided into regions to obtain a plurality of sub-regions; according to the ball height detection results of all tin balls in each sub-region, an average tin ball height of each sub-region is obtained; and according to the average tin ball height of each sub-region, a warpage detection result is obtained.

[0015] According to a second aspect, an embodiment provides a detection system of a BGA device, which is used for detecting three-dimensional defects of the BGA device, and includes:

[0016] A data acquisition module is configured to acquire three-dimensional information of a BGA device to be detected, and the three-dimensional information includes a gray-scale image and a depth image of the BGA device to be detected.

[0017] An initial detection range acquisition module is configured to obtain an initial detection range of the BGA device to be detected according to the gray-scale image.

[0018] An actual detection range acquisition module is configured to obtain a center coordinate of a substrate in the BGA device to be detected and a real-time angle according to the initial detection range, and obtain an actual detection range of the BGA device to be detected according to the center coordinate of the substrate in the BGA device to be detected and the real-time angle.

[0019] A three-dimensional defect detection module is configured to perform three-dimensional defect detection of the BGA device to be detected according to the actual detection range of the BGA device to be detected, and the three-dimensional defect detection includes ball height detection, coplanarity detection, and warpage detection.

[0020] wherein each tin ball region in the BGA device under test is obtained according to the actual detection range of the BGA device under test; and the ball height detection result of each tin ball is obtained according to each tin ball region in the BGA device under test and the reference plane;

[0021] the coplanarity detection result of the BGA device under test is obtained according to the ball height detection result of each tin ball;

[0022] the actual substrate edge is obtained according to the actual detection range of the BGA device under test; the warpage detection result is obtained according to the coordinates of each pixel point in the actual substrate edge and the reference plane; or, the actual detection range of the BGA device under test is divided into multiple sub-regions; the average tin ball height of each sub-region is obtained according to the ball height detection result of all tin balls in each sub-region; and the warpage detection result is obtained according to the average tin ball height of each sub-region.

[0023] According to the BGA device detection method and system of the above embodiment, by obtaining the three-dimensional information of the BGA device under test, the gray scale image and the depth image of the BGA device under test are obtained, and the ball height of each tin ball is obtained based on the reference plane and the depth value of each tin ball in the BGA device under test, so as to obtain the ball height detection result; then, the coplanarity detection is carried out based on the ball height of each tin ball, so as to obtain the coplanarity detection result; when the warpage detection is carried out, the warpage degree of the BGA device under test in the X direction and the Y direction is obtained according to the actual substrate edge, and then the overall warpage degree of the BGA device under test is evaluated; or, the entire BGA device under test is divided into regions, the average tin ball height of different sub-regions is obtained, so as to obtain the warpage evaluation index, thereby obtaining the warpage detection result; the three-dimensional geometric tolerance of the BGA device under test is detected based on the three-dimensional information of each pixel point in the BGA device under test, which is more rapid, simple and efficient. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 the method flowchart of the substrate and tin ball detection method of the BGA device;

[0025] Figure 2 the system block diagram of the substrate and tin ball detection system of the BGA device;

[0026] Figure 3 the method flowchart of the BGA tin ball surface defect detection method;

[0027] Figure 4 the system block diagram of the BGA tin ball surface defect detection system;

[0028] Figure 5 the method flowchart of the BGA device three-dimensional defect detection method;

[0029] Figure 6 System block diagram of the three-dimensional defect detection system for BGA device;

[0030] Figure 7 Schematic diagram of preselected area in the process of obtaining initial detection range;

[0031] Figure 8 Schematic diagram of connected domain analysis result of the BGA device to be detected;

[0032] Figure 9 Local enlarged view of the connected domain analysis result of the BGA device to be detected;

[0033] Figure 10 Schematic diagram of angle in the process of obtaining second evaluation index;

[0034] Figure 11 Schematic diagram of detection area of each solder ball in the actual detection range;

[0035] Figure 12 Schematic diagram of substrate orthogonality detection;

[0036] Figure 13 Schematic diagram when the upper (lower) side edge of the actual detection range is not parallel to the X axis;

[0037] Figure 14 Schematic diagram of position degree detection;

[0038] Figure 15 Schematic diagram of multiple regions of interest in the detection area of each solder ball;

[0039] Figure 16 Schematic diagram of obtaining first type of pixel point;

[0040] Figure 17 Schematic diagram of area division result of the actual detection range. DETAILED DESCRIPTION

[0041] The application will be further described in details through specific embodiments and the accompanying drawings. In different embodiments, similar elements are marked with similar element reference numbers. In the following embodiments, many details are described in order to make the application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different cases, or can be replaced by other elements, materials or methods. In some cases, some operations related to the application are not shown or described in the specification, in order to avoid the core part of the application being overwhelmed by too much description, and it is not necessary to describe these related operations in details for those skilled in the art, who can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0042] In addition, features described in the specification, an operation or a characteristic can be combined in any appropriate manner to form various embodiments. Also, each step or action in the method description can be performed in an order different from the order described, as long as possible, by those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing one embodiment, and do not mean that the sequence is necessary.

[0043] The serial numbers of components in this paper, such as "first", "second", etc., are only used to distinguish the described objects, and do not have any order or technical meaning. Unless otherwise specified, "connection" and "coupling" in this application include direct and indirect connections (couplings).

[0044] Ball Grid Array (BGA) technology is a surface mount packaging technology applied to integrated circuits, commonly used to permanently fix devices such as microprocessors, and its core function is to conduct electronic signals from integrated circuits to the printed circuit board (PCB) on which it is located when the device is operating.

[0045] Unlike traditional packaging, the bottom pins of BGA packaging are replaced by tin balls, which can be manually or automatically configured by machine, and positioned with the help of flux. When the device is fixed to the PCB using surface mount technology, the arrangement of the bottom tin balls will accurately correspond to the position of the copper foil on the board. Then it is heated by a reflow oven or infrared oven, and the tin balls are dissolved at this time; at this time, the surface tension will drive the melted tin balls to support the packaging points and align with the circuit board, and after the tin balls are cooled and fixed, the formed solder joints can realize the stable connection between the device and the PCB.

[0046] In this process, when the BGA device is pasted to the PCB and reflowed, in order to make the solder and the tin balls on the BGA device completely reflow to form reliable solder joints, the assembly will be placed at a high temperature of 217-260℃ for 60-90s, the substrate of the BGA device is generally BT material, and the PCB is generally FR-4 material, and the reflow temperature is higher than the glass transition temperature of the two materials, plus the cohesive force of the solder, the warpage of the packaging substrate and the PCB board may occur. For BGA devices, if the design of the chip placement substrate cavity is not symmetrical, warpage may also occur during heating or cooling; in addition, because the solder joints are not solidified at the same time, the warpage that would normally disappear after cooling may also be set.

[0047] Two-dimensional geometric tolerance refers to the allowable deviation range of the shape, position, size, etc. of the geometric parameters of the element or feature in the two-dimensional plane (such as the X-Y plane), for example, whether the parallelism and orthogonality of the substrate, the diameter of the tin ball, the ball pitch, the arrangement position, etc. meet the design requirements.

[0048] Sn ball surface quality defect refers to the physical defects on the surface of the BGA Sn ball, including scratches, oxidation, contamination, deformation, cracks, burrs, etc., which may affect the welding quality or electrical performance.

[0049] Three-dimensional geometric tolerance refers to the allowable deviation range of the shape, position, height, etc. of a component or feature in three-dimensional space (X-Y-Z axis), for example, whether the height, coplanarity, warpage, etc. of the Sn ball meet the design requirements.

[0050] In the embodiment of the present application, first, real-time image acquisition is performed on the BGA device to be tested to obtain a real-time image; wherein, in the embodiment of the present application, the surface gray scale information of the BGA device to be tested is obtained based on a two-dimensional camera, and three-dimensional information of the BGA device to be tested is obtained based on a three-dimensional camera, so as to obtain three-dimensional space coordinates and depth data of the BGA device to be tested, which work together to realize multi-dimensional information fusion; then, the initial detection range of the BGA device to be tested is extracted according to the obtained real-time image; then, the initial detection range of the BGA device to be tested is posture corrected based on a standard distribution norm to obtain the actual detection range of the BGA device to be tested; then, the two-dimensional geometric tolerance, Sn ball defect and three-dimensional geometric tolerance of the BGA device to be tested are comprehensively detected based on the actual detection range, so as to realize intelligent detection and improve the comprehensive detection capability of the BGA device.

[0051] In some embodiments, the detection method of the BGA device can be used to detect the substrate and Sn ball of the BGA device, in which case, the detection method can also be referred to as a substrate and Sn ball detection method of the BGA device.

[0052] Please refer to Figure 1 In some embodiments, a substrate and Sn ball detection method of a BGA device is provided, which comprises the following steps:

[0053] Step S100: obtaining a real-time image of a BGA device to be tested.

[0054] Real-time image acquisition is performed on the BGA device to be tested on the pipeline by a two-dimensional camera to obtain a real-time image of the BGA device to be tested, in which, in addition to the BGA device to be tested, there is also a carrier carrying the BGA device.

[0055] Step S110: obtaining an initial detection range of the BGA device to be tested according to the real-time image of the BGA device to be tested.

[0056] Since there is a large gray scale difference between the edge of the BGA device and the carrier, in this embodiment, a preselected area is set at each edge of the substrate to exclude the interference of other edges in the BGA device to be tested, so as to realize fast positioning of the BGA device to be tested, for example, Figure 7As shown; for any one preselected region: edge detection is performed on the preselected region by an edge detection algorithm to obtain the substrate edge points in the preselected region; then linear fitting is performed according to all the substrate edge points in the preselected region, and for example, the linear fitting can be performed by the least square method to obtain the straight line corresponding to the preselected region;

[0057] The intersection of all the straight lines corresponding to the preselected regions is obtained, and the intersection obtained at this time is the four corner points of the substrate in the BGA device to be measured; and the region surrounded by all the straight lines corresponding to the preselected regions is taken as the initial detection range of the BGA device to be measured.

[0058] Step S120: The center coordinates and real-time angle of the substrate in the BGA device to be measured are obtained according to the initial detection range, and the actual detection range of the BGA device to be measured is obtained in combination with the standard distribution parameters.

[0059] Since the position of the BGA device to be measured placed on the flow line is not fixed, it will be offset relative to the standard position, so the embodiment further corrects the initial detection range according to the standard distribution parameters after obtaining the initial detection range, so as to obtain the actual detection range. The standard distribution parameters are preconfigured parameters, including the standard angle of the substrate, the standard center coordinates of the substrate, the standard center coordinates of each solder ball, the standard length of the substrate, and the standard width of the substrate.

[0060] The embodiment takes the center of gravity of the four corner points of the substrate in the BGA device to be measured as the center coordinates of the substrate in the BGA device to be measured; and the included angle between the upper side edge of the substrate in the BGA device to be measured and the X axis (with the horizontal right direction as the positive direction) and the included angle between the lower side edge of the substrate and the X axis are obtained, and the average value between the two obtained included angles is taken as the real-time angle of the substrate in the BGA device to be measured.

[0061] Then, the pose transformation relationship matrix is obtained according to the standard distribution parameters, the obtained center coordinates of the substrate in the BGA device to be measured, and the real-time angle, the coordinate system in which the standard distribution parameters are located is converted to the coordinate system of the BGA device to be measured through the pose transformation relationship matrix, so that the initial detection range of the BGA device to be measured and the standard distribution parameters are in the same coordinate system, and then the actual detection range of the BGA device to be measured is obtained; the pose transformation relationship matrix of the embodiment can be expressed as:

[0062]

[0063] Wherein, H represents the pose transformation relationship matrix, (x1, y1) is the center coordinates of the substrate in the BGA device to be measured; (x0, y0) is the standard center coordinates of the substrate; θ1 is the real-time angle of the substrate in the BGA device to be measured; θ0 is the standard angle of the substrate; cos represents the cosine function, and sin represents the sine function.

[0064] The posture transformation relationship matrix moves the standard center point (x0, y0) of the substrate in the coordinate system of the standard distribution parameters to (0, 0), rotates the coordinate system around the new origin by θ1-θ0, and then translates the origin to (x1, y1), thereby converting the standard center point of the substrate to the coordinate system of the BGA device under test through the posture transformation relationship matrix. At this time, the standard center point of the substrate after the posture transformation coincides with the center coordinate of the substrate in the BGA device under test.

[0065] In some embodiments, after obtaining the center coordinate of the substrate after the posture transformation, the actual detection range is obtained according to the standard distribution parameters, that is, the actual detection range of the BGA device under test is obtained according to the rectangular region determined by the center coordinate of the substrate after the posture transformation, the standard length of the substrate, and the standard width of the substrate.

[0066] It should be noted that the process of obtaining the standard angle of the substrate is as follows: obtaining the upper side edge and the lower side edge of the substrate according to the standard center coordinate of the substrate, the standard length of the substrate, and the standard width of the substrate; then obtaining the included angle between the upper side edge of the substrate and the X axis (with the horizontal right direction as the positive direction) and the included angle between the lower side edge of the substrate and the X axis, and taking the average of the two obtained included angles as the standard angle of the substrate.

[0067] In some embodiments, after obtaining the center coordinate of the substrate after the posture transformation, the four corner points of the substrate in the BGA device under test are further subjected to posture transformation, and the actual detection range of the BGA device under test is obtained according to the region surrounded by the corner points after the posture transformation.

[0068] Step S130: detecting the substrate and the solder balls of the BGA device under test according to the actual detection range of the BGA device under test.

[0069] It should be noted that after obtaining the actual detection range of the BGA device under test, the BGA device under test needs to be subjected to empty board detection before being detected in two dimensions and three dimensions, so as to determine whether the BGA device under test is an empty board.

[0070] Before detecting the substrate and the solder balls of the BGA device under test, the actual detection range of the BGA device under test is subjected to binaryzation processing to obtain a binary image, and the obtained binary image is subjected to connected component analysis, so that each connected component corresponds to a solder ball. The connected component analysis result of the BGA device under test is shown in FIG. 4. Figure 8 Figure 9 Figure 8

[0071] ​​​When the total number of connected domains is less than the preset number or the total area of the connected domains is less than the preset area threshold, it is considered that the current BGA device to be measured is empty, and the detection of the current BGA device to be measured is stopped; otherwise, it is considered that the current BGA device to be measured is not empty, and subsequent measurement and detection of the current BGA device to be measured in two-dimensional and three-dimensional dimensions are performed, thereby reducing unnecessary calculation and improving detection efficiency.

[0072] For example, when the total number of connected domains is 0, it indicates that there is no solder ball in the current BGA device to be measured, and defect detection is not needed; and when the total area of the connected domains is less than the preset area threshold, it indicates that there are too few solder balls in the current BGA device to be measured, which does not meet the production requirements, and defect detection is also not needed.

[0073] In the method, parallelism and orthogonality of the substrate in the BGA device to be measured are detected according to the initial detection range and the actual detection range.

[0074] The parallelism of the substrate refers to whether two opposite edges of the substrate maintain equal distance and do not intersect. In the process of detecting the parallelism of the substrate in the BGA device to be measured, four corner points of the substrate in the BGA device to be measured in the initial detection range and the actual detection range are obtained.

[0075] A first evaluation index is obtained according to the projection distance of each corner point of the substrate in the initial detection range and the corresponding corner point in the actual detection range. For any one corner point, the coordinates of the corner point in the initial detection range and the coordinates of the corner point in the actual detection range are obtained. The Euclidean distance between the two coordinates corresponding to the corner point is calculated, and the projection distance of the Euclidean distance on the X-axis is obtained, and the value of the projection distance is equal to the absolute value of the difference between the horizontal coordinates of the two coordinates corresponding to the corner point. The maximum value of the projection distances of all the corner points is taken as the first evaluation index.

[0076] Each pair of edges of the substrate in the BGA device to be measured in the initial detection range and the actual detection range is obtained. The upper edge and the lower edge of the substrate are a pair of edges. The left edge and the right edge of the substrate are a pair of edges, which are denoted as a second pair of edges.

[0077] A second evaluation index is obtained according to each pair of edges of the substrate in the initial detection range and each pair of edges of the substrate in the actual detection range. As shown in FIG. 2, the initial detection range corresponds to a gray rectangular region, and the actual detection range corresponds to a black rectangular region. The upper edge and the lower edge of the initial detection range form an angle with the left edge of the actual detection range, respectively denoted as ∠A and ∠B. The left edge and the right edge of the initial detection range form an angle with the lower edge of the actual detection range, respectively denoted as ∠C and ∠D. Figure 10

[0078] ​In some embodiments, since ∠A and ∠B, and ∠C and ∠D are similar in position to corresponding angles, the absolute values ​​of the angle differences between ∠A and ∠B, and ∠C and ∠D are calculated respectively, and the maximum value among the obtained absolute values ​​of angle differences is used as the second evaluation index.

[0079] In some embodiments, since ∠A and ∠C, and ∠B and ∠D are similar interior alternate angles in position, the absolute values ​​of the angle differences between ∠A and ∠C, and ∠B and ∠D are calculated respectively, and the maximum value among the obtained absolute values ​​of angle differences is used as the second evaluation index.

[0080] The parallelism test result of the substrate in the BGA device under test is obtained based on the first evaluation index and the second evaluation index. The first evaluation index and the second evaluation index each correspond to a preset qualified range. When both are within the corresponding qualified range, the parallelism test result of the substrate is considered qualified; otherwise, the parallelism test result of the substrate is considered unqualified.

[0081] The orthogonality of the substrate refers to the degree of perpendicularity between two adjacent edges of the substrate. In the process of detecting the orthogonality of the substrate in the BGA device under test, the angle values ​​of the four corners of the substrate in the initial detection range are obtained.

[0082] The angle deviation of each corner of the substrate is obtained by comparing the angle value of each corner with the preset angle; the third evaluation index is obtained by comparing the angle deviation of each corner of the substrate; and the orthogonality test result of the substrate in the BGA device under test is obtained by comparing the third evaluation index.

[0083] In this embodiment, the preset angle is 90°, such as Figure 12 As shown in the figure, the initial detection range corresponds to the gray rectangular area. Ideally, the edge of the BGA device's substrate corresponds to the black rectangular area. For any corner of the substrate: calculate the absolute value of the difference between the angle value of the corner and the preset angle to obtain the angle deviation of the corner. Taking the lower right corner in the initial detection range as an example, assuming the angle value of the corner is α, the angle deviation of the corner is |α-90°|. The closer the angle value of the corner is to 90°, the smaller the corresponding angle deviation. At this time, the perpendicularity between the two edges corresponding to the corner is greater, and the stronger the orthogonality of the substrate in the BGA device under test is.

[0084] The maximum value of the angular deviation corresponding to all angles of the base is used as the third evaluation index. When the obtained third evaluation index is less than the preset threshold, the orthogonality test result of the base is considered to be qualified; otherwise, the orthogonality test result of the base is considered to be unqualified.

[0085] According to the actual detection range and the standard distribution parameters, a detection area of each solder ball in the BGA device to be detected is obtained; in this embodiment, the detection area of each solder ball in the actual detection range is determined according to the standard center coordinates of each solder ball in the standard distribution parameters, the standard base length and the standard base width, the standard center coordinates of each solder ball in the standard distribution parameters are converted to the corresponding coordinates of the actual detection range according to the pose transformation relationship matrix H, that is, the standard center coordinates of each solder ball are converted into homogeneous vectors respectively, and then the obtained homogeneous vectors are multiplied by the pose transformation relationship matrix H to obtain the standard center coordinates after pose transformation; and then the actual detection range is divided according to the standard base length and the standard base width, so that the detection area of each solder ball in the actual detection range is obtained, as shown in FIG. 8, the detection area of each solder ball corresponds to one grid area in the actual detection range, and when the solder ball is abnormal, the position of the abnormal solder ball can be quickly determined according to the position of the detection area where the solder ball is located, so as to facilitate subsequent repair. Figure 11 Figure 11 The solder ball spacing detection, the missing ball detection and the position degree detection are performed on the solder balls according to the detection area of each solder ball in the BGA device to be detected.

[0086] The solder ball spacing detection, the missing ball detection and the position degree detection are performed on the solder balls according to the detection area of each solder ball in the BGA device to be detected.

[0087] The solder ball spacing detection, the missing ball detection and the position degree detection are performed on the solder balls according to the detection area of each solder ball in the BGA device to be detected.

[0088] In the missing ball detection according to the detection area of each solder ball in the BGA device to be detected, the solder ball area corresponding to the solder ball area of each detection area is obtained according to the solder ball area of each detection area, and the total number of pixel points in each solder ball area is the solder ball area corresponding to the solder ball area of each detection area; then, the missing ball detection result of each detection area is obtained according to the solder ball area in each detection area and the preset area threshold; if the solder ball area in each detection area is less than the preset area threshold, it is considered that the missing ball detection result of the detection area is missing ball at this time, and since the position of each detection area is known, the position of the missing ball can be quickly located subsequently, and the position is repaired by ball supplementing; otherwise, it is considered that the missing ball detection result of the detection area is not missing ball.

[0089] ​In the ball pitch detection according to the detection area of each tin ball in the BGA device to be detected, the tin ball area corresponding to each detection area and the center of gravity of each tin ball area are obtained; when the real-time angle of the substrate is equal to 0, that is, at this time, the upper and lower edges of the actual detection range of the BGA device to be detected are parallel to the X axis, the center of gravity of each tin ball area is sorted according to the coordinates, that is, first sorted according to the horizontal coordinates from small to large, and for the centers of gravity with the same horizontal coordinates, sorted according to the vertical coordinates from large to small;

[0090] Considering that the upper (lower) edge of the actual detection range may not be parallel to the X axis direction, at this time, the real-time angle of the substrate is not 0, as shown in Figure 13 In this case, the main direction of tin ball distribution in the BGA device to be detected needs to be obtained first; for example, two main directions of tin ball distribution can be obtained according to the center of gravity coordinates of each tin ball area by using a principal component analysis (PCA) algorithm, and then the sorting is performed row by row and column by column along the two main directions.

[0091] For any tin ball area: the tin ball areas in the four-neighborhood of the grid area corresponding to the tin ball area are taken as the adjacent areas of the tin ball area; for example, for the tin ball area in the i-th row and the j-th column, the tin ball areas in the grid areas in the i-1-th row and the j-th column, the i-th row and the j-1-th column, the i-th row and the j+1-th column, and the i+1-th row and the j-th column are taken as the adjacent areas of the tin ball area.

[0092] Then, the ball pitch evaluation index is obtained according to the distance between each tin ball area and its adjacent area; for any tin ball area: the distance between the center of gravity of the tin ball area and the center of gravity of the adjacent tin ball area (adjacent area) is calculated, and the maximum value, the average value or the median value of all the distances obtained is taken as the ball pitch evaluation index.

[0093] The ball pitch detection result of each detection area is obtained according to the ball pitch evaluation index, wherein when the obtained ball pitch evaluation index is within a preset ball pitch range, it is considered that the ball pitch detection result of the detection area is normal; otherwise, it is considered that the ball pitch detection result of the detection area is abnormal.

[0094] The position degree detection refers to the detection of the deviation degree between the actual position of the tin ball on the substrate and the theoretically designed position, and by detecting whether each tin ball is located within the tolerance range of the theoretically designed position, the poor welding caused by the deviation of the tin ball is avoided.

[0095] As shown in Figure 14As shown, the solid circles in the figure represent the actual positions of the solder balls, and the hollow circles represent the theoretically designed positions of the solder balls. A line segment formed by the actual positions of the solder balls in each column (i.e., an actual line segment) and a line segment formed by the theoretically designed positions of the solder balls in the column (a standard line segment) are obtained, and the positional deviation of the column is represented by the distance between the actual line segment and the standard line segment of the corresponding column. The positional degree is obtained according to the positional deviations of each row and each column, and then the positional degree detection result is obtained.

[0096] In the positional degree detection according to the detection regions of each solder ball in the BGA device to be detected, the standard line segment of each row and each column is obtained according to the standard center coordinates of each solder ball;

[0097] When the base standard angle is 0, it indicates that the upper (lower) side edge of the base formed according to the standard distribution parameters is parallel to the X axis (horizontal direction), and at this time, since the standard center coordinates of each solder ball in each row or each column are on a straight line, the standard line segment can be directly obtained. When the base standard angle is not 0, it indicates that the upper (lower) side edge of the base formed according to the standard distribution parameters is not parallel to the X axis, and at this time, straight line fitting needs to be performed according to the standard center coordinates of each solder ball in each row or each column to obtain the standard line segment of each row and each column.

[0098] The actual line segment of each row and each column in the actual detection range is obtained according to the center of gravity of each solder ball region in the actual detection range. In this embodiment, straight line fitting is performed on the center of gravity of all solder ball regions in each row or each column to obtain the actual line segment of the row or the column, and then each row and each column in the actual detection range of the BGA device to be detected corresponds to an actual line segment.

[0099] For any standard line segment, the endpoint coordinates of the standard line segment are obtained, which are actually the standard center coordinates of the first solder ball and the last solder ball in the corresponding row or column of the standard line segment. Then, the actual line segment corresponding to the standard line segment is obtained according to the corresponding row or column of the standard line segment. If the standard line segment corresponds to the kth row, the actual line segment corresponding to the standard line segment is the actual line segment corresponding to the kth row in the actual detection range.

[0100] The endpoint coordinates of the standard line segment are further transformed according to the standard distribution parameters to obtain the transformed endpoint coordinates of the standard line segment. The pose transformation relationship matrix H is generated according to the standard distribution parameters. Each endpoint coordinate of the standard line segment is converted into a homogeneous vector, and the homogeneous vector is multiplied by the pose transformation relationship matrix H to obtain the transformed endpoint coordinates of the standard line segment.

[0101] According to the distance between the end point coordinate of the standard line segment after the coordinate transformation and the actual line segment corresponding to the standard line segment, the obtained distance is taken as the position deviation corresponding to the standard line segment;

[0102] According to the position deviations corresponding to all standard line segments, a position degree detection result is obtained, wherein the maximum position deviation is taken as the position degree, and when the obtained position degree is within a preset position deviation range, it is considered that the position degree detection result of the to-be-tested BGA device is normal, otherwise it is considered that the position degree detection result of the to-be-tested BGA device is abnormal.

[0103] The embodiment first obtains the real-time image of the to-be-tested BGA device, and quickly extracts the initial detection range of the to-be-tested BGA device by setting a preselected area; then, the initial detection range and the standard distribution parameters are in the same coordinate system through the posture transformation relationship matrix, and then the actual detection range of the to-be-tested BGA device is obtained; and the parallelism and orthogonality of the base are detected according to the coordinates and angles of the four corners of the base before and after the posture transformation; the detection area of each solder ball in the actual detection range is determined according to the standard center coordinates of each solder ball in the standard distribution parameters, and the solder ball area in each detection area is extracted, and the detection of the missing ball, the ball spacing and the position degree is performed according to the area and the center of gravity of each solder ball area, so as to realize the automatic detection of the two-dimensional geometric tolerance of the BGA device, and improve the accuracy and stability of the detection result of the to-be-tested BGA device; based on the detection area of each solder ball, the rapid division of the solder balls in the to-be-tested BGA device and the rapid positioning of the subsequent abnormal solder balls can be realized, so that the method in the embodiment is simpler and more efficient.

[0104] In some embodiments, the detection system of the BGA device can be used for detecting the base and the solder balls of the BGA device, and in this case, the detection system can also be referred to as a base and solder ball detection system of the BGA device.

[0105] For reference Figure 2 In some embodiments, a base and solder ball detection system of a BGA device is provided, which includes the following system modules:

[0106] The data acquisition module 200 is configured to obtain the real-time image of the to-be-tested BGA device;

[0107] The initial detection range acquisition module 210 is configured to obtain the initial detection range of the to-be-tested BGA device according to the real-time image of the to-be-tested BGA device;

[0108] The actual detection range acquisition module 220 is configured to acquire the center coordinate of the substrate in the BGA device under test and the real-time angle according to the initial detection range; acquire the standard distribution parameter; and obtain the actual detection range of the BGA device under test according to the standard distribution parameter, the center coordinate of the substrate in the BGA device under test and the real-time angle.

[0109] The substrate and solder ball detection module 230 is configured to detect the substrate and solder ball of the BGA device under test according to the actual detection range of the BGA device under test, wherein the parallelism and orthogonality of the substrate in the BGA device under test are detected according to the initial detection range and the actual detection range.

[0110] The detection area of each solder ball in the BGA device under test is obtained according to the actual detection range and the standard distribution parameter.

[0111] The solder ball is detected for the inter-ball spacing, the missing ball and the position degree according to the detection area of each solder ball in the BGA device under test.

[0112] It should be noted that each system module in the embodiment corresponds to the method steps in the above-described substrate and solder ball detection method of the BGA device, and the specific implementation manner has been described in the above embodiment, which will not be described here again.

[0113] In some embodiments, the detection method of the BGA device can also be used to detect the surface defects of the solder ball in the BGA device, in which case, the detection method can also be referred to as a BGA solder ball surface defect detection method.

[0114] For reference Figure 3 In some embodiments, a BGA solder ball surface defect detection method is provided, which includes the following steps:

[0115] Step S300: acquiring a real-time image of a BGA device under test.

[0116] Step S310: obtaining an initial detection range of the BGA device under test according to the real-time image of the BGA device under test.

[0117] Step S320: acquiring the center coordinate of the substrate in the BGA device under test and the real-time angle according to the initial detection range, and obtaining the actual detection range of the BGA device under test in combination with the standard distribution parameter.

[0118] It should be noted that the steps S300-S320 of the embodiment are consistent with the methods in steps S100-S120 of the above-described substrate and solder ball detection method of the BGA device, and the specific implementation manner has been described in the above embodiment, which will not be described here again.

[0119] Step S330: obtaining the detection area of each solder ball in the BGA device to be tested according to the actual detection range of the BGA device to be tested.

[0120] The detection area of each solder ball in the BGA device to be tested is obtained according to the actual detection range and the standard distribution parameters; wherein the detection area of each solder ball in the actual detection range is determined according to the standard center coordinates of each solder ball in the standard distribution parameters, the standard base length and the standard base width.

[0121] Step S340: obtaining a plurality of regions of interest in the detection area of each solder ball.

[0122] According to the gray level change of the surface of the solder ball and the gray level of the base, three regions of interest can be extracted in the detection area of each solder ball, as shown in FIG. 3, wherein the three annular regions in the figure correspond to the inner solder ball region, the middle solder ball region and the outer solder ball region in order from inside to outside, and wherein the solder ball region in each detection area includes the inner solder ball region and the middle solder ball region. Figure 15

[0123] In this embodiment, the center point of each solder ball is taken as the starting point, and the segmentation is performed in the radial direction according to the preset ratio range, thereby obtaining a plurality of regions of interest of the solder ball. In this embodiment, the solder ball region extraction is first performed on the detection area of each solder ball to obtain the corresponding solder ball region of each detection area; in this embodiment, the binaryzation processing is performed on the detection area of each solder ball, and the pixel value corresponding to the pixel point belonging to the solder ball in the binaryzation processing result is 255, at this time, the region formed by the pixel points with pixel value 255 in the detection area is the solder ball region in the detection area; then the edge detection is performed on the solder ball region to obtain the solder ball edge point of the solder ball region, and the circular fitting is performed according to all the solder ball edge points, for example, the circular fitting is performed through the Hough circle detection, thereby obtaining the center point and the radius R of the solder ball.

[0124] Since the types of defects appearing in different regions of the solder ball are different, for example, burrs are prone to appear in the outer solder ball region, solder ball deformation such as concave, convex and the like is prone to appear in the middle solder ball region, and scratches are prone to appear in the inner solder ball region, therefore, in this embodiment, the solder ball is divided into different regions of interest based on the radius of the solder ball and the preset different ratio range, thereby performing different types of defect detection on different regions of interest.

[0125] ​The radius R of the tin ball is the whole 1, the center point of the tin ball is 0, the ratio range corresponding to the inner tin ball region is [0, 0.6], the start ratio and the end ratio of the inner tin ball region are in the ratio range; the ratio range corresponding to the middle tin ball region is [0.4, 1.0], the start ratio and the end ratio of the middle tin ball region are in the ratio range; and the ratio range corresponding to the outer tin ball region is [1.0, 1.5], the start ratio and the end ratio of the outer tin ball region are in the ratio range.

[0126] That is, each region of interest corresponds to a ratio range, and the start ratio and the end ratio of the region of interest are determined according to the ratio range, that is, the start ratio and the end ratio of each region of interest are selected in the ratio range, and the start ratio of each region of interest is less than the end ratio of the region of interest.

[0127] In Figure 15 , the inner tin ball region is a circular ring region formed by the radius corresponding to the A point to the B point, wherein the A point is a point on the start radius determined according to the start ratio of the inner tin ball region, the B point is a point on the end radius determined according to the end ratio of the inner tin ball region, the positions of the A point and the B point are determined according to the ratio range of the inner tin ball region, for example, when the ratio corresponding to the A point is 0 and the ratio corresponding to the B point is 0.4, the inner tin ball region is a circular ring region with a radius ranging from 0 to 0.4R; the middle tin ball region is a circular ring region formed by the radius corresponding to the C point to the D point, wherein the C point is a point on the start radius determined according to the start ratio of the middle tin ball region, and the D point is a point on the end radius determined according to the end ratio of the middle tin ball region; and the outer tin ball region is a circular ring region formed by the radius corresponding to the E point to the F point, wherein the E point is a point on the start radius determined according to the start ratio of the outer tin ball region, and the F point is a point on the end radius determined according to the end ratio of the outer tin ball region.

[0128] Preferably, the inner tin ball region and the middle tin ball region do not overlap, and in this case, the end ratio corresponding to the inner tin ball region is less than or equal to the start ratio of the middle tin ball region.

[0129] Step S350: tin ball defect detection is performed on each tin ball according to the region of interest corresponding to the tin ball.

[0130] The tin ball defect detection in this embodiment includes contrast detection and tin ball quality detection.

[0131] In the process of contrast detection, a representative point of each region of interest is obtained, and the contrast detection is performed according to the representative point of each region of interest to obtain a contrast detection result. The gray value of the representative point is used to represent the overall gray value of the region of interest and the overall quality of the solder ball, and can be used to detect whether the solder ball is lusterless, the color is normal (e.g. gray), and whether the solder ball is oxidized or broken.

[0132] In this embodiment, different ratios are set based on the radius R of the solder ball, so that a pixel point in each region of interest is obtained as a representative point of the region of interest. In this embodiment, the representative point in the outer solder ball region is referred to as an outer point, the representative point in the middle solder ball region is referred to as a middle point, and the representative point in the inner solder ball region is referred to as an inner point. The ratio corresponding to the outer point is usually greater than 1, the ratio corresponding to the outer point is greater than the ratio corresponding to the middle point, and the ratio corresponding to the middle point is greater than the ratio corresponding to the inner point.

[0133] For example, the ratios corresponding to the outer point, the middle point and the inner point can be 1.2, 0.8 and 0.5 respectively. Taking the outer point as an example, the method for obtaining the outer point is as follows: a pixel point is randomly obtained as the outer point on the circumference of a circle with the center point of the solder ball as the center and the radius of 1.2R, and the gray value of the pixel point is read, thereby obtaining the gray value of the outer point.

[0134] A group of pixel pairs is generated from the representative points of each adjacent two regions of interest. In this embodiment, the pixel pair generated from the representative points of the inner solder ball region and the middle solder ball region is referred to as an internal pair, and the pixel pair generated from the representative points of the middle solder ball region and the outer solder ball region is referred to as an external pair. The contrast of each group of pixel pairs is obtained according to the gray value of each representative point in the group of pixel pairs. The contrast detection result is obtained according to the contrast of all pixel pairs.

[0135] Since the normal solder ball will have obvious highlight and shadow regions due to different light reflection angles, the surface of the lusterless and oxidized solder ball has weak light reflection ability, and the overall gray value in the gray image is relatively stable. After the solder ball is broken, the broken part will cause the originally relatively uniform gray value of the solder ball to change abruptly, thereby causing the contrast between different regions of interest to be abnormal. Therefore, whether the contrast of the solder ball is abnormal can be judged according to the gray difference between the representative points in the internal pair and the external pair.

[0136] For example, the absolute value of the difference between the gray values corresponding to the two representative points in each group of pixel pairs is calculated, and the obtained absolute value is taken as the contrast of the group of pixel pairs. Then, the contrast corresponding to all pixel pairs (internal pairs and external pairs) is taken as a contrast evaluation index. When all the obtained contrast evaluation indexes are within a preset contrast range, it is considered that the contrast detection result is qualified, otherwise it is considered that the contrast detection result is unqualified.

[0137] Different from the representative point-based contrast detection, the solder ball quality detection mainly aims at the solder ball with external scratch or slight damage, and detects the solder ball quality by performing pixel-by-pixel analysis on each region of interest.

[0138] In the process of the solder ball quality detection, for any region of interest in each solder ball region: obtaining the defective pixel points in the region of interest, wherein the initial end radius and the terminal end radius of the region of interest are obtained according to the radius of the solder ball, the initial end ratio and the terminal end ratio of the region of interest, i.e., the product of the initial end ratio of the region of interest and the radius of the solder ball is taken as the initial end radius of the region of interest, and the product of the terminal end ratio of the region of interest and the radius of the solder ball is taken as the terminal end radius of the region of interest.

[0139] According to the gray value of each pixel point in the terminal end radius of the region of interest, an average gray value is obtained; wherein a first gray accumulation sum is obtained according to the gray value of each pixel point in the terminal end radius of the region of interest, and the average gray value is obtained according to the first gray accumulation sum and the total number of all pixel points in the terminal end radius of the region of interest. In this embodiment, the gray values of all pixel points in the terminal end radius of the region of interest are sorted in descending order, and the first gray accumulation sum is obtained according to the gray values corresponding to the pixel points of a preset proportion in the sorting result, wherein the preset proportion can be set to 50%, i.e., the first gray accumulation sum G1 is obtained by adding the gray values corresponding to the first 50% of the pixel points in the sorting result. Then, the total number G2 of pixel points in the terminal end radius of the region of interest is obtained, and the average gray value is obtained by taking the ratio between the first gray accumulation sum and 1 / 2 of the total number G2, i.e., the ratio between G1 and G2 / 2.

[0140] According to the gray value of each pixel point in the terminal end radius of the region of interest, an average gray value is obtained; wherein a first gray accumulation sum is obtained according to the gray value of each pixel point in the terminal end radius of the region of interest, and the average gray value is obtained according to the first gray accumulation sum and the total number of all pixel points in the terminal end radius of the region of interest. In this embodiment, the gray values of all pixel points in the terminal end radius of the region of interest are sorted in descending order, and the first gray accumulation sum is obtained according to the gray values corresponding to the pixel points of a preset proportion in the sorting result, wherein the preset proportion can be set to 50%, i.e., the first gray accumulation sum G1 is obtained by adding the gray values corresponding to the first 50% of the pixel points in the sorting result. Then, the total number G2 of pixel points in the terminal end radius of the region of interest is obtained, and the average gray value is obtained by taking the ratio between the first gray accumulation sum and 1 / 2 of the total number G2, i.e., the ratio between G1 and G2 / 2.

[0141] It should be noted that, in order to realize the fast positioning of the defective pixel points, when the defective pixel points are judged, the pixels on the end radius of the region of interest can be scanned to the pixels on the start radius along the radial direction; and since only the pixels on the radial direction need to be judged, the calculation amount can be further reduced and the detection efficiency can be improved.

[0142] Exemplarily, the entire solder ball region is divided into 360 angle directions on the circumference every 1°, each direction corresponding to a radial direction; in any radial direction in the current region of interest: the pixel on the end radius of the region of interest and located in the radial direction is obtained, and then the pixel points are traversed along the radial direction from the pixel, and the defective pixel points of each pixel traversed are judged.

[0143] Finally, the solder ball quality tolerance of the region of interest is obtained according to the total number of pixels in the region of interest and the number of defective pixels in the region of interest; and the solder ball quality detection result is obtained according to the solder ball quality tolerances of all the regions of interest.

[0144] Exemplarily, the difference between the total number of pixels in the region of interest and the number of defective pixels in the region of interest is calculated to obtain the total number of normal pixels in the region of interest; the ratio between the obtained difference and the total number of pixels in the region of interest is taken as the solder ball quality tolerance of the region of interest; when the solder ball quality tolerances of all the regions of interest are within the preset tolerance range, the solder ball quality detection result of the solder ball is qualified; otherwise, the solder ball quality detection result of the solder ball is unqualified. The preset tolerance range can be set by the user, and the preset tolerance range in the embodiment is 80% to 100%.

[0145] The embodiment is based on the gray scale change of each tin ball in the detection area of the tin ball to be detected, and divides the tin ball into different regions of interest. In combination with the characteristics that normal tin balls will have obvious highlights and shadow regions due to different light reflection angles, the representative points of each region of interest are obtained, the contrast between the representative points of each adjacent two regions of interest is taken as a contrast evaluation index, the contrast detection result of the tin ball is obtained, and the defects such as tin ball oxidation, crushing and dullness are detected. Then, the average gray scale values of different regions of interest are obtained, the average gray scale values of each region of interest are used for radial search in the region of interest, and the bad pixel points in the region of interest are quickly and efficiently located. Then, the tin ball quality tolerance of each region of interest is obtained according to the number of bad pixel points in each region of interest, and the tin ball quality detection result of each tin ball is obtained. By dividing each tin ball into multiple regions of interest and extracting the representative points in each region of interest and identifying the bad pixel points, multiple defects on the surface of the tin ball in the BGA device to be detected are quickly and accurately detected.

[0146] In some embodiments, the detection system of the BGA device can also be used for detecting the surface defects of the tin ball in the BGA device, and in this case, the detection system can also be referred to as a BGA tin ball surface defect detection system.

[0147] For reference Figure 4 In some embodiments, a BGA tin ball surface defect detection system is provided, which includes the following modules:

[0148] The data acquisition module 400 is used to obtain the real-time image of the BGA device to be detected.

[0149] The initial detection range acquisition module 410 is used to obtain the initial detection range of the BGA device to be detected according to the real-time image of the BGA device to be detected.

[0150] The actual detection range acquisition module 420 is used to obtain the center coordinates of the substrate in the BGA device to be detected and the real-time angle according to the initial detection range, and obtain the actual detection range of the BGA device to be detected according to the center coordinates of the substrate in the BGA device to be detected and the real-time angle.

[0151] The tin ball detection area extraction module 430 is used to obtain the detection area of each tin ball in the BGA device to be detected according to the actual detection range of the BGA device to be detected.

[0152] The region of interest acquisition module 440 is used to obtain multiple regions of interest in the detection area of each tin ball.

[0153] The tin ball surface defect detection module 450 is configured to perform tin ball defect detection on each tin ball according to the region of interest corresponding to the tin ball. In this embodiment, the tin ball defect detection includes contrast detection and tin ball quality detection.

[0154] The tin ball surface defect detection module 450 is configured to perform tin ball defect detection on each tin ball according to the region of interest corresponding to the tin ball. In this embodiment, the tin ball defect detection includes contrast detection and tin ball quality detection.

[0155] For each region of interest of each tin ball, the tin ball surface defect detection module 450 is configured to obtain defective pixel points in the region of interest, obtain a tin ball quality tolerance of the region of interest according to a total number of pixel points in the region of interest and a number of defective pixel points in the region of interest, and obtain a tin ball quality detection result according to tin ball quality tolerances of all regions of interest.

[0156] It should be noted that the various system modules in this embodiment correspond to the method steps in the above-described BGA tin ball surface defect detection method, and the specific implementation manner has been described in the above-described embodiment, which will not be described here again.

[0157] In some embodiments, the BGA device detection method can also be used for three-dimensional defect detection of the BGA device, in which case the detection method can also be referred to as a BGA device three-dimensional defect detection method.

[0158] For reference Figure 5 In some embodiments, a BGA device three-dimensional defect detection method is provided, which includes the following steps:

[0159] Step S500: Obtain three-dimensional information of a BGA device to be detected.

[0160] The three-dimensional camera is used to capture images of the BGA device to be detected on the pipeline to obtain three-dimensional information of the BGA device to be detected, wherein the three-dimensional information of the BGA device to be detected includes a gray-scale image and a depth image of the BGA device to be detected, i.e., each pixel point corresponds to a gray-scale value and a depth value.

[0161] In this embodiment, the plane corresponding to the working distance of the three-dimensional camera is the zero plane, the absolute value of the depth value of each pixel point is the distance between the pixel point and the zero plane, and if the pixel point is above the zero plane, the depth value of the pixel point is positive; if the pixel point is below the zero plane, the depth value of the pixel point is negative.

[0162] Step S510: Obtain an initial detection range of the BGA device to be detected according to the obtained gray-scale image.

[0163] Respectively set a preselected area on each edge of the substrate, and for any one preselected area: perform edge detection on the preselected area by an edge detection algorithm to obtain substrate edge points in the preselected area; and then perform straight line fitting according to all substrate edge points in the preselected area, and for example, the straight line fitting can be performed by a least square method to obtain a straight line corresponding to the preselected area.

[0164] Obtain the intersection of straight lines corresponding to all preselected areas, and the obtained intersection is four corner points of the substrate in the BGA device to be measured; and the area surrounded by straight lines corresponding to all preselected areas is taken as an initial detection range of the BGA device to be measured.

[0165] Step S520: Obtain the center coordinates and real-time angle of the substrate in the BGA device to be measured according to the initial detection range, and further obtain an actual detection range of the BGA device to be measured.

[0166] The step S520 is the same as the method in step S120 in the above-mentioned BGA device substrate and solder ball detection method, and the specific implementation manner has been specifically described in the above-mentioned embodiment, which will not be described here again.

[0167] Step S530: Perform three-dimensional defect detection on the BGA device to be measured according to the actual detection range of the BGA device to be measured.

[0168] The three-dimensional defect detection in this embodiment includes ball height detection, coplanarity detection and warpage detection.

[0169] In the process of performing ball height detection on the BGA device to be measured, each solder ball region in the BGA device to be measured is obtained according to the actual detection range of the BGA device to be measured; in this embodiment, the detection region of each solder ball in the actual detection range is determined according to the standard center coordinates of each solder ball in the standard distribution parameters, the standard length of the substrate and the standard width of the substrate; each detection region is subjected to binaryzation processing, and the pixel value corresponding to the pixel point belonging to the solder ball in the obtained binaryzation processing result is 255, so that the region formed by the pixel point with the pixel value of 255 in the detection region is the solder ball region in the detection region, thereby realizing extraction of the solder ball region from each detection region.

[0170] Then, the ball height detection result of each solder ball is obtained according to each solder ball region in the BGA device to be measured and the reference plane;

[0171] In this embodiment, the depth value corresponding to the reference plane and the nominal height are obtained first, and the nominal height of the reference plane is the height of the solder ball under normal circumstances.

[0172] For any one solder ball region in the BGA device to be tested: obtain the depth value corresponding to each pixel point of the solder ball region in the depth image, obtain the maximum depth value of the solder ball region, and the pixel point corresponding to the maximum depth value is the highest point of the solder ball; obtain the relative height of the solder ball in the solder ball region according to the maximum depth value of the solder ball region and the depth value corresponding to the reference plane, and the difference between the depth value corresponding to the reference plane and the maximum depth value of the solder ball region is calculated as the relative height of the solder ball in the solder ball region.

[0173] Then, the ball height detection result of the solder ball is obtained according to the nominal height and the relative height of the solder ball in the solder ball region, that is, the nominal height and the relative height are added, and the addition result is the ball height of the solder ball; if the ball height of the solder ball is within the preset ball height range, the ball height detection result of the solder ball is qualified; otherwise, the ball height detection result of the solder ball is unqualified.

[0174] According to the ball height detection result of each solder ball, the coplanarity detection result of the BGA device to be tested is obtained; in this embodiment, the ball height corresponding to each solder ball region is obtained, and the maximum ball height and the minimum ball height of the BGA device to be tested are obtained; the height difference is obtained according to the absolute value of the difference between the maximum ball height and the minimum ball height, and the coplanarity detection result of the BGA device to be tested is obtained according to the obtained height difference; in this embodiment, the obtained height difference or twice the obtained height difference is taken as the coplanarity evaluation index; when the coplanarity evaluation index is within the preset coplanarity range, it is considered that the coplanarity detection result of the current BGA device to be tested is qualified, otherwise it is considered that the coplanarity detection result of the current BGA device to be tested is unqualified.

[0175] In the process of detecting the warpage of the BGA device to be tested, first, the actual base edge is obtained according to the actual detection range of the BGA device to be tested.

[0176] In some embodiments, the initial base edge is obtained according to the initial detection range of the BGA device to be tested; then, the actual base edge is obtained according to the actual detection range of the BGA device to be tested and the initial base edge;

[0177] In the process of obtaining the initial detection range, the base edge points in each preselected area and the four corner points of the base are obtained, and the base edge points are actually part of the edge of the base in the BGA device to be tested, which are recorded as the initial base edge;

[0178] For example, the edge detection is performed on the actual detection range of the BGA device to be tested, and all edge points in the BGA device to be tested are obtained; and the edge search is performed based on the edge points in each preselected area;

[0179] Taking the preselected region corresponding to the upper side edge of the substrate as an example, it is assumed that the edge points in the preselected region corresponding to the upper side edge of the substrate form an edge set; for an edge point P in the preselected region, edge searching is performed based on the edge point, i.e., it is determined whether an edge point Q in the eight-neighbor domain of the edge point P belongs to the edge set, if the edge point Q is not a corner point of the substrate and does not belong to the edge set, the edge point Q is added to the edge set; if the edge point Q belongs to the edge set, it is determined whether an edge point in the eight-neighbor domain of the edge point Q belongs to the edge set, if the edge point Q is a corner point of the substrate, the edge searching is stopped, and the edge set obtained finally is the complete upper side edge of the substrate in the BGA device to be measured. In the embodiment, all the edge points in the edge set are recorded as first-type edge points.

[0180] The edge sets corresponding to the lower side, the left side and the right side edges of the substrate in the BGA device to be measured are obtained respectively, and the obtained edge sets are recorded as second-type pixel points, third-type pixel points and fourth-type pixel points respectively, so as to obtain the actual substrate edges.

[0181] In some embodiments, a plurality of preset regions of interest in the actual detection range of the BGA device to be measured are obtained; a plurality of gray scale conversion maps are obtained according to the depth values of the pixel points in each preset region of interest; and edge pixel points are extracted according to each gray scale conversion map, so as to obtain the actual substrate edges.

[0182] In the embodiment, one preset region of interest is arranged on each of the four edges of the substrate in the actual detection range. Since the BGA device to be measured is placed in the groove on the carrier, there is a gap between the edge of the BGA device to be measured and the edge of the groove, which causes a sudden change in the depth, so the edge extraction can also be performed according to the depth change of the pixel points in the preset region of interest.

[0183] For example, for any preset region of interest, the depth values of the pixel points in the preset region of interest are obtained, and the maximum depth value and the minimum depth value are obtained; the depth values of the pixel points in the preset region of interest are mapped to the range of 0 to 255 according to the obtained maximum depth value and the minimum depth value, so as to convert the depth values of the pixel points in the preset region of interest into gray scale values, and a gray scale conversion map corresponding to the preset region of interest is obtained; edge detection is performed on the obtained gray scale conversion map, so as to obtain the edge points in the preset region of interest; and then edge searching is performed according to the four corner points of the substrate and the edge points in the preset region of interest, so as to obtain the actual substrate edges.

[0184] For example, taking the process of obtaining the first-type pixel points as an example, as shown in FIG. 2, the maximum depth value and the minimum depth value of the pixel points in the preset region of interest are obtained, and the depth values of the pixel points in the preset region of interest are mapped to the range of 0 to 255 according to the obtained maximum depth value and the minimum depth value, so as to convert the depth values of the pixel points in the preset region of interest into gray scale values, and a gray scale conversion map corresponding to the preset region of interest is obtained. Figure 16As shown, the rectangular region in the figure is a preset region of interest corresponding to the upper side edge of the substrate in the BGA device to be measured. A gray scale conversion map is obtained according to the depth values of each pixel point in the preset region of interest. Edge detection is performed on the gray scale conversion map, and edge searching is performed according to the obtained edge points, and the searching is stopped when two corner points of the substrate are searched, thereby obtaining the edge points corresponding to the upper side edge of the substrate in the BGA device to be measured, i.e., all the edge points obtained at this time are the first type of pixel points. By analogy, the second type of pixel points, the third type of pixel points and the fourth type of pixel points are obtained according to the preset regions of interest corresponding to the lower side edge, the left side edge and the right side edge of the substrate in the BGA device to be measured.

[0185] That is, the actual substrate edge at this time also includes the first type of pixel points, the second type of pixel points, the third type of pixel points and the fourth type of pixel points, and the first type of pixel points, the second type of pixel points, the third type of pixel points and the fourth type of pixel points correspond to the upper side edge, the lower side edge, the left side edge and the right side edge of the substrate in the BGA device to be measured respectively.

[0186] Then, the warping degree detection result is obtained according to the coordinates of each pixel point in the actual substrate edge and the reference plane. Taking the first type of pixel points as an example, the distance between the coordinates of the first type of pixel points in the actual substrate edge and the reference plane is obtained, and the maximum distance and the minimum distance are recorded as the first maximum distance and the first minimum distance. Then, the first height difference is obtained according to the first maximum distance and the first minimum distance, wherein the difference between the first maximum distance and the first minimum distance is taken as the first height difference.

[0187] The distance between the coordinates of the second type of pixel points in the actual substrate edge and the reference plane is obtained, and the second maximum distance and the second minimum distance are obtained. The second height difference is obtained according to the second maximum distance and the second minimum distance. The distance between the coordinates of the third type of pixel points in the actual substrate edge and the reference plane is obtained, and the third maximum distance and the third minimum distance are obtained. The third height difference is obtained according to the third maximum distance and the third minimum distance. The distance between the coordinates of the fourth type of pixel points in the actual substrate edge and the reference plane is obtained, and the fourth maximum distance and the fourth minimum distance are obtained. The fourth height difference is obtained according to the fourth maximum distance and the fourth minimum distance.

[0188] The warpage detection result is obtained based on the first height difference, the second height difference, the third height difference, and the fourth height difference. Specifically, the first X-direction warpage is obtained based on the first and second height differences; in this embodiment, the maximum value of the first and second height differences is taken as the first X-direction warpage, thus obtaining the degree of warpage of the BGA device under test in the X direction. The first Y-direction warpage is obtained based on the third and fourth height differences; that is, the maximum value of the third and fourth height differences is taken as the first Y-direction warpage, thus obtaining the degree of warpage of the BGA device under test in the Y direction. The warpage detection result is obtained based on the first X-direction warpage and the first Y-direction warpage; in this embodiment, the sum of the first X-direction warpage and the first Y-direction warpage is used as the warpage evaluation index to evaluate the overall warpage degree of the BGA device under test. When the obtained warpage evaluation index is within a preset warpage range, the warpage detection result is considered qualified; otherwise, the warpage detection result is considered unqualified.

[0189] In some embodiments, the actual detection range of the BGA device under test can be divided into multiple sub-regions, wherein the region division method can be set according to the actual situation; the average solder ball height of each sub-region is obtained based on the ball height of all solder balls in each sub-region. At this time, the average solder ball height of the sub-region is the average value of the corresponding ball height of all solder balls in the sub-region; and then the warpage detection result is obtained based on the average solder ball height of each sub-region.

[0190] For example, such as Figure 17 As shown, the actual detection range of the BGA device under test is divided into 9 sub-regions. The average height of all solder balls in each sub-region is calculated to obtain the average solder ball height of that sub-region. The maximum and minimum values ​​of the average solder ball heights of all sub-regions are obtained to obtain the maximum and minimum average solder ball heights. The warpage detection result is obtained based on the maximum and minimum average solder ball heights. The difference between the maximum and minimum average solder ball heights is used as the warpage evaluation index. When the obtained warpage evaluation index is within the preset warpage range, the warpage detection result is considered qualified; otherwise, the warpage detection result is considered unqualified.

[0191] In some embodiments, the actual detection range of the BGA device under test is divided into multiple sub-regions; the sub-region where the center coordinates of the substrate are located is used as the base sub-region; then, the second X-direction warp is obtained based on the average solder ball height of the base sub-region and the average solder ball height of the corresponding sub-region in the X direction; the second Y-direction warp is obtained based on the average solder ball height of the base sub-region and the average solder ball height of the corresponding sub-region in the Y direction; and the warp degree detection result is obtained based on the second X-direction warp and the second Y-direction warp.

[0192] For example, inFigure 17 In some embodiments, the base sub-region is the 5th sub-region (Region 5), all sub-regions in the X direction of the base sub-region, i.e., the 4th sub-region (Region 4) and the 6th sub-region (Region 6), are obtained, the absolute value of the difference between the average solder ball height of each sub-region obtained by calculation and the average solder ball height of the base sub-region is calculated, and the maximum value among all the absolute values obtained is taken as the second X direction warpage; then, all sub-regions in the Y direction of the base sub-region, i.e., the 2nd sub-region (Region 2) and the 8th sub-region (Region 8), are obtained, the absolute value of the difference between the average solder ball height of each sub-region obtained by calculation and the average solder ball height of the base sub-region is calculated, and the maximum value among all the absolute values obtained is taken as the second Y direction warpage; finally, the sum of the second X direction warpage and the second Y direction warpage is taken as the warpage evaluation index.

[0193] When the obtained warpage evaluation index is within the preset warpage range, the warpage detection result is considered to be qualified, otherwise, the warpage detection result is considered to be unqualified.

[0194] In this embodiment, the three-dimensional information of the BGA device to be measured is obtained, the gray scale image and the depth image of the BGA device to be measured are obtained, and the ball height of each solder ball is obtained based on the reference plane and the depth value of each solder ball in the BGA device to be measured, and the ball height detection result is obtained; the coplanarity detection is performed based on the ball height of each solder ball, and the coplanarity detection result is obtained; when the warpage degree is detected, the warpage degree of the BGA device to be measured in the X direction and the Y direction is obtained according to the actual base edge, and then the overall warpage degree of the BGA device to be measured is evaluated; or the entire BGA device to be measured is divided into regions, the warpage evaluation index is obtained according to the average solder ball height of different sub-regions, and the warpage detection result is obtained; the three-dimensional geometric tolerance of the BGA device to be measured is detected based on the three-dimensional information of each pixel point in the BGA device to be measured, which is more rapid, simple and efficient.

[0195] In some embodiments, the detection system of the BGA device can also be used for three-dimensional defect detection of the BGA device, and in this case, the detection system can also be referred to as a BGA device three-dimensional defect detection system.

[0196] For reference Figure 6 In some embodiments, a BGA device three-dimensional defect detection system is provided, which includes the following modules:

[0197] The data acquisition module 600 is used to obtain the three-dimensional information of the BGA device to be measured, and the three-dimensional information includes the gray scale image and the depth image of the BGA device to be measured;

[0198] The initial detection range acquisition module 610 is configured to obtain an initial detection range of the BGA device to be detected according to the gray-scale image.

[0199] The actual detection range acquisition module 620 is configured to obtain a center coordinate of a substrate and a real-time angle in the BGA device to be detected according to the initial detection range, and obtain an actual detection range of the BGA device to be detected according to the center coordinate of the substrate and the real-time angle in the BGA device to be detected.

[0200] The three-dimensional defect detection module 630 is configured to perform three-dimensional defect detection on the BGA device to be detected according to the actual detection range of the BGA device to be detected, and the three-dimensional defect detection includes ball height detection, coplanarity detection and warpage detection.

[0201] According to the actual detection range of the BGA device to be detected, each tin ball region in the BGA device to be detected is obtained, and according to each tin ball region in the BGA device to be detected and the reference plane, a ball height detection result of each tin ball is obtained.

[0202] According to the ball height detection result of each tin ball, a coplanarity detection result of the BGA device to be detected is obtained.

[0203] According to the actual detection range of the BGA device to be detected, an actual substrate edge is obtained, and according to the coordinates of each pixel point in the actual substrate edge and the reference plane, a warpage detection result is obtained, or the actual detection range of the BGA device to be detected is regionally divided to obtain a plurality of sub-regions, according to the ball height detection result of all tin balls in each sub-region, an average tin ball height of each sub-region is obtained, and according to the average tin ball height of each sub-region, a warpage detection result is obtained.

[0204] It should be noted that the various system modules in the embodiment correspond to the method steps in the BGA device three-dimensional defect detection method described above, and the specific implementation manner has been specifically described in the above embodiment, which will not be described here.

[0205] The application realizes real-time data acquisition of the BGA device to be detected by two-dimensional cameras and three-dimensional cameras, calculates different evaluation indexes based on the obtained two-dimensional gray-scale information and three-dimensional information, comprehensively analyzes the two-dimensional geometric tolerance of the substrate and tin ball of the BGA device to be detected, the surface defects of the tin ball and the three-dimensional geometric tolerance, realizes comprehensive detection of multiple defects in different dimensions, effectively improves the accuracy and stability of the detection result by calculating multiple indexes of a single defect type, and further realizes effective classification and analysis of defects on the basis of realizing real-time online detection of the BGA device to be detected, which is helpful to guide the repair link of subsequent processes and can better meet the automatic detection needs in the actual production process.

[0206] Those skilled in the art can understand that all or part of the functions of various methods in the above embodiments can be realized by hardware or by a computer program. When all or part of the functions in the above embodiments are realized by a computer program, the program can be stored in a computer readable storage medium, which can include a read-only memory, a random access memory, a magnetic disk, an optical disk, a hard disk, and the like. The above functions are realized by executing the program by a computer. For example, the program is stored in a memory of a device, and the above functions are realized by executing the program in the memory by a processor. In addition, when all or part of the functions in the above embodiments are realized by a computer program, the program can also be stored in a storage medium such as a server, another computer, a disk, an optical disk, a flash disk, or a mobile hard disk, and is saved in a memory of a local device by downloading or copying, or the system of the local device is updated, and the above functions are realized by executing the program in the memory by a processor.

[0207] The above application of specific examples to the present application is described, which is only used to help understand the present application and does not limit the present application. For those skilled in the art, according to the idea of the present application, a number of simple deductions, deformations or substitutions can be made.

Claims

1. A method for detecting BGA devices, the method being used to detect three-dimensional defects in BGA devices, characterized in that, The detection method comprises: acquiring three-dimensional information of a BGA device to be detected, the three-dimensional information comprising a gray-scale image and a depth image of the BGA device to be detected; obtaining an initial detection range of the BGA device to be detected according to the gray-scale image; acquiring a center coordinate and a real-time angle of a substrate in the BGA device to be detected according to the initial detection range; obtaining an actual detection range of the BGA device to be detected according to the center coordinate and the real-time angle of the substrate in the BGA device to be detected; performing three-dimensional defect detection on the BGA device to be detected according to the actual detection range of the BGA device to be detected, the three-dimensional defect detection comprising ball height detection, coplanarity detection and warpage detection; wherein each solder ball region in the BGA device to be detected is obtained according to the actual detection range of the BGA device to be detected; and a ball height detection result of each solder ball is obtained according to each solder ball region in the BGA device to be detected and a reference plane; a coplanarity detection result of the BGA device to be detected is obtained according to the ball height detection result of each solder ball; an actual substrate edge is obtained according to the actual detection range of the BGA device to be detected; a warpage detection result is obtained according to a coordinate of each pixel point in the actual substrate edge and the reference plane; or, the actual detection range of the BGA device to be detected is divided into a plurality of sub-regions; an average solder ball height of each sub-region is obtained according to a ball height detection result of all solder balls in each sub-region; and the warpage detection result is obtained according to the average solder ball height of each sub-region.

2. The method of claim 1, wherein the BGA device is a ball grid array (BGA) device. The ball height detection result of each solder ball obtained according to each solder ball region in the BGA device to be detected and a reference plane comprises: acquiring a depth value corresponding to the reference plane and a nominal height; for any one solder ball region in the BGA device to be detected: acquiring a depth value corresponding to each pixel point of the solder ball region in the depth image to obtain a maximum depth value of the solder ball region; obtaining a relative height of a solder ball in the solder ball region according to the maximum depth value of the solder ball region and the depth value corresponding to the reference plane; obtaining a ball height of the solder ball according to the nominal height and the relative height of the solder ball in the solder ball region; obtaining a ball height detection result of the solder ball according to the ball height of the solder ball.

3. The method of claim 2, wherein the BGA device is a ball grid array (BGA) device. The coplanarity detection result of the BGA device to be detected obtained according to the ball height detection result of each solder ball comprises: obtaining a maximum ball height and a minimum ball height of the BGA device to be detected by obtaining a ball height corresponding to each solder ball region; obtaining a height difference according to a difference between the maximum ball height and the minimum ball height, and obtaining a coplanarity detection result of the BGA device to be detected according to the obtained height difference.

4. The method of claim 1, wherein the BGA device is a ball grid array (BGA) device. The actual substrate edge obtained according to the actual detection range of the BGA device to be detected comprises: obtaining an initial substrate edge according to the initial detection range of the BGA device to be detected; and obtaining an actual substrate edge according to the actual detection range of the BGA device to be detected and the initial substrate edge. Or, a plurality of preset regions of interest of an actual detection range of the to-be-tested BGA device are obtained; a plurality of gray scale conversion maps are obtained according to depth values of each pixel point in each of the preset regions of interest; and an actual base edge is obtained according to edge pixel points of each of the gray scale conversion maps. The actual base edge includes first-type pixel points, second-type pixel points, third-type pixel points and fourth-type pixel points, and the first-type pixel points, the second-type pixel points, the third-type pixel points and the fourth-type pixel points correspond to one edge of a base in the to-be-tested BGA device.

5. The method of claim 4, wherein the BGA device is a ball grid array (BGA) device. The warpage detection result obtained according to the coordinates of each pixel point in the actual base edge and the reference plane includes: A first maximum distance and a first minimum distance are obtained according to distances between the coordinates of the first-type pixel points in the actual base edge and the reference plane; and a first height difference is obtained according to the first maximum distance and the first minimum distance. A second maximum distance and a second minimum distance are obtained according to distances between the coordinates of the second-type pixel points in the actual base edge and the reference plane; and a second height difference is obtained according to the second maximum distance and the second minimum distance. A third maximum distance and a third minimum distance are obtained according to distances between the coordinates of the third-type pixel points in the actual base edge and the reference plane; and a third height difference is obtained according to the third maximum distance and the third minimum distance. A fourth maximum distance and a fourth minimum distance are obtained according to distances between the coordinates of the fourth-type pixel points in the actual base edge and the reference plane; and a fourth height difference is obtained according to the fourth maximum distance and the fourth minimum distance. The warpage detection result is obtained according to the first height difference, the second height difference, the third height difference and the fourth height difference.

6. The method of claim 5, wherein the BGA device is a ball grid array (BGA) device. The warpage detection result obtained according to the first height difference, the second height difference, the third height difference and the fourth height difference includes: A first X-direction warpage is obtained according to the first height difference and the second height difference; a first Y-direction warpage is obtained according to the third height difference and the fourth height difference; and the warpage detection result is obtained according to the first X-direction warpage and the first Y-direction warpage.

7. The method of claim 1, wherein the BGA device is a ball grid array (BGA) device. The warpage detection result obtained according to the average solder ball height of each sub-region includes: A basic sub-region is obtained according to a sub-region in which a center coordinate of the base is located; a second X-direction warpage is obtained according to the average solder ball height of the basic sub-region and the average solder ball height of a sub-region corresponding to the basic sub-region in an X-direction; a second Y-direction warpage is obtained according to the average solder ball height of the basic sub-region and the average solder ball height of a sub-region corresponding to the basic sub-region in a Y-direction; and the warpage detection result is obtained according to the second X-direction warpage and the second Y-direction warpage. Or, a maximum value and a minimum value of the average solder ball height of all the sub-regions are obtained to obtain a maximum average solder ball height and a minimum average solder ball height; and the warpage detection result is obtained according to the maximum average solder ball height and the minimum average solder ball height.

8. The method of claim 7, wherein the BGA device is a ball grid array (BGA) device. The second X-direction warpage obtained according to the average solder ball height of the basic sub-region and the average solder ball height of a sub-region corresponding to the basic sub-region in an X-direction includes: An absolute value of a difference between the average tin ball height corresponding to all sub-regions in the X direction of the base sub-region and the average tin ball height corresponding to the base sub-region is calculated; and a maximum absolute value among all the obtained absolute values is taken as a second X direction warpage.

9. A BGA device inspection system for inspecting three-dimensional defects of a BGA device, the inspection system comprising: The detection system comprises: A data acquisition module is configured to acquire three-dimensional information of the BGA device to be detected, the three-dimensional information comprising a gray-scale image and a depth image of the BGA device to be detected; An initial detection range acquisition module is configured to obtain an initial detection range of the BGA device to be detected according to the gray-scale image; An actual detection range acquisition module is configured to acquire a center coordinate of a substrate and a real-time angle of the BGA device to be detected according to the initial detection range, and obtain an actual detection range of the BGA device to be detected according to the center coordinate of the substrate and the real-time angle of the BGA device to be detected; A three-dimensional defect detection module is configured to perform three-dimensional defect detection on the BGA device to be detected according to the actual detection range of the BGA device to be detected, the three-dimensional defect detection comprising ball height detection, coplanarity detection and warpage detection; According to the actual detection range of the BGA device to be detected, each tin ball region in the BGA device to be detected is obtained; and according to each tin ball region in the BGA device to be detected and a reference plane, a ball height detection result of each tin ball is obtained. According to the ball height detection result of each tin ball, a coplanarity detection result of the BGA device to be detected is obtained. According to the actual detection range of the BGA device to be detected, an actual substrate edge is obtained; according to a coordinate of each pixel point in the actual substrate edge and the reference plane, a warpage detection result is obtained; or, the actual detection range of the BGA device to be detected is divided into a plurality of sub-regions; according to a ball height detection result of all tin balls in each sub-region, an average tin ball height of each sub-region is obtained; and according to the average tin ball height of each sub-region, a warpage detection result is obtained.

10. A computer-readable storage medium, characterized in that, The medium stores a computer program, and the computer program can be executed by a processor to implement the method of any one of claims 1-8.