Modeling and prediction of surface roughness using multiple regressions: A noncontact approach

In the present work, a machine vision system is introduced, which captures images and extracts surface texture features of machined surfaces. The texture feature parameters are extracted using the gray‐level co‐occurrence matrix and correlated with different surface roughness parameters recorded by a contact‐type surface profilometer. The image acquisition carried out at different roughness levels in order to extract texture features. The variation between each texture features and surface roughness parameter is investigated. Multiple regression models are developed to predict the subjective estimation of surface roughness parameter (Ra) and qualitative detection of the degree of surface roughness. It is observed that the linear detection model shows better performance characteristics compared with a nonlinear detection model. The comparison between measured and predicted results shows that the linear detection model had a maximum relative error of 2.01%, drastically better than nonlinear detection model of −9.60% error parts, hence indicating better surface detection capability over the nonlinear detection model. The results demonstrate that the prediction of surface roughness using linear regression model is a reliable approach of noncontact measurement.

Many researchers have proposed different approaches to predict surface roughness based on machining theory. [4][5][6][7][8][9] Surface measurement is primarily divided into two categories: (a) contact measurement and (b) noncontact measurement. [10][11][12] Contact-type measurements are currently used due to the compact design, high measurement accuracy, and the ability to deliver consistent output for surface inspection. 13 However, the study did not provide universal testimony for the significance of these advantages for the accuracy of measurements. 14 Extensive research is carried out on non-contact-type assessment of surface roughness parameters using machine vision system and artificial intelligence technology, which include methods such as laser speckle, light scattering, and optical interference. [15][16][17][18][19] Pontes et al 20 proposed the technique called multilayer perceptron (MLP) network architecture, which considerably reduces errors in predicting surface roughness parameters of machined components compared with currently used techniques. Huaian et al presented a new methodology to assess surface roughness that uses uniform texture direction without any primary necessities, which defeats the present issues such as limited range, complex calculations, and so on. This improves the accuracy of noncontact measurement up to a certain degree. However, the field of reference for relevancy still needs to be straightened out. 21 Mia et al established a model based on an artificial neural network to predict surface roughness of turned components. The Bayesian regularization of network architecture provided the highest accuracy. 22 Chen et al 23 developed an optical path using the laser speckle method, which enhances the accuracy of measurement in inspection machinery, though the workability of the proposed method is very crucial to accomplish on a regular basis. Zhu et al 24 proposed a surface roughness prediction model based on a multiwavelength fiber optic sensor to minimize the error difference (less than 3%), which is better than characteristic curves between surface roughness and scattering intensity ratio.
The objective of the present work is to examine the correlation between surface roughness parameters and image texture features of computer numerical control (CNC) turned components with non-contact-type approach as it consists of points of interest such as high efficiency of measurement with accuracy, great adaptability, noncontact in nature, the ability to secure a large amount of information, and high performance-price ratio over contact-type measurement. It is aimed to extract the surface texture features by gray-level co-occurrence matrix (GLCM) and correlate it to surface roughness parameter measured by a surface profilometer. Linear and nonlinear regression models were established for arithmetical mean deviation (Ra) prediction, and the feasibility of detection models has been explored in the present work.
Subsequent sections of the article are organized as follows. Section 2 describes preparation of specimen and measurement of surface roughness using surface profilometer followed by image processing. Section 3 talks about linear and nonlinear regression model development for the comparison of the predicated roughness values with the measured values. Section 4 deals with concluding part where the researcher identifies that both the models are efficient; however, the linear regression model dominates in terms of precision.

MATERIALS AND METHODS
The average surface roughness (Ra) is generally used as a dimensional index to determine the surface finish of a machined surface. 25 Assessment of roughness parameters plays a vital role to distinguish problems such as friction, contact deformation, and tightness of contact joint accuracy in industrial sectors. 26

Measurement of surface roughness parameters using surface profilometer
The machining process of 12 low carbons steel workpieces having a diameter of 30 mm and a height of 18 mm was carried out on a CNC turning machine. The experiments were conducted by varying operating parameters such as spindle speed, feed rate, and depth of cut using Taguchi method. Table 1 shows the value of CNC turning cutting parameters. Stylus instrument, also known as surface profilometer, is used as a contact-type surface roughness measurement of the machined component. It consists of a diamond stylus probe that is moved perpendicularly to the direction of roughness, and a characteristic of surface roughness is recorded at the other ends. 13 It is most widely used technique because of its advantages and generating a profile of an object along a well-defined direction. 13 Surface roughness measurement of 12 CNC turned components has been carried out on contact-type stylus instrument called surface profilometer as shown in Figure. 1. The measuring conditions for measurement are given in Table 2.

Image processing of CNC turned surfaces
In order to achieve precise information from captured images of the machined surface, uneven illumination, geometric image distortion, and noise should be eliminated. The digital image contains noise generated from photosensitive electron microscope elements. A filtering algorithm is used to eliminate unwanted noise from digital images as it is difficult to remove dead pixels and other pollutants directly through a charge-coupled device (CCD) camera. The algorithm retains the important details of the image texture. The machine vision system has been taken into account for direct measurement because of its advantages in many sectors. 27 It is connected with CCD camera PULNIX; captures the image of a machined surface, illuminated by ordinary lighting as shown in Figure 2. The machine vision system has been kept in such a manner that the camera can focus on the machined surface and store corresponding images. It takes advantage of high speed, higher spatial resolution, and easiest method to measure the roughness of the workpiece more precisely. It can be very useful to predict surface roughness offline, online, and in-process. 28 In order to collect rich information from captured raw images as shown in Figure 3, it needs to be preprocessed to make free from all artifacts and noise. The image processing tool of MATLAB was used to enhance the captured images to get precise result. 29 Evaluation length 8 mm

F I G U R E 3 Raw images of turned components
The preprocessing of the captured image was executed before the stage of image feature extraction to enhance the image by adjusting the contrast. The actual image of the machined component was subdivided into 15 equal parts to take advantage of the nonoverlapping loop of images that help to create a strong database, and ultimately developed model will be more robust compared with overlapping. Furthermore, subimages were preprocessed by continuous two-dimensional (2D) wavelet transform in which images are being converted into grayscale by extracting coefficient from discrete wavelet transform. It provides better result for nonstationary signals. "Wavelet image processing" toolbox of MATLAB has been utilized to remove the noise. Haar wavelet has been chosen as it gives the least permutation entropy among all descriptors. 30 The process parameters for the 2D wavelet denoise process are listed in Table 3.
Generally, the texture is a surface attribute or representation of an object stated by its dimensions such as length, width, height, density, and so on. The primary process to compile these attributes through texture analysis is called texture feature extraction. Patel et al interpreted different methods for texture feature extraction such as statistical, structural, model-based, and transform information. Among them, statistical method uses a nondeterministic approach to identify the texture, which increases reliability and representativeness of any object. 31 One of the most widely used methods is GLCM. It is a probability of the one gray value "i" to another gray value "j" with the distance d and orientation ⊖ in a square matrix.
Generally, in the captured image of a machined component, GLCM works on the probability of two pixels occurrences in a certain positional manner. The relative position between the two pixels and the gray value distribution in the texture image space is accessible by GLCM. As an advantage of discrimination of textures, texture analysis was done for image classification for different datasets. 31 As shown in Table 4, various image texture features were extracted using the gray-level co-occurrence matrix. Segmenting the preprocessed image into 32 × 32 pixels of subimages, assists to prepare the image dataset. This dataset of images has been loaded to extract the various texture features listed in Table 4. The extraction process has been carried out by varying orientation at 0 • , 45 • , 90 • , and 135 • at constant displacement of d = 1.

RESULTS AND DISCUSSION
In this section, the results of surface roughness measurement using surface profilometer and multiple regressions are compared and discussed.

Texture feature extraction and analysis
The image acquisition of machined components has been carried out for several times at roughness levels of 2. 20 Table 5.
From the extracted data, the average value of each texture features was computed at every stage. The relevancy of texture features and Ra can be visualized graphically as shown in Figures 4 to 16.

Development and analysis of multiple linear detection models
The relationship between two or more variables can be estimated by regression analysis. Multiple regression equations were developed for surface roughness detection of the workpiece as stated in texture feature and roughness variation Regression Equation (1) can be justified from Table 6, as the coefficient of determination R 2 (.99989) approaches to 1. F-statistics and associated probability demonstrate that regression model showed an outstanding linear relationship. The above parameters conclude that linear detection model generated for finding relationship behavior was suitable. 32

Development and analysis of multivariate nonlinear detection model
In regression analysis, it is quite difficult to conclude the behavior of detection model for evaluation of sample data. Various curve models have been taken into account to overcome this difficulty. Palanikumar 33 selected several functional forms such as exponential, power, inverse, logarithmic, two times and three times functions for the nonlinear fitting of image texture feature, and surface roughness parameters. The results showed that there was a linear, quadratic, and cubic relationship between Ra and dissimilarity (F4), homogeneity (F7), and entropy (F9), respectively. The nonlinear regression Equation (2) constructed with image texture features and average surface roughness (Ra) is shown below.
In Equation (2), X1 to X9 represents the regression coefficients. The coefficient values obtained for nonlinear multiple regression model are shown in Table 7. By substituting the values of regression coefficients in Equation (2) One cannot judge the reliability of nonlinear function relation between the roughness parameter and texture features directly. To judge it, a fitting degree of Equation (3) should be determined first in order to check the performance of the established model. The R 2 and F tests were performed on the model to evaluate the fitting effect on multiple regression models. The test results of the nonlinear detection model are shown in Table 8. From Table 8, as the coefficient of determination R 2 (.9964) approaches toward unity, it signifies that the nonlinear regression Equation (3) fits well. The existence of the remarkable nonlinear relationship was noticed between dependent and independent variables, hereby confirming the successful demonstration of nonlinear detection model for the evaluation of sample data. 34

Performance analysis of multivariate regression detection model
Multiple regression analysis is a statistical method that assists to find a correlation between a continuous dependent and at least two discrete independent variables. It is considered to estimate surface roughness parameters due to the broad area of tasks such as analyzing categorical, ordinal, or experimental data. 35 (1) and (3), the detected values and error values can be obtained as presented in Table 9.
The comparison graph of testing results and measured results for linear and nonlinear detection model is shown in Figure 17A,B, respectively. The maximum relative error in the linear detection model is 2.01%, which justifies the good detection capability of the linear detection model developed for the turned workpiece. The maximum relative error observed in the nonlinear detection model is −9.60% as shown in Table 9.
From the test results, it is found that detection capability for linear detection model is better compared with nonlinear detection model for turned workpiece surface roughness. Compared with nonlinear detection model, the maximum detection error was decreased by 80% using the linear detection model, which demonstrates the better execution attributes over nonlinear detection model.

CONCLUSION
The researcher has used the CNC turning workpiece as an outcome of the study to detect surface roughness by image texture feature analysis, which proposes a detection method via a noncontact approach based on the machine vision system. The mathematical relationship was developed using multiple regression modeling between image texture features of machined surfaces and arithmetic mean deviation (Ra) measured by a surface profilometer. Multiple linear and nonlinear regression models were used to judge the behavior of the detection model and analyze the experimental data. Statistical analysis showed that both linear and nonlinear detection models fit well into the multivariant regression model. In the present work, researcher found that performance of maximum detection error for linear detection model was 2.01% over nonlinear detection model of −9.60%, which showed better performance characteristics of linear detection model over nonlinear detection model to predict various statistical roughness parameters of flat rough surfaces. From the results, one can conclude to the point of predicting surface roughness effectively via a noncontact approach. Experiments show the minimal relative error in prediction of Ra and hence the obtained results provide motivation for extending proposed prediction model for amplitude parameters, namely, root mean square roughness (R q ); maximum height of peaks (R p ); maximum height of the profile (R t ), and 10-point height (R z ).

CONFLICT OF INTEREST
The authors declare that there is no conflict of interest regarding the publication of this article.