A Simple Automated Void Defect Detection for Poor Contrast X-ray Images of BGA

For surface mount technology, the occurrence of voi d defects inside solder balls during the ball grid ar ray (BGA) reflow is an important problem. In this paper, we d esign a simple automated system for void detection. First, it can analyze the X-ray images obtained from arbitrary ro tating angles and it is robust against occluded balls caus ed by some interference. Second, we apply the new method, which is to average multiple outputs of local contr as enhancement over different block sizes, for treatin g poor contrast images in order to reduce some false voids while the accuracy of void location and void area is reas on bly preserved. These conclusions were confirmed by our experiments.


Introduction
A ball grid array (BGA) is a type of surface-mount that is being used widely for integrated circuits and applied increasingly in the manufacture of electronic circuits. The BGA offers many advantages; however, the process of BGA assembly itself is one of the key concerns. Void defect can be defined as holes formed inside a solder ball due to the amount of outgassing flux that gets entrapped in the solder ball during the reflow process. Based on the inspection techniques (1)(2)(3)(4)(5) , the void can be visualized as a brighter area inside the solder ball on a 2D X-ray image.
Because the manual inspection causes high variability and time consuming, then the manufacturer has changed from using human-based analysis to the intelligent software instead. Therefore, the research of automated void detection algorithms has been actively developed (2)(3)(4)(5) in order to obtain the better accuracy, speed and robustness when dealing with different types of practical factors, e.g., noise, interference, and various quality of images acquired from different setting in X-ray machines, especially the case of low contrast images.
In this paper, we present a simple framework; however, Overview of X-ray system and practical problems it is capable to: 1) analyze image acquired from different rotating angles (both flat and oblique modes) producing different patterns of ball arrangement (see Fig. 1a), 2) identify the center of solder ball occluded by some interfering components effectively using the techniques based on the Delaunay triangulation and the unit lattice verification (see Fig. 1b), and 3) be robust against the case of poor contrast image (see Fig. 1c) in the sense of giving a good estimate of void location and a fair estimation of void area. The first parameter, void location inside ball, is emphasized as the primary root cause for the loss of solder joint integrity (1) and the second parameter, void area, is required as 25% or less cumulative voiding percentage in solder balls based on the IPCA610D standard (1)(2)(3) .

Individual solder ball segmentation from the background of image
In typical 2D X-ray images (gray scale image, 0-255 levels), the solder balls are often interfered by other board components (2)(3) , for example some joints normally create some occluded solder balls. Then, the robust segmentation algorithms that are able to deal with different kinds of interfering backgrounds are essentially preferred. Traditionally, a proper threshold of intensity (2)(3)(4) has to be chosen to separate between the group of interfering backgrounds and the group of solder balls. Specifically, the method applied in Said et al.'s works (2)(3) is relied on the (a) Disadvantage of conventional method (2)(3)(4) (b) Disadvantage of conventional method (2)(3)(4) (c) Advantage of proposed method (circle detection) (d) Robustness of the simple circle detection against occluded balls. assumption of two separated clusters of intensity, which is not true in general. To calculate this threshold, it is better to use the conventional OTSU method instead (4) . These earlier works (2)(3)(4) used this threshold for binary image conversion and selected the solder ball region based on area, shape, and the arrangement pattern of each labeled region. By contrast, we here applied this global threshold to reject some artifacts only (their intensity values assigned to 255 as white pixels in the new gray scale image) before cooperating to our next proposal when dealing with the presence of complicated backgrounds (see Fig. 2a-2b).
For ball segmentation, we propose to use the Hough transform, which is the conventional circle detection algorithm (including circular shapes) to locate the possible centers of solder balls. Typically, this algorithm is quite slow when calculating on a large or intense image then in our method; the Hough transform is calculated particularly on the resized image instead of its original size. The final center and radius values are recovered by just scaling them back. Moreover, to be user friendly, the default input of radius range applied in the Hough transform is intentionally widen; consequently some false circles are detected but the wanted balls can be simply selected based on checking the intensity distribution inside each circle (see Fig. 2c-2d).
We use the results depicted in Fig. 3a-3d to show that the circle detection simply outperforms the previous conventional method (2)(3) in term of estimating the correct centers of occluded solder balls (inside blue rectangles) while Said et al.'s works (2)(3) have to do more correction to interpolate the centers of occluded balls using the knowledge of nearby balls with respect to the specific arrangement pattern focusing on 0°, 45°, 90° directions.
Furthermore, since we have not provided the specific parameter set of inputs in Hough transform for different images. Then, in general case, it is possible to have some missing (undetected) balls; see Fig. 3d (yellow circle). To solve this problem, firstly, we calculated the Delaunay triangulation from the centers of all detected balls, for illustration in Fig. 3e-3f using eight randomly simulated missing balls, and then there are two types of missing ball found, such as locating on the long edge or inside the large triangle, where at least one ball can be inscribed inside. In the next step, we check all these candidates' locations and the searching space mostly becomes simpler due to the symmetric geometry of ball arrangement, which suggests searching near the center of edge or triangle at first. Although the false balls can be rejected by verifying their distribution of intensity inside each searching window, but here we developed one necessary condition of being a true circle with the radius at the center , by minimizing the objective function in the equation (1) where , is the binary image. From Fig. 4a, it is obvious that , , is the global minimizer of , , . In practice, the robust circle detection as described earlier can give us the approximation of ̂ so that the center of ball can be then estimated by minimizing , , ̂ over , as demonstrated in Fig. 4b-4c. The last step, the unit lattice can be derived to check the correctness of all ball centers by translating this unit structure at each vertex and verifying the fitting. ( _ and _ in (1) mean the regions inside red and blue rectangles in Fig. 4, respectively.) ,

Void detection inside each solder ball
The traditional procedure of image processing of void detection (here, called the "single CLAHE method") can be described as follows (see Fig. 2e-2n): From the raw image shown in Fig. 2a; although the physical fact suggests the void regions are brighter than neighborhood inside the solder ball, however, in reality these voids are quite difficult to be detected because of poor image contrast, irregular shapes, different void sizes and positions (2)(3)(4) , and high noise level (5) . These issues are what we have to overcome in practice.
A quality of image contrast is varied in general due to different setting of data acquisition, therefore the global image contrast of each segmented solder ball can be firstly enhanced by transforming the input image so that the histogram of the output intensity image approximately matching to the desired target histogram extracted from reference images (see Fig. 2f) In particular, some images show very poor contrast and the global contrast enhancement alone is not sufficient. Therefore, after smoothing an image for denoising, the Contrast Limited Adaptive Histogram Equalization (CLAHE) is needed to improve the local contrast in smaller regions (see Fig. 2g); the two key input parameters of CLAHE function are block size and clip limit (6) and the local maxima (peaks) of intensity in Fig. 2h indicate the candidates of void locations (brighter regions); beside of typical gradient techniques, the multi-scale blob filter (4) was studied to identify the accurate peak regions and the results showed much better than the others (2)(3) .
In the next step, the boundary of each void is effectively determined by applying the simple edge detection algorithm (Laplacian of Gaussian filter) with a proper size of filter but sometimes; consecutive voids are wrongly detected as a single connected void, then the water shedding algorithm is essentially applied to find the separating boundary between them as depicted in Fig. 2i-2j To obtain the correct number and area of voids, the connected voids must be separated completely by using some morphological operations to remove the connected region (see Fig. 2k-2l) Fig. 2m-2n illustrates using some 2D shape criteria such as a roundness value (2)(3)(4) to reject some false voids. Finally, the number of voids, the ratio between void area and solder ball area (1)(2)(3)(4) and the height of peak (5) are normally used as the indicators of severity levels.

Averaged multiple CLAHE method
The CLAHE method itself is quite powerful; however, the contrast level should also be well controlled to avoid amplifying noise or the side effect of creating artificial fluctuations (falsely small peaks) possibly detected as false voids which are normally found in the results obtained from the single CLAHE method. These false voids then have to be screened out intensively later using some heuristic criteria, such as various 2D shape parameters.
Our novel idea is from the fundamental assumption that the true void regions are more consistent in locations than the false voids region; we then propose to average the multiple outputs of CLAHE methods over different block sizes and apply the rest of same procedures afterwards.

Experimental Results
The prototype of software was developed by using the simple image processing functions provided in MATLAB (MathWorks, Natick, MA, U.S.A.), for examples the Hough transform, OTSU method, Delaunay triangulation, smooth filtering, edge detection and CLAHE method but all equivalent functions are also provided openly and freely in Python code.
In Fig. 5; the results show the comparison of void detection compared between the single CLAHE method and the averaged multiple CLAHE method; the void features screening were not applied on both of them. The number reported in parentheses indicates the void area to solder ball area percentage ratio. These three images confirmed that the averaged multiple CLAHE method is better than the single CLAHE method with the reduction of false voids while the accuracy of void location and area is reasonably preserved.

Conclusions
We design the simple system that is able to automatically identify void locations and void areas inside each individual solder ball although these images have very poor contrast. The key proposal is to average the multiple outputs of local contrast enhancement over different block sizes helping to eliminate the false voids while true voids are not significantly affected. To be user friendly, this system is developed to fix several drawbacks caused by the occluded solder balls, such as the missing balls problem, under various possibilities of ball arrangement pattern due to rotating sample board (both flat and oblique modes). Because of this simplicity our methods can be easily extended to different programming codes fitting to individual users, especially free and open platform for the commercial extensions.