A method for analyzing the texture features of free-form surface polishing paths based on co-occurrence matrix

Surface quality analysis of polished surface has been the subject of many classic studies in surface polishing technology and is a key indicator for evaluating the polishing path. However, as an important part of surface quality, surface texture features have been ignored in many related researches. In this paper, a new method to analyze the texture features of polishing based on co-occurrence matrix is proposed. It provides a new perspective of surface quality analysis focusing on surface texture features. It extends the previous approach termed the residual level co-occurrence matrix (RLCM) focusing on the distribution of surface polishing residues, leading to more targeted and stabilized evaluation results. This method can be used in the path planning stage to estimate the polishing quality of the planned path without physical processing, which can avoid resource waste in the physical world. Furthermore, in this method, the usage of images is avoided, which can ensure that the results are not affected by the light and image quality. Simulation experiments as well as empirical investigations were conducted to verify the feasibility of the method. The results of both consistently reveal that the proposed method is able to accurately describe the texture feature and correctly analyze the texture feature.


Introduction
Currently, free-form surfaces have been widely used in various industrial fields, while numerous studies focused on the surface characteristics emerging [1]. Texture is an important component of the surface roughness produced by abrasive and polishing processes and is closely related to workpiece performance, such as wear resistance, frictional characteristics, and microcontact characteristics. It depends on the mechanical processing method used in surface formation, especially the tool path. A number of studies suggest an association between tool path and surface roughness [2][3][4]. However, it is significant to note that previous studies have not been conducted on the surface texture properties. In these studies, surface texture was simply described by roughness [5]. The surface topography and the texture distribution were not the primary variables studied or were simply ignored. At the same time, there were also works proving that texture properties cannot be equivalent to roughness [6]. Surveys such as those conducted by Pradeep et al. have shown that two surface textures can resemble roughness values but significantly different friction characteristics [7]. In terms of the wear condition, similar conclusions were drawn in the works of Zhang et al. [8]. Hamdavi et al. analyzed the effect of surface texture on lubrication [9]. Yayoglu et al. also demonstrated the importance of micropatterned textures for corrosion resistance [10].
Although it seems to be neglected in the field of surface quality, texture analysis and evaluation have long been a question of great interest in image fields. It is extremely difficult to formally define and analyze the texture properties of surfaces, although many material properties, such as smoothness/roughness, graininess, periodicity, homogeneity, and directionality, can be intuitively related to them [11]. In recent years, with the rapid development of image processing technology, computer vision-based methods have become the mainstream method to evaluate texture quality. Texture analysis algorithms are mainly composed of three categories: statistical methods, structural methods, and frequency domain-based methods [12]. The gray level co-occurrence matrix (GLCM) is a commonly used method that belongs to the statistics field [13][14][15]. It is now well established from a variety of studies that it can provide information about the spatial relationships of image pixels, i.e., image texture. More recently, scholars have attempted to evaluate surface texture by image means [16]. Gadelmawla established a vision system to evaluate the surface roughness using the gray level co-occurrence matrix [17]. Liu et al. proposed a GLCM-SVM model to evaluate the microcosmic surface roughness of micro-heterogeneous textures in deep holes [5]. However, images cannot always reflect the surface texture accurately. The illumination condition greatly affects the image [16], and camera parameters, such as sharpness, can also change the surface texture evaluation results [18]. To avoid image interference, an in-process surface texture condition monitoring approach was proposed by Sun et al. [19]. The vibration signal features in the polishing process were used to replace unstable images to establish the mapping relationship with the surface texture. However, the acquisition of vibration signals was also not an easy matter. The use of multiple sensors increased the method cost while enhancing the accuracy. Additionally, all the methods mentioned above focus on polished surfaces, which means that the polishing process needs to be completed to evaluate the texture features of the polishing path by the above method. This will result in vast time costs and material waste, while interference from other factors in the process can also lead to erroneous predictions. Therefore, a texture feature analysis method of the free-form surface polishing path needs to be proposed, which can be used to both predict the polishing quality and evaluate the surface texture features.
Surface texture is essentially an uneven distribution of machining errors. During polishing, it is almost impossible to achieve accurate target removal values everywhere on the surface. Errors cannot be eliminated completely and are different here and there. Compared with the ideal surface, unequal removal produced by the tool path forms peaks and valleys, and these structures form the texture. Therefore, this paper focuses on removal errors and proposes a residual level co-occurrence matrix (RLCM) for analyzing the texture features of polishing paths according to the principle and calculation method of GLCM.
The rest of this paper is organized as follows. Section 2 proposes the concept and calculation of the residual level cooccurrence matrix (RLCM). Section 3 presents the overall process of obtaining the residual matrix, which is an essential preliminary step to achieve the calculation introduced in Section 2. In Section 4, simulation and experiments are given to prove the availability, which is followed by concluding remarks in Section 5.

Texture features and analysis
The gray level co-occurrence matrix (GLCM) is an effective method proposed by Haralick [20] and has been verified to be useful to describe the surface texture. It describes the frequency correlation matrix P ij (s, ) of two pixels separated by s in the direction of angle , whose gray levels are i and j , respectively. GLCM is widely used to convert gray values into texture information. However, the corresponding gray value of each position can be easily influenced by image quality, light conditions or any other factors. This leads to unpredictable errors, thereby affecting the identification and evaluation of surface texture. Following the concept of GLCM, a residual level co-occurrence matrix (RLCM) was proposed in this paper to describe the surface texture. Replacing the gray value with removal errors can avoid above questions and provide an approach of texture evaluation that is more direct and accurate.

Residual level co-occurrence matrix
Similar to the GLCM, the RLCM is obtained by calculating the residual matrix. The residual matrix describes the surface by recording the removal errors in the form of a matrix. The removal errors indicate the difference between the actual and target removal values, which can be calculated by Eq. (1), where r x,y is the residual value at position (x, y) of the residual matrix, r a is the actual removal value, and r t is the target removal value.
The RLCM is also a two-dimensional matrix similar to the GLCM with the same size as the number of residual levels in a processed surface. The determination of residual levels will be discussed in detail later. RLCM mathematically describes the joint probability distribution (1) r x,y = r a x,y − r t x,y of two positions with a fixed distance on the surface. It can be constructed by counting the number of occurrences of position pairs, (x, y) and x ′ , y ′ , which have residual levels (i, j) . Position (x, y) is called the base position, and x ′ , y ′ is the corresponding neighbor position. The position of x ′ , y ′ relative to (x, y) is fixed not only distance but also orientation. In the whole residual matrix, the occurrence number P(i, j∕d, ) for each value pair (i, j) is calculated; then, the RLCM P(i, j∕d, ) can be written by Eq. (2), where d is the fixed distance named the step and is the fixed direction.  Figure 1b shows the calculated RLCM using parameters (1, 0 • ) , which corresponds to Fig. 1a. The gray cells indicate the corresponding value of the residual level. The circled cells indicate a sample of correspondence between residual level pair (i, j) and the occurrence number P(i, j) . Figure 1c corresponds to Figs. 1d, and Fig. 1d shows the calculated RLCM using parameters 1, 90 • . Commonly used orientation parameters also include 45 • and 135 • . The selection of parameters is described below. (2)

Constructing parameters
As seen above, there are three key parameters called constructing parameters that affect the result of RLCM: residual levels, step, and orientation. Different parameter combinations have different capabilities to describe the texture, and the evaluation results will also be different. Consequently, appropriate parameters should be reasonably selected. The polishing removal residual is a continuous value that cannot be described by a matrix and needs to be discretized into several levels. Less detailed information on the texture will be lost with a subdivision discrete result. The more levels there are, the clearer the surface features will be and the more vivid the texture information will be. However, a larger number of levels will induce a tremendous amount of calculation. Therefore, it is significant to find a suitable discretization scheme.
Normalization is the first step in dividing levels, as shown in Eq. (3), where x scale is the normalization result of element x . x min is the minimum value of elements in the matrix, while x max is the maximum. According to different machining methods, the surface roughness and residual error can vary greatly. Using the same scale to divide grades for different surfaces is irrational, such as roughwrought surfaces and polished surfaces. Normalization is applied to solve this problem. It converts the removal values to [0, 1] and improves the usability of the method. However, normalization will lead to the deformation of ) (d) RLCM with parameters texture depth. Thus, the final evaluation result should take the effect of the normalized coefficient into consideration, which is equal to x max − x min . The specific calculation of the final result will be described in detail later. Furthermore, a series of level numbers was attempted based on the normalized value to explore the most suitable level dividing scheme. The residual values were mapped into several uniform divided levels, and the number of levels was gradually increased by one each time. The feature values calculated in each case are shown in Fig. 2, which are vivid representations of the texture. The abscissa in Fig. 2 is the level numbers, while the ordinate is the feature values in the corresponding level. The analysis of feature values will be discussed in detail in Section 2.3.
Four surfaces with different residual distributions were adapted-scanning, broken, boundary parallel, and random. It is apparent from Fig. 2 that almost all the features of every surface were relatively stable in the ten-level case, and the texture can be reflected well in the feature value. More levels may provide a better description, but the cost is the unbearable surge in the amount of calculation. With successive increases in the number of levels, the amount of calculation increased exponentially. To avoid redundant calculation, the number of levels is decided to be ten.
Step d is another important constructing parameter. In the calculation of GLCM, Bo et al. proved that the result is independent of d for an image describing a wide range with consistent texture [21]. The same conclusion can be drawn in RLCM. However, the conclusion can only be established in this case that satisfied the definition of the neighborhood described by the Markov random field. It is necessary to explore the method of the step selection and make the conclusion stand.
From the above analysis, it can be seen that the step is related to the matrix size. The same method was adopted again to explore the appropriate relationship between them. Different proportions were used, and the results were shown in Fig. 3, where the abscissa is the ratio of the step d to the size of the matrix and the ordinate is the corresponding feature values. This shows that the value keeps changing continuously as the step size increases, and there is no stable stage during this process. In particular, for a curve with a ratio of 25 × 25, the corresponding feature values continue to changing with increasing step size, but because the ordinate range is too large, there is no obvious performance in the figure. Therefore, the corresponding feature values do not have a stable stage. This means that the residual matrix can hardly meet the definition of the Markov random field, and the conclusion above is not valid in the situation of this paper. The information is lost significantly as the step grows until it is completely incapable of describing the characteristics. A small step size can alleviate the loss of information, which can provide excellent performance in evaluation. The smallest possible step size should be chosen as far as the calculation allows. The most common choice is d = 1 [18].
Orientation also affects the result. Because the surface textures are arranged in different directions, the results in different directions are also different. There are four commonly used orientations that can characterize almost all orientations because of the symmetry of the co-occurrence matrix: 0 • , 45 • , 90 • , and 135 • [22]. Figure 4 shows the spatial relationships of positions that are defined offsets for various orientations. To show the direction more clearly, step d = 4 is selected in Fig. 4.
The direction of the surface texture is unpredictable. To avoid losing texture information in any orientation, the RLCM of four orientations needs to be calculated. The most prominent result will be the final result of the calculation. It can ensure that the method proposed in this paper has the same sensitivity in all orientations.

Calculate matrix feature value
It is not intuitive to describe features by a matrix, which makes the comparison between two surfaces troublesome. The literature [20] has proposed 14 features to analyze the co-occurrence matrix by statistical methods. These features can describe the information about the spatial relationships in a direct number. Excluding redundant features [23] and low correlation features [24], four features were preliminarily selected as candidates for the evaluation. The definition and geometric meaning of these features are shown as follows, where i , j are the number and the pair combination of levels is written as (i, j) . P(i, j) is the occurrence number of level pair (i, j) . x is the initial value of the removal residual, and x max is the maximum among x , while x min is the minimum. The features below were originally proposed in the theory of GLCM. Because of the same definition and character, these features were inherited into the RLCM and adaptively changed for the situation of the method proposed in this paper. An experiment was designed to verify whether they can perform well in the situation of RLCM. At the same time, the experiment can also probe into the most appropriate feature acquitted best in texture description. The experiment and its results will be described in greater detail in the next section. The meaning and calculation of features are as follows: Angular second moment (ASM) is the sum of squares of the values of each element in RLCM, which is also called energy. Surfaces with uniform and regularly changing texture patterns will have a larger ASM value. ASM can be calculated in Eq. (4). Contrast (CON) is the sum of the contrast relationships between elements. The clearer the texture, the greater the contrast between elements; the more element pairs with high contrast, the larger this value will be. The value of CON reflects the clarity of texture. CON can be calculated in Eq. (5).
Meanwhile, the influence of normalization on the calculation results should not be ignored. Normalization compresses the texture depth to a uniform scale. It is beneficial to improve the adaptability of the method but damages the evaluation results. The relationship of the corresponding level to the normalized element x n and the corresponding level to the original element x satisfies Eq. (6), where i means the corresponding level to the normalized element and i x means the corresponding level to the original element. However, the occurrence number of level pairs P(i, j) will not be affected.
Therefore, the normalized coefficient, which is equal to x max − x min , should be considered during the calculation process. The final result of CON, which counteracts the influence of normalization, is shown in Eq. (7).
Entropy represents the regularity of objects in physics. The more orderly the texture is, the smaller the entropy is. When all elements in the spatial co-occurrence matrix have maximum randomness and all values are nearly equal, the entropy is greater when the elements in the co-occurrence matrix are dispersed. It represents the complexity of texture distribution. The value of entropy is inversely proportional to the clarity of texture. Equation (8) is usually used to calculate ENT.
The inverse differential moment measures the similarity of elements in the row or column orientation. The value of IDM reflects the local correlation degree, which is larger when the elements are uniform and equal. The formula of IDM is Eq. (9).
Similarly, the expression of the normalization can also be found in the calculation result of IDM. The normalized coefficient should be added into the equation, and the IDM eliminated the influence of normalization, which can be calculated in Eq. (10).

Evaluation value
To explore the ability of features to reflect texture characteristics, six samples polished by different paths that produced various textures at different depths and densities were adopted in this part. The texture of the samples is shown in Fig. 5. Figure 5a is an idealized surface with a completely equal removal distribution (null matrix), while Fig. 5b is a processed surface with a smooth removal effect. Figure 5c-f shows four surfaces with different degrees of texture. The difference between colors indicates the depth difference of the positions. Form Fig. 5c-f, textures became increasingly obvious.
The trend of feature values changing with texture changes can reflect the correlation between features and texture characters, which determines the capability of features to evaluate. The feature parameters corresponding to different degrees of textures were calculated and are shown in Fig. 6, where the abscissa is the line spacing of polishing paths and the ordinate is the corresponding feature values. Figure 6 reflects the correlation between features and the texture. Obviously, ENT cannot describe the surface texture well because its variation does not satisfy monotonicity. What can be clearly seen in this figure is that other features, ASM, CON, and IDM included, monotonically increase as the texture deepens except for the ideal smooth surface (null matrix). Among them, CON is the best. The value of CON gradually tends to be ideal, with the surfaces trending to smooth, and it is extremely sensitive to the variedness of the texture degree. Compared with other features, CON varies tremendously even though the change in texture is slight. This can be visually observed in Fig. 7, where all the features were put into the same coordinates. The abscissa and the ordinate of Fig. 7 are the same as those of Fig. 6. As the texture becomes increasingly obvious, the CON changed the most, which means the best representability of features. It can measure the characters of textures precisely and meticulously distinguish the tiny shift. Therefore, if a simple number is needed to describe the surface texture, CON will be chosen. Hence, the final evaluation can be obtained by Eq. (11) , which is named RLCMs.

Residual matrix of polished surface
The most significant difference between the RLCM and the GLCM is the obtained original matrix. It is also a dramatic difficulty to obtain the residual matrix from the removal distribution of the surface. The removal is the value distributed on the surface of physics workpieces, which is not always a regular square plane. Usually, it is a three-dimensional geometry with irregularly shaped boundaries that cannot be easily described by a two-dimensional matrix.
The use of the parameterization method is a well-established approach in mapping a curved surface to the plane. It is widely used in many machining scenarios for establishing the one-to-one correspondence between the real and nominal surfaces [25]. It can be described as a flattening process that is mathematically equivalent to a smooth bijection between two surfaces. Conformal flattening named boundary first flattening (BFF) was used in this part. Conformal flattening can map curved surfaces without distorting angles, and among the related algorithms, BFF has obvious advantages. It is a linear method for conformal parameterization that is faster than traditional linear methods but provides control and quality comparable to sophisticated nonlinear schemes [26]. It combines higher speed as well as lower cost, and the boundary shape of the mapping plane can be freely defined by the user. This provides two solutions for obtaining the two-dimensional residual matrix.
The first approach is directly mapping a curve surface to a square domain plane. Removing values described in a two-dimensional square plane is easy to translate into a matrix. Down-sapling can be performed when the distribution of removal values is too dense. However, it is not always implemented because it may lead to information loss. This method is direct, and it can completely cover the entire surface as well as take all information into calculation. However, the square domain may lead to distortion for some extremely complex surfaces, which will change the texture features. Therefore, the second approach is provided for complicated surfaces that are easily deformed.
The situation in which the texture is parameterized to the square domain is shown in Fig. 8. The second approach is mapping a curve surface to a free domain plane. The boundary of the mapping plane is the optimal shape calculated with minimum deformation, as shown in Fig. 9. The boundary is usually irregular. To obtain the matrix, the principle of the five-point sampling method is used here. The central point of the mapping plane is chosen as the central sampling point. Then, four points on the diagonal line with the same distance as the central sampling point are selected as the surrounding sampling points. With these sampling points as the center, the corresponding matrixes are extracted. Each matrix reflects the local texture of the surface, and the comprehensive assessment is regarded as the evaluation result of the surface texture.
The second approach provides a mapping with less deformation. It can describe the distribution of texture in more detail. The difference between the evaluated values of each matrix reflects the distinction between local textures. This means that the texture in the surface is multidirectional if the evaluation value of each matrix reaches the maximum in different directions. Moreover, the evaluation value of the large gaps shows that the texture is unevenly distributed on the surface. In contrast, the texture is unevenly distributed on the surface. When a global evaluation result is wanted, the average is simply given as the final evaluation result.
The defect of the second method is also obvious. In addition to the complexity, the coverage rate is also a limiting factor. If sample matrixes cannot cover enough area, the results will be regarded as untrustworthy. Sample matrixes cover as much area of plane as possible on the premise of avoiding default values. Repetition is allowed for more coverage area, and it can also select more samples as needed. However, both of these measures will increase the redundancy of the calculation and make the algorithm more complicated. In general, terms, this means that the second approach should be adopted cautiously.

Simulation and experiment
To verify the approach discussed above, a series of related works are performed. Simulation works were presented to show the feasibility of the overall process, while experimental works proved that the simulation results were able to truthfully reflect the physical situation, and using the simulation polish results of various tool paths to analyze the texture feature was available.

Simulation
Simulation is very useful in the early stage of work to preliminarily verify the feasibility of the method. Alexander Verl argued that initial evaluation based on simulation can save cost overhead in the physical world and provide a useful guide to actual processing results [27]. Therefore, the method proposed in this paper is more suitable for use in conjunction with removal simulation, which can estimate the polishing effect of the newly planned path in terms of surface texture before actual processing. Paths with horrible predictability obtained in this method will not be applied in physics experiments, which can only lead to the pointless waste of time and cost. In addition, another reason to be considered is the considerable difficulty in obtaining removal by any measurement method. In other words, new planned polishing paths can be simulated before they are used and evaluated for texture features by this method. It can greatly improve the efficiency of path planning, and many materials that would otherwise be wasted by low-quality polishing paths can be saved.

Simulation system
To simulate the polishing result of the path, software written in C + + using Microsoft Visual Studio 2013 was developed. This software is based on Open CASCADE Technology, which is an open-source full-scale 3D geometry kernel. The entire process of the method proposed in this paper was integrated, and both removal simulation and texture evaluation can be performed with this software. The simulation of the polishing process and removal distribution is established based on the Preston equation. The relationship between removal amount and pressure and linear velocity is shown in Eq. (12), where K p is the comprehensive coefficient of the processing environment determined by experiments. P c (x, y, t) is the distribution of  V(x, y, t) is the relative movement between the tools and surfaces.
Machining paths are densely divided into path points, and the removal of each point is calculated individually. The linear superposition of these removals constitutes the complete removal of the whole path over the surface. Document [4] has proven the feasibility of this equivalent replacement. Substituting Eq. (12) with Eq. (1), the result of Eq. (12) is the variable named r a in Eq. (1). In this way, the polished simulation results of the planted path with texture at different depths and densities can be obtained.

Simulation surface texture preparation
In general, the contact between the cutter and work piece produces some regular textures. Little difference lies between adjacent textures. The same machining path produces similar (12) dh = K p P c (x, y, t)V(x, y, t)dt texture characteristics, while variable machining paths produce different texture patterns. Therefore, four different kinds of typical tool paths were used to prepare the surface with different textures, scanning paths, spiral paths, boundary parallel paths, and random paths included. These paths are shown in Fig. 10. In particular, Fig. 10c is taken from a plane with irregular borders, and the path is obtained by offsetting the boundary. Figure 10d is composed of random paths in different directions. The results produced by these paths will have different texture properties.
The polishing force and the line spacing affect the depth and density of the texture. To prove the method's universality, several combinations of force and path spacing were used to obtain the simulation surfaces. Three different line spacings are provided: 2 mm, 6 mm, and 10 mm. Each spacing was simulated four times with different forces: 1 N, 3 N, 5 N, and 10 N. In this way, 12 samples with different degrees of texture were prepared for each path. Besides, a group of random paths were designed, as shown in Fig. 11, to imitate At the same time, a perfectly ideal smooth surface was provided as a simulation sample for comparison. Therefore, 49 samples were prepared for this simulation.

Simulation evaluation results
The input of the simulation system includes the surface model, polishing path type, cutting force, and path line spacing. The distribution of the removal can be calculated by the system, and the process above can be carried out step by step. The output of the system is the final result called RLCMs, which is defined in Section 2.4.
The results of the removal simulation are shown in Fig. 12. Figure 12a shows the variation of the removal in different kinds of textures with different line spacings, while Fig. 12b shows the effect of force (scanning path with 6 mm spacing, for example). It can be seen intuitively that the removal is proportional to the force and is inversely proportional to the density of the path. Under the condition of constant machining force, the continuous increase in the line spacing makes the processing path gradually sparse, which leads to the reduction of repeated processing between processing rows and the increase in unprocessed area. Therefore, it can easily be seen from Fig. 12a that the surface texture gradually lightens with increasing line spacing. The same conclusion can be drawn for each kind of path. Similarly, under the condition of constant line spacing, increasing force will enhance the texture proportionally, as shown in Fig. 12b. The surface of the ideal sample is shown in Fig. 13, whose RLCMs is equal to 0. Table 1 shows the RLCMs of each simulation sample.
The calculation result of RLCMS shows the same conclusion as the removed image. The RLCM value gradually decreases with increasing spacing, which means that the RLCMs will decrease as the texture lightens. At the same time, the texture deepening caused by the increasing force will also be reflected in the increase of RLCMs. The variety of RLCMs for each path with different line spacing and processing force is shown in Fig. 14. The trend is identical between different kinds of paths, which means that this approach can effectively detect textures of various forms.

Free-form surface simulation
Similarly, a set of machining paths with different spacings were used in the simulation of free-form surfaces to verify the estimate ability of the method for the polishing results of the given path. The blade, which is a typical common free-form surface workpiece, was used in the simulation experiment. The blade model is shown in Fig. 15, and the illustrated surface was selected to be polished in this simulation experiment. The paths used are shown in Fig. 16, and the polishing results of the simulation are shown in Fig. 17. The simulated surface textures were calculated by the algorithm proposed in this paper, and the corresponding RLCM calculations of the specimen surface are 47.638, 218.438, and 736.837.

Experimental
In the experiments, a group of machined blades that have been simulated in 4.1.4 were used to verify that the method is valid in practice. Blades are typical freedom surface (a) random path 1 (b) random path 2 (c) random path 3 workpieces that can be easily textured during polishing because of their complex geometric features. To prepare specimens for the experiments, a group of blades were processed with different process parameters, including the line spacing of the process path and the processing force. During the polishing process, a KUKA six-axis industrial robot (KR22 R1610-2) and an abrasive belt grinder were used, and the parameters of the polishing process were set according to Table 2.
The surfaces of the processed specimens are shown in Fig. 18. It can be clearly seen that the specimen shown in Fig. 18a numbered 0 has a smooth surface without obvious texture. Textures can be seen on the surface of the specimens shown in Fig. 18b and c, while the specimens shown in Fig. 18b numbered 1 have a sparser texture than the others.
Using a 3D scanner to measure the processing removal, the residual distribution of each specimen surface could be obtained. The scanning results are calculated by the algorithm proposed in this paper, and the corresponding RLCMs of the specimen surfaces are calculated as 100.5, 3805.2, and 11,066.3. The result of scanning is shown in Fig. 19.
The results of the experiment show the same trend as the simulation; that is, the RLCMs can reflect the texture degree. RLCMs continue to decrease as textures lighten. Specimen 1, with the smoothest surface, has the smallest RLCMs value, while specimen 3 has the largest RLCMs whose texture is most visible and dense. The experimental conclusion supports the conclusions drawn from the simulation. It proves the effectiveness of the evaluation method proposed in this paper once again.

Conclusion
In this paper, a method for analyzing the texture features of free-form surface polishing paths based on co-occurrence matrix was proposed. A calculation method based on the residual matrix is proposed to analyze the texture features of different polishing paths, and two mapping proposals are provided to convert the surface removal residual distribution to the residual matrix. Four textures processed by different types of paths and different process parameters were used for simulation and experimental verification, which can prove that the method proposed in this paper has good usability and can be used for the detection, feature analysis, and evaluation of path surface texture quality.
The method proposed in this paper can solve the following problems: (1) By calculating the residuals of the processed surface, the method proposed in this paper can effectively evaluate the texture features of the polishing path; Fig. 13 Surface of an ideal sample (2) This method proposed two kinds of methods to obtain the residual matrix, which can be freely selected according to application scenarios, including (1) square domain mapping and under-sampling and (2) free domain mapping and five-point sampling; (3) This method can be used in both simulation and actual machined surfaces. It can not only evaluate the surface quality of the machined workpiece but also estimate the texture features and polishing result of the planned path before physical processing; (4) The simulation and experimental results both show that the method shows high feasibility for texture analysis of various surfaces; textured surfaces of different shapes, shades and densities have been used to verify this conclusion.
In future work, the numerical calculation formula of RLCMs will be further optimized to address the influence of the residual magnitudes on the results. The goal of the next stage is to further improve the adaptability and precision of the method. Moreover, advanced material removal models that are more precise will be used in future research work to obtain the surface residuals that can be used for method feasibility validation.   The scanning results of the processed Blade specimens Author contribution JiaXuan Li performed the algorithm design and code writing and was a major contributor in writing the manuscript. The above work was completed under the guidance of Bo Zhou and Lun Li. Guang Zhu and Cai Ming analyzed and interpreted the experimental data. All authors read and approved the final manuscript.
Funding This study was supported in part by grants from the National Defense Basic Scientific Research Program of China (grant no. JCKY2020210C002) and the National Natural Science Foundation of China-Liaoning Provincial Joint Fund (grant no. U1908230).
Data availability All data generated or analyzed during this study are included in this published article.

Declarations
Ethical approval Not applicable.

Consent to participate Not applicable.
Consent for publication Not applicable.

Competing interests
The authors declare no competing interests.