Measurement of Micro Burr and Slot Widths through Image Processing: Comparison of Manual and Automated Measurements in Micro-Milling

In this study, the burr and slot widths formed after the micro-milling process of Inconel 718 alloy were investigated using a rapid and accurate image processing method. The measurements were obtained using a user-defined subroutine for image processing. To determine the accuracy of the developed imaging process technique, the automated measurement results were compared against results measured using a manual measurement method. For the cutting experiments, Inconel 718 alloy was machined using several cutting tools with different geometry, such as the helix angle, axial rake angle, and number of cutting edges. The images of the burr and slots were captured using a scanning electron microscope (SEM). The captured images were processed with computer vision software, which was written in C++ programming language and open-sourced computer library (Open CV). According to the results, it was determined that there is a good correlation between automated and manual measurements of slot and burr widths. The accuracy of the proposed method is above 91%, 98%, and 99% for up milling, down milling, and slot measurements, respectively. The conducted study offers a user-friendly, fast, and accurate solution using computer vision (CV) technology by requiring only one SEM image as input to characterize slot and burr formation.


Introduction
Workpiece optimization is an important procedure in micro-machining applications [1,2]. Today, micromachining is widely used in the manufacturing of micro-sized parts for various applications such as electronics, optics, automotive, aerospace, and biomedical. Despite the high performance of the micromachining process, the quality of micro-sized parts is related to the burr formation [3,4]. Especially in researches on micro-machining processes and working piece analyses, the precision measurement on slot and burr widths is necessary for better investigation of the micro-machining process and optimization of the machining conditions [5][6][7]. In micro-machining process, cutting conditions and cutting parameters signi cantly affect the burr formation [8][9][10]. In order to minimize burr formation, new cutting conditions are determined by measuring burr dimensions after micro-machining process. Before the micro-machining process, nite element modeling or mathematical model based on response surface methodology (RSM) are applied to decrease burr size [11][12][13][14]. Considering the complex geometrical shapes of the slot and burr on a machined workpiece, accurate, rapid, and practical measurement of slot and burr parameters using SEM images is a worthwhile utility for fundamental research [3,15,16].
Various methods are often used by researchers for slot and burr measurements [2,8,11,17]. One of them is to use a screen caliper to measure the slot and burr widths of an image that is captured under an scanning electron microscopy (SEM) [18,19]. In this approximation, an SEM microscope image measured with the screen caliper using pixel information is used to determine the parameters of the working piece which highly depends on the user-related error. This method is inconvenient and manual measurement is required for each image which is a long time process for investigating a large number of SEM images [18,19]. The next procedure for slot and burr widths measuring is to use three-dimensional optical pro lometer which is commercially available from technology labs or various companies [5,20]. Although the pro lometer instruments make the measurement very practical and precise, these are mostly present in well-funded labs because of their relatively higher costs. An arti cial neural network (ANN) is the another method to predict the formation of burrs in the micro machining [21]. The other approach is to use image processing software to measure the slot and burr widths [3,22,23]. It is a well-known technique with high accuracy and the ability to measure two-dimensional distances with different properties expressing mathematically for a large number of images. However, due to the license costs of the advanced image processing software and lack of pinpoint solutions, these are not available in many research facilities. There are also few open-sourced approaches [24] for measuring slot borders and burr lengths on a machined workpiece using computer vision technology. For example, ImageJ which released by the National Institute of Health of the United States of America [25]. It is published as free software that can be used to measure slot and burr from a captured image. Nevertheless, the image processing tools are limited and not proper for situations that may need multiple threshold operation for measuring complex SEM output in the same image. In laboratories with limited resources, the screen caliper method is the only option for investigating of slot and burr parameters. Therefore, there is a requirement for an open-sourced, user-friendly, high speed, automated, and accurate procedure for measuring slot and burr.
Recently, computer vision and feature extraction are continuously evolving and their popularity is increasing with the help of advanced technology [26][27][28][29].
In this study, an automated slot and burr measuring method based on computer vision (CV) technology is demonstrated using an open-sourced image processing library. The approach offered here is conducted to be an accurate and robust method for precisely measuring slot and burr widths, and can be used for slot and burr evaluation in micro-machining research applications.

Machining Parameters
In this study, Inconel 718 alloy was chosen as the workpiece. Cutting tools with different speci c properties were used to provide burr formation in different sizes and to determine the success of the image processing method ( Table 1). The machining parameters are also given in Table 1. Micro-milling tests were performed under dry conditions. In Table 1, slots A, B, and C belong to the cutting process applied with the same cutting tool. Slot A is the SEM image captured from the start of the milling process. Slot B and C are the SEM images captured after the cutting lengths of 45 and 135 mm. Other slots correspond to different tool geometries.
For the micro-milling tests, a CNC vertical machining center with a maximum power of 2.2 kW and maximum spindle speed of 24,000 rev/min was used. Before the cutting tests, cutting tests, precursory checks were conducted on the axial run out on the spindle and it was determined that the size of the run out was around 2 µm.

Image Processing Stages
An automated slot and burr measuring software to calculate borders of the slot and lengths of the burr on a machined workpiece demonstrated. The software algorithm is designed to process SEM images to measure slot and burr using peak points and ROI of the image and a reference scale coe cient in pixels for the prede ned ltering parameters. The slot and burr measuring software require an SEM image, a metric reference coe cient in pixel and, prede ned threshold parameters for Hue Saturation Value (HSV), and Black-White (BW) transforming operations. The result from the software is the slot and bur parameters using an input SEM image. A block diagram, which represents the algorithm of software is presented in Fig. 1.
The measuring process is initiated with an SEM image input. At rst, the SEM image obtained by the software as a color image. Next, the image is converted to HSV values and a threshold is applied concerning the pre-de ned threshold parameters by the user. The BGR image is masked using the thresholded HSV image. In the next stage, the image is converted to the BW. The Gaussian lter, a blur lter, and a second threshold are applied for minimizing the effect of the background. Then, BGR values are calculated by summing color indents for each column which is used for nding the vertical peak values. Detected peaks are considered as vertical lines which, represent slot borders. In the next stage, two ROIs are determined according to the slot borders on the left and right sides of the image for calculating the burrs. The ROIs for the left and right sides of the images indicate the burrs. These two ROIs are reprocessed using previous steps from the beginning for determining burr lengths using the peak values but horizontal peak values are considered. A pre-de ned coe cient is used to calculate the distances in the metric unit before processing the results. In the result stage, each peak value is used to indicate the determined borders of the slot and length of the burrs for the left and right sides of the image. The owchart of the solution is indicated in Fig. 2.
Slot and burr evaluation process is divided three main parts by processing image with three steps. The vertical peak values are determined in the rst step and borders are determined respect to the these peaks using the actual image. In the next steps cropped images are processed for investigating left and right side burrs parameters. These images are limited with the slot borders for both left and right side burr. The burr parameters related to the peaks are investigated using horizontal peak values from the cropped images (Fig. 3).
The slot determining stage starts after processing the image with respect to the given image processing procedures, vertical peak values are considered for slot length and horizontal peaks for burrs. These peaks are determined by summing BGR values of each column, which is the vertical and horizontal sum of the pixel indents. The image is divided into two parts for determining the slot borders for the left and right sides of the image. The calculated peaks are the maximum values for both the left and right sides considered as slot borders. The pixel difference of the slot for the X-axis gives the length of the slot and the result is converted to metric units by multiplying the difference with a metric coe cient (Fig. 4).
In the next stage, the ROIs are determined by referencing detected borders of the slot. Two vertical imaginary lines are drawn on the image to extract the ROIs for the left and right sides considering the slot borders. The ROIs mainly include the data about burr parameters. In the ROI extracting step, the maximum X value for the left side ROI and the minimum X value for the right side ROI was referenced and limits of the image: the minimum X value and the maximum X value are used for the left and right side ROI, respectively. In the sequel, the two ROIs are generated considering the slot borders and image limits.
The ROIs are processed for determining the biggest burr from the peaks and the integral of the chart is used to investigate the burr area. An example result of a processed image for the biggest burr detected from the peaks and burr area for the left and right side of the image are shown in Figs. 5 and 6, respectively.

Manual Measurement
After cutting tests, SEM analysis was performed in order to measure the slot and burr widths manually.
The SEM images were taken at different magni cations. The slot and burr widths were measured using Screen Caliper software. Figure 7 shows  Figure 8 shows the SEM images of slots. The SEM images were captured at different magni cations to determine the changes of success rates. The radius of tool edge and its sharpness decrease as a result of the abrasive wear. The wear of micro cutting tool increases due to the cutting length for same cutting tool and parameters. From all reasons above, the burr widths on the machined slot sides (Fig. 8a-8c) increased respect to the cutting length. It was also observed that the burr widths increased due to the effect of the increasing number of cutting edge and helix angle (Fig. 8d-8e). And there is no clear effect of the axial rake angle on the burr width. The other prominent nding in Fig. 8 is that the burr widths are larger on the down milling sides. However it is possible to see similar burr widths on the down and up milling sides, which is a possible output of the cutting tool wear. In the similar studies a high correlation is observed for the slot width due to the cutting tool wear [2,18,19,30,31].

Micro Burr Widths For Up Milling And Down Milling Sides
Up milling and down milling results are shown in Figs. 9 and 10. Measurements of micro burr widths at the up milling and down milling sides are evaluated using both manual and automated methods. The results indicate that there is a high correlation between automated and manual measurement results. The obtained results from the experiments show the accuracy of the automated measurements is very close to manual measurements. It is observed that the accuracy rates are found above 91.3% and 98.2% for up milling and down milling, respectively. Additionally, the burrs are detected with the software more accurately increasing the accuracy rate. Mostly, in cutting tests down milling side has more burrs compared to the up milling side. It is understood that the down milling side accuracy is higher than the up milling side with respect to the increasing burr width. The same difference is clearly seen from the visual observation on SEM images for the burr widths.

Micro Slot Width
Slot widths are directly dependent on the tool diameter. And there is a negative correlation between the tool wear and slot width. In the experiments, cutting tools approximately 1000 µm diameter were used with different helix and axial rake angles and cutting edge number. According to the slot width determining stage results, the accuracy is independent of the tool parameters (indicated in Table 1). The conducted measurements show the accuracy of the automated measurement for determining the slot width is very close to the manual measurement with 99.6% (Fig. 11).

Success Rate (%) of Automated and Manual Measurements
In Fig. 12, the averaged accuracy is shown for up milling, down milling sides, and slots from seven SEM images. According to the conducted experiments, both the manual and automated measurements addressed accurate results. Measurements results obtained from the up milling side are shown a good correlation with manual measurements. The result for the up milling side is found 91.26% and a better result obtained from the down milling side with 98.18%. The slot measurements indicate very close results (99.58%) to the known manual measuring method.

Conclusions
In the present study, an image processing method is proposed that compared with a widely used manual burr and slot measurement method. An open-sourced image processing library is used for processing SEM images. The burr and slot measurement software showed a good correlation to the manual measurements. It is a swift, accurate, and time-saving alternative method for slot and burr investigating experiments. The accuracy of the proposed method is above 91%, 98%, and 99% for up milling, down milling, and slot measurements, respectively.
Moreover, the accuracy of the results is independent of the SEM images at different magni cation and speci c tool properties such as helix angle, axial rake angle, and the number of cutting edge.
The proposed image processing method has the potential to investigate the surface quality of micromachined parts, swiftly and accurately.