iconOpen Access

ARTICLE

crossmark

An Image Analysis Algorithm for Measuring Flank Wear in Coated End-Mills

Vitor F. C. Sousa1, Jorge Gil1, Tiago E. F. Silva1, Abílio M. P. de Jesus1,2, Francisco J. G. Silva1,3, João Manuel R. S. Tavares1,2,*

1 Institute of Science and Innovation in Mechanical and Industrial Engineering, Campus FEUP, Rua Dr. Roberto Frias, Porto, 4200-465, Portugal
2 Departament of Mechanical Engineering, Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias, Porto, 4200-465, Portugal
3 CIDEM, ISEP, Polytechnic of Porto, Rua Dr. António Bernardino de Almeida, Porto, 4249-015, Portugal

* Corresponding Author: João Manuel R. S. Tavares. Email: email

Computers, Materials & Continua 2025, 83(1), 177-199. https://doi.org/10.32604/cmc.2025.062133

Abstract

The machining process remains relevant for manufacturing high-quality and high-precision parts, which can be found in industries such as aerospace and aeronautical, with many produced by turning, drilling, and milling processes. Monitoring and analyzing tool wear during these processes is crucial to assess the tool’s life and optimize the tool’s performance under study; as such, standards detail procedures to measure and assess tool wear for various tools. Measuring wear in machining tools can be time-consuming, as the process is usually manual, requiring human interaction and judgment. In the present work, an automated offline flank wear measurement algorithm was developed in Python. The algorithm measures the flank wear of coated end-mills and slot drills from Scanning Electron Microscopy (SEM) images, according to the ISO 8688 standard, following the same wear measurement procedure. SEM images acquired with different magnifications and tools with varying machining parameters were analyzed using the developed algorithm. The flank wear measurements were then compared to the manually obtained, achieving relative errors for the most common magnifications of around 2.5%. Higher magnifications were also tested, yielding a maximum relative error of 13.4%. The algorithm can measure batches of images quickly on an ordinary personal computer, analyzing and measuring a 10-image batch in around 30 s, a process that would require around 30 min when performed manually by a skilled operator. Therefore, it can be a reliable alternative to measuring flank wear on many tools from SEM images, with the possibility of being adjusted for other wear measurements on different kinds of tools and different image types, for example, on images obtained by optical microscopy.

Keywords

Image processing; wear measurement; machining

1  Introduction

Machining remains a very important manufacturing process, not only because it is present in various industry sectors but because it is still the preferred procedure to obtain high-quality and high-precision parts. This is especially true for the automotive, aeronautical, and aerospace sectors, which are quite demanding, particularly in the tight tolerances of the produced parts [1,2]. Usually, these parts are produced by turning, milling, or drilling machining processes or their combination [3].

Although its relevancy, quite a few studies about machining processes focused primarily on their optimization and overall improvement [4]. Process optimization can be achieved in several ways by studying the influence of machining parameters on the processes’ performance [5]. For example, the parameters impact the quality of the produced parts [6,7], the tool’s wear, and the process’s efficiency and stability [8]. These studies are quite useful, as they enable the creation and employment of new machining and lubrication techniques [9,10], new tools, tool materials, and tool geometries, as well as providing valuable information regarding the tool’s wear progression as well as the machinability of the alloys themselves [11]. On the other hand, machinability studies are useful, particularly in the case of hard-to-machine materials, such as nickel-based or titanium alloys [12]. These materials induce high tool wear levels, causing premature tool failure when machining. One example is Inconel 718 alloy, particularly known for its tendency to adhere to the tool’s surface, causing high abrasive and adhesive wear [13]. One of the advances made to improve the machining process and mitigate problems from machining these hard-to-cut materials is using tool coatings. It is common to employ coated tools to produce machined parts, particularly parts made of hard-to-machine alloys that require high precision [14,15]. This high precision is achieved using a tool that preserves its geometry; therefore, preserving this geometry for the longest time is beneficial. Tool coatings help to retard tool wear as well as enable the use of more aggressive machining parameters, improving process efficiency. Some known coatings used in demanding and high-speed machining operations are the TiAlN coatings and TiAlN-based coatings [16], which contain doping elements that confer the coating with increased mechanical or physical properties.

Assessing the tool’s wear and life is crucial to improving machining processes [17,18]. Standards evaluate the wear sustained by machining tools; for example, the ISO 8688-2 standard is used for milling processes, offering a tool wear measurement and tool life testing procedure. In this case, the flank wear of end-mills is measured until reaching a maximum value mentioned in the standard. More standards are applied to different tools, such as drills, turning tools, and cutting inserts for milling and turning. However, the focus of this study is the assessment of tool wear in end-mills. There are different ways to measure the developed flank-wear in end-mills. However, the most common is using microscopy to analyze the tools’ flank and then an image analysis software to perform measurements, for example, the ImageJ software (National Institutes of Health and the Laboratory for Optical and Computational Instrumentation, USA). There are other alternatives regarding the measurement software, but they are similar in the measuring process. Firstly, a scale is defined, and then, the flank wear is measured according to the ISO 8688-2 standard. Therefore, analyzing and measuring each tool’s flank can be quite a time-consuming process. Furthermore, since it is usually a manual process, it is prone to human error. As such, there is room for the development and employment of an automatic measurement solution that detects and measures the wear of machining tools. Image processing and analysis algorithms can be used for that.

Still, regarding tool wear analysis, it is important to note that tool wear assessment is performed by measuring wear and evaluating wear mechanisms [19]. This is usually performed using Scanning Electron Microscopy (SEM) based analysis, enabling a detailed assessment of the wear mechanisms. These wear mechanisms offer valuable insight into how the wear develops in the machining tool, providing explanations that can improve the process, particularly of the tools being used [20]. However, evaluating the wear mechanisms can be difficult, mainly when performed by humans. However, there could also be an algorithm to evaluate some wear mechanisms, particularly regarding adhesive wear. Usually, adhesive wear occurs after some material that is adhered to the tools’ surface is removed, taking tome tool coating or even substrate material with it, leaving a crater on the tool’s surface [21]. As there are already some algorithms that can detect some form of wear [22], it is possible to develop algorithms to consider adhesive wear. However, the use of algorithms for even measuring flank wear is quite sparse.

Machining processes benefit from computational image analysis; for example, Carvalho et al. [23] suggest a computational image analysis solution to perform the segmentation and characterization of the chip generated by machining a titanium alloy. The chip segmentation facilitates the extraction of valuable information regarding process optimization; for example, a further algorithm can characterize and perform measurements on the segmented images of the generated chips in a completely automated way. There are some studies also regarding the evaluation of tool wear, such as the work by Fong et al. [24], where an algorithm capable of quantitative measurement of tool wear using image-based cross-correlation analysis is presented. In this work, the authors successfully tried to develop a computational vision solution capable of evaluating wear on various tools, achieving good results in measuring tool wear on an end-mill, taper tap, drill bit, and carbide insert. However, the developed solution struggles with finer measurements, unable to measure wear under 100 µm, although it can detect catastrophic tool failure. Agarwal et al. [25] presented a procedure using an image processing algorithm developed in MATLAB (MathWorks, USA) to measure flank wear in trochoidal milling of Inconel 718. Using the proposed solution, the authors could accurately measure flank wear and even characterize wear evolution over time. The studied milling cutter had a considerable diameter of 16 mm, with the wear being monitored after the machining operation. However, this methodology might not be as suited for smaller diameter cutters, but the developed work significantly contributes to this domain. Other methods for assessing tool wear have been proposed; for example, recent methods involve using Artificial Intelligence (AI)-or model-based approaches, where the tool’s wear is predicted not only directly using images but by analyzing other factors such as cutting forces and vibration. This information is stored in datasets and used as the basis for tool wear prediction [26], not heavily relying on image analysis. Regarding AI-based, Chehrehzad et al. [27] propose an AI-based approach to predict instant flank wear during operation by using data acquired by a dynamometer regarding cutting forces and using an industrial edge device to collect drilling data during the process.

In the present work, a novel automatic tool flank-wear offline measurement algorithm was developed in Python (Python Software Foundation, USA). The developed algorithm was calibrated to analyze and measure tool flank wear from SEM images according to the ISO 8688-2 standard, commonly used to evaluate and characterize tool wear in coated end-mills and slot drills. As previously mentioned, measuring and evaluating tool wear is crucial for improving machining processes and developing novel tools. However, this is usually performed manually and, therefore, is prone to mistakes and very time-consuming. There are very few alternatives to the manual flank wear measuring method. However, the developed algorithm can employ a faster, automatic, and more precise procedure, and has shown to be a promising solution to perform these measurements. The methodology for developing the flank wear measurement algorithm is presented and explained in the next section, followed by the results of the algorithm’s testing, where SEM images were used and measured, and their discussion.

2  Methodology

The methodology for developing the automatic flank wear measurement offline algorithm is presented in the present section, starting with explaining the procedure to quantify the flank wear sustained by end-mills used in machining operations. The algorithm was developed according to this procedure, proposed in the ISO 8688-2 standard, with its code implementation being written in Python. The measurements are performed on images obtained during wear analyses, mainly during SEM analysis, for which the algorithm was particularly adjusted. The images and tools used to test the new algorithm are also presented, which are not exclusive to a single machining test campaign and were gathered from various previously conducted works, are described. Finally, the algorithm’s functioning is explained, i.e., how the flank wear measured from one SEM image of the machining tools’ flank is accomplished.

2.1 Flank Wear Measurement Procedure

Flank wear measurements are performed on machining tools’ flanks; usually, this is the value that is accounted for when wanting to assess tool life. The measured wear value is registered over time, over a cutting length, or a certain volume of removed material, thus enabling the analysis of the tool wear progression and determining the overall tool life. Flank wear is measured according to the ISO 8688-2 standard for end-mills and some types of drills, namely slot drills. This standard provides valuable information regarding the valid testing methods for tool life and wear assessment and measurement. In Fig. 1, wear on end-mills’ cutters can be observed.

images

Figure 1: Types of wear on milling cutters (adapted from ISO 8688-2)

As shown in Fig. 1, there are different types of flank wear, which are divided into three main categories: uniform flank wear (VB 1), non-uniform flank wear (VB 2), and localized flank wear (VB 3). Usually, the parameter that is evaluated is VB 1; however, the other forms of flank wear are also often used to characterize tool wear. Different types of wear are described in the ISO 8688-2 standard, namely crater wear (KT), chipping wear (CH), flaking (FL), which is usually observed in coated tools and can be linked to coating delamination, and cracking (CR). Although these types of wear are described in the standard for evaluating end-mills and some drill types, flank wear is the primary type to be analyzed and quantified when assessing wear progression and overall tool life. Therefore, the present work focused primarily on flank wear, concretely VB 1 and VB 3, which are the criteria used to evaluate tool life in most cases.

There are several ways to measure and obtain the values for sustained tool wear; usually, the tools are subjected to a microscopic analysis where the tool’s flank is visible perpendicularly to the point of view of the person performing these measurements. A software solution can then be used to perform the measurements during the wear analysis. Optical or digital microscopy can be used to perform this analysis; however, SEM is often used. Images obtained via SEM are very detailed and offer valuable information that cannot be observed by optical or digital microscopy, particularly regarding coated tools’ wear and wear mechanisms to which the tools are subject. Furthermore, it is possible to perform manual measurements during the SEM analysis; however, this is a time-consuming practice. Moreover, SEM analysis can be expensive, especially compared to optical or digital microscopy. The other alternative for flank wear measurement, and one of the most employed, is saving the images during microscopic analysis and using general-purpose image processing and analysis software to perform the wear measurements to assess the tools’ wear. However, this procedure is very time-consuming and usually performed by humans, prone to measurement mistakes, particularly for many acquired images.

2.2 Selected Images and Tools

As mentioned, the images to be analyzed were of coated tools, mainly end-mills and drills subjected to machining tests on different materials using different cutting parameters. Thus, the images selected for this study were acquired from tools employed in similar operations that caused some flank wear degree on them in varying intensities. These tools’ wear was already characterized and quantified beforehand, with the images being obtained via SEM imaging. Given that the tools are coated, and their substrate is tungsten carbide (WC-Co), the sustained flank wear can be easily detected using SEM because the acquired images are displayed in greyscale, with the heavier elements presenting with lighter bright. Being on a greyscale, the images facilitate their easy computational processing. Some images used to conduct this work can be observed in Fig. 2.

images

Figure 2: SEM images obtained for tool wear analysis: (a) TiAlN/TiN coated end-mill used in the machining of titanium alloys, and (b) TiAlN coated end-mill used in the machining of stainless steel alloy

In Fig. 2, two tool flanks can be observed, with the tool in Fig. 2a being an end-mill with a 16 mm diameter used in the machining of a Titanium alloy and, on the other hand, Fig. 2b shows light flank wear on a 6 mm end-mill used for the machining of a stainless steel alloy. Still, regarding the images used, the lighter grey tones, particularly closer to white and near the cutting edge of the tools, correspond to the WC-Co, which is the exposed substrate of the tools being eroded or delaminated after machining. The less grey lighter tones correspond to the adhered material, which occurs during machining; in Fig. 2a, there is a portion of adhered material to the tool’s flank and cutting edge. The darker tones of grey correspond to the tool’s coating, which can be easily observed in Fig. 2b, where a portion of the tool’s coating was delaminated, exposing the WC-Co substrate underneath.

All the used images were obtained using the same SEM equipment, a FEI QUANTA 400 FEG scanning electron microscope (FEI Company, USA), provided with an EDAX Genesys Energy Dispersive X-ray Spectroscopy microanalysis system (EDAX Inc., USA). Therefore, all the images have the same information displayed in their bottom region. This means the scale is positioned in the same region from image to image. It is important to mention that during the analysis, the position of the tools is crucial to ensure a correct measurement. This is true even when performing these measurements manually.

In Fig. 3, the experimental images, which are related to different machining tools used in the machining of different alloys in two milling centers (HAAS VF-2 and DMG Mori DMU 60 eVo CNC milling centers), used here are depicted, mainly the images:

•   #1: 1000× magnification of a 16 mm TiAlN/TiN coated end-mill used in the machining of titanium alloy, showing a section of uniform wear along the tool’s edge;

•   #2: 220× magnification of a 16 mm TiAlN/TiN coated end-mill used in the machining of titanium alloy, showing the upper tool flank near the tool’s top area;

•   #3: 5000× magnification of a 4 mm TiAlN coated end-mill used in the machining of stainless steel alloy, showing minor flank wear and coating delamination (revealing substrate);

•   #4: 100× magnification of a 10 mm TiAlN coated end-mill used in the machining of Inconel 718 alloy, showing flank wear distributed along the tools’ clearance face;

•   #5: 100× magnification of a 10 mm TiAlN coated end-mill used in the machining of Inconel 718 alloy, showing flank wear distributed along the tools’ clearance face;

•   #6: 220× magnification of a 10 mm TiAlN coated drill’s flank, showing material adhesion, exposed substrate and flank wear, used for drilling titanium alloy;

•   #7: 100× magnification of a 10 mm TiAlN coated end-mill used in the machining of Inconel 718 alloy, showing flank wear distributed along the tools’ clearance face;

•   #8: 220× magnification of a 16 mm TiAlN/TiN coated end-mill used in the machining of titanium alloy, showing the upper tool flank wear;

•   #9: 100× magnification of a 16 mm TiAlN/TiN coated end-mill used in the machining of titanium alloy, showing the sustained flank wear along the tool’s side, i.e., lower flank wear damage, exhibiting some material adhesion as well as significant chipping;

•   #10: 220× magnification of a 16 mm TiAlN/TiN coated end-mill used in the machining of titanium alloy, showing the upper tool flank near the tool’s top area.

images

Figure 3: The 10 SEM images used here for tool wear analysis

2.3 Flank Wear Measurement Algorithm

The Python programming language was chosen mainly due to its versatility and availability to implement the flank wear measurement algorithm. As mentioned, the algorithm analyzes the input SEM image and provides the measured flank wear value. The flowchart of the developed algorithm is shown in Fig. 4.

images

Figure 4: Flowchart of the developed flank wear measurement algorithm

The flowchart for the flank wear measurement algorithm, shown in Fig. 4, includes 6 main steps; however, some “intermediary” steps are comprised in some of them. For this reason, a more detailed explanation of each of the algorithm’s steps is given below.

The two first steps regard the preparation that the algorithm performs before the measurement process, being the first step the only one that requires user input. After these two steps, the algorithm starts processing the input image, mainly binarizing and filtering it to obtain the wear area outline used to perform the measurement. In step 4, the algorithm “reads” and calculates the scale value for the image to be analyzed, which is then used to calculate the measured flank wear. The measurement is performed in step 5, which is explained in more detail in the next section. After step 5 is completed, the algorithm checks if all the images inside the starting directory have already been analyzed; if not, the algorithm will go back to step 3 and apply the procedure to the next image. After all the images are processed and analyzed, the flank wear measurement data and the images obtained from the processing steps are saved in an output directory created by the operator in step 1.

2.3.1 Step 1—Preparation

Firstly, some files and the initial algorithm configuration need to be prepared from some user inputs. There is a need to define the analysis region in the images and identify a directory of the images to be analyzed and a directory of the outputs, i.e., where the processed and analyzed images will be saved.

Regarding the definition of the analysis region, an example of this region is highlighted in Fig. 5 in green. This step ensures that only the tools’ images are displayed and processed, cropping out the legend and scale regions.

images

Figure 5: Analysis region (delineated in green) of an SEM image of an end-mill’s flank

Images obtained in the same way or with the same equipment have a fixed dimension; thus, by defining this region, a whole batch of images can be analyzed by going through this step only once.

2.3.2 Step 2—Reading the Images Batch

After all the images to be analyzed are placed inside the desired directory, the algorithm reads these images and sets a number for each one (starting with 0 (zero)). This is useful as the outputs with the processed images, and the measurement results follow this numbering.

2.3.3 Step 3—Image Processing

In this step, the input image is processed, this is, from the original i-th image, the wear outline is generated. However, some steps must be performed to obtain the desired result. A flowchart regarding this main step is presented in Fig. 6.

images

Figure 6: Flowchart showing the intermediary steps of the main step 3 for processing an input image

As can be observed in the flowchart in Fig. 6, there are 6 intermediary steps in the image processing task, starting with the gamma correction of the original image. This is performed because the image is already supplied on grayscale, and, thus, the gamma correction is performed, and the resultant image is inverted to proceed to the image binarization step, as shown in Fig. 7.

images

Figure 7: Steps to achieve the initial binarization of an SEM image: (a) original image, (b) image with applied gamma correction, and (c) binarized image

A threshold needs to be applied to obtain the binarized image; in this case, the Sauvola threshold is used for that purpose. In Fig. 7a, the original image can be observed; as the image was obtained by SEM, it was supplied in grayscale. Furthermore, the abrasive wear is depicted in brighter levels, particularly close to white, due to the atomic number of the substrate material being higher than that of the adhered material and the tool’s coating, and quite easily, therefore, identified in SEM analysis. The original image is then gamma-corrected and inverted to ease the further binarization process.

Regarding the operation performed in Fig. 7b, it is important to note that the algorithm can be further adapted; for example, one can change the image’s gamma correction, adjusting the brightness and contrast of the desired image. This can be useful for these operations, as some coatings or machined materials may present different grey tonalities. Therefore, if a tool flank presents high levels of material adhesion, this can “confuse” the algorithm, and it attributes a black spot on the adhesion areas. An example of this can be observed in Fig. 8, where the adhesion area is identified in red. This “confusion” can lead to inaccuracies in the determined value of the wear measurement, as the algorithm cannot determine the tools’ edge as clearly, resulting in a thinner or wider wear area.

images

Figure 8: Binarization of an SEM image with adhered material, which is shown inside the red circle: (a) original SEM image, (b) gamma corrected image, and (c) binarized image, exhibiting a dark spot on the adhesion area

On the other hand, the material adhesion at higher magnifications can be interpreted as flank wear, even when not adhered to the flank, for example, on the tool’s surface or clearance face. Some of this adhered material can be observed in Fig. 8a, where specs of “light grey” material can be observed in this area. If excessive, this material forms a wide lighter area wrongly interpreted as flank wear, as previously mentioned.

Finally, the image is binarized, Fig. 7c, and the area of tool wear is depicted in white; however, some black spots inside this area can exist, which can negatively influence the tool wear measurement procedure, as some of these black spots are close to the tools’ edge.

To remove the “black spots” from the area of tool wear, shown in Fig. 7c, it is necessary to perform some morphological operations to the binarized image, as depicted in Fig. 9, which represents the continuation of the image processing pipeline shown in Fig. 7. Firstly, a black top hat filter with a disk structuring element with a 2-pixel radius removes the black spots inside the tool wear area, as shown in Fig. 9a.

images

Figure 9: Morphological operations applied to a binarized SEM image: (a) a black top hat filter is used to remove noise inside the wear area, (b) a white top hat filter is applied to the wear area to help with edge detection, and (c) a black top hat filter is used to clean the wear area further

The small radius was chosen to avoid some “discontinuities” in the wear area. Secondly, there is a need to detect the tool’s edge, which facilitates the measuring procedure, Fig. 9b. For that, a white top hat filter highlights the bright parts of the related area. Thus, a custom 10 by 18 structuring element is used:

images

The structuring element used by the white top hat filter helps with edge detection, correcting problems regarding the occlusion of wear areas and some worn areas that are not on the tools’ edge but rather on the tools’ top, as seen in Fig. 10.

images

Figure 10: Application of morphological operations to an SEM image of a tool worn: (a) after the application of a black top hat filter, with some wear on the tool’s top being visible in the red delineated region, (b) after the application of a white top hat filter to remove the wear pattern on the tool’s top, and (c) after the application of a final black top hat filter to clean the wear pattern further

Fig. 10a shows a tool that has some wear damage on the tool’s top area, which is visible on the flank wear image. The white top hat filter is applied to differentiate between these two areas. Note that the white area delineated in red in Fig. 9a disappeared in Fig. 10b. This needs to be performed, as that wear pattern would influence the subsequent wear measurements to be performed.

After performing the white top hat filter to detect the tool’s edge (Fig. 9), another black top hat filter is applied, with a disk structuring element with an 8-pixel radius. This is a larger disk compared to the first used black top hat filter (2-pixel radius) because the main function of this last filter is to “fill” the wear area with white, as the main wear area is already defined (Fig. 9c).

Finally, with the wear area clearly defined and filtered, i.e., de-noised, the final step of image processing, which is the tool wear area outline generation, can be performed. The outline of the wear area obtained from the case in Fig. 9 is presented in Fig. 11. This outline enables the algorithm to perform the measurement, i.e., image analysis, procedure described in Section 2.3.5 in more detail.

images

Figure 11: Outline of the identified flank wear generated by the developed algorithm (the x and y axes’ numbering represents the input image’s pixels)

2.3.4 Step 4—Reading of Image Scale

In this step, the algorithm “reads” the scale depicted in the image according to the flowchart presented in Fig. 12.

images

Figure 12: Flowchart showing the intermediary steps of the main step 4 used to obtain the image scale under analysis

Although this step comprises six intermediary steps, as the previously presented step 3, it is simpler as it does not involve the application of any image filter. However, it is still necessary to perform its binarization. So firstly, the scale area is defined by the algorithm; if a batch of images is being analyzed, the area will be the same for every image as it is assumed they were all acquired by the same image acquisition equipment.

The image is binarized using the Sauvola threshold technique again, and then a package for Python that recognizes numbers is used to “read” the scale number. Then, the maximum and minimum values of the scale are determined, which is achieved by attributing coordinates for the leftmost and rightmost white pixel in the x-axis of the image. Then, the distance in pixels is determined to calculate the length using the number recognition package. This value is saved for the flank wear measurement performed in the following main step. An example of a processed and analyzed scale can be observed in Fig. 13, which is the scale image of the images shown in Figs. 7, 9, and 11.

images

Figure 13: A scale area image for the algorithm to calculate the associated scale

2.3.5 Step 5—Flank Wear Measurement

With the input image processed, the flank wear measurement can be performed. As aforementioned, this measurement is performed according to the ISO 8688-2 standard, trying to emulate the manual procedure to obtain the flank wear values. The flowchart of the intermediate steps for flank wear measurement can be observed in Fig. 14.

images

Figure 14: Flowchart showing the intermediary steps of main step 5 devoted to the flank wear measurement

Firstly, the wear outline is analyzed, and then the x and y coordinates for the right-most and leftmost sides of the wear area are stored in arrays. After knowing these coordinates, a linear regression is calculated for the two sides of the outline, and the respective linear regression straight lines are plotted. The rightmost straight linear regression line is represented in yellow, while the leftmost is in blue. Then, the algorithm determines the thickest point between the lines in pixels. After this, a straight line parallel to the rightmost linear regression line is plotted in green at the broadest section between these lines. Having these two straight lines defined, a red perpendicular straight line is plotted between the yellow and green lines. Then, the algorithm determines the length of this red perpendicular straight line in pixels, which is then used to calculate the flank wear value according to the previously read scale. An example of a measured image can be observed in Fig. 15. This procedure helps mitigate problems associated with non-consistent or non-uniform flank wear along tools’ flank. According to the mentioned ISO standard, the maximum wear line can be used as an indicator.

images

Figure 15: A scale area image for the algorithm to calculate the associated scale

2.3.6 Step 6—Saving the Data

After measuring the flank wear, and if all the images placed in the initial directory are already processed, the algorithm creates and saves the output data in a CSV file. For each image, the output data comprises its number and the distance of flank wear in pixels according to the measured scale.

2.4 Flank Wear Measurement Algorithm Validation

To validate the developed algorithm, ten SEM images showing flank wear for various magnification values of differently coated tools that had machined different materials were used (Fig. 3). The flank wear depicted in these images was analyzed and measured using the ImageJ software, following the ISO 8688-2 standard procedure. The manually obtained values were then compared to those obtained by the proposed algorithm, calculating the relative error for each of the ten selected images. The values of relative error were then averaged.

3  Results and Discussion

Here, all the results obtained by the measurement algorithm are presented, starting with the output image files generated for each analyzed image. Then, the results regarding the flank wear measurement are presented.

3.1 Outputs—Generated Image Files

At the end of the algorithm’s running cycle, as described in Section 2, there must be a directory for the generated outputs: the processed and analyzed images and the CSV file containing the measured flank wear values.

Fig. 16 shows one of the generated output image files; it shows every step of the image processing pipeline, the image scale, and the plotted straight lines used in the flank wear measurement step.

images

Figure 16: Generated output for the input “Image #3” after being processed and analyzed by the developed algorithm, showing the results of its steps

It should be noted that the numbers displayed on the x and y axes of the images shown in Fig. 16 correspond to the image coordinates in pixels. Having these images generated at the end of a running cycle of the algorithm enables the operator to verify if all the steps were performed correctly, namely the binarization and noise removal, as well as the outline generation. This way, some parameters can be adjusted if the images are still too noisy, if the outline is not properly generated, if the scale is not properly recognized, if the measurements were performed in the correct area, or if the lines were not properly plotted.

The algorithm’s parameters that can be adjusted are mainly the contrast of the image to be binarized, the Sauvola threshold, and the configuration of the morphological operations, such as the black and white top hat filters. Of course, these parameters need to be adjusted to enable the analysis of the whole batch of image files, finding a suitable balance and compromise of them.

Multiple batches of files can be created to analyze different types of wear using different parameters. For example, images or tools with high levels of material adhesion to their surface can be grouped, and the algorithm’s parameters can be adjusted to analyze this type of wear. As can be observed in Fig. 8, this material adhesion can be considered as “not wear” by the algorithm, requiring some contrast adjustments.

3.2 Algorithm Measurement Results

As aforementioned, ten images were analyzed using the developed flank wear measurement algorithm (Fig. 3). Furthermore, this flank wear was manually measured using the ImageJ software. The results obtained manually and by the computational algorithm and their relative error for each of the images under study are presented in Table 1. Running the algorithm to measure the input batch of ten images required only 30 s using a common personal computer with an Intel® Core™ i7-10870H CPU at 2.20 GHz. During the algorithm’s running, a total peak of 18.8% of CPU usage was registered.

images

The relative error in Table 1 was calculated considering that the flank wear (VB) value obtained manually was the correct one. Overall, the relative error measured for the selected images is quite low and can be considered acceptable, with a maximum value of 13.44% found for “Image #3”, which has a very high magnification. However, this error does not exceed 5.30% for the remainder images. The high relative error value registered for “Image #3” can be attributed to its high magnification, being the only one of 5000× analyzed in the batch under study.

For magnifications exceeding the 1000× value, small deviations on the measured value can result in high values of relative error; for example, in the case of “Image #3”, the manually measured flank wear value was equal to 4.91 μm, while the value obtained by the algorithm was 4.25 μm (Table 1), which is not such a significantly different in practical terms; however, it causes a considerably high relative error value. This can happen particularly in cases where the wear is not accurately determined, as it does not show uniform flank wear. This can also be caused by material adhesion that influences the algorithm’s precision. However, this can be mitigated by adjusting the algorithms’ parameters regarding the image binarization step, considering the adhered material on the edge, or by adjusting the structuring element used in the white-top hat filter step. Although this can be adjusted and the error reduced, again, it is important to mention that these wear value deviations are not critical for these cases, as observed in the example of “Image #3”.

The error value was quite low for magnifications of 100× and 220×, which is quite satisfactory, as the lower magnifications images are less time-consuming to acquire when compared to higher magnifications such as 1000× and 5000× (Table 1). This means that the algorithm is reliable in measuring flank wear at these lower magnifications; therefore, when analyzing tool wear using SEM, the tools can be analyzed at these lower magnifications, optimizing the analysis time required for each batch of tools.

Although there seem to be higher relative error values at higher magnifications, “Image #1”, taken at 1000× magnification, exhibits an error value of 2.01% (Table 1). This is because the wear in this image is easily identified, as shown in Fig. 17, with the manually measured values being quite close to the ones measured using the proposed algorithm. The tool in this figure presents uniform flank wear, at least on the depicted wear zone, which facilitates the wear measurement by the algorithm; furthermore, the edge is also clearly identified.

images

Figure 17: Original “Image #1” depicting uniform flank wear at relatively high magnification (1000×)

As previously mentioned, the algorithm’s runtime is approximately 30 s, more precisely 30.16 s, to analyze the input batch of 10 images in a common personal computer, which means an average processing time per image of about 3 s. Smaller image batches were also tested, and the runtime remained consistent with this finding.

The common method to determine and measure tool flank wear is the manual one, as the wear intensity and tool type vary too much. Thus, when assessing tool wear, an operator is usually required to perform this work, and the measurement is performed according to the ISO 8688 standard, following the next steps:

•   After image collection, each image is opened and loaded into an image processing software, such as ImageJ™, which enables the definition of a scale and determination of distances between elements, such as straight lines, by converting the number of pixels into the corresponding distance value:

With the image open, the operator is required to determine the area where the wear measurement is to be performed, which is at the widest point of the wear zone;

•   After the last step, the operator must draw a straight line along the analyzed tool’s edge. Then, another straight line, parallel to the latter, is drawn at the zone of widest wear;

•   The operator then needs to draw a perpendicular line between these two previous parallel straight lines and determine this distance;

The value shown in the software regarding the straight line’s dimension, the operator then must register this value and move on to the next image to be analyzed.

The operator needs to perform these steps each time a new image is analyzed; if the next image has the same scale as the previous ones, the operator can skip the first manual step; nevertheless, this measurement process can be very time-consuming. Of course, when performing these manual measurements, a skillful software operator can perform the measurements quicker; nonetheless, that operator will usually take two to three minutes per image. It is also important to note that the operator must have some experience in wear analysis and knowledge of the methodology of the ISO 8688 standard, particularly for flank wear measurement performed on end-mills. Taking this into account, if performed manually, measuring the tool wear on the selected ten images (Fig. 3) would take approximately 30 min, while using the proposed algorithm, this could be cut down to only 30 s, significantly increasing the measurement process productivity. Of course, this requires a correct configuration of the algorithm and its initialization by determining the analysis and scale regions and configuring the correct parameters regarding image filtering, particularly if the images to be analyzed present high levels of material adhesion. However, this configuration can be performed by a more expert person. At the same time, the algorithm can be run by an operator with little experience, only requiring the placement of the image files in the analysis folder.

After being configured, the algorithm can be run with very low variation on the performed measurements, leading to a process with high repeatability and measurement fidelity. Additionally, multiple copies can be kept, having different configurations, one to analyze tools with high material adhesion and another to analyze tools exhibiting mainly abrasive wear. This wear type can be easily identified, and the operator can group the images quickly, creating multiple batches of images that can be quickly analyzed by the algorithm. As such, an operator with particularly low expertise can collect tool images and organize them to be analyzed and measured for multiple machining tools and processes if provided with relatively simple instructions. Some developed solutions already use image processing and analysis to determine or classify wear [28], as the one proposed by Hrechuk et al. [29], where an automated solution for assessing tool wear is used for turning inserts. The authors describe a way to determine flank wear by analyzing the wear crater on turning insert images obtained by optical microscopy and measuring it according to the standard for evaluating tool wear on this type of insert. The wear is determined based on the crater shape, manually or by automatic detection based on the Delanay triangulation and implenarity parameter. This is a novel method with high potential; however, it is a bit more difficult to implement than the developed algorithm.

Still, regarding the manual wear measurement method, although most cases can be generalized to be analyzed by the algorithm, some cases require human intervention and judgment. This is because either the algorithm cannot interpret the tools’ edge or there is adhered material occulting the wear.

3.3 Algorithm Limitations and Future Improvements

Although the algorithm is quite simple to use and provides accurate flank wear measurements, it has some limitations, for example:

•   Currently, it is limited to be used with SEM images of coated tools due to the high contrast between the coating and substrate materials in the images. In SEM analysis, this difference is quite easily visible; as such, the algorithm can measure the flank wear reliably. Nonetheless, the algorithm can be adjusted to analyze tools with different contrast materials, enabling the analysis of uncoated tools;

•   There needs to be an initial definition of the analysis region as well as of the scale regions; this may be more difficult if using images that are obtained using different SEM equipment;

•   There are some limitations to the location of sustained wear, although the algorithm can be adjusted; currently, the measurements are to be performed on the tools’ flank according to the ISO 8688-2 standard;

•   If the tools present too much adhered material, it is necessary to group the images with “similar” wear patterns into batches to enable adjustments in the algorithm, particularly for its image processing steps;

•   There are some high errors associated with the analysis and measurement of high-magnification images.

Considering these limitations, the proposed algorithm has room for improvement. Although the algorithm was designed for SEM image analysis and measurement, it can be adapted to optical microscopy. This type of microscopy is also commonly used when analyzing tool wear, as it can be performed more quickly than SEM-based analysis. However, using optical microscopy usually requires more attention to the scale definition, and the measurement is almost always performed manually, at least in an industrial environment. Regarding the adaptation of the algorithm to optical microscopy, it would require additional effort on image binarization, as the tool wear is not as evident as the one shown in SEM images. However, if end-mills are analyzed, the procedure is the same as presented in this work. As for the adaptation for the analyses of other tool types, if there is a standard procedure, the algorithm can be adapted, for example, for turning tools.

4  Conclusions

This work presented the development of a novel algorithm that can automatically measure flank wear sustained by end-mill and drills. The offline algorithm was developed in Python using various available packages. Reliable flank wear measurements can be obtained by “feeding” the algorithm with a batch of SEM images. From the conducted work, the following conclusions can be drawn:

•   The algorithm was developed to measure flank wear according to the ISO 8688-2 standard regarding the tool life assessment of end-mills and slot drills;

•   A batch of ten SEM images of different tools, acquired at different magnifications, was used to test the proposed algorithm;

•   The ten testing images were manually measured using the ImageJ software, which is commonly used for this purpose; the measurement values were then compared to the ones obtained by the proposed algorithm;

•   The maximum relative error value was equal to 13.44% for the image with the highest acquisition magnification; however, the second highest error was equal to 5.30%;

•   Higher measurement precisions were obtained for images of lower magnifications, such as 100× and 220×, with the average relative error for the analyzed images being equal to 2.49% and 2.11%, respectively, confirming the proposed algorithm’s competence.

•   There are quite some advantages associated with using an algorithm such as the one proposed here:

•   Can obtain reliable results regarding measured flank wear;

•   It is much less time-consuming than the common manual measurement process, with a run time for ten SEM images of 30 s on a common personal computer;

•   Is adjustable for different images and amounts of wear, with some image processing parameters being able to be changed to enable, for example, the analysis of tools that sustained more material adhesion to their surface;

•   Low average error for images acquired with low magnification; these images are easier to obtain and take less time to acquire, especially by SEM. As such, the analysis time can also be shortened if these low-magnification images are “fed” to the algorithm.

Despite its limitations, the developed algorithm is very useful, effectively reducing the measurement time of the sustained flank wear while not sacrificing accuracy. This is highly valuable for researchers and even tool makers who are required to analyze many tools and characterize their tool life, especially by registering the progression of flank wear during a certain machining operation. Moreover, the algorithm can be continuously improved, including different measuring techniques and support for different types of images. Usually, images of tools are obtained by optical or digital microscopy and not SEM. Although SEM analysis is crucial for analyzing wear patterns and mechanisms, flank wear can be assessed using different, less costly microscopy techniques. Therefore, the algorithm can be adapted to analyze and measure this wear on different tool types and images, such as turning tools and optical microscopic images.

Acknowledgement: The authors would like to acknowledge the contribution of the FCT-MIT grant gratefully, with the reference PRT/BD/154305/2023. This article partially results from the project “Sensitive Industry”, co-funded by the European Regional Development Fund (ERDF) through the Operational Programme for Competitiveness and Internationalization (COMPETE 2020) under the PORTUGAL 2020 Partnership Agreement.

Funding Statement: The authors received no specific funding for this study.

Author Contributions: Conceptualization, Vitor F. C. Sousa and João Manuel R. S. Tavares; methodology, Vitor F. C. Sousa; software, Vitor F. C. Sousa and Jorge Gil; validation, Vitor F. C. Sousa, Tiago E. F. Silva, and Jorge Gil; formal analysis, João Manuel R. S. Tavares and Abílio M. P. de Jesus; investigation, Vitor F. C. Sousa; data curation, Vitor F. C. Sousa and Francisco J. G. Silva; writing—original draft preparation, Vitor F. C. Sousa; writing—review and editing, João Manuel R. S. Tavares, Francisco J. G. Silva, Tiago E. F. Silva, and Abílio M. P. de Jesus; visualization, Tiago E. F. Silva, Francisco J. G. Silva, Abílio M. P. de Jesus, and João Manuel R. S. Tavares; supervision, Abílio M. P. de Jesus, Francisco J. G. Silva, and Tiago E. F. Silva. All authors reviewed the results and approved the final version of the manuscript.

Availability of Data and Materials: The data that support the findings of this study are available from the first author, Vitor F. C. Sousa, upon reasonable request.

Ethics Approval: Not applicable.

Conflicts of Interest: The authors declare no conflicts of interest to report regarding the present study.

References

1. Ali SH, Yao Y, Wu B, Zhao B, Ding W, Jamil M, et al. Recent developments in MQL machining of aeronautical materials: a comparative review. Chin J Aeronaut. 2025;38(1):102918. doi:10.1016/j.cja.2024.01.018. [Google Scholar] [CrossRef]

2. Sol ID, Rivero A, Salguero J, Fernández-Vidal SR, Marcos M. Tool-path effect on the geometric deviations in the machining of UNS A92024 aeronautic skins. Procedia Manuf. 2017;13:639–46. doi:10.1016/j.promfg.2017.09.134. [Google Scholar] [CrossRef]

3. Groover MP. Fundamentals of modern manufacturing: materials, processes, and systems. Hoboken, NJ, USA: Wiley; 2010. [Google Scholar]

4. Li C, Zhao G, Meng F, Yu S, Yao B, Liu H. Multi-objective optimization of machining parameters in complete peripheral milling process with variable curvature workpieces. J Manuf Process. 2024;117(5):95–110. doi:10.1016/j.jmapro.2024.03.004. [Google Scholar] [CrossRef]

5. Zhujani F, Todorov G, Kamberov K, Abdullahu F. Mathematical modeling and optimization of machining parameters in CNC turning process of Inconel 718 using the Taguchi method. J Eng Res. 2023;3(4):214. doi:10.1016/j.jer.2023.10.029. [Google Scholar] [CrossRef]

6. Liang X, Liu Z, Wang B, Cai Y, Ren X. Progressive mapping surface integrity and multi-objective optimizing surface quality of machining Ti-6Al-4V based novel tool failure criterion. CIRP J Manuf Sci Technol. 2023;42(3):81–94. doi:10.1016/j.cirpj.2023.01.013. [Google Scholar] [CrossRef]

7. Miao H, Li C, Liu C, Wang C, Zhang X, Sun W. Machined surface prediction and reliability analysis in peripheral milling operations. Int J Mech Sci. 2024;272(2):109193. doi:10.1016/j.ijmecsci.2024.109193. [Google Scholar] [CrossRef]

8. Bai Q, Wang P, Cheng K, Zhao L, Zhang Y. Machining dynamics and chatters in micro-milling: a critical review on the state-of-the-art and future perspectives. Chin J Aeronaut. 2024;37(7):59–80. doi:10.1016/j.cja.2024.02.022. [Google Scholar] [CrossRef]

9. Pimenov DY, da Silva LRR, Machado AR, França PHP, Pintaude G, Unune DR, et al. A comprehensive review of machinability of difficult-to-machine alloys with advanced lubricating and cooling techniques. Tribol Int. 2024;196(1):109677. doi:10.1016/j.triboint.2024.109677. [Google Scholar] [CrossRef]

10. Sivarupan T, Bermingham M, Ng CH, Sun S, Dargusch M. A review of the use of cryogenic coolant during machining titanium alloys. Sustain Mater Technol. 2024;40(4):e00946. doi:10.1016/j.susmat.2024.e00946. [Google Scholar] [CrossRef]

11. Ahmed F, Ahmad F, Abbassi F, Kumaran ST, Mabrouki T. Investigation of machining quality indicators and effect of tool geometry parameters during the machining of difficult-to-machine metal. Results Mater. 2023;20(425):100487. doi:10.1016/j.rinma.2023.100487. [Google Scholar] [CrossRef]

12. Liao Z, Schoop JM, Saelzer J, Bergmann B, Priarone PC, Splettstößer A, et al. Review of current best-practices in machinability evaluation and understanding for improving machining performance. CIRP J Manuf Sci Technol. 2024;50(2):151–84. doi:10.1016/j.cirpj.2024.02.008. [Google Scholar] [CrossRef]

13. Agmell M, Bushlya V, M’Saoubi R, Gutnichenko O, Zaporozhets O, Laakso SV, et al. Investigation of mechanical and thermal loads in pcBN tooling during machining of Inconel 718. Int J Adv Manuf Technol. 2020;107(3):1451–62. doi:10.1007/s00170-020-05081-8. [Google Scholar] [CrossRef]

14. De Bartolomeis A, Newman ST, Jawahir IS, Biermann D, Shokrani A. Future research directions in the machining of inconel 718. J Mater Process Technol. 2021;297(10):117260. doi:10.1016/j.jmatprotec.2021.117260. [Google Scholar] [CrossRef]

15. Buddaraju KM, Ravi Kiran Sastry G, Kosaraju S. A review on turning of inconel alloys. Mater Today Proc. 2021;44(9):2645–52. doi:10.1016/j.matpr.2020.12.673. [Google Scholar] [CrossRef]

16. Sousa VFC, Da Silva FJG, Pinto GF, Baptista A, Alexandre R. Characteristics and wear mechanisms of TiAlN-based coatings for machining applications: a comprehensive review. Metals. 2021;11(2):260. doi:10.3390/met11020260. [Google Scholar] [CrossRef]

17. Sousa VFC, Silva FJG. Recent advances in turning processes using coated tools—a comprehensive review. Metals. 2020;10(2):170. doi:10.3390/met10020170. [Google Scholar] [CrossRef]

18. Sousa VFC, Silva FJG. Recent advances on coated milling tool technology—a comprehensive review. Coatings. 2020;10(3):235. doi:10.3390/coatings10030235. [Google Scholar] [CrossRef]

19. Sousa VFC, Silva FJG, Alexandre R, Fecheira JS, Silva FPN. Study of the wear behaviour of TiAlSiN and TiAlN PVD coated tools on milling operations of pre-hardened tool steel. Wear. 2021;476(1):203695. doi:10.1016/j.wear.2021.203695. [Google Scholar] [CrossRef]

20. Abu Bakar HN, Ghani JA, Che Haron CH, Ghazali MJ, Kasim MS, Al-Zubaidi S, et al. Wear mechanisms of solid carbide cutting tools in dry and cryogenic machining of AISI H13 steel with varying cutting-edge radius. Wear. 2023;523(1):204758. doi:10.1016/j.wear.2023.204758. [Google Scholar] [CrossRef]

21. Ding F, Wang C, Zhang T, Deng Y, Zhu X. Adhesive wear mechanism of coated tools and its influence on cutting performance during machining of Zr-based bulk metallic glass. J Mater Res Technol. 2023;27(2):5489–506. doi:10.1016/j.jmrt.2023.11.073. [Google Scholar] [CrossRef]

22. Korkmaz ME, Gupta MK, Çelik E, Ross NS, Günay M. Tool wear and its mechanism in turning aluminum alloys with image processing and machine learning methods. Tribol Int. 2024;191:109207. doi:10.1016/j.triboint.2023.109207. [Google Scholar] [CrossRef]

23. Carvalho S, Horovistiz A, Davim JP. Morphological characterization of chip segmentation in Ti-6Al-7Nb machining: a novel method based on digital image processing. Measurement. 2023;206(1):112330. doi:10.1016/j.measurement.2022.112330. [Google Scholar] [CrossRef]

24. Fong KM, Wang X, Kamaruddin S, Ismadi MZ. Investigation on universal tool wear measurement technique using image-based cross-correlation analysis. Measurement. 2021;169(3):108489. doi:10.1016/j.measurement.2020.108489. [Google Scholar] [CrossRef]

25. Agarwal A, Potthoff N, Shah AM, Mears L, Wiederkehr P. Analyzing the evolution of tool wear area in trochoidal milling of Inconel 718 using image processing methodology. Manuf Lett. 2022;33:373–9. doi:10.1016/j.mfglet.2022.08.002. [Google Scholar] [CrossRef]

26. Oh JY, Kim JE, Lee W. Model-based tool wear detection and fault diagnosis for end mill in various cutting conditions. Manuf Lett. 2024;41(5–8):595–604. doi:10.1016/j.mfglet.2024.09.076. [Google Scholar] [CrossRef]

27. Chehrehzad M, Kecibas G, Besirova C, Uresin U, Irican M, Lazoglu I. Tool wear prediction through AI-assisted digital shadow using industrial edge device. J Manuf Process. 2024;113(7–8):117–30. doi:10.1016/j.jmapro.2024.01.052. [Google Scholar] [CrossRef]

28. Friedrich M, Gerber T, Dumler J, Döpper F. A system for automated tool wear monitoring and classification using computer vision. Procedia CIRP. 2023;118(2):425–30. doi:10.1016/j.procir.2023.06.073. [Google Scholar] [CrossRef]

29. Hrechuk A, Bushlya V. Automated detection of tool wear in machining and characterization of its shape. Wear. 2023;523:204762. doi:10.1016/j.wear.2023.204762. [Google Scholar] [CrossRef]


Cite This Article

APA Style
Sousa, V.F.C., Gil, J., Silva, T.E.F., de Jesus, A.M.P., Silva, F.J.G. et al. (2025). An image analysis algorithm for measuring flank wear in coated end-mills. Computers, Materials & Continua, 83(1), 177–199. https://doi.org/10.32604/cmc.2025.062133
Vancouver Style
Sousa VFC, Gil J, Silva TEF, de Jesus AMP, Silva FJG, Tavares JMRS. An image analysis algorithm for measuring flank wear in coated end-mills. Comput Mater Contin. 2025;83(1):177–199. https://doi.org/10.32604/cmc.2025.062133
IEEE Style
V. F. C. Sousa, J. Gil, T. E. F. Silva, A. M. P. de Jesus, F. J. G. Silva, and J. M. R. S. Tavares, “An Image Analysis Algorithm for Measuring Flank Wear in Coated End-Mills,” Comput. Mater. Contin., vol. 83, no. 1, pp. 177–199, 2025. https://doi.org/10.32604/cmc.2025.062133


cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 207

    View

  • 98

    Download

  • 0

    Like

Share Link