1 Introduction

With the rapid development of semiconductor industry, the demand for printed circuit board (PCB) is getting greater and greater. In PCB production, micro-hole drilling is one of fundamental steps. Thereby, automatic inspection of micro-drilling tools, namely micro-drill bits, has become a matter of great importance for quality control in PCB production. A worn-out micro-drill bit damages the quality of PCB surface finish and the dimensions of drilled holes [2]. An example of micro-drill is shown in Fig. 1a and the tip structure is illustrated in Fig. 1b. The drill inspection or wear measurement mainly focuses on the cutting plane which is also called first facet or lip relief plane. On the four edges of the cutting plane, cutting lip and chisel edge are two important cutting edges. Cutting clips are the major cutting edges for material removal, and chisel edges, which locate in the intersecting line of cutting plane and clearance, remove the material by extrusion and cutting at a high negative rake angle [3].

Fig. 1
figure 1

a An example of micro-drill and b the tip schematic diagram from top view

Since the increasing circuit density brings about continuing micromation of drill bits, the inspection has come into an enormous challenge. Human visual inspection is obviously impossible to satisfy the requirement. It has been proved that a promising way to inspect micro-drill bits is with the help of machine vision technology, which is called as automatic optical inspection (AOI) [46]. It relieves inspectors of the tedious jobs. Compared to manual inspection, it is time-saving, objective and non-contact [1, 5, 19].

So far, a fair number of research have been done on the AOI of micro-drill bits by machine vision techniques. A kind of methods for geometric defect inspection of micro-drill bits has been presented by the authors in [3, 6, 7]. These methods work in the similar scheme. Firstly, the edge detection or boundary following technique is employed to get the edge of cutting plane from a micro-drill bit image, and then corner detection and curve fitting are implemented to measure some geometric quantities of the cutting plane, such as angles and lengths, for defect inspection. On the other hand, a method for flank wear measurement of cutting plane was reported in [2]. Using a set of pair points located on the raising edge and the falling edge, three quantities, flank wear area, average flank wear height, and maximum wear height, are calculated to measure the flank wear for tool life evaluation.

All the methods mentioned above adopt the strategy of “one-to-one” comparison. The geometric quantities of cutting plane are measured to compare with prior standards for micro-drill bits inspection. However, to guarantee measurement accuracy, the inspection instrument requires large enlargement lens and high-resolution CCD [2, 3, 6, 7], which increases the cost of both system hardware and system computation. In our previous work [8, 9], we proposed a method that relatively lowers the requirement for imaging equipment of inspection instrument. The proposed method adopts the phases of micro-drill bits lifecycle as an index for inspection. This paper follows the work [8, 9] in further developing a more accurate method for phase identification of micro-drill bits.

Generally during a micro-drill bit lifecycle in PCB production there are six important phases which are denoted as N, ND, K1, K1D, K2 and K2D (examples are shown in Fig. 2).

  1. 1.

    N: it means new product that has not been put into production.

  2. 2.

    ND: the drill bit is worn out from the condition N. It cannot be put into use until being fixed.

  3. 3.

    K1: the drill bit has been fixed once only. It has recovered to be available for production.

  4. 4.

    K1D: the drill bit is worn out from the condition K1, before that it had been fixed for one time. It can be put into use after being fixed again.

  5. 5.

    K2: the drill bit has been fixed twice. It is available for production.

  6. 6.

    K2D: the drill bit is worn out from the condition K2. However, different from K1D, it has been out of fixing, and has come to the end of lifecycle.

During the whole lifecycle, a micro-drill bit goes through this six phases. During inspection, if these phases can be identified, we can easily confirm its condition and evaluate the tool life. Thus, the inspection can be viewed as a six-class classification problem to identify the phases of micro-drill bits. With this motivation, we propose an automatic optical phase identification method using pattern recognition techniques. The basic idea is that using the images of micro-drill bits, the shape representation of micro-drill bits is built first, and phase identification follows with the shape representation as feature and support vector machines (SVMs) [10, 11] as classifier.

Fig. 2
figure 2

Example images of the six phases (0.5-mm-diameter micro-drill bit): a N, b ND, c K1, d K1D, e K2, and f K2D

Since the shape of micro-drill bits varies largely due to the wear in PCB production, it is a difficult problem to effectively represent the shape. In this paper, inspired by the success of active shape models (ASM) for deformable objects modeling [12], we discuss the limitations of conventional ASM on shape modeling of micro-drill bits, and propose an improved ASM by defining six key landmarks for the initialization and optimization of ASM fitting. In addition, considering the local shape feature, we also develop a bag of shape segment (BoSS) model to organize local image features to provide a shape-level feature representation. By integrating the improved ASM and BoSS, a novel shape representation of micro-drill bits is then formed and employed for phase identification.

This paper is organized as follows. In Sect. 2, we describe the improved ASM for micro-drill bit modeling. Section 3 presents the BoSS representation for a statistical description of local shape variation of micro-drill bits. In Sect. 5, the overview of the phase identification is discussed. Then, experimental results are presented in Sect. 6. Finally, in Sect. 7, we summarize this work.

2 Improved active shape model for micro-drill bit modeling

Active shape models (ASM) was originally introduced by Cootes et al. [12] and has been successfully used for shape modeling of deformable objects, such as face, hand and vertebra. Compared to active contour models or snakes, ASM comes from a set of training data set in a learning way, so instances of a model can only deform within variations of the training set, namely, they have considerable variability but still keep the structures they intend to represent. An instance of a model can fit to a new image using a local gray-level model for searching in an iterative optimization scheme. Hence, here we employ ASM to automatically extract the point shape representation of micro-drill bits. ASM is mainly composed by three parts: point distribution models (PDM), local structure models (LSM), and the optimization scheme.

In the conventional version of ASM, the initial shape is given by the mean shape, the accuracy of which is affected by the size and variation of training data set. Additionally, the gradient information around landmarks is taken as local structure to drive the fitting. However, if most points for shape representation have similar local structures, it is difficult to define landmarks with unique neighboring gradient feature on the object. Thus, the fitting accuracy will be influenced.

Over the past few years, a lot of work has been done for the improvement of ASM [1315]. But all these are proposed for facial images and medical images. Unfortunately, the micro-drill bits image are quite different from these two kind images, hence, they cannot work well for shape model construction of micro-drill bits. We list the important limitations of the conventional ASM on micro-drill bit shape modeling in the following.

  1. 1.

    Using gradient profiles for all landmarks. The micro-drill images used for fitting are binary image, so there is no difference among the gradient profiles of all landmarks.

  2. 2.

    The search direction of each landmark. It is an inefficient approach, and sometimes will drive the point to the opposite direction.

  3. 3.

    The initialization of the shape model. Most optimization approaches are sensitive to initial values, and the fitting of conventional ASM is also unexceptional.

In the following, we will discuss the three parts of ASM for micro-drill bit shape modeling with our proposed improved methods.

2.1 Point distribution models

PDM is to find a statistical model of object shape and its variation from a set of training images. Firstly, it is preprocessing. The micro-drill bit is segmented and aligned to the vertical direction. These preprocessed images are labeled with 40 landmarks on the boundary to obtain object shapes (as shown in Fig. 3). Finally, principal component analysis (PCA) is applied to them to get the statistics of the variation.

Fig. 3
figure 3

A example of labeled micro-drill bits: the six points in blue circles are the defined key landmarks

Given a set of aligned shapes, each shape is represented as a vector

$$\begin{aligned} \mathbf{x}_i =\left[ {x_1 ,y_1 ,\ldots ,x_m ,y_m } \right] ^{T}\!,\quad i=1,\ldots ,n, \end{aligned}$$
(1)

where x and y denotes the location of a landmark, m is the number of landmarks and n is the number of training samples. A shape example can be approximated by

$$\begin{aligned} \mathbf{x}_i =\bar{{\mathbf{x}}}+\mathbf{Pb}, \end{aligned}$$
(2)

where \(\mathbf{P} = [\mathbf{v}_{1}{\vert }\mathbf{v}_{2}{\vert }{\cdots }{\vert }\mathbf{v}_{t}]\), is the orthonormal transformation matrix, called as eigenshape, and b is a vector of weights, called as model parameters. P contains \(t\) eigenvectors of the covariance matrix corresponding to the \(t\) largest eigenvalues.

2.2 Improvement of local structure model

LSM helps the landmarks find its new better locations during fitting process. It involves two parts, search directions of landmarks and derivate profiles. Since the micro-drill bit images are in binary format, and there is no intensity variation inner the drill bit, which means that the derivate profile makes no sense, so it can be simplified into an edge profile, except that of key landmarks. As shown in Fig. 3, the six corner points in blue circles are defined as key landmarks, which are used as references in ASM initialization and constraints in ASM optimization for robust fitting.

2.2.1 Key landmarks detection

Though the key landmarks are corner points, the shape of micro-drill bits deforms largely in different phases, because of drill wear, so some common corner detection algorithms, such as the SUSAN corner detector and Moravec corner detection algorithm, cannot find their exact positions. So we proposed a novel method using projection profiles for the key landmarks detection. Here, projection is an operation that maps a binary image to one axis to get one-dimensional array called as projection profile. As shown in Fig. 4, a horizontal projection profile of a drill bit image is the sum of intensity level of all pixels on each raw, and a vertical projection profile is the sum of intensity level of all pixels on each column. In Fig. 4a, according to the horizontal projection profile, the two end points (A and B) of the middle segment with minimum value are corresponding to the key landmarks 1 and 2 (Fig. 3). The key landmark 3 can be detected by the proposed algorithm shown in Fig. 5. The horizontal coordinate of point C is equal to the vertical coordinate of key landmark 3, and the key landmark 4 can be obtained in the same approach. The key landmarks 5 and 6 are detected using the vertical projection profiles shown in Fig. 4b. A horizontal line in the level that is smaller than the maximal value of the vertical projection profile passes through it, then the cross point A with the smallest horizontal coordinate (the left cross point) is corresponding to the key landmark 6, and the cross point B with the largest horizontal coordinate (the right cross point) is corresponding to the key landmark 5.

Fig. 4
figure 4

Horizontal (a) and vertical (b) projection profiles of a micro-drill bit image

Fig. 5
figure 5

Key landmark 3 detection algorithm

2.2.2 Searching direction definition

To improve the efficiency of the searching, the searching direction is constrained to only one side of landmarks. For example, for the points between key landmarks 1 and 5, if the point for fitting is located on the background, the search direction is defined as right-to-left, and if the point is located on the drill bit, the search direction is defined as left-to-right. The searching directions of the left points are defined according to the same rules.

2.3 Improvement of fitting

The fitting process starts with an initial estimate, usually the mean shape, and then it can be fit to an image by local transformation that is achieved by varying model parameters b, and global transformation \(T(s, \theta , \mathbf{t})\) that includes scale \(s\), rotation \(\theta \), and translation t. To fit an instance is to minimize

$$\begin{aligned} f(\mathbf{b},s,\theta ,\mathbf{t})=\left| {\hat{{\mathbf{x}}}-T\left( {\bar{{\mathbf{x}}}+\mathbf{Pb};s,\theta ,\mathbf{t}} \right) } \right| ^{2} \end{aligned}$$
(3)

where \(\hat{{\mathbf{x}}}\) is a best match shape searched by LSM. The whole optimization process of improved ASM is summarized as follows.

Initialization:

  1. 1.

    Start with an initial shape \(\mathbf{x}_t =T\left( {\bar{{\mathbf{x}}}+\mathbf{Pb};s,\theta ,\mathbf{t}} \right) \).

  2. 2.

    Detect the key landmarks, and align the key landmarks of \(\mathbf{x}_{t}\) to the detected ones to get the parameters of global transformation, \(s_{t}, \theta _{t}\) and \(\mathbf{t}_{t}\).

  3. 3.

    Calculate the new model parameters \(\mathbf{b}_{t}\) according to \(s_{t}, \theta _{t}\) and \(\mathbf{t}_{t}\).

  4. 4.

    Update \(\mathbf{x}_{t}\) according to the new model parameters \(\mathbf{b}_{t}\) to get a new initial shape \(\mathbf{x}_t^{\prime }\).

Fix the key landmarks:

  1. 5.

    Search along profile normal through each left point to determine the best match shape \(\hat{\mathbf{x}}^{\prime }\) according to LSM.

  2. 6.

    Find the update of global transformation parameters to align \(\mathbf{x}_t^{\prime }\) to \(\hat{\mathbf{x}}^{\prime }\), and then calculate the update of model parameters by the update of global transformation parameters.

  3. 7.

    Update the shape \(\mathbf{x}_t^{\prime }\) according to the update of model parameters.

  4. 8.

    Repeat 6–7 until convergence.

3 Bag of shape segment representation

Since the point shape represents the global shape features, and the local shape feature is also important for micro-drill bit shape representation, we propose a method called as bag of shape segment (BoSS) to involve the local shape feature for micro-drill bit shape representation, inspired by the well-known bag of features (BoF) model that are widely used in image classification [1618]. The BoF model organizes local image features to provide an image-level feature representation scheme. From a set of training images, features are extracted and clustered to form a visual codebook. Then, given an image, each feature extracted from it is assigned to a code according to the codebook. Thereby, the image can be represented by a histogram which counts the frequency of the occurrence for each code in the codebook. In the proposed BoSS, the local shape segments of micro-drill bits are utilized as the features to construct a shape codebook for a shape-level representation. As shown in Fig. 6, the procedure of BoSS generation mainly concludes the following two steps.

Fig. 6
figure 6

The procedure of BoSS generation

4 Codebook construction

The training samples are selected the same with those in ASM construction. For each shape point of a micro-drill bit, the boundary segment with the shape point as the middle point is extracted. We call the segment as shape segment. The length of the shape segment is decided according to the size of whole micro-drill bit shape and the point number. Here, we set it as 11, which means that five boundary pixels around the shape point are chosen to compose a shape segment together with the shape point itself. Then, all of the shape segments are aligned by rotation and translation. By performing K-means algorithm, the shape segments are clustered into a number of classes and the class centers form the codebook.

If the cluster number \(K\) is a small value, a compact codebook can be obtained and the following computational efficiency will be high, while it leads to lower discriminability and underfitting due to quantization effects. Conversely, a fine codebook with large value of \(K\) can improve the ability of feature distinguish, however, it will be noise sensitive and leads to overfitting and computational inefficiency. By the experiments with different \(K\), we find that \(K = 30\) is a good trade-off between accuracy and efficiency.

4.1 Assignment

After codebook construction, by assigning each shape segment of a micro-drill bit shape with a code, we can obtain the BoSS representation which indicates the occurrence frequency of each codebook vector of the micro-drill bit shape. Similar to the histogram of an image, the BoSS representation is a statistic that can be viewed as an approximation of an underlying distribution of micro-drill bit local shape features. Specifically, assume \(\mathbf{D}=[\mathbf{d}_1 ,\mathbf{d}_2 ,\ldots ,\mathbf{d}_m ]\) is the codebook matrix in which each column is a code vector and \(\mathbf{S}=[\mathbf{s}_1 ,\mathbf{s}_2 ,\ldots ,\mathbf{s}_n ]\) is the set of local shape segments of a micro-drill bit shape, in which each column is a shape segment vector, the BoSS representation of micro-drill bit shape, \(\mathbf{h}=\left( {h_1 ,h_2 ,\ldots h_m } \right) \) is obtained by

$$\begin{aligned} h_j =\sum _{i=1}^n {\delta \left( {j,\mathop {\arg \min }\limits _k \left( {\mathbf{s}_i ,\mathbf{d}_k } \right) } \right) }, \quad j=1,2,\ldots ,m \end{aligned}$$
(4)

where

$$\begin{aligned} \delta \left( {x,y} \right) =\left\{ {\begin{array}{ll} 1, &{}\quad x=y \\ 0, &{}\quad x\ne y \\ \end{array}} \right. \end{aligned}$$
(5)

5 Phase identification

The flowchart of our proposed framework for phase identification of micro-drill bits, which consists of training stage and test stage, is depicted in Fig. 7. The images of micro-drill bits are acquired by an imaging system that we developed. In the training stage, the ASM model and BoSS model of micro-drill bits are first constructed by a set of training image samples. In this work, the support vector machines (SVMs), one of most popular classifiers is employed for classifying the phase of micro-drill bits. Thus, the SVMs model of micro-drill bits is also built in the training stage. For a test image, the shape feature is extracted by the improved ASM and the proposed BoSS, and then it is inputted into the trained SVMs classifier for phase identification.

Fig. 7
figure 7

The flowchart of phase identification

5.1 Image acquisition

The setup of our developed automatic visual inspection system is shown in Fig. 8a [1]. Basically it is composed of a special scanner (NC DI-801P) that has a travelling 256 by 340 resolution CCD camera with 100 times enlargement lens inside and a personal computer (Intel Core2 1.86 GHz). Both the magnification of lens and the resolution of CCD are much lower than those (mentioned above) commonly used in research and practice. As illuminated in Fig. 8b, the image is captured by the CCD camera with a LED illumination system in frontal view of the drill bit in the scanner. For intuitional instruction, in the right side we give an example of the acquired image. The image is transformed into an eight-bit grayscale format (as shown in Fig. 2) and saved to the memory of the computer. Each digital image is 256 by 340 pixels in size. The intensity value of each pixel ranges from 0 to 255.

Fig. 8
figure 8

a Automatic visual inspection system of micro-drill bits and b micro-drill bit image acquisition

5.2 Classification

Given an image of micro-drill bit, let \(\mathbf{x}=\left( {x_1 ,x_2 ,\ldots x_n } \right) \) is the point shape vector which is extracted by ASM, and \(\mathbf{h}=\left( {h_1 ,h_2 ,\ldots h_m } \right) \) is its BoSS representation, we normalize them to the unit norm and joint them as one vector which is taken as the shape feature of the micro-drill bit, denoted by \(\mathbf{f}=[\mathbf{x};\mathbf{h}]\). Then, the shape feature vector f is inputted into the SVMs classifier to identify the phase of the micro-drill bit. The one-against-one strategy is adopted to extend SVMs for handling multiclass problems, since one-against-one SVMs reduce the unclassifiable regions that occur for one-against-all SVMs [10]. The kernel function of SVMs is selected as an important family of kernel functions, Gaussian radial basis function (RBF).

6 Experimental results

The proposed automatic optical inspection method of micro-drill bits is implemented on the inspection instrument which we introduced in Sect. 5 with two sizes of micro-drills (0.5 mm diameter and 0.3 mm diameter). Each size involves 180 sets of micro-drill bits for evaluation, and there are six samples corresponding to six phases in each set. Totally, we have 1,080 samples for each size. In the experiments with both types of the micro-drill bits, 80 sets are randomly selected as training data and the other 100 sets are left for test.

In ASM construction, the shape of a cutting plane is represented by 40 labeled points as shown in Fig. 3 where the boldfaced points mean basic landmarks. The dimension of a shape vector is 80. In BoSS calculation, the normalized cross-correlation [10] is employed for comparing two shape segment vectors. The SVMs procedure is implemented based on the “OSU SVM tools” [20]. The optimal parameter sigma in RBF is decided by comparing the classification rate with continuous changing of the sigma.

The experiments are implemented by Visual C\(++\) 9.0, and performed on a PC that is introduced in Sect. 5.1 under Windows XP (32-bit) system. In computing cost investigation, the average inspection time of the 1200 (200 sets) test samples is calculated and compared between the proposed method and the conventional methods. The inspection time is measured from input of the captured image to output of the inspection results.

6.1 Fitting performance

Figure 9 shows the comparison fitting results of our proposed improved ASM and conventional ASM with micro-drills of 0.5 mm diameter. For quantitative analysis, the average mean square error (MES) is calculated phase by phase. It is found that the fitting accuracies of all the six phases have been largely improved by the improved ASM, and the improvement for phases ND, K1D and K2D is higher than that for their corresponding phases N, K1 and K2D. The highest one is achieved by K2D whose MSE is reduced by 6.2 (10–3.8).

Fig. 9
figure 9

Average MSE comparison of proposed improved ASM and conventional ASM with micro-drills of 0.5 mm diameter

The comparison fitting results of the proposed improved ASM and conventional ASM with micro-drills of 0.3 mm diameter are shown in Fig. 10. Similar to the results of micro-drills of 0.5 mm diameter, the fitting accuracies of all the six phases have been largely improved by the improved ASM, especially for the phases of ND, K1D and K2D. The reason is that the drill bit shape changes greatly in these phases, due to the drill wear in machining, and the key points in the proposed ASM can guide the shape fitting to a better result.

Fig. 10
figure 10

Average MSE comparison of proposed improved ASM and conventional ASM with micro-drills of 0.3 mm diameter

We compared the mixed average MSE of the proposed improved ASM and the conventional ASM in Fig. 11. For micro-drills of 0.5 mm diameter, the mixed average MSE is reduced by 4.97 (8.10–3.13), and the variance is reduced by 0.43 (0.85–0.42). For micro-drills of 0.3 mm diameter, the mixed average MSE is reduced by 5.53 (9.13–3.60), and the variance is reduced by 0.51 (0.81–0.30). A pair of examples of fitting results by the proposed ASM and the conventional ASM is shown in Fig. 12.

Fig. 11
figure 11

Mixed average MSE comparison of proposed improved ASM and conventional ASM

Fig. 12
figure 12

Examples of fitting results of phase ND images: a conventional ASM and b proposed improved ASM

6.2 Phase identification

Figure 13 shows the identification results of each phase by conventional ASM, the improved ASM and the improved ASM combined with BoSS (denoted by improved ASM \(+\) BoSS) with micro-drills of 0.5-mm-diameter. The results indicate that for all the phases the performance of the improved ASM is better that of conventional ASM, and the improved ASM + BoSS outperform the improved ASM. Except that the identification rate of the phase N achieves 93 %, the identification rates of the other five phases are all between 80 and 90 % (ND 85 %, K1 80 %; K1D 81 %; K2 87 %; K2D 80 %), while the phase identification rates of all the phases by the improved ASM \(+\) BoSS are over 90 %, ND and K2D are 92 %, K1D is 94 %, K2 is 95 %, K1 is 96 %, and N is 98 %. The results of conventional ASM are relatively poor. The identification rate of the phase K1D is only 64 %, K2D is 68 %, both K1 and K2 are 73 %, ND is 78 %, and N is 90 %.

Fig. 13
figure 13

Phase identification result comparison with micro-drills of 0.5 mm diameter

Figure 14 shows the identification results of each phase with micro-drills of 0.3mm-diameter. It is found that the results accord with those with micro-drills of 0.5mm-diameter mentioned above. For all the six phases, the improved ASM + BoSS perform best, with the improved ASM the second and conventional ASM the worst. Similarly, the phase identification rates of all the phases by the improved ASM + BoSS are over 90 %, ND and K2D are 92 %, K1D is 94 %, K2 is 95 %, K1 is 96 %, and N is 98 %. For conventional ASM, K1D is only 60 %, K2D is 67 %, K2 is 70 %, ND is 72 %, K1 is 75 %, and N is 85 %.

Fig. 14
figure 14

Phase identification result comparison with micro-drills of 0.3 mm diameter

We compared the average identification rates and the variance of the three methods with micro-drills of 0.5mm-diameter in Fig. 15, and micro-drills of 0.3mm-diameter in Fig. 16. For micro-drills of 0.5mm-diameter, by the improved ASM, the average identification rate is improved by 10 % (74.33–84.33 %), and the variance is reduced by 3.58 (8.26–4.68); by the improved ASM + BoSS, the average identification rate is improved by 20.17 % (74.33–94.5 %), and the variance is reduced by 6.12 (8.26– 2.14). For micro-drills of 0.3mm-diameter, by the improved ASM, the average identification rate is improved by 11 % (71.50– 82.50 %), and the variance is reduced by 3.40 (7.63–4.23); by the improved ASM + BoSS, the average identification rate is improved by 23.17 % (71.50–94.67 %), and the variance is reduced by 5.50 (7.63–2.13).

Fig. 15
figure 15

Average phase identification rate with micro-drills of 0.5 mm diameter

Fig. 16
figure 16

Average phase identification rate with micro-drills of 0.3 mm diameter

According to the results mentioned above, the improved ASM \(+\) BoSS can largely increase the phase identification accuracy of micro-drill bits. The identification rate variance of the improved ASM \(+\) BoSS are also smaller than that of conventional ASM, which means that the identification capacity of the improved ASM \(+\) BoSS are more stable for different phase. It is worth noting that the identification rates of K1D and K2D by the conventional ASM is much lower than those by the other two methods. Since the micro-drill bit shape variation of these two phases is too large, the impact of the limitations of the conventional ASM becomes more evident, and conversely, it is relatively not so strong in other phases, but still exists.

In order to investigate the performance more carefully, we summarize the results of the improved ASM \(+\) BoSS in confusion matrixes as shown in Tables 1 and 2. Table 1 gives the results of micro-drills of 0.5mm-diameter, and Table 2 shows the results of micro-drills of 0.3mm-diameter, where the values in the diagonal give the correct classification rates for each phase.

Table 1 Confusion matrix of identification rate with micro-drills of 0.5 mm diameter
Table 2 Confusion matrix of identification rate with micro-drills of 0.3mm-diameter

From Table 1, for micro-drills of 0.5mm-diameter, ND confuses with N by 3 % and K1D by 7 % which is relatively large. K1 and K2 mix a little with each other, and this also occurs between K1D and K2D. From Table 2, for micro-drills of 0.3mm-diameter, it is observed that ND also confuses with K1D by a relatively large rate (5 %), confusion mainly happens between K1 and K2, and between K1D and K2D.

In Table 3, we compare the results of the improved ASM \(+\) BoSS with the results of the conventional prior standards referred method using the measuring quantities introduced in [7]. We can find that the proposed method can provide not only more phase information but also better inspection accuracy, which demonstrates that the proposed method for automatic inspection micro-drill bits is applicable.

Table 3 Comparison of the improved ASM + BoSS and the conventional method

The average inspection time of the four methods are compared in Table 4. The conventional method [7] is the most computationally expensive. The least one is the improved ASM which takes less computing cost than the conventional ASM by 0.08 s, since it converges more quickly in the fitting. The improved ASM + BoSS take 0.95 s which is larger than that of the conventional ASM by 0.04 s due to the BoSS extraction, however, it is acceptable for application.

Table 4 Comparison of the inspection time (s)

7 Conclusion

An automatic optical inspection method with phase identification of micro-drill bits in PCB production was presented. To robust extract and effectively represent the shape of micro-drill bits, we discussed the limitation of conventional ASM and proposed an improved ASM for shape modeling of micro-drill bits, and we also developed a BoSS model for involving the local shape feature to the representation. The shape representation of micro-drill bits was finally formed by the improved ASM joint with BoSS. The experiments with two sizes of micro-drills (0.5mm-diameter and 0.3mm-diameter) both showed encouraging results. The identification accuracy should be improved using a larger database for training. Our future work will consider evaluating this method with more micro-drill bit samples and the samples of other diameters.