Research on the Method of Coke Optical Tissue Segmentation Based on Adaptive Clustering

The microstructure is the key factor for quality discriminate of coke. In view of the characteristics of coke optical tissue (COT), a segmentation method of coke microstructures based on adaptive clustering was proposed. According to the strategy of multiresolution, adaptive threshold binarization and morphological filtering were carried out on COT images with lower resolution. The contour of the COT body was detected through the relationship checking between contours in the binary image, and hence, COT pixels were picked out to cluster for tissue segmentation. In order to get the optimum segmentation for each tissue, an advanced K-means method with adaptive clustering centers was provided according to the CalinskiHarabasz score. Meanwhile, Euclidean distance was substituted with Mahalanobis distance between each pixel in HSV space to improve the accuracy. The experimental results show that compared with the traditional K-means algorithm, FCM algorithm, and Meanshift algorithm, the adaptive clustering algorithm proposed in this paper is more accurate in the segmentation of various tissue components in COT images, and the accuracy of tissue segmentation reaches 94.3500%.


Introduction
In recent years, blast furnace ironmaking technology had developed with the continuous development of the steel industry. So blast furnace ironmaking also puts forward higher requirements on the metallurgical properties of coke [1][2][3]. As an indispensable raw material and fuel in the blast furnace ironmaking, coke plays the role of heating agent, reducing agent, carburizing agent, and material column framework in the blast furnace [4][5][6][7]. Coke structures are one of the most important factors affecting the quality of coke. Its optical tissue composition has a direct impact on the reactivity of coke, its strength after reaction, and its thermal conductivity. Therefore, analysis and study of coke optical tissues are of great practical significance for blast furnace ironmaking and coking coal blending [8][9][10].
The relationship between coke microstructures and coke properties had attracted a great deal of research attention since the 1980s. For example, Singh et al. [11] studied the thermal resistance of coking coal, Yang et al. [12] discussed the carbonization properties and microstructures of coke, and Lin et al. [13] studied the influence of semicoke optical structures on the carbonization properties. In recent years, the use of digital image processing technology for the analysis and identification of coke microstructures has also aroused widespread interest, but research results are mainly focused on the determination of coke porosity parameters; the automated research on coke microstructures progresses slowly [14][15][16][17][18][19][20][21][22][23][24]. Based on image processing methods, Ghosh et al. [14] measured coke microstructure information about porosity, pore size distribution, pore wall thickness, radius, circumference, shape, and other structural parameters. Compared with volume analysis, image analysis provides more information on coke structures. Shohei et al. [15] established a coke model with a microstructure in order to study the influence of microstructures including pores, cracks, and inert materials on the shrinkage of coke and performed thermal stress analysis using finite element methods.
Segmentation of COTs is a prerequisite for subsequent COT identification and classification. Chen et al. [25] integrated an iterative mesh clustering algorithm into the image segmentation algorithm to improve the segmentation accuracy of COTs. The algorithm worked well for the segmentation of COTs and provided a reliable basis for the automatic identification of coke microstructures. Zhou et al. [26] proposed a segmentation algorithm combining mean drift and edge confidence for COT images. The experimental results showed that the algorithm was more reasonable and effective in partitioning between the different optical textures of the coke. However, the above two methods were clustered on the whole COT image, the algorithm is not highly targeted. In this paper, the binary image of the COT image was obtained based on the adaptive threshold binarization and morphological filtering algorithm. While finding all the contours of the binary image, the contour hierarchy matrix and the contour area coefficient were introduced to filter out the contour of the main body in the COT image, and then, the pixels of the main body were obtained. Finally, the pixels in the main body were subjected to adaptive clustering with K-means to realize the segmentation of each tissue component, comparing with the tissue segmentation algorithms in literature [25] and literature [26]; the algorithm proposed eliminates the effect of the pore area pixels on the effectiveness of clustering and improves the processing speed of the algorithm; it is more targeted to directly cluster the tissue pixels of the main body. At the same time, the clustering feature of this article is color feature, which is simpler than texture feature. In addition, by introducing the hierarchical matrix, the main body of the optical tissue image can be extracted to the greatest extent. On the basis of traditional K-means, certain improvements have been made to the similarity measurement method, the determination of the optimal cluster K value, and the selection of the initial cluster centers to form the adaptive clustering algorithm of this article, making the result of clustering tissue segmentation closer to the result of manual tissue segmentation, which also lays the foundation for the subsequent automatic identification and classification of various tissue components in COT images.

Acquisition and Characterization of COT Images
2.1. Acquisition of COT Image. The COTs are the microstructures observed under a polarized light microscope with a magnification of 400-600 [27]. The micrograph acquisition process is shown Figure 1. As shown in Figure 1, first, the focal light film specimen was placed on a carrier plate with mastic and flattened, then placed on the loading platforms to focus and correct the center of the objective lens. Second, under the incident halogen light source, adjust the light source aperture and field of view aperture so that the brightness of the field of view in the evelens is moderate, the light is uniform, and the image is clear. Finally, use the AxioCam HRC CCD camera to capture the observed COT image, the light signal into electrical signals after the signal to form a digital image on the computer.

Characteristics of COTs.
Typical COTs are isotropic, mosaic tissue (coarse grain, medium grain, and fine grain), fiber tissue, flake tissue, inert tissue, etc. (Figure 2). Its morphological characteristics in the microscopic state are as follows: (1) Inert tissue: irregular shape, isochromatic region of orange or red in color, relatively gentle changes with light change (2) Fiber tissue: brighter color with green, trip-like distribution, and certain continuity (3) Mosaic tissue: small isochromatic regions, the large dispersion, and widely distributed (4) Flake tissue: brighter color with thin edges, regular shape, small interconnection area, and good color consistency

Pixel Extraction of the Main Body in COT Image
The focal light film specimen was made by embedding toner into a transparent gel and curing, grinding, and polishing [28]. Since the gelatinous material does not reflect light when imaged under a polarizing microscope, COT images often consist of a darker background (pixels that are not in the main body) and colored pixels in the main body that reflects polarized light ( Figure 2). In order to obtain each tissue from COT image more accurately, reduce the input of subsequent pixels, and improve the pertinence and effectiveness of clustering, the pixels of the main body that reflect polarized light should be segmented first.
According to the characteristics of COTs, this paper proposed a tracking method based on contour level. The implicative relationship between the contours was used to obtain the contour of the pixels in the main body and then obtains the pixels in the main body. Meanwhile, according to the strategy of multiresolution, the contour of the main body is more holistic at smaller resolutions. Therefore, the algorithm first performs multiresolution decomposition of the COT image to ensure the integrity of the contour while improving the processing speed. The multiresolution decomposition in this paper is 0.25 times the original image size; in other words, the width and height of the image become half of the original size. The processing is shown in Figure 3.
3.1. Adaptive Threshold Binarization. It can be seen from Figure 2 that the main body of the COT image is brighter than the background area. In order to extract the brighter tissue in the main body from the darker background, the image needs to be presegmented. Commonly used image segmentation algorithms include threshold-based segmentation algorithms, such as fixed threshold segmentation, Otsu segmentation, and adaptive threshold binarization segmentation; edge detection-based segmentation algorithms, such as Canny edge detection algorithm; and region-based segmentation algorithms, such as watershed segmentation algorithm and morphology segmentation algorithm [29].

International Journal of Photoenergy
It can be seen from Figure 4 that the three traditional algorithms of Otsu, morphology, and watershed do not perform well in the segmentation of the main body in the COT image, and there are serious undersegmentation in the inert area at the upper left of the image (circled by the red ellipse). In contrast, the watershed algorithm performs better, but there is still a certain oversegmentation (circled by the red ellipse in Figure 4(f)) in the pore area. If the image was directly processed by the adaptive threshold algorithm, the entire main body will have a more serious undersegmentation (Figure 4(e)). In order to avoid the above problems, this paper introduces an adaptive threshold binarization segmentation algorithm, calculates the threshold value for each pixel separately, and averages the n × n pixels around the pixel point Pði, jÞ to obtain the threshold valueF; then, the result of subtracting the threshold offset C fromF is used as the threshold of the pixel [30], the schematic diagram of the binarization threshold was shown in Figure 5 which is There are two methods of averaging, one is the arithmetic average of local neighborhood blocks, the other is the weighted average of local neighborhood blocks, which replaces the original pixel grayscale with the weighted average of the pixel grayscale within the pixel neighborhood blocks [31].
where Qði, j, M, NÞ is the weighted value corresponding to pixel ðM, NÞ within neighborhood A ij and Pði, jÞ is the central pixel value. A Gaussian weighted average algorithm was chosen, whose weight Qði, j, M, NÞ is a Gaussian transformation of the grayscale difference between these neighborhood pixels and the central pixel. The Gaussian function curve shape is similar to the general correlation function curve shape. So this is an ideal algorithm for averaging weighted characteristics.
It can be seen from Figure 6(b) that the COT image after adaptive threshold binarization still has denser noise in the main body. However, the pixel values of the nonmain body are basically the same. After morphological filtering, the noise of the main body has been suppressed to a certain extent.

Contour
Screening of the Main Body. The arriving image after adaptive threshold binarization and morphological filtering is the binarized image, where the contours are the continuous edge formed by the white pixels in the 8 neighborhoods of all black pixels in the binarized image. A topological analysis of an optically organized binarized image was performed, and a binarized image row scans to determine all contours and their hierarchical relationships. Since these contours have a one-to-one correspondence with the regions of the original image, they can be used to represent the original image [32]. Figure 7(a) is a line scan of a local binarized image of size 9 × 9 with one complete contour, where 1 indicates normalized white pixels and 0 indicates black pixels. Scan line by line from the first to the ninth line, if a pixel value of 0 is encountered in the scan, starting from the first neighboring pixel on the left, traverse all the pixels in its 8 neighborhoods clockwise. The pixel value of 1 is the contour pixel during traversa, which was shown by the green pixels in Figures 7(b) and 7(c).
All contours can be obtained by performing the above process on the processed binarized image. Based on the connectivity of the contour region, the complete contours that emerge during the scan are numbered and recorded as C i . i is added with 1 each time a new contour was found, so that all contours in the binarized image can be obtained. Finally, the coordinates (p in , q in ) of the ith contour pixel are stored in the corresponding set of contour M i .
The contours extracted in the binarized image usually include small and incomplete edges, so it is necessary to filter out the noise contours and retain the contours of the main body. A contour hierarchy-based tracking method was proposed to analyze the contour hierarchy matrix H½i and then use the connotation relationship between contours to obtain the contours of the main body in the COT image. The flowchart of the contour extraction algorithm is shown in Figure 8.
Some of the contours may be inside some other contours, in which case the outer contours are referred to as the parent contours and the inner contours as the child contours, while some other contours have no containment relationship with each other and are of the same level as each 4 International Journal of Photoenergy other. This implication relation is the hierarchy of contours, which can be represented by the hierarchical matrix [32]. Each hierarchical matrix is an array of four elements ½ A i B i C i D i , where A i represents the serial number of the next contour in the same level, B i represents the serial number of previous contour in the same level, C i represents the serial number of its first child contour, and D i represents the serial number of its paternity contour. If the specified contour does not exist, it was indicated by -1.
Analyze with the schematic diagram of the contour hierarchy in Figure 9. The red number is the contour ordinal.
The green number is the organizational, for example, the organization of contour 0 is 0, whose next contour in the same level is contour 4, there is no previous contour, the child contour is contour 1, and there is no parent contour, so its hierarchical matrix is [4 -1 1 -1]. The hierarchical matrices of the other contours are shown in Table 1.
Based on the characteristics of the contour image, it is known that all contours can be divided into three main categories, namely, the largest contour, the contours inside the largest contour, and the contours outside the largest contour.
The algorithm proposed traverses the hierarchical matrix H½i = ½A i B i C i D i of each contour and judges whether D i is -1. If D i is -1, it means that the contour has no parent contour, then the contour that meets this condition is the contour of the largest contour, and the same level of the largest contour of the third component C i of the hierarchical matrix of these contours is the serial number of their first child contour, and then traverse the first two components A i and B i of these child contour   International Journal of Photoenergy hierarchical matrices to get other child contours of the same level contours. If D i is not -1, it means that the contour has a parent contour. Similarly, traverse the first two components A i and B i of this part of the contour to get all the child contours of this part of the contour. Finally, if both D i and C i are -1, it means that this contour has neither a parent contour nor a child contour, and then, this part of the contours was directly discarded.
Following the filtering rule above, the contours retained in Figure 9 have ordinal numbers 0, 1, 2, and 3. That is the largest contour and the internal contour of the largest contour. All contours of the sample image were processed in the same way, and the results are shown in Figure 10(c).
As can be seen from Figure 10(c), there are still many small contours inside the largest contour. In combination with the COT image features, some of these internal contours are the contours of the main body in COT image, while others are noise contours in the main body. In order to obtain the pixels in the main body more completely, further filtering of the contours within the largest contour is required. Therefore, the contour coefficient β i is introduced from the point of view of the contour envelope area.    International Journal of Photoenergy In formula (5), S i is the area of each contour, S max is the envelope area of the largest contour, and set the appropriate contour retention confidence level η. If η ≤ β i , this contour was retained; otherwise, this contour was eliminated. As shown in Figure 10(d), the noise contours inside the largest contour are basically eliminated, leaving only part of the larger pore contours. These contours are the contours of the main body of the COT image. Match the contour of the main body with the original image, as shown in Figure 10(e); basically, all the pixels of the main body in the original image are selected. The segmentation of the main body in the original image was finally realized, and the segmentation result is shown in Figure 10(f).

Color Space Transformation
RGB is a common model for displaying color images. In the RGB color space, R, G, B three components have strong correlation. So it is not good at color image segmentation and analysis. Therefore, it is necessary to select a more appropriate color space for clustering. Common color spaces include YUV, Lab, and HSV space. The HSV color space is more akin to the human emotional perception of color [33,34], which encapsulates three pieces of information about the hue, brightness, and saturation of the color. Therefore, the pixels in the main body of COT image are transformed from RGB space to HSV space.
From the distribution of normalized scatter plots of pixels of the main body in two different spaces in Figure 11, it is obvious that the density distribution of pixels of the main body in HSV space is more suitable for the selection of clustering centers, and the degree of dissimilarity between clusters is more accurate.

Extraction of COTs Based on Adaptive Clustering
As can be seen from Figure 2, different COTs will have different colors and morphology. We can sort out the different components by color. However, its color will be different for different lighting. So it is not suitable for segmentation with fixed color thresholds. To be more adaptable, the method of adaptive clustering with K-means was adopted to extract each COT. Convert the previously extracted pixels of the main body to in HSV space (Figure 11(b)) as the input of clustering. By dividing the pixels of the main body into K clusters, this results in a high degree of similarity within clusters and a low degree of similarity between clusters. K-means is an unsupervised learning algorithm proposed by MacQueen [35]. It is often used in image segmentation and has the advantages of being fast, simple, intuitive, and easy to implement [36]. Traditional K-means needs to manually determine the number of clusters K, which cannot accurately determine the number of optimal clustering centers. Besides, since the initial clustering center was selected randomly, the clustering process is prone to fall into the local optimal solution. If there are duplicate clustering centers, the clustering results will contain empty clusters, which will render the cluster results meaningless. In order to solve the shortcomings of traditional algorithms. This paper studies and proposes a K-means adaptive clustering algorithm, which was optimized from the similarity measurement method, the determination of the optimal cluster K value, and the selection of the initial cluster centers.  7 International Journal of Photoenergy 5.1. Similarity Measurement Method. The traditional K -means algorithm generally uses the Euclidean distance as a measure of the distance between clustered pixels. The similarity between pixel sample x i = ðx ih , x is , x iv Þ and pixel sample x j = ðx jh , x js , x jv Þ is usually expressed by the Euclidean distance between them: where x i = ðx ih , x is , x iv Þ represents the data of three channels H, S, and V for pixel X i .
Obviously, the smaller the distance, the greater the similarity [37]. However, Euclidean distance does not distinguish the difference between different attributes of samples [38]. It also fails to include the influence of the population change and difference of samples in the distance size. So Mahalanobis distance was proposed to measure the similarity between samples instead of Euclidean distance. Mahalanobis distance is a method to calculate the similarity between two samples by covariance distance [39,40]. Compared with Euclidean distance, it is not disturbed by the dimension and measurement scale of samples, while also removing the influence of intersample correlation.
International Journal of Photoenergy In formula (7), d * ðx i , x j Þ is the Mahalanobis distance between sample pixel i to j, x i = ðx ih , x is , x iv Þ and x j = ðx jh , x js , x jv Þ are the corresponding pixel values in the HSV space, and M is the covariance matrix of the samples. When i = j, the Mahalanobis distance d * ðx i , x j Þ satisfies the following conditions: 5.2. Determine the Optimal Cluster Number K. As can be seen from the color distribution of coke microimages in HSV space, there are only some types of COTs in an image. In order to reduce the iteration time of the algorithm, the upper limit of K is set to 6 in the process of searching the best cluster on color clustering. So the Calinski-Harabasz scores are introduced to evaluate each cluster [41]. The Calinski-Harbasz score is computed by assessing interclass and intraclass variance.
In formula (9), where k is the number of clusters, N is the number of training sets, SS E is the interclass variance, and SS M is the intraclass variance.
In formula (10), where B k is the interclass covariance matrix, trðB k Þ is the trace of the interclass covariance matrix, c i is the center of this class, and c f is for all data points.
In formula (11), where M k is the intraclass covariance matrix, trðM k Þ is the trace of the intraclass covariance matrix. By analyzing Equation (9), it can be seen that the global best-clustered K value is obtained at the highest S CH score.

Selection of Initial Cluster Centers.
In order to overcome the shortcomings of randomly selecting the initial cluster centers in traditional K-means clustering, this paper uses the maximum and minimum distance method to determine the cluster centers. The steps are as follows: (2) Extract any point in the set N as the first initial cluster center K 1 , and calculate the distance between K 1 and other sample points, and take the point with the largest distance as the second cluster center K 2 (3) For each remaining sample point N j in the set N, calculate the distance d ji from the existing cluster center N i , and take min fd ji g as the representative distance of the point N j ; select the sample point corresponding to the maximum value in min fd ji g as the next cluster center (4) Repeat the above steps and calculate the S CH score in the iterative process for each additional cluster center until the best cluster K value was found, and then, determine the attribution of each pixel in the main body of the COT image according to the principle of minimum distance The carbon powder is embedded in a special mold of transparent unsaturated resin for curing. The diameter of the sample shall not be smaller than 22 mm; the volume of the cement must be less than 1/3. After curing, it is manually ground and polished until there are no obvious pitting or scratches under the 20x dry objective lens or oil immersion objective lens. A sample of the prepared focal light film specimen is shown in Figure 12. Generally speaking, the magnification of the microscopic image is 400~600. In order to compromise, the magnification of the microscope in this article is 500. The experimental platform is shown in Figure 13.

Extracting Experiment of Pixels in the Main Body of COT
Image. The hardware platform for this experiment is an Intel Core i7-6700HQ CPU, GTX950M with 8 GB of RAM. Extracting algorithm of pixels in the main body of COT image and adaptive clustering algorithm were both written in python.
In the process of extracting the pixels of the main body of the image, this article selects 4 typical COT images from different batches of focal film specimen. Sample 1 is inert fibrous tissue, sample 2 is coarse-grained fibrous tissue, sample 3 is inert fibrous sheet-like tissue, and sample 4 is inert fibrous tissue. The image sizes are 2752 × 2208, 1950 × 1523, 1300 × 1030, and 1300 × 1030, four sample images with different tissue components are selected for processing, and the results of the algorithm proposed and the traditional segmentation algorithm are compared with the results of manual segmentation of the pixels in the main body. The comparison result is shown in Figure 14.
Further, in order to verify the segmentation effect of the algorithm proposed, we define a segmentation accuracy λ of the main part to evaluate, and its expression is as follows: where B is the number of pixels of the main body segmented by the algorithm and A is the number of pixels of the main body of the artificially marked image. The larger the λ, the better the segmentation effect of the main body, since the algorithm proposed searches for the pixels of the main part at 0.25 times the original resolution; it is necessary to restore to the original size of the image and then perform the segmentation of the four algorithms. The values of A and B for each image are shown in Table 2, substituting the A and B values of each sample in Table 2 under different segmentation algorithms into formula (13) to obtain the corresponding segmentation accuracy of the main body part; the result is λ in Table 2. It can be seen from Table 2 that compared with the traditional algorithm, this method proposed has the best segmentation effect on the main body of the COT image among the six different methods, and the average segmentation accuracy is up to 97.6352%.
6.3. Adaptive Clustering Experiment. Perform traditional K -means clustering and improved adaptive clustering on the extracted pixels of the main body. In order to make the clustering results more accurate, the algorithm proposed clusters the segmented body part at the original resolution, rather than at a lower resolution. Through a large number of observations, the upper limit of the COT type of each image is 4. Therefore, in order to further reduce the time used for clustering, the upper limit of the number of iterations K in each clustering process was set to 6; the Calinski-Harabasz score

10
International Journal of Photoenergy was used to evaluate the clustering effect to determine the best K value of clustering. During the clustering process, the K value and its Calinski-Harabasz evaluation score changes are shown in Figure 15. It can be seen from Figure 15 that the horizontal axis is the cluster K value, and the vertical axis is the cluster score. For the Calinski-Harabasz score, the highest score corresponds to the best cluster K value. In the iterative process, the S CH score and clustering time data corresponding to the best K value are shown in Table 3.
It can be seen from Table 3 that the traditional K-means clustering takes a long time to determine the best cluster K value under the evaluation of the Calinski-Harabasz score. The average clustering time for each image is 9.1 seconds, and the best K value obtained under this evaluation score is different from the number of tissue types in a single image, which will cause the tissues with basically the same color to be divided into multiple similar clusters, so it is also not suitable for segmentation of COTs.
On the contrary, the optimal K value determined by the improved adaptive clustering under the evaluation of the Calinski-Harabasz score is consistent with the number of tissue types in the image itself. The algorithm running time for a single image is significantly reduced compared to the  In order to compare the difference between the algorithm proposed and several other common clustering algorithms, traditional K-means clustering, Meanshift clustering, and FCM clustering were performed on the main pixels of the four sample images. At the same time, in order to further improve the clustering of traditional algorithms for class segmentation effects, this article still clusters four typical sample images in the HSV space at the original resolution of the three traditional methods; the segmentation semantic map of different methods is shown in Figure 16.
From Figure 16, to a large extent, it can be seen that the traditional K-means algorithm, FCM algorithm, and

12
International Journal of Photoenergy Meanshift algorithm will generate more classes than the actual number of organizations in the division of tissues. But the algorithm in this paper is consistent in the number of categories of tissue segmentation with the types of tissues contained in the original image, and the distribution of tissues is also roughly consistent with the results of manual segmentation.
In order to quantitatively measure the segmentation effect of each method, we define the tissue segmentation accuracy rate Δ to represent the accuracy of the algorithm segmentation, and the expression of Δ is as follows: where P i is the number of pixels of the ith tissue segmented by the algorithm in a picture and Q i is the artificial segmentation number of pixels of the corresponding tissue. The value of Δ evaluates the matching degree with the manual segmentation result. In the four algorithms, the artificial tissue segmentation results of each image are the same. The number of tissue types for samples 1, 2, and 4 is 2, the number of artificial tissue segmentation pixels for each tissue is Q 1 and Q 2 , and the number of tissue types for sample 3 is 3, so the number of pixels for artificial tissue segmentation is Q 1 , Q 2 , and Q 3 , respectively. In the same way, each clustering pixel obtained by each clustering algorithm corresponds to the number of segmentation types, and the number of pixels P i of each type was counted. The specific values of P i and Q i of the 4 images under the 4 clustering algorithms are shown in Table 4.
Substituting the data in Table 4 into formula (14) to obtain the corresponding tissue segmentation accuracy rate Δ, the results are shown in Table 5.
From Table 5, it can be seen that the traditional K-means algorithm, Meanshift algorithm, and FCM algorithm are different in the tissue segmentation accuracy of the 4 sample images. The average tissue segmentation accuracy are 83.9025% (K-means), 62.0400% (FCM), and 62.9275% (Meanshift). The adaptive clustering algorithm proposed has the highest segmentation accuracy Δ of the COTs, with  13 International Journal of Photoenergy an average segmentation accuracy of 94.3500%, and the running time of the algorithm proposed is much lower than that of the other three clustering methods. The average segmentation time of each image is 5.3 seconds.

Conclusions
Since the COT image is composed of a bright main body and a dark nonbody, if the pixels of the main body are not extracted, the pixel input of the clustering algorithm will be very large, which will affect the timeliness of the clustering. Therefore, the concept of contour hierarchical matrix is introduced, and then, the hierarchical relationship between contours and the contour area coefficient are used to extract the pixels of the main body of the tissue to achieve presegmentation. The segmentation accuracy of traditional algorithms in the main body of the COT image is Otsu (63.4375%), morphology (29.9225%), watered (77.4075%), fix threshold (70.7875%), and adaptive threshold (25.7525%). But the segmentation accuracy of the main body of the algorithm proposed is as high as 97.6352%. Compared with these algorithms, the algorithm proposed has the highest degree of completeness in the segmentation of the main body of the COT image.
The main body pixels obtained by presegmentation are transformed into HSV space, and adaptive clustering is performed on the basis of the original resolution of the image. The accuracy of the three traditional clustering segmentation algorithms in the main body of the tissue segmentation is K -means (83.9025%), FCM (62.0400%), and Meanshift (62.9275%). However, the tissue segmentation accuracy of adaptive clustering proposed is as high as 94.3500%, and the average processing time of a single image is 5.3 s. Compared with the traditional clustering algorithms, the processing speed of the algorithm proposed is faster, the accuracy of tissue segmentation is the highest, and it is closer to the result of manual segmentation, which provides the basis for the subsequent recognition of various COTs.

Data Availability
All data, models, and code generated or used during the study appear in the submitted article.

Conflicts of Interest
The authors declare that they have no conflicts of interest.