Abstract
Quality of machined surfaces and its integrity are strongly dependent on tool wear, which consequently depends on the tool life or machining time. Therefore, prediction of the machining time of the cutting tool during machining processes is very important in order to obtain high precision parts and to reduce manual fit operations and production cost. In this work, the relationship between texture features of the gray-level co-occurrence matrix and the machining time of the cutting tool in turning operations has been investigated, and the results show that four texture features are highly correlated with machining time. These highly correlated texture features were utilized to calculate machining time of the cutting tool from captured images of machined parts. The verification results showed that the maximum percentage of error between the actual and calculated machining time ranged between −4.65% and 7.79%.
Introduction
Quality of machined surfaces and its integrity are strongly dependent on tool wear, which consequently depends on the tool life or machining time. When a cutting tool reaches its life end, it must be replaced before the cutting edge of the tool cannot produce the required surface quality and the accepted tolerance. 1 It was reported that tool wear/tool life increases by increasing the machining time of the cutting tool.2,3 Therefore, the machining time of a cutting tool can be considered as an indicator to the tool wear and tool life. Because many parameters can affect the relationship between tool life and machining time such as cutting conditions, workpiece material, and lubrication, this article concentrates on the calculation of the machining time of cutting tools. The analysis of relationship between tool life and machining time using texture features could be studied in a further research.
In addition, tool life or the machining time of the cutting tool should be taken into consideration in order to complete finishing operation with just one tool, avoiding the intermediate stops in order to change the tool due to its wear. 4 Eventually, sudden failure of cutting tools leads to loss of productivity, rejection of parts, and consequential economic losses. 5
Estimation of tool wear/tool life and the corresponding economic analysis are among the most important topics in process planning and machining optimization. 6 Prediction and detection of tool wear before the tool causes any damage on the machined surface are very significant to avoid loss of products, damage to the machine tools, and loss in productivity. For most researchers and tool manufacturers, tool wear progress and tool wear profile are also of the utmost importance. 7
Experimentally, prediction of tool wear is performed by calculating tool life using empirical tool life equations such as Taylor’s equation as well as its extension versions. However, Taylor’s equations consume a lot of money and time 8 since they give relatively reliable results only in a narrow cutting speed range. 9
Many researches have been done to study the relationship between tool life and machining time and their effect on final products. For example, Narayana Rao et al. 2 studied the progress of tool wear with machining time and reported that initially tool wear is rapid and gets stabilized with progress in machining time. Dhar et al. 10 studied the effect of machining time and tool wear on surface roughness of AISI 1060 steel obtained by turning process. They reported that Ra values have the tendency to increase with machining time and tool wear. Similarly, Mantana Srinang and Asa Prateepasen 3 reported that tool wear increases by increasing machining time.
Similarly, many researches have been created to estimate or predict the tool life. For example, Erry Yulian et al. 1 developed a MATLAB Simulink model to estimate tool life during high-speed hard turning based on the relationship between the flank wear progress and time. Also, Tsai et al. 11 presented a network model for predicting tool life in high-speed milling (HSM) operations. They reported that experimental results have shown that the network model could be used to predict HSM end mill life under varying cutting conditions, and the prediction error of HSM tool life is less than 10%.
In the field of image processing and computer vision, image texture is considered an important feature, which provides important information for scene interpretation, 12 and it plays a crucial role in computer vision and pattern recognition. Statistical approaches define textures as stochastic processes and characterize them by a few statistical features. Haralick et al.’s 13 texture features–based gray-level co-occurrence matrix (GLCM) is one of the most widely used techniques for texture analysis. It captures second-order gray-level information, which is mostly related to human perception and the discrimination of textures. GLCM texture features have proved their usefulness in a variety of image analysis applications.14–17
Determination of tool wear using computer vision is fairly widespread in the manufacturing literature and dates back 30 years. 18 Many texture descriptors were used for tool wear monitoring using computer vision. For example, Kassim et al.19,20 used both fractal analysis and Hough transform in order to monitor tool wear of machined surfaces. Similarly, Li et al. 21 used the Wavelet Packet for the same purpose. Volkan Atli et al. 22 introduced a computer vision–based approach to monitor drilling tool condition by capturing images and applying a Canny edge detector to extract tool features from the acquired images. A comprehensive review of tool wear monitoring using computer vision has been introduced by Kerr et al. 23
In a previous work, 24 it was found that some GLCM texture features are highly correlated with surface roughness parameter Ra (arithmetic average height). The idea of this article came from these results. Therefore, the aim of this work is to investigate the relationship between GLCM texture features and the machining time of the cutting tool in turning operations in order to discover texture features that are highly correlated with the machining time. In turn, these texture features can be used to calculate the machining time of the cutting tools from captured images of machined parts.
Image texture features
Generally, the co-occurrence matrix, Mc(i, j), is calculated using the following equation
where Mc(i, j) is defined as the co-occurrence of gray level occurring; P(i, j) is the frequency of occurrence of gray levels i and j; and n refers to the total number of pixel pairs. A normalized matrix is produced by dividing each element of the GLCM by the summation of all elements.
A detailed explanation of the GLCM and its calculation method is presented in Gadelmawla. 24 All texture features that can be calculated from the GLCM (24 features) were collected from the literature and discussed in previous works.25,26 These texture features were used in this work to calculate the machining time of the cutting tools from captured images of parts machined by turning operations.
Experimental work
This section describes the procedures that were applied to prepare the required specimens in order to investigate the relationship between the machining time of the cutting tool and the image texture features.
To prepare the required specimens, a cutting tool for turning operations with tips of commercial-type CNMG 120408EN-TM was utilized. A steel bar with 50 mm diameter (Steel 70 type) was used as a raw material to produce the required specimens. All specimens were machined using the same cutting conditions. It was decided to use the cutting tool for 4 h of actual cutting process to produce 10 cylindrical specimens with 50 mm diameter using face turning operations. To calculate the required length of each specimen, it was necessary to calculate the machining time of each specimen, the machining time of each face, and the depth of cut. The following sections show how to calculate the required length of each specimen.
Calculation of the specimen’s machining time
To calculate the length of machined part (lm) of each specimen, it was required to calculate the machining time for each specimen (ts) and the machining time for each face (tf). As it was mentioned before, it was decided to use the cutting tool for 4 h to produce 10 specimens; the required machining time for each specimen (ts) can be calculated using equation (2)
where ts is the machining time required for each specimen (in min), tt is the machining time for the cutting tool (in h) and n is the number of specimens to be machined by the cutting tool.
As a result, each specimen will be machined for 24 min (4 × 60/10). Because the machining process used in this work was a face turning operation, the machining time for each face (tf) can be calculated using equation (3)
where tf is the machining time required for each face (in min), D is the workpiece diameter (in mm), f is the feed (mm/rev) and s is the speed (r/min).
Calculation of specimen dimensions
Once the machining time for each specimen (ts) and the machining time for each face (tf) are calculated, the length of machined part (lm) in each specimen can be calculated using equation (4)
where lm is the length of machined part (in mm), ts is the machining time required for each specimen (in min), tf is the machining time required for each face (in min) and dc is the depth of cut (in mm).
By referring to Figure 1, the total length (lt) of each specimen can be calculated using equation (5)
where lt is the total length of raw specimen (in mm), lw is the length of workpiece after machining and before finishing (in mm), lm is the length of machined part (in mm) and ls is the length of each face to be straighten (in mm).

Dimensions used to calculate the total length of row specimens.
In this case, the final length of workpiece (lwf) can be calculated by equation (6)
where lf is the length of finishing process (in mm).
To calculate the dimensions of raw specimens based on different machining parameters, an Excel sheet has been created to automate this process as shown in Figure 2. Once the machining data and cutting conditions are entered by the user through the first two sections, the calculated dimensions for each specimen are displayed in the third section (calculated parameters), and it will be presented graphically at the right side of the Excel sheet. As shown in Figure 2, the calculated length of each specimen was 88 mm. Therefore, a steel bar with 50 mm diameter (Steel 70 type) was used as a raw material to produce 10 specimens with a length of 88 mm for each specimen. These specimens, then, were machined using a computer numerical control (CNC) machine as discussed in the following section.

Excel sheet used to calculate the dimensions of raw specimens based on the cutting parameters.
Machining of specimens
A CNC turning machine (Figure 3) was used to produce the required specimens, and a CNC part program was prepared to reduce the length of each specimen from 88 to 20 mm using the cutting conditions shown for the cutting process in Table 1. To get relatively smooth surfaces for each specimen, a finishing process was used to finish the face of each specimen using the same tool and the cutting conditions shown in the finishing process column of Table 1. In the finishing process, the speed is increased, while the feed and the depth of cut are decreased.

The CNC machine used to produce the investigated specimens.
Cutting conditions for the cutting process and finishing process for each specimen.
Capturing images
A Nikon ECLIPSE 150 industrial microscope with DS-Fi1 digital camera system (Figure 4) was used to capture images for machined specimens. The microscope was connected to a PC compatible computer with 3.0-GHz Pentium IV processor, 2 MB of memory and Windows XP operating system. The charge-coupled device (CCD) camera features a 5-megapixel CCD that captures at a high resolution of 2560 × 1920 pixels.

The vision system used to capture images.
A capturing image software called NIS is provided with the Nikon vision system, and it was used to capture images for all machined specimens. The NIS software enables to capture images with different sizes (up to resolution of 2560 × 1920 pixels). However, to speed up the calculation of images’ texture features, the CCD camera was adjusted to capture images of resolution 1280 × 960 pixels.
Adjusting location of specimens
It is well known that specimens machined by face turning operations have different textures at various radial distances. Therefore, capturing images at different radial distances might affect the results of the image analysis process. In order to capture images at the same radial distance for all specimens, a special fixture consisting of a square angle and block gauges was used. Figure 5 shows how to position specimens under the microscope using the square angle and block gauges. Also, Figure 6 shows a side view of the microscope to show how the block gauges were used to fix the microscope table at a specific position. As shown in Figure 5, the square angle was placed, so that one side touches the microscope table at the front and the other side touches the block gauges shown on left. Each specimen was set under the microscope, so that it touches the two sides of the square angle.

Using square angle and block gauges to control movement of the microscope table in X direction.

Using the block gauges to control the movement of the microscope table in Y direction.
Captured images
For each specimen, three different images were captured at the same radial distance. To avoid varying illumination conditions, which may affect the values of texture features, the microscope light was adjusted to constant light intensity while capturing all images. Figure 7 shows the captured images for the 10 machined specimens. All specimens were captured at a magnification of 5×.

Captured images for the 10 specimens.
Image analysis
To calculate image texture features for captured images, a software named GLCMTF (GLCM Texture Features) was used. This software was fully developed in-house and has been discussed in a previous work.24,26 It is capable of calculating all GLCM texture features, discussed in section “Image texture features,” for up to 100 position operators (direction θ and distance d) of the GLCM. The image texture features were calculated for captured images by the GLCMTF software as follows:
For each specimen, the three captured images were opened by the GLCMTF software, then the texture features were calculated for each image using a position operator of (1, 0) (i.e. distance = 1 and angle = 0).
For each texture feature, the average of the values obtained from the three images was calculated and recorded as shown in Table 2.
For each texture feature, the relationship between the ts and the values of the texture feature was plotted to a graph using MS Excel.
The equation of correlation between ts and each texture feature was obtained from Excel. These equations were used later to calculate the machining time of the cutting tool from captured images.
Calculated texture features for different machining time.
ASM: angular second moment; CPR: cluster prominence; CSH: cluster shade; CVAR: coefficient of variation; CON: contrast; COR: correlation; DM: diagonal moment; DENT: difference entropy; DVAR: difference variance; DIS: dissimilarity; ENT: entropy; IDM: inverse difference moment; MaxP: maximum probability; MEAN: mean; MCOR1: mean correlation 1; MCOR2: mean correlation 2; SDM: second diagonal moment; SIM: similarity; SAVR: sum average; SENT: sum entropy; SVAR: sum variance; VAR: variance.
Results and discussion
This section describes the correlations between the machining time ts and all texture features. In addition, the process of calculating ts from the captured images using texture features has been discussed.
Correlations between texture features and the machining time
Using Table 2, the correlation coefficient between the values of each texture feature and the values of ts was calculated using equation (7)
where a and b are the data sets of ts and texture features, respectively, and

Texture features sorted according to their correlation coefficients with the machining time.
The following points could be observed from Figure 8:
Four texture features (angular second moment (ASM), sum variance (SVAR), sum entropy (SENT), and difference variance (DVAR)) are highly correlated with ts (correlation coefficient greater than or equal to 0.9). Therefore, these texture features could be used to predict the value of ts later on. Figure 9 shows the relationship between these texture features and ts. The equation of correlation between each texture feature and ts is also shown in the figure.
Two texture features (sum average (SAVR) and entropy (ENT)) are relatively highly correlated with ts (correlation coefficient ranges between 0.8 and 0.9). Figure 10 shows the relationship between these texture features and ts.
Other texture features do not have good correlation with ts (correlation coefficient less than 0.80). Figure 11 shows the relationship between two of the texture features (dissimilarity (DIS) and diagonal moment (DM)) and ts.
Texture features maximum probability (MaxP), cluster shade (CSH), Diagonal Variance (DgVAR), and cluster prominence (CPR) have approximately no correlation with ts.

Relationship between highly correlated texture features and the machining time (correlation coefficient ≥ 0.90): (a) ASM (correlation coefficient = 0.95), (b) SVAR (correlation coefficient = 0.93), (c) SENT (correlation coefficient = 0.92), and (d) DVAR (correlation coefficient = 0.92).

Relationship between some texture features of relatively high correlation and the machining time (correlation coefficient ranges between 0.80 and 0.90): (a) SAVR (correlation coefficient = 0.85) and (b) ENT (correlation coefficient = 0.81).

Relationship between some texture features of lowest correlation and the machining time (correlation coefficient less than 0.80): (a) DIS (correlation coefficient = 0.32) and (b) DM (correlation coefficient = 0.26).
Calculation of the machining time
Regarding the equations shown in the plotted graphs (Figures 9–11), y represents the texture feature and x represents the machining time ts. From the plotted graphs, it can be seen that the equations of correlation for texture features that have high correlation with ts are as follows
From these equations, the machining time can be calculated using one of the following equations
System calibration
To calculate the machining time ts from captured images of machined parts based on the values of their texture features, the system should be calibrated. The calibration process can be done by entering the equations of calculating the machining time to the GLCMTF software. After that, when any image is opened, the software calculates its texture features and then substitutes by their values in these equations to calculate the machining time.
To perform the calibration process, a new module called machining time calculation (MTC) has been added to the GLCMTF software. The MTC module was written using visual C++, and it contains two dialog boxes. The first dialog box, Figure 12, is used to enter the equations used to calculate ts (equations (12)–(15)) to the MTC module, which stores them to a file for further use by the software. The second dialog box, Figure 13, is used to display the calculated texture features and the calculated machining time for captured images of machined parts.

Entering equations of calculating the machining time to the MTC module.

Calculated texture features and the machining time for sample 2 (after 48 min).
System verification
To verify the accuracy of the introduced system, the MTC module was used to calculate the machining time for three specimens of the samples produced during this work. The actual machining times for the selected specimens were 48, 120, and 192 min. A random image was captured for each specimen using the same fixture discussed in section “Adjusting location of specimens.” The MTC module was used to calculate the texture features and the machining time for each image, and the results were listed in Table 3. Table 3 also shows the percentage of error between the actual machining time and the calculated machining time. The percentage of error was calculated using equation (16) as follows
Comparison between the actual and calculated machining time for three selected samples.
ASM: angular second moment; DVAR: difference variance; SVAR: sum variance; SENT: sum entropy.
From Table 3, it can be seen that the maximum percentage of error between the actual and calculated machining time was from 3.83% to 5.47% for ASM, from −4.65% to 6.35% for DVAR, from 6.02% to 7.79% for SVAR, and from −3.42% to 5.96% for SENT. In general, the maximum percentage of error between the actual and calculated machining time for the four texture features was from −4.65% to 7.79%. According to this study, ASM gave the best results.
System limitations
As it was mentioned in a previous work, 24 changes in illumination conditions while capturing images may affect the values of texture features. On the other hand, it is well known that vision systems are usually utilized to perform a particular task in specific circumstances. If these circumstances change, the vision system should be recalibrated. The calibration process here means that texture features that have high correlation with ts should be discovered and their equations of correlation should be recalculated and entered into the MTC module. This makes the employed vision system suitable for calculating machining time of cutting tools in mass production for specific machining operation.
Conclusion
In this work, the relationship between GLCM texture features and the machining time of cutting tools in CNC face turning operations has been investigated. The following points could be concluded:
It was found that four texture features (ASM, SVAR, SENT, and DVAR) have high correlation factor (>0.9) with the machining time of cutting tools. Therefore, these texture features could be employed to calculate the machining time from captured images of machined parts.
It was found that ASM has the highest correlation factor (0.95) among the four texture features. Also, it was found that ASM is proportionally increased by increasing the machining time.
While ASM is proportionally increased by increasing the machining time, it was found that the other three texture features (SVAR, SENT, and DVAR) are proportionally decreased by increasing the machining time. However, they give a good correlation with the machining time (≥0.92).
Two texture features (SAVR and ENT) are relatively highly correlated with the machining time (correlation coefficient ranges between 0.8 and 0.9). Other texture features do not have good correlation with the machining time (correlation coefficient less than 0.80). Therefore, these features cannot be used to calculate the machining time of the cutting tool.
The verification of the proposed system showed that the maximum percentage of error between the actual and calculated machining time for the four texture features ranges from −4.65% to 7.79%. Also, ASM gave the best results (maximum error ranges from 3.83% to 5.47%).
Footnotes
Appendix 1
Conflict of interest statement
The authors declare that there is no conflict of interest.
Funding
This research has been funded by the Scientific Research Deanship at Qassim University, KSA.
