1 Introduction

"Lab-on-fiber" combines the benefits of environmental materials with micro-structured optical fibers, thereby utilizing the evanescent field that permeates from the fiber core into surrounding media of different refractive indices. This results in the development of sensors with higher sensitivity to signals as well as the detection of environmental materials [1], which act as catalysts for executing novel interdisciplinary research in the domain of photonics and global optics [2]. For such evanescent field sensors, the structure of the fiber waveguide is typically governed by their key metrics such as sensitivity, stability, and repeatability. Side-polished Fiber (SPF) is a special type of fiber created on standard fibers using optical micromachining techniques where part of the cladding is removed. After side-polishing, the evanescent field leaks from the core, making the polished area of the fiber highly sensitive to the sheathing materials. By combining SPF with materials possessing superior optical properties, high-performance SPF sensors can be developed [3,4,5,6,7,8,9].

In recent years, researchers have investigated various techniques for refining the manufacturing process of SPF, including V-groove block polishing, wheel polishing, and femtosecond laser processing [10]. However, these methods inevitably produce a polished surface on the SPF with a certain degree of roughness. Studies conducted by Zhong [11], Sequeira [12], Ribeiro [13], and Barros [14] have examined the effect of surface roughness on the sensing performance of D-shaped Plastic Optical Fibers (POF-D). They found that a higher root mean square roughness of the polished surface led to an increased scattering, thereby enhancing the sensor's performance. Similarly, Kim [15] and Qazi [16] have investigated the effect of surface roughness on the sensitivity of D-shaped single-mode fiber refractive index sensors. They observed that for the 1.3–1.4 refractive index unit (RIU) range, D-shaped single-mode SPF with rough polished surfaces generated stronger light scattering on such surfaces that consequently affected the sensitivity of the sensor. Furthermore, Alves et al. [17] proposed a method to explore the fractal characteristics of D-shaped single-mode fibers by simulating their surface roughness. However, they were unable to analyze the texture features of the polished fiber surfaces. In our previous work on the transmission characteristics of SPF sensors based on liquid crystal media, it was found that the texture distribution on rough polished surfaces led to light scattering. This, in turn, influence the sensitivity of SPF sensors [5]. This research work aims to explore the relationship between the texture features and surface roughness of SPF polished surfaces, thereby laying the foundation for further studies on analyzing the relationship between the roughnesses and scattering characteristics of SPF polished surfaces along with the sensitivity of SPF sensors.

The texture features can be regarded as the main component for evaluating the surface roughness of the SPF polished surface. These texture features have a profound impact on the scattering properties of the polished surface that influence the optical performance, sensing sensitivity, reliability, and biocompatibility of SPF sensors. Traditional contact methods for measuring surface roughness, such as stylus profilometry, exhibit systematic errors when used on SPFs with minor surface roughness. These methods are inefficient and incapable of executing online measurement and, hence, fail to characterize the true texture of a two-dimensional rough surface [18]. Optical measurement methods, as typical non-contact approaches, generally avoid the deformation errors caused by contact methods on the polished fibers. However, such techniques generally suffer from drawbacks of lengthy scan time, difficulty in obtaining real-time measurement, and elevated costs, all of which make them unsuitable for the SPF manufacturing process. Computer vision analysis, which is fundamentally a part of optical detection, offers a simple and low-cost yet efficient and flexible method for performing online measurements with extensive support. Various studies have been conducted in the literature to analyze the surface roughness measurement using computer vision techniques [19,20,21,22,23,24,25]. This paper utilizes the computer vision technique by employing uniform illumination of light on the polished surface. The rough texture of the polished surface alters the direction of reflected light, and the intensity and distribution of light entering the optical microscope camera sensor transmit information regarding the surface roughness. By combining the Random Forest (RF) classification algorithm with texture feature importance ranking, this study establishes a relationship between image feature indicators and the roughness of the SPF polished surface. It also attempts to characterize the surface roughness through texture features of the SPF polished surface and extensively evaluates the influence of such textures on SPF sensors.

2 Research methodology

2.1 Texture feature extraction based on the gray level co-occurrence matrix (GLCM)

It is pertinent to mention that evaluating image texture features for extracting surface roughness is a critical aspect of analyzing surface roughness using computer vision techniques. At present, most of the texture feature indicators associated with roughness are designed based on grayscale information in the image [26]. These are generally categorized into two types: texture features based on the spatial domain and those based on the frequency domain. Texture feature indicators in the frequency domain establish a relationship between frequency and amplitude information in the frequency domain space to investigate surface roughness. They are generally known for their robustness and ease of filtering noise. However, they are predominantly used to detect textured rough surfaces and their effectiveness in detecting texture features of polished surfaces is generally limited and needs to be revamped [27]. Feature indicators based on spatial domain, especially second-order statistical texture features, consider both energy characteristics and location information of pixels that contain energy and structural information, respectively.

Among these texturing evaluation strategies, GLCM is the prominent method to extract texture features. A GLCM portrays comprehensive information about image direction, spacing, amplitude variation, and speed by estimating the joint probability density of two pixels appearing simultaneously at various spatial positions and directions. This method has been widely used to detect surface roughness, defects within the fabric, cancer tumors, remote sensing, as well for other applications requiring optical technologies. In this paper, the texture feature analysis method of GLCM has been applied to analyze and extract texture features from optical microscope images of the SPF polished surface. This would inevitably assist in establishing the relationship between the texture features of the SPF polished surface and its roughness.

2.1.1 GLCM

A comprehensive set of information can be obtained from the GLCM technique such as the direction of texture, local texture arrangement, and its variation in the image of the SPF polished surface. However, it is not the GLCM itself that is directly used in characterizing the texture features of the SPF polished surface images, but rather a series of feature quantities that are derived from the GLCM. Haralick [21] defined 14 feature parameters based on GLCM including angular second moment (ASM), energy, contrast, entropy, correlation, homogeneity, dissimilarity, mean, and variance. In this work, the GLCM has been calculated for the images of the SPF polished area. GLCM is defined as the probability of a point in the original image with gray level i transitioning to a point corresponding with gray level j, as represented by \(P_d (i,j)\) with (i,j = 0,1,…, L-1) where L represents the number of gray levels. As shown in Fig. 1 , i and j satisfied a fixed spatial relationship via the following equation:

$$d = (\Delta x,\Delta y)$$
(1)
Fig. 1
figure 1

Schematic illustration of pixel pair distribution in GLCM

Note that θ in Fig. 1 represents the orientation for generating the GLCM, commonly set to 0°, 45°, 90°, and 135°. The texture information of the SPF polished surface is characterized by GLCM whereby the function of two-pixel points is represented by a distance d in a given direction as given in Eq. (1). The relationship on gray level values can also be employed to determine the probability of the occurrence of pixel points throughout the entire image.

2.1.2 Calculation method for GLCM texture feature extraction

Although the GLCM can extract 14 feature parameters, the roughness of the SPF polished surface is determined by the microscopic geometrical characteristics of the tiny peaks as well as valleys on such surface. The following six features can be used to represent the roughness of the SPF polished surface:

ASM: This is a measure of the distribution uniformity of the image's gray level. When the elements of the GLCM are concentrated around the main diagonal, the texture appears coarser overall, indicating uniform gray-level distribution in local regions which results in a higher ASM value. Conversely, with the finer texture, the local area's gray level distribution tends to be less uniform and the ASM value becomes smaller according to Eq. (2):

$$ASM = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {p_d (i,j)^2 } }$$
(2)

Contrast: The contrast of an image describes the clarity of its visual texture. Therefore, the deeper the texture grooves in the image, the greater the contrast in the GLCM as per Eq. (3):

$$con = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {(i - j)^2 p_d (i,j)} }$$
(3)

Entropy: Entropy is used to measure the amount of information or complexity in an image. With no texturing in the image, the GLCM approximately corresponds to a zero matrix with the entropy value nearing to 0. If the image contains fewer textures, the entropy value is smaller. However, if the image contains complex and abundant textures, the entropy value becomes higher, indicating a larger amount of information available per Eq. (4):

$$ent = - \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {p_d (i,j)\log p_d (i,j)} }$$
(4)

Homogeneity: Also known as inverse difference moment, homogeneity measures the extent of local variation in an image's texture. According to Eq. (5), a higher value of homogeneity indicates a lack of variation between different areas of the image texture.

$$IDM = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {\frac{p_d (i,j)}{{1 + (i - j)^2 }}} }$$
(5)

Correlation: Correlation can measure the degree of similarity of elements in the GLCM in the direction of either columns or rows. With horizontally-oriented texturing in the image, the correlation value for the 0° direction in the GLCM is often greater than the correlation values in other directions. The following set of equations can be used to determine the correlation:

$$\begin{gathered} cor = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {\frac{(i - \mu )(j - \mu )p_d (i,j)^2 }{{\delta^2 }}} } , \hfill \\ \mu = \frac{1}{L^2 }\sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {p_d (i,j)} } , \hfill \\ \delta = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {(i - \mu )(j - \mu )p_d (i,j)} } \hfill \\ \end{gathered}$$
(6)

Variance: Variance reflects the periodicity of the texture. A larger variance corresponds to a larger periodicity in the surface texture which can be determined by using Eq. (7):

$${\text{var}} = \sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {(i - \mu )(j - \mu )p_d (i,j),} } \mu = \frac{1}{L^2 }\sum_{i = 0}^{L - 1} {\sum_{j = 0}^{L - 1} {p_d (i,j)} }$$
(7)

2.2 Selection of GLCM texture feature parameters based on feature importance ranking

To establish the correlation between texture features and the roughness of the SPF polished surface, it is necessary to identify feature parameters for texture that are sensitive to the classification of different roughness levels on such surfaces. RF is a decision tree model based on the Bagging algorithm, primarily used for classification problems. In the RF algorithm, the bootstrap resampling technique is employed which involves sampling with replacement and repeating the process N times to form N training sample sets. For each of these N training sample sets, a decision tree is constructed, and branching feature selection is carried out based on the Gini coefficient to achieve sample classification. The final forest comprises N classification and corresponding regression trees (CARTs). Each tree independently completes the classification, and the classification result for new samples can be determined by a voting method based on the predictions of the ensemble of N decision trees. Hence, RF is suitable for processing high-dimensional data and has been widely incorporated for image classification analysis in recent times owing to its rapid processing power. Each decision tree in the RF is trained with a training set generated by bootstrap resampling. Some samples may be drawn multiple times, while others may not be drawn at all. The samples not drawn are referred to as out-of-bag (OOB) samples and such samples approximately constitute one-third of the total which can be used to calculate the importance of features [28].

In this work, for different areas of the SPF polished surface, RF feature importance ranking is utilized to select GLCM texture feature parameters that are sensitive to the classification of various levels of roughness. The texture features of the SPF polished surface images are then used to characterize the surface roughness information.

3 Analysis of texture features of the SPF polished surface

3.1 Image preprocessing of the SPF polished surface

The fiber employed in this study is the SMF-28e single-mode standard communication fiber from Corning Inc., having a core diameter of 8.3 μm, a fiber diameter of 125 μm, and a numerical aperture of 0.13. With a cutoff wavelength of less than 1260 nm, the fiber possesses a core refractive index of about 1.468 and a cladding refractive index of 1.462. Both refractive indices have been measured under a light source with a wavelength of 1550 nm. The SPFs used in the experiments were prepared using the wheel-type fiber side-polishing method [29] and 6 μm (2500 grit) sandpaper. The polished area has a length of 20 mm, and the average residual thickness is 2 μm, meaning the closest distance between the polished surface and the outer surface of the fiber core is on average 2 μm after side-polishing.

Images of the SPF polished surface were captured using an optical microscope camera sensor, as shown in Fig. 2a. To the naked eye, the roughness and texture of the SPF polished surface do not show obvious regularity. However, due to the wheel method used for preparing the SPF, there were transitional and flat areas observed [29], as depicted in Fig. 2b and c. For the SPF, uniform light was projected onto the fiber-polished surface. The rough texture of the polished surface changed the direction of reflected light. The intensity and distribution of light entering the optical microscope camera sensor conveyed information regarding the surface roughness and the distance from the polished surface to the fiber core (i.e., the residual thickness).

Fig. 2
figure 2

SPF area images a Captured image of SPF polished surface, b Transitional area of SPF polished surface, and c Flat area of SPF polished surface

Images of the selected SPF polished surface were captured and then subjected to grayscale processing, meaning each pixel in the captured image was represented by an 8-bit number [0,255] indicating its grayscale value. To facilitate subsequent processing while ensuring that the parallel relationships and the proportions of line segment lengths in the original image were preserved, the grayscale-processed images of the SPF polished surface underwent the following affine transformation, as expressed by Eq. (8).

$$\left[ {\begin{array}{*{20}c} {\tilde{x}} \\ {\tilde{y}} \\ 1 \\ \end{array} } \right] = M_A \left[ {\begin{array}{*{20}c} x \\ y \\ 1 \\ \end{array} } \right], \,\,\,\, M_A = \left[ {\begin{array}{*{20}c} {a_{11} } & {a_{12} } & {a_{13} } \\ {a_{21} } & {a_{22} } & {a_{23} } \\ 0 & 0 & 1 \\ \end{array} } \right]$$
(8)

The images of the SPF polished surface, after undergoing affine transformation and grayscale processing, were then cropped at intervals of 50px, resulting in 75 image segments, as illustrated in Fig. 3.

Fig. 3
figure 3

75 image segments of SPF polished surface

The intensity of light transmission in the images of the SPF polished surface is related to the distance from the polished surface to the fiber core [29]. It can be inferred that the stronger the light transmission intensity in the images of the SPF polished surface, the smaller the residual thickness which translates into a minimal distance between the polished surface and the external surface of the fiber core after side-polishing.

3.2 Selection of construction parameters for GLCM

As defined by the GLCM, the calculation of GLCM requires setting three construction parameters: the number of gray levels (L), the step size (d), and the generation direction (θ). The quality of the image was represented by L with a higher number corresponding to enhanced preservation of texture details in the image. However, increasing L resulted in a larger GLCM and slower computational speed. Similarly, the distance between pairs of pixel points in the image was determined by d. For a fine texture, d should not be set too large, else it may lead to the loss of detailed information. Similarly, the direction of the image texture was represented by θ. Hence, different settings of construction parameters led to significant differences in the GLCM generated, which in turn influenced the subsequent extraction of texture features. It is necessary to reasonably choose the GLCM construction parameters based on the images of the SPF polished surface. It should be noted that the selection of construction parameters for GLCM depends on the polishing parameters since the GLCM has been calculated for the images of the SPF polished area and is defined as the probability of a point in the original image with gray level i transitioning to a point corresponding with gray level j. The SPFs used in the experiments were prepared using the wheel-type fiber side-polishing method [29] and 6 μm (2500 grit) sandpaper. And the polishing time of the SPFs used in our experiment was 5 min. We tested four samples of side-polished fibres. The test results show that the GLCM construction parameters are the same for SPFs with the same polishing parameters.

3.2.1 Selection of gray levels (L)

As discussed, the quality of the image as well as the clarity of its texture depends on the value of L. However, setting L too high resulted in a GLCM with a larger number of dimensions, thereby affecting computational speed. Figure 4a illustrates the texture feature parameter—contrast, and its computation time for the SPF polished surface at a step size of 1, a generation direction of 0°, and L of 16, 64, 128, and 256, respectively. The higher the L, the greater would be the mean contrast that is conducive to effectively preserving the texture details of the image. With L set to 256, the computation time of 235.78 s was observed.

Fig. 4
figure 4

Selection of gray levels (L) for analyzing. a Contrast and computational time of GLCM texture Features for SPF polished surface. b Grayscale histogram distribution of SPF.In the grayscale histogram, the horizontal axis represents the gray level, whereas the vertical axis represents the frequency

Based on the gray histogram distribution of the SPF polished surface image in Fig. 4b, the gray levels of the polished surface image were distributed between 80 and 250. Choosing a lower value of L for GLCM construction resulted in the gray levels being compressed with a subsequent loss of texture details in the image. This translated towards a faulty description of the texture distribution as well as the roughness of the SPF polished surface. Hence, an optimized L value of 128 has been selected for this work.

3.2.2 Selection of step size (d)

Step size determines the distance between pairs of pixel points in the image. For finer image texturing, it is not recommended to use a large d as doing so can lead to the loss of detailed information. Concomitantly, the extracted feature parameters may not accurately portray the texture characteristics of the image. However, a smaller d may result in a localized uniformity for images with coarser textures. Under the conditions of a growth direction of 0° and an L value of 128, the mean entropy values of the texture feature parameters for the SPF polished surface were calculated at step sizes of 1, 2, 4, 6, and 8. As evident from Fig. 5, the mean value of entropy was found to be 0 with d set to 8. This can be attributed to d being too large relative to the texture of the SPF polished surface image. The GLCM feature parameters could not accurately describe the texture characteristics of an investigated image. Similarly, with d set to 1, the mean value of entropy was found to be significantly lower, thereby, failing again to depict the texture information of the image. This suggested that d was too small relative to the texture of the SPF polished surface image. Utilizing a GLCM with d of 1 to describe the texture of the polished surface resulted in a locally smooth state. Therefore, an optimized d value of 2 has been chosen for texture analysis in this work.

Fig. 5
figure 5

Selection of step size (d) for GLCM

3.2.3 Selection of generation direction (θ)

The correlation parameter in GLCM features can measure the degree of similarity of elements in the GLCM in the direction of either columns or rows. It demonstrates the linear relationship among grayscale values. For the texture of an image that is heavily skewed in the direction of θ, the correlation in that particular θ direction will be significantly greater than in other directions. Hence, correlation is often used to determine the primary direction of texture. Under the conditions with L set to 128 and d as 2, the mean values of the texture feature parameter—the correlation—for the SPF polished surface were calculated with θ of the GLCM set to 0°, 45°, 90°, and 135°. As demonstrated in Fig. 6, the mean correlation was found to be the highest for θ = 0°. Therefore, the generation direction angle for GLCM was chosen as 0° which indicated the main texture direction of the SPF polished surface being along the direction of the fiber core, which was consistent with the wheel polishing process used in its preparation.

Fig. 6
figure 6

Selection of generation direction (θ) for GLCM

However, it merits mentioning that the mean correlations at θ of 45° and 135° were almost identical and were found to be relatively higher as compared to 90°. Our previous study [5] also demonstrated the possibility of texture grooves on the SPF with angles of 40°–50° relative to the fiber core direction, which could subsequently affect the sensitivity and reliability of SPF sensors based on liquid crystal media in applications.

3.3 GLCM texture feature analysis of the SPF polished surface

By choosing the optimized construction parameters of L, d, and θ as 128, 2, and 0°, respectively, GLCM and corresponding six texture feature parameters were calculated for each of the 75 image segments of the SPF polished surface. As illustrated in Fig. 7, the texture feature parameters of image segments numbered 26–50 showed significant differences among them compared to other segments. Figure 7a confirmed the largest mean contrast for segments numbered from 26 to 50. Because of the wheel polishing process that was incorporated for preparing the SPF, the distance between the polished surface and the outer surface of the fiber core was observed to be minimal (i.e., smaller residual thickness) in the flat area of the polished surface as compared to the transitional area. Consequently, the flat area corresponding to these image segments demonstrated stronger intensity of the light transmission as well as enhanced clarity of the texture. Figure 7b and c showed that the mean values of ASM and homogeneity were significantly lowered for segments numbered from 26 to 50, indicating that the texture of the SPF polished surface corresponding to these segments came out to be finer. This translated into a non-uniform distribution of gray levels and rich texture variations within the local area of the image. Figure 7d displayed that the mean entropy value for segments numbered 26–50 was significantly higher than for other segments, reflecting the profused texture information of the SPF polished surface in these segments. However, compared to other segments, the mean correlation at θ of 0° was lower for segments numbered 26–50.

Fig. 7
figure 7

GLCM texture feature analysis of SPF polished surface

It has been reported that the surface roughness of the sensing area in D-shaped optical fibers had a profound impact on the sensitivity of the fiber sensor [16]. With an increasing surface roughness, the sensitivity of the sensor is enhanced in a non-linear manner. This agrees with our previous experimental finding whereby enhanced sensitivity in SPF sensors based on liquid crystal media was attributed to the surface texture of the polished area of the fiber [5]. Similarly, Yu et al. [4] reported enhanced sensitivity of coreless D-shaped SPF sensors with deeper polishing depths within the fiber [30]. Tang et al. found that in the flat area of the liquid crystal-based SPF biosensors with small residual thickness and grooved textures, the sensor sensitivity was observed to be higher [8]. From Fig. 7, it can be discerned that for a smaller residual thickness in the flat area of the SPF polished surface corresponding to segments numbered 26–50, the GLCM texture feature analysis indicated the presence of rich local variations and fine textures on the polished surface. This appeared to be in contrast with the texture features of the transitional area of the polished surface, where the residual thickness was found to be larger. Based on these findings, further analysis can be conducted using GLCM texture features to identify areas of enhanced sensitivity on the SPF polished surface. Hence, this research work can be termed as a harbinger for the development of an emerging micro-probe type "lab-on-fiber" technology that envisages the amalgamation of functionalized materials on fibers for realizing miniaturized fiber optic sensors.

3.4 Roughness analysis of SPF polished surface based on texture feature importance

The surface roughness analysis may be deemed to become a tedious process that can be attributed to establishing correlations among the six texture feature parameters and the overlapping of texture information. To evaluate the sensitivity of GLCM texture feature parameters in classifying the roughness levels of the SPF polished surface, each of these parameters was ranked based on their importance using RF feature importance ranking by taking into account the Gini coefficient and the RF OOB error estimation. The results are depicted in Fig. 8. Employing both feature importance analysis methods, the ranking of the importance of GLCM texture features for classifying the roughness of the SPF polished surface was found to be consistent. The most significant parameter was the variance that represented the texture periodicity. The order of importance ranking from strongest to weakest parameters was observed as follows: variance, ASM, entropy, contrast, homogeneity, and correlation.

Fig. 8
figure 8

Importance ranking of GLCM texture feature parameters

However, previous studies have reported four parameters that effectively represented the texture features—ASM, contrast, entropy, and correlation [23,24,25]. Hence, based on attained results, two types of texture feature subsets were constructed in this work. Feature Subset 1 comprised variance, ASM, entropy, and contrast,whereas Feature Subset 2 contained ASM, entropy, contrast, and correlation. The roughness of the SPF polished surface was classified using these two texture feature subsets in RF classification experiments. As tabulated in Table 1, the RF classification accuracy for Subset 1 was the highest, demonstrating an improvement of 17.65% as compared to Subset 2. Hence, it can be concluded that variance, ASM, entropy, and contrast were more sensitive to the classification of various roughness levels on the SPF polished surface.

Table 1 RF classification experiment based on feature importance ranking for analyzing roughness of polished surface using GLCM texture feature subsets

The RF classification validation experiment using Feature Subset 1 was also conducted to analyze the roughness of the SPF2# polished surface and the results are shown in Fig. 9. The results, as displayed in Table 2, showed high classification accuracy. Compared to Feature Subset 2, Subset 1 nevertheless maintained a higher accuracy rate in classifying the roughness level of the SPF polished surface.

Fig. 9
figure 9

75 image segments of SPF 2# polished surface corresponding to roughness validation experiment

Table 2 RF classification validation experiment of polished surface roughness based on GLCM texture feature subsets

4 Conclusion

The GLCM method was creatively implemented to analyze the texture features of the SPF polished surface. The grayscale histogram and subsequent texture feature parameters were thoroughly analyzed by considering computational speed, clarity of image texture, texture detail information, and primary texture direction. It was found that a gray level of 128, a step size of 2, and a generation direction angle of 0° were considered as optimized values to construct the GLCM for the SPF polished surface images. Similarly, GLCM and its texture feature parameters were calculated for various image segments of the SPF polished surface. Significant variations among the texture feature parameters were observed for such segments that corresponded to the flat area of the SPF polished surface as compared with other segments. They exhibited higher mean values for contrast and entropy, but lower mean values for ASM, homogeneity, and correlation. Other characteristics include smaller residual thickness, stronger light transmission intensity, fine texture, rich local variations, uneven distribution of gray levels, and texture features primarily oriented parallel to the fiber core.By using the RF feature importance ranking method which was based on the Gini coefficient and OOB error estimation, this work evaluated the sensitivity of various GLCM texture feature parameters to the classification of various roughness levels of the polished surface. A subset of features, composed of variance, ASM, entropy, and contrast, was selected for categorizing the roughness levels on the SPF polished surface. The validation experiment on the roughness of the SPF polished surface demonstrated an RF classification accuracy of 95.65%. Hence, the roughness levels of SPF polished surface were effectively characterized by utilizing the texture features. We obtained the relationship between SPF polishing surface texture feature and fibre polishing surface roughness for the first time. And the texture feature importance method was used for the first time to achieve high-precision classification and identification of SPF polishing surface roughness. The presented results could serve as a stepping stone for further capitalizing on the GLCM texture features to precisely identify areas of high sensing sensitivity on the SPF polished surface, thereby, establishing a foundation for creating a micro-probe type "lab-on-fiber".