Abstract
The automatic inspection of throw-away tips is very important for quality control in precision cutting. We proposed an image processing based method for automatic inspection of the processing wear of throw-away tips. After image denoising, the proposed method utilized image-patch based principal component analysis method to enhance the cutting worn region while suppress the background region. Then the enhanced worn region was automatically segmented by a simple thresholding method followed by post-processing. The area of the segmented worn region was used as a measure of cutting wear degree. We collected three datasets of time-series images that recorded the processing of throw-away tips on a product line. One dataset was used to choose optimal parameters of the proposed method, and the other two datasets were used for evaluate its performances. Experimental results showed that the proposed method was able to inspect the cutting wear with high accuracy. Additionally, it was also showed that the proposed method outperformed the conventional thresholding based method.
Introduction
In precision cutting, a lot of materials have been used as cutting tools, such as alloys, ceramic, abrasion resistance of artificial diamond sintered body and sintered carbon nanotubes [1–5]. Among these cutting tools, there are some types that can be reused by regrinding. However, the most widely used types are the throw-away tips that are abolished when serious cutting wear occurs. The examples of throw-away tips are given by Fig. 1.
Since the precision of cutting is affected by the condition of wear of the cutting tools, these tools should be inspected and judged whether they are suitable for cutting or not in order to maintain the cutting precision. In the scene of cutting by throw-away tips on an actual product line, the judgment of their useful life is made by a craftsman by the following procedure. Take off the tip from the product line, and then inspect whether it can still be used under a microscopy. Such a procedure has the drawback that its precision is affected by subjective judgments. Additionally, it costs too much time on an actual product line where thousands and hundreds of industrial devices are cut in one day. Therefore, the throw-away tips are usually used until the time when the craftsman are definitely sure that they can be used safely for cutting, rather than until their exactly useful life. Because of such a protocol used in practical product line, throw-away tips are usually abolished when they still can be used and unnecessary costs occur.
In order to get rid of these drawbacks, we proposed a novel method to automatically inspect the cutting wear of a throw-away tip when it is fixed on a product line. A camera is used to capture images of the throw-away tip during cutting, and the images are analyzed automatically to give a quantified measure that is able to check the cutting wear conditions objectively. By using the proposed method, not only the management of the quality of precision cutting can be improved, but also the unnecessary costs in cutting can be saved.
The preliminary results of this research were reported in a conference paper [11], where the algorithm of the proposed method was briefly described. This paper is an extended version of the previous work [11]. We not only described the detailed procedure of the proposed method, but also evaluated it by more experiments that included parameter turning and comparison its performance with conventional thresholding based method.
This paper is organized as follows. In order to make the paper readable, we will introduce some background related to the cutting by throw-away tips in the Section 2. The proposed method is described in the Section 3. Experimental results are given in the Section 4, and a conclusion is given at last.
Background related to the cutting by tips
In this section, we describe some background about the metal material cutting by throw away tips. At first, we introduce some specific words related to the cutting by throw-away tips. Then we give some actual examples of the cutting that we deal with in thispaper.
Cutting process
Figure 2 illustrates how a metal material is cut by a throw-away tip. The material is fixed on an equipment, and it is rotated during the cutting. The tip approaches to the material to cut it. The surface of the tip that is attached to the material is called the cutting face. The surface where the cut metal dust drops away is called the flank. The cutting face is orthogonal to the flank.
Wear of throw-away tips
Figure 3 gives examples a series of collected images of a throw-away tip when it is used in the material-cutting. Figure 3(a) shows three images captured from the direction facing to the cutting face. From left-top to right-down, the images are captured when the cutting was not operated, and operated in 50 times, 100 times and 150 times. Figure 3(b) shows when the throw-away tip is captured from the direction facing to the flank at the same time. The surface of the tip is shown by a yellow-green color, and its color becomes dark during the cutting. The dark part is called the worn region that is generated due to the cutting wear. It becomes larger during the cutting. It is noticed that the worn area can be visualized more obviously on images that is toward to the cutting face (Fig. 3(b)) than those toward to the flank (Fig. 3(a)). We used the images shown by Fig. 3(b) to develop the automatic checking of the cuttingwear.
Development of the system to automatically check cutting wear
Camera system
When metal material is cut on a product line, a craftsman has to stop the cutting and then take off the throw-away tip to check the cutting wear. However, the tip is fixed onto the product line for the cutting. Grinding fluid are used and some material dusts that is generated during the cutting. Additionally, steams are also generated due to the extra-heat in the cutting. These things makes that the surface of throw-away tip is unclean, and the precision to inspect the cutting wear is affected. Therefore, the throw-away tip is cleaned by using an air pump that emits compressed air to blow its surface before it is taken out from the product line to be inspected. Figure 4 gives a picture to illustrate how a tip is cleaned on the product line.
In the traditional way to inspect the tip, it is required that the product line should be stopped and the tip should be taken out from the product line. Such an inspection method costs a lot of time and is not very practical for daily production. Therefore, we install a camera-based system on the product line to inspect the whole cutting procedure. In order to make the camera can be used in all capturing conditions, a programmed robot-arm is adopted to take the camera for the inspection. Figure 5 gives a picture for the robot-arm that is used to inspect the cutting wear of the throw-away tip.
Conventional method for worn region segmentation
Since the wear degree is proportional to the area of wear, the worn region segmentation is a key issue for inspection of throw-away tips. It is simple for a craftsman to delineate the area of cutting wear manually as shown in Fig. 8(a), but it is time consuming and is a not automatic method. Therefore it is necessary to do automatic segmentation of worn region by image processing.
It can be seen that the pixels in the worn region have higher intensity values than other parts in Fig. 8. This gives us a hint that a simple thresholding based method would be able to extract the worn regions. Since Otsu-thresholding method [7] is widely used as an image processing based segmentation technique, we firstly utilized it for the automatic segmentation of worn regions. Figure 6(a) gives the flowchart of the Otsu-thresholding based. After image denoising, the images are processed by the Otsu-thresholding method. Finally, the binary image is processed by the post-processing to eliminate isolated small regions, and the final segmentation result is obtained. This method is called as the conventional method in this paper. However, only simple thresholding cannot extract the worn region with acceptable accuracy due to large variations on pixel intensity. Therefore, we have to develop a more powerful method to deal with this problem.
Proposed PCA based method for worn region segmentation
Figure 6(b) gives the flowchart of the proposed method for automatic segmentation of worn regions. Firstly, the original image is processed by median filtering to reduce noises. Then, a principal component analysis (PCA) method is utilized to enhance the worn region while suppress the background part. Finally, the enhanced image is processed by Otsu-thresholding and post-processing to obtain the segmented worn regions.
The novelty of the proposed method is that we utilize a patch-based PCA method to enhance the worn region. PCA is a popular technique for feature extraction and dimension reduction, which is to calculate a set of eigenvectors that spans a linear subspace. The original data is then transformed onto this subspace to get a more elegant representation of the original data. This method has been applied on a large number of recognition tasks, such as face recognition [9] and object recognition [10]. In these researches [9, 10],the whole images are arranged as vectors, and PCA is calculated to determine a subspace for these vectors. Different from these researches, we calculate PCA from a set of image-patches that are randomly selected from an un-worn region of a throw-away tip, as illustrated by Fig. 7. These patches are arranged to be vectors from which PCA is calculated to obtain eigenvectors. These eigenvectors span a subspace of non-worn regions of throw-away tips. This means that a non-worn patch can be represented by these eigenvectors very well. If an image patch belongs to a worn region of throw-away tips, there would be lots of errors when this patch is represented from these vectors. According to this idea, we proposed an image patch based method to enhance the worn region by using PCA. The details of the proposed method are described as follows.
Within a non-worn region of a non-used throw-away tip, as shown by Fig. 7, a set of
By using singular value decomposition on the covariance matrix
Given a certain image, we can enhance intensity values of pixels that belong to the worn region as follows. We crop a
If the image patch
The final worn region can be easily extracted by processing the enhanced image by Otsu-thresholding and post-processing. The Otsu-thresholding can extract regions with higher intensity; however some isolated small regions due to noises are also obtained, as illustrated by Fig. 8(c). Post-processing by morphology processing and connected region labeling is operated on the thresholding result to eliminate these isolated small regions to get the final segmentation result for worn regions. An example of the final segmented result of the proposed method is shown by Fig. 8(d). It should be noticed that the post-processing in the proposed PCA based method is the same as the one in the conventional Otsu-thresholding method.
The final segmentation result is a binary image, where pixels of worn region have the intensity value of 1 and others have the intensity of zero. If more pixels of worn region exist, the throw-way tip is more worn. Therefore, we can define a measure for the wear degree by using the segmentation result. The definition of the wear degree is given by Equation (6).
Data
In this paper, we used the same kind of throw-away tip in experiments. The tip is installed onto the camera-based system on the product line to evaluate its performance, as shown by Figs. 4 and 5. Table 1 gives details of experimental conditions under which a series of images are captured during the mental device cutting. These images are analyzed by the method that is described in Section 3 to automatically detect the area of cutting wear on the throw-away tip. We collected 3 sets of time-series images under similar conditions for the evaluation of different methods. Examples of original images for the 3 datasets are given by Fig. 9(a), and the corresponding manual segmentation of worn regions are given by Fig. 9(b).
There are 2 parameters (patch size and the number of principal component) that could affect the performance of the proposed PCA based method. In the previous study [11], we did not consider the optimization of these parameters. In this paper, we adopt a cross-validation way to optimize these two parameters. Specifically, we random select a dataset (Dataset- A) to try different values of the two parameters to maximize the performance; and then we choose the best parameters and directly use them to evaluate the method on the other two dataset (Dataset-B and Dataset-C). In the following two subsections, we will discuss the parameter turning and report the comparison of different methods respectively.
Parameter turning
The patch size and the number of principal components are the parameters for the proposed PCA based method. We made use of the Dataset-A to choose the optimal parameter that can make the proposed method achieve the best performance. Firstly, we set the number of principal components to be a certain value and turn the patch size. After the optimal patch size is chosen, we turn the number of principal components.
For turning of the patch size, we set the number of principal component to be 3, and try different patch sizes, which are 9×9, 11×11, 13×13 and 15×15. Figure 11 gives the results when different patch sizes are used for images in Dataset-A. The horizontal axis gives indices of the time-series images, and the vertical axis gives the wear degree that is defined by Equation (6). The manual segmentation results are denoted as dots, and the results using different patch sizes are denoted as lines of different colors. It can be seen that the line using patch size of 9×9 (red line) is closer to the manual results (dots) than other lines, so the optimal patch size is 9×9.
Figure 10 gives an example to illustrate how different patch size affects the result. Figure 10(a) gives the original image, and (Fig. 10b–e) gives enhanced image by the PCA method and the final segmentation result when patch sizes are 9×9 and 13×13 respectively. It can be seen that satisfied segmentation result is available when the patch size is 9×9; however the patch size of 13×13 leads to unacceptable results since regions beyond cutting wear are also enhanced. Therefore, the patch size is an important parameter for the proposed PCA based method.
After the optimal patch size is set, we turn the number of principal component by trying different values from 1 to 4. Figure 12 gives the results when different numbers of principal component are used. When there are 2 principal components, the line (red line) is closest to the manual results (dots). Therefore, the optimal number of principal components is 2.
Evaluation and comparison
By using the Dataset-A, we get the optimal parameters for the proposed PCA based method, and then we use these parameters (9×9 patch size and 2 principal components) and evaluate the method by using Dataset-B and Dataset-C. The results obtained by this way are named as the proposed method with parameter turning. We compare them with two other results, which are achieved by the conventional Otsu-thresholding method and the proposed method without parameter turning respectively. The latter one is the same as what we reported in the previous study [11].
Figure 13 gives examples of segmented results for different methods when we choose three frames for both Dataset-B and Dataset-C. It can be seen that the conventional Otsu-thresholding achieved under- or over-segmentation results (the 2nd column of Fig. 13(a) and (b)). The two results given by the proposed method are similar and both of them are looked better than the Otsu-thresholding results.
Figure 14 gives the graph to show the wear degree calculated by different methods for all images in Dataset-B and Dataset-C. It can be seen that the lines (blue color) obtained from Otsu-thresholding are noisy and far from the dots that referrer to the manual segmentation results. The two lines (red and green colors) obtained by the proposed method are better. Both of them are smoothing and similar as the manual segmentation results. It is seemed that the result obtained by the proposed method with parameter turning is better since the line (green color) is the closest one to the dots. This is demonstrated by the quantified evaluation, where we calculate the absolute difference of between the wear degrees obtained by different automatic segmentation methods against to the ones obtained by the manual segmentation. The mean values and standard deviation values for each automatic segmentation method are summarized by Table 2. It can be seen that the proposed with the parameter turning gives the best results, since it gives the lowest mean value.
The proposed method can run fast on a personal computer with Intel(R) Core(TM) i7CPU 870 and 4.00GB memory. The proposed method without parameter turning of average processing time for one image is about 15.21 second. The proposed method with parameter turning of average processing time for one image is about 13.78 second, which is fast enough for a stand-along time of device cutting on a product line.
Table 3 gives examples of training step results when we choose different patch size.
Comparison with gabor filter-based segmentation method
Yoshihara etc [13] proposed a segmentation method based on Gabor filter for the worn region detection of throw-away tips. After Gabor filtering, the edge between the worn and non-worn regions can be greatly emphasized as shown in Fig. 15. In order to give the worn region, morphology Filter is used on the binarized Gabor-filtered image; a result is shown in Fig. 16. However, some worn region still cannot be detected, and thus, [13] used some manual step to give the final segmentation result.
Figure 17 gives examples of the final refined results of Gabor filter-based method. From Fig. 17, it can be seen that this method leads to a lot of detection noise, and results in very large oscillation even for two contiguous tip images in time. On the other hand, our proposed method can significantly reduce this detection noise and achieve more stable detection accuracy.
Conclusion
We proposed an automatic checking system to inspect cutting wear of throw-away tips in this paper. In the proposed method, a camera-based equipment was installed onto the actual product line to inspect the whole cutting procedure. The captured time-series images were analyzed by a principal component analysis method to extract the area of cutting wear on throw-way tips, and then a quantified measure is proposed to measure how the tip has been worn in the cutting of mental materials. Experimental results showed that the proposed system was able to inspect the cutting wear with high accuracy.
By using the proposed automatic checking system, not only the inspection time can be saved, but also it would be possible for the earlier detection of cutting wear for throw-away tips. In future, we will try to improve the inspecting precision of the proposed automatic checking system, and make it to be used in practice.
Footnotes
Acknowledgments
This research was supported in part by the Recruit-ment Program of Global Experts (HAIOU Program) from Zhejiang Province, China.
