# Crack Repair Model of Ancient Ceramics Based on Digital Image

Authors: Feng Fang
Journal: Scientific Programming
 (2022)

---

## Abstract

Ancient ceramics is an important carrier of concretization and artistic transformation of Traditional Chinese culture. It is also an extremely indispensable link for the world to understand traditional Chinese culture. It is of great significance to ensure the quality of ceramic products and improve the reliability of products by nondestructive testing of ceramic microdefect cracks. It is necessary to extract the microdefect crack area first and describe the characteristics of the ceramic crack image with the gradient weighting feature of the model to complete the nondestructive detection of the crack image. The traditional method sets the pixel point and brightness threshold according to the pixel value of the microdefect area but ignores the description of the weighted feature of the image and completes the nondestructive detection of the microdefect crack image of ceramic products. In this study, the improved algorithm of edge detection based on cluster analysis was applied to the ancient ceramic crack repair. First, cluster analysis is used to optimize the Sobel operator in edge detection. Then, the gray value distribution of edge detection map is changed by the Clustering algorithm. Finally，the experimental results show that the contour crack trace and edge direction of the improved edge detection map are obviously enhanced by 20%, which is beneficial to improve the accuracy of ancient ceramic crack repair.


---

## Body

## 1. Introduction

Ceramics occupy a very important position in Chinese culture. Since the late Eastern Han Dynasty, when China successfully fired mature celadon, China’s porcelain-making technology has been in a leading position in the world in the long history until the late Qing Dynasty [1–3]. At present, China’s ceramics industry scale and total production are at the forefront of the world; however, China’s ceramic industry is large but not strong, and a series of problems such as backward scientific research technology of ceramics, especially advanced ceramics, are a major bottleneck restricting China to become a powerful country in the ceramic industry. Taking China’s construction ceramics industry as an example, the output of China’s construction ceramics accounts for more than 80% of the world’s output of construction ceramics. However, there are few enterprises capable of producing high-quality architectural ceramic products. Therefore, in order to change the status quo of large but not strong Chinese ceramic industry and improve the status of Chinese ceramic industry in the world, it is necessary to improve the production of high-quality ceramics technology research and development ability and the production of advanced ceramic material technology research and development ability, which is the basis and key to produce high-grade ceramic products [4, 5]. The premise of improving the research and development of high-quality ceramic materials is to strengthen the experimental analysis of ceramic materials [6].With the rapid development of multimedia technology and computer technology, the wide use of digital image acquisition equipment, as well as the popularity of network applications, a large number of ceramic image information has been digitized, and the use of computer processing of digital image information pottery and porcelain can avoid the low efficiency of traditional research process [7–9]. The workload is heavy, and the objectivity is difficult to guarantee. Promoting ceramic culture is inseparable from the display of ceramic images. Among them, there are also a lot of repeated ceramic images. So how to remove repetitive information and show users more kinds of images becomes particularly important. It is the urgent application demand of users to carry out research on the content diversity of ceramic image retrieval. With the rapid development of Internet, it has a wide application prospect. Therefore, the detection and recovery of defects indicated by ceramics are particularly important in this industry [7–12].Since entering the 21st century, data mining technology has been widely applied in various fields, which has directly promoted the upgrading of information technology and intelligent technology in many industries and brought remarkable social and economic benefits. The information obtained by data mining technology can be widely used in various fields [13, 14]. The skillful craftsmen in ancient China created a large number of exquisite ceramic wares. With the passage of time, a large part of the exquisite ancient ceramics suffered from the damage of human factors or natural factors, and it is urgent to carry out the scientific restoration of this part of ancient ceramics. At present, there are very few professionals engaged in repairing damaged and cracked ancient pottery in China, less than 3,000 nationwide, and most of whom use traditional methods to repair [15]. Moreover, there are even fewer professional technicians who can use numerical information intelligence and other technologies to repair damaged ancient ceramics. The application of the above technologies has changed the limitation of using traditional methods to detect and analyze ceramic materials, greatly reduced the cost of ceramic material analysis and improved the efficiency of ceramic material analysis [16, 17].


## 2. Related Works

In the middle of the 20th century, automatic detection technology based on machine vision has been widely used in the detection of surface defects of industrial products. Crack, the most common surface defect of ceramic tile, is also the most difficult to detect, and common crack detection algorithms include edge detection, wavelet transform, automatic zone growth method, etc. Vander Loo et al. extracted edge images of ceramic tile cracks by wavelet transform and morphological fusion difference method [18]. Walton used sliding filtering and automatic zone growth method to detect ceramic tile cracks [19]. This method can detect cracks in tile head area accurately, but the detection speed is slow and the detection rate of cracks in texture area is not high. The above algorithm has a good effect on crack detection with smooth background and single color, but it is not applicable to crack detection with texture interference and surface fluctuation. In order to make the retrieval results to provide users with more information rather than simple repetition, diversified image retrieval was proposed and extensively studied. Pradell and Molera applied diversified image retrieval technology to the field of image retrieval and used reordering technology to make the retrieval results contain richer information [20]. In reference [21], positive and negative cases are selected from the initial retrieval results by automatic simulation formula and filtered. Then, gradient clustering algorithm is used to classify the remaining results. Finally, reordering method is used to select samples from each category to form the retrieval results. He et al. rearranged the traditional query results according to users’ query terms, so as to provide users with diversified search results [22, 23].After the defects indicated by the ceramic are detected, it is necessary to restore the defects. A crack recovery method based on nonsubsampled Shearlet transform is proposed [24]. Uniform low-frequency target image is obtained by background difference method [25]. This method can effectively suppress the interference of ceramic image noise, but when the grinding texture is similar to the intensity of microdefect, the microdefect area is misjudged. Literature [10] proposed a nondestructive crack recovery method based on infiltration algorithm [26]. When the neighborhood vector of image pixel is greater than 2, it can be judged as a microdefect crack. Wang et al. [3] reconstructed grayscale images through principal component analysis, divided the target and background into two categories to achieve image segmentation, reduced the complexity and time consumption of threshold optimization in multithreshold segmentation method, and finally achieved a better defect recovery effect [7].From the above analysis, we know that the above methods have studied the crack repair model of ancient ceramics to some extent [27]. However, some problem still exists. For example, no scholar has applied the digital image to this field till now, so the research here is still a blank, which has great theoretical research and practical application value for crack repair. In addition, almost all crack repair models of ancient ceramics are shallow structure framework without deep feature extraction [28–30].The contributions of this study are as follows: (1)the basic theory of Bayesian network is introduced, including probability theory, basic principle of Bayesian network, Bayesian network learning, and common Bayesian network classifier. (2) The improved Bayesian network structure learning algorithm in Section 3 was used to construct the data classification model of hypothyroidism, and the performance of different Bayesian network classifiers was compared.This study consists of five parts. The first and second parts give the research status and background. The third part is the digital image-based crack repair model of ancient ceramics. The fourth part shows the experimental results and analysis. The experimental results of this study are introduced and compared and analyzed with relevant comparison algorithms followed. Finally, the fifth part concludes the full study.


## 3. Digital Image-Based Crack Repair Model of Ancient Ceramics

### 3.1. Feature Extraction of Ceramic Image

At present, the research on ceramic image is still relatively less use of image processing technology, processing, analysis, and mining, and application of information in ceramic image can promote the modernization of ceramic field, which is also an inevitable trend of research and development. The whole process of the method is shown in Figure1.Figure 1
Feature extraction of ceramic image framework.In order to make the retrieval results show more diversity, the very similar images in the same category are removed, and this study uses affinity propagation (AP) clustering algorithm to cluster the preliminary retrieval results and then selects the substituted table image in each category as the retrieval result. The core step of AP algorithm is the alternating update process of two parameters, and the update formula is as follows:(1)ri,k←si,k−maxk′s.t.k′≠kai,k′+si,k′.Ifi≠k(2)ai,k←min0,rk,k+∑i′s.t.i′∉i,kmax0,ri′,k.Ifi=k(3)ak,k←∑i′,s.i′≠kmax0,ri′,k,where attractiveness matrix ri′,k represents the suitability of Xi choosing Xk as the clustering center and attribution matrix Ai′,k represents the suitability of Xi choosing Xk as the clustering center.


### 3.2. Ceramic Tile Surface Crack Detection Method

Firstly, this study designs image reconstruction based on principal component analysis. The basic idea of PCA is to get the projection matrix Y of the original data. A linear transformation is used to project a higher-dimensional data image into a lower-dimensional space. For anm×n image matrix A, it is the projection of A through the matrix eigenvector X to obtain the eigenmatrix Y:(4)Y=AX.The divergence matrixJ(X) of the projection sample is used to determine the optimal projection direction, and the divergence matrix can be obtained by the covariance matrix Sx of the projection feature vector, namely,(5)JX=trSx,(6)Sx=EY−EYY−EYT=EA−EAXA−EAXT,where tr() is the trace of the matrix and E() is the mean value of the matrix, and equation (6) is written as follows:(7)JX=trSx=XTEY−EYY−EYT=EA−EAXA−EAXTX,where Gt is a nonpositive definite matrix of size n×n. In the experiment, the optimal projection direction is usually defined as the eigenvectors corresponding to the first h largest eigenvalues in Gt. For example, a set of matrices X1 and X2 that make J(X) maximum and mutually orthogonal are firstly obtained:(8)A′=YXT=∑j=1hYjXjT.The ceramic surface image reconstructed by different ceramic tile cracks is also different. WhenA′ is small, the reconstructed image contains only a small part of background texture image information and no information of crack defects is reconstructed. When A′ is appropriate, the reconstructed image contains obvious texture information and a small part of noise crack information. When A′ is larger, there are obvious crack defect information and background texture image in the reconstructed image. The larger A′ is, the more obvious the crack defect information will be in the reconstructed image. Since A is not square matrix, it cannot be directly connected to carry out the fractional solution of odd and strange eigenvalues. That is(9)AAT=PΛ1PT,ATA=QΛ2QT,where Λ1 and Λ2 are the same diagonal matrices of two diagonal elements, respectively.The preprocessed image data matrix A is taken as the sample for centralization to ensure that all the deviations in all dimensions are based on 0.Figure 2
Surface crack detection flow of ceramic tile based on PCA.


### 3.3. Crack Repair of Ancient Ceramics

As the basis of image analysis, edge detection plays an important role in image tracking, target recognition, and image segmentation. The essence of edge detection is to extract gray image by some algorithms. The essence of edge detection is to extract discontinuous edge pixels in gray image by some algorithms. The basic idea of edge detection is to detect edge points in the image first and then to form the contour of edge points according to some strategy, so as to form segmented regions. Because the edge is the boundary between the object and the background to be extracted, the object and the background can be separated only when the edge is extracted. For continuous imagesfx,y, its directional derivative has a local maximum in the square direction of the edge (normal). Therefore, edge detection is to find the local maximum and direction of the gradient. The specific definition is as follows:(10)∂f∂r=∂f∂x∂f∂r+∂f∂y∂f∂r=fxcosθ+fysinθ.The condition for∂f/∂r to reach its maximum is ∂f/∂r=0, and we have(11)θg=arctanfyfx.Based on the above edge detection principle, the commonly used edge detection operators include Sobel differential operator, Priwitt differential operator, Roberts differential operator, Canny operator, Laplacian differential operator, etc. However, the above algorithms are all local optimization algorithms, and the edge detection effect obtained is certain. Therefore, it needs to be improved.K-means clustering algorithm is a given number of classes K, and N objects are divided into K classes according to the principle of nearest distance. The clustering result is expressed by K clustering centers. Based on the given clustering objective function (or discriminant function of clustering effect), algorithm adopts the method of iterative update, each iteration process is conducted to the direction of the objective function values decrease in each round, on the basis of the reference points around the point ofk clusters, respectively, and the geometric center of each cluster will be as reference point of the next round of iterations, the iteration makes the selection of reference point closer to the real cluster geometry center, Until the position does not change, that is, the center of mass does not move:(12)J=∑j=1k∑i=1nxij−cj2,where xij−cj2 is the distance between n data points and each cluster center. Edge detection is mainly aimed at grayscale images, in which the information of each pixel in a grayscale image is described by a quantized grayscale.


## 3.1. Feature Extraction of Ceramic Image

At present, the research on ceramic image is still relatively less use of image processing technology, processing, analysis, and mining, and application of information in ceramic image can promote the modernization of ceramic field, which is also an inevitable trend of research and development. The whole process of the method is shown in Figure1.Figure 1
Feature extraction of ceramic image framework.In order to make the retrieval results show more diversity, the very similar images in the same category are removed, and this study uses affinity propagation (AP) clustering algorithm to cluster the preliminary retrieval results and then selects the substituted table image in each category as the retrieval result. The core step of AP algorithm is the alternating update process of two parameters, and the update formula is as follows:(1)ri,k←si,k−maxk′s.t.k′≠kai,k′+si,k′.Ifi≠k(2)ai,k←min0,rk,k+∑i′s.t.i′∉i,kmax0,ri′,k.Ifi=k(3)ak,k←∑i′,s.i′≠kmax0,ri′,k,where attractiveness matrix ri′,k represents the suitability of Xi choosing Xk as the clustering center and attribution matrix Ai′,k represents the suitability of Xi choosing Xk as the clustering center.


## 3.2. Ceramic Tile Surface Crack Detection Method

Firstly, this study designs image reconstruction based on principal component analysis. The basic idea of PCA is to get the projection matrix Y of the original data. A linear transformation is used to project a higher-dimensional data image into a lower-dimensional space. For anm×n image matrix A, it is the projection of A through the matrix eigenvector X to obtain the eigenmatrix Y:(4)Y=AX.The divergence matrixJ(X) of the projection sample is used to determine the optimal projection direction, and the divergence matrix can be obtained by the covariance matrix Sx of the projection feature vector, namely,(5)JX=trSx,(6)Sx=EY−EYY−EYT=EA−EAXA−EAXT,where tr() is the trace of the matrix and E() is the mean value of the matrix, and equation (6) is written as follows:(7)JX=trSx=XTEY−EYY−EYT=EA−EAXA−EAXTX,where Gt is a nonpositive definite matrix of size n×n. In the experiment, the optimal projection direction is usually defined as the eigenvectors corresponding to the first h largest eigenvalues in Gt. For example, a set of matrices X1 and X2 that make J(X) maximum and mutually orthogonal are firstly obtained:(8)A′=YXT=∑j=1hYjXjT.The ceramic surface image reconstructed by different ceramic tile cracks is also different. WhenA′ is small, the reconstructed image contains only a small part of background texture image information and no information of crack defects is reconstructed. When A′ is appropriate, the reconstructed image contains obvious texture information and a small part of noise crack information. When A′ is larger, there are obvious crack defect information and background texture image in the reconstructed image. The larger A′ is, the more obvious the crack defect information will be in the reconstructed image. Since A is not square matrix, it cannot be directly connected to carry out the fractional solution of odd and strange eigenvalues. That is(9)AAT=PΛ1PT,ATA=QΛ2QT,where Λ1 and Λ2 are the same diagonal matrices of two diagonal elements, respectively.The preprocessed image data matrix A is taken as the sample for centralization to ensure that all the deviations in all dimensions are based on 0.Figure 2
Surface crack detection flow of ceramic tile based on PCA.


## 3.3. Crack Repair of Ancient Ceramics

As the basis of image analysis, edge detection plays an important role in image tracking, target recognition, and image segmentation. The essence of edge detection is to extract gray image by some algorithms. The essence of edge detection is to extract discontinuous edge pixels in gray image by some algorithms. The basic idea of edge detection is to detect edge points in the image first and then to form the contour of edge points according to some strategy, so as to form segmented regions. Because the edge is the boundary between the object and the background to be extracted, the object and the background can be separated only when the edge is extracted. For continuous imagesfx,y, its directional derivative has a local maximum in the square direction of the edge (normal). Therefore, edge detection is to find the local maximum and direction of the gradient. The specific definition is as follows:(10)∂f∂r=∂f∂x∂f∂r+∂f∂y∂f∂r=fxcosθ+fysinθ.The condition for∂f/∂r to reach its maximum is ∂f/∂r=0, and we have(11)θg=arctanfyfx.Based on the above edge detection principle, the commonly used edge detection operators include Sobel differential operator, Priwitt differential operator, Roberts differential operator, Canny operator, Laplacian differential operator, etc. However, the above algorithms are all local optimization algorithms, and the edge detection effect obtained is certain. Therefore, it needs to be improved.K-means clustering algorithm is a given number of classes K, and N objects are divided into K classes according to the principle of nearest distance. The clustering result is expressed by K clustering centers. Based on the given clustering objective function (or discriminant function of clustering effect), algorithm adopts the method of iterative update, each iteration process is conducted to the direction of the objective function values decrease in each round, on the basis of the reference points around the point ofk clusters, respectively, and the geometric center of each cluster will be as reference point of the next round of iterations, the iteration makes the selection of reference point closer to the real cluster geometry center, Until the position does not change, that is, the center of mass does not move:(12)J=∑j=1k∑i=1nxij−cj2,where xij−cj2 is the distance between n data points and each cluster center. Edge detection is mainly aimed at grayscale images, in which the information of each pixel in a grayscale image is described by a quantized grayscale.


## 4. Experimental Results and Analysis

### 4.1. Introduction to Experimental Environment and Data Set

The purpose of the experiment in this section is to verify the comprehensive effectiveness of the proposed PCA model-based nondestructive detection method for microdefect cracks in ceramic products, and a simulation is needed. A dual-core 2.4 GHZ PC with a memory of 4 GB is used to detect a series of microdefect crack images of ceramic products on the MATLAB software platform. The image collected by the image card is stored in the computer in the form of frames. The core purpose of the digital image recognition system is to use some specific methods to extract the required information from the image. Although there are often many measures to achieve the goal, the results obtained by using different algorithms or using different steps will be very different.Ceramic images and nonceramic images were collected as positive samples and negative samples respectively to form the experimental image database. Among them, there are a total of 1000 samples, including 10 types of ceramic images, namely, white ceramic cup, golden rattan flower cup, colored ceramic cup, coarse ceramic cup, gold, dragon cup, cartoon porcelain cup, blue and white porcelain cup, ink and wash painting cup, and purple sand teacups [31].


### 4.2. Experimental Results Analysis

Except for one nonceramic image, all the other images are ceramic images, including cartoon porcelain cup, rough ceramic cup, ink painting cup, ceramic color cup, blue steafing cup, purple sand cup, and blue and white porcelain cup, totally seven kinds of ceramic cups, indicating that the diversity of the retrieval algorithm not only ensures the correlation of the retrieval results but also makes the retrieval results rich and diverse. In order to make a better comparison, this study inputs 10 types of ceramic cup images for similarity image retrieval and diversity image retrieval and calculates the maximum divergence diversity (MSD) of the two retrieval results according to the evaluation index formula, as shown in Figure3.Figure 3
Search results of different ceramic cup categories.It can be seen from the experimental results that the traditional image retrieval algorithm based on similarity is used for the first time when 10 kinds of ceramic cup images are input. The results of mean square displacement (MSD) were calculated according to the evaluation index formula and were improved obviously.In order to facilitate human-computer interaction, and considering that the optimal threshold for edge detection operation of each image is different, the rolling position of the roller bar is dragged by human mouse, and the corresponding edge detection result changes accordingly until the optimal detection result is obtained, as shown in Figures4 and 5.Figure 4
Image of ancient ceramics after edge detection by PCA.Figure 5
Image of ancient ceramics after edge detection by improved PCA.Through the comparison of the above figure, it can be seen intuitively that the improved IM-Canny operator can intuitively and conveniently select the best threshold value, so the connectivity of detection results obtained is better, and cracks can be more obviously reflected in the image detection results obtained after a series of experimental operations. Cracks in two ancient ceramics can be clearly observed in Figures4 and 5. The experimental results show that the above image processing algorithm and process are effective for ancient ceramic crack detection. The detected cracks are very clear and continuous, and the crack location can be accurately reflected.The black rectangle in Figure6 reflects the increasing amplification factor of the microdefect region. The analysis of the change of the above index values in Figure 6(a) shows that when the amplification factor of the microdefect crack region is gradually greater than 4 and still increases, the mean gray level of the pixels on the microdefect crack region decreases significantly after the ceramic image enhancement. The gray mean of the cracked region is significantly different from that of the noncracked region. As can be seen from Figure 6(b), the ratio of pixel gray scale in the noncracked area and pixel gray scale mean in the microdefect area after ceramic product image enhancement shows an obvious upward trend compared with the ratio without enhancement. The ratio of gray scale mean is also constant, denoted by C. The two graphs given in Figure 6 well illustrate the extraction of microdefect cracks in ceramic images processed by the proposed method.Figure 6
Gray results before and after microdefect crack image enhancement. (a) The mean gray level. (b) The ratio gray mean.
(a)(b)The interference noise is removed after the preprocessing of ceramic products image, and the microdefect crack area is highlighted. The microdefect crack area is obtained through skeleton extraction and length statistics, and the pixel marking method is used to search the whole binary image of ceramic products. When a pixel with a gray value of 0 is found, it is marked and searched for connected points, and the same image pixel value is given. When the target pixel of the microdefect region without added marks is encountered, a new pixel value is given, and each microdefect region can be detected.The perimeter value is equal to the sum of the distances between the pixels on the contour line of the microdefect area. The pixel marking method is used to search the whole binary image of ceramic products. When the pixel with gray value 0 is found, the connected point is marked and searched, and the same pixel value is assigned to the image. When the target pixel of the microdefect region without mark is encountered, a new pixel value is assigned. Each microdefect area can be detected. In summary, the above is the detection principle of microdefect crack image, according to which the nondestructive detection of microdefect cracks in ceramic products can be completed.The proposed method, the method in reference [9], and the method in reference [11] were used to conduct nondestructive testing of microdefect cracks in ceramic products, and the testing results are shown in Figure 7. By comparison, it can be seen that the proposed method can effectively eliminate the influence of noise and grinding texture in ceramic images, accurately extract the microdefect region of ceramic images, and increase the contrast between the image background region and the microdefect crack region. The detection accuracy is high. The internal image of ceramic products is segmented by mathematical morphology operation, and the microdefect crack region is extracted. The gradient pixels of the microdefect gradient value of different ceramic products are given different weight values to enhance the ability of feature to describe the gradient image of the microdefect crack region. The proposed method can be used for nondestructive detection of microdefect cracks.Figure 7
Nondestructive testing results of microdefect cracks by different methods. (a) Results of crack detection in reference [9]. (b) Results of crack detection in reference [11]. (c) Results of crack detection of this study.
(a)(b)(c)For the ancient ceramic crack repair, the ancient ceramic image information is one of the main information, and the edge is the most basic information feature of the image, including the useful information for image recognition, so that the image contour trend toward the edge. Therefore, the quality of edge detection algorithm directly affects the quality of image information. In this study, two groups of cracked ceramic images were randomly selected as experimental images. The image processing software selected for the experiment is MATLAB. MATLAB, as one of the three major mathematical software, has powerful graphics processing function and simple and easy-to-understand programming language. The two groups of experimental images are imported into MATLAB, and edge detection is mainly aimed at grayscale images, as shown in Figure8.Figure 8
Grayscale image for experimental.The selection of threshold value is very important in the proposed algorithm. Figure9 shows the change curves of threshold changes of three different evaluation parameters in the crack region extracted by the algorithm in this study when T is of different values. As can be seen from the figure, when T keeps increasing, the recall rate curve gradually rises, while the recall rate curve gradually decreases. As can be seen from Figure 9(a), when T = 0.7, the proposed algorithm has the highest repair accuracy. Precision is the number of samples divided by the number of samples, and in general, the higher the accuracy, the better the classifier. And the recall rate is a measure of coverage, which has multiple positive cases divided into positive cases.Figure 9
Comparison of ceramic repair performance under different parameters.
(a)(b)(c)In addition, the size of the voting domain in the process of tensor voting also has a significant impact on the performance and running time of the proposed algorithm, as shown in Figures9(b) and 9(c). When the value of σ is small, the voting window is too small to connect the crack fragments, resulting in a low precision rate. When the value of σ is large, that is, the window of the voting domain becomes larger in the process of tensor voting, the crack connection will be affected by discrete noise points, resulting in a low recall rate, and the increase of the voting domain will also lead to an increase in the running time of the algorithm. Figures 9(b) and 9(c) show that the proposed algorithm has the highest repair rate when σ = 22.


## 4.1. Introduction to Experimental Environment and Data Set

The purpose of the experiment in this section is to verify the comprehensive effectiveness of the proposed PCA model-based nondestructive detection method for microdefect cracks in ceramic products, and a simulation is needed. A dual-core 2.4 GHZ PC with a memory of 4 GB is used to detect a series of microdefect crack images of ceramic products on the MATLAB software platform. The image collected by the image card is stored in the computer in the form of frames. The core purpose of the digital image recognition system is to use some specific methods to extract the required information from the image. Although there are often many measures to achieve the goal, the results obtained by using different algorithms or using different steps will be very different.Ceramic images and nonceramic images were collected as positive samples and negative samples respectively to form the experimental image database. Among them, there are a total of 1000 samples, including 10 types of ceramic images, namely, white ceramic cup, golden rattan flower cup, colored ceramic cup, coarse ceramic cup, gold, dragon cup, cartoon porcelain cup, blue and white porcelain cup, ink and wash painting cup, and purple sand teacups [31].


## 4.2. Experimental Results Analysis

Except for one nonceramic image, all the other images are ceramic images, including cartoon porcelain cup, rough ceramic cup, ink painting cup, ceramic color cup, blue steafing cup, purple sand cup, and blue and white porcelain cup, totally seven kinds of ceramic cups, indicating that the diversity of the retrieval algorithm not only ensures the correlation of the retrieval results but also makes the retrieval results rich and diverse. In order to make a better comparison, this study inputs 10 types of ceramic cup images for similarity image retrieval and diversity image retrieval and calculates the maximum divergence diversity (MSD) of the two retrieval results according to the evaluation index formula, as shown in Figure3.Figure 3
Search results of different ceramic cup categories.It can be seen from the experimental results that the traditional image retrieval algorithm based on similarity is used for the first time when 10 kinds of ceramic cup images are input. The results of mean square displacement (MSD) were calculated according to the evaluation index formula and were improved obviously.In order to facilitate human-computer interaction, and considering that the optimal threshold for edge detection operation of each image is different, the rolling position of the roller bar is dragged by human mouse, and the corresponding edge detection result changes accordingly until the optimal detection result is obtained, as shown in Figures4 and 5.Figure 4
Image of ancient ceramics after edge detection by PCA.Figure 5
Image of ancient ceramics after edge detection by improved PCA.Through the comparison of the above figure, it can be seen intuitively that the improved IM-Canny operator can intuitively and conveniently select the best threshold value, so the connectivity of detection results obtained is better, and cracks can be more obviously reflected in the image detection results obtained after a series of experimental operations. Cracks in two ancient ceramics can be clearly observed in Figures4 and 5. The experimental results show that the above image processing algorithm and process are effective for ancient ceramic crack detection. The detected cracks are very clear and continuous, and the crack location can be accurately reflected.The black rectangle in Figure6 reflects the increasing amplification factor of the microdefect region. The analysis of the change of the above index values in Figure 6(a) shows that when the amplification factor of the microdefect crack region is gradually greater than 4 and still increases, the mean gray level of the pixels on the microdefect crack region decreases significantly after the ceramic image enhancement. The gray mean of the cracked region is significantly different from that of the noncracked region. As can be seen from Figure 6(b), the ratio of pixel gray scale in the noncracked area and pixel gray scale mean in the microdefect area after ceramic product image enhancement shows an obvious upward trend compared with the ratio without enhancement. The ratio of gray scale mean is also constant, denoted by C. The two graphs given in Figure 6 well illustrate the extraction of microdefect cracks in ceramic images processed by the proposed method.Figure 6
Gray results before and after microdefect crack image enhancement. (a) The mean gray level. (b) The ratio gray mean.
(a)(b)The interference noise is removed after the preprocessing of ceramic products image, and the microdefect crack area is highlighted. The microdefect crack area is obtained through skeleton extraction and length statistics, and the pixel marking method is used to search the whole binary image of ceramic products. When a pixel with a gray value of 0 is found, it is marked and searched for connected points, and the same image pixel value is given. When the target pixel of the microdefect region without added marks is encountered, a new pixel value is given, and each microdefect region can be detected.The perimeter value is equal to the sum of the distances between the pixels on the contour line of the microdefect area. The pixel marking method is used to search the whole binary image of ceramic products. When the pixel with gray value 0 is found, the connected point is marked and searched, and the same pixel value is assigned to the image. When the target pixel of the microdefect region without mark is encountered, a new pixel value is assigned. Each microdefect area can be detected. In summary, the above is the detection principle of microdefect crack image, according to which the nondestructive detection of microdefect cracks in ceramic products can be completed.The proposed method, the method in reference [9], and the method in reference [11] were used to conduct nondestructive testing of microdefect cracks in ceramic products, and the testing results are shown in Figure 7. By comparison, it can be seen that the proposed method can effectively eliminate the influence of noise and grinding texture in ceramic images, accurately extract the microdefect region of ceramic images, and increase the contrast between the image background region and the microdefect crack region. The detection accuracy is high. The internal image of ceramic products is segmented by mathematical morphology operation, and the microdefect crack region is extracted. The gradient pixels of the microdefect gradient value of different ceramic products are given different weight values to enhance the ability of feature to describe the gradient image of the microdefect crack region. The proposed method can be used for nondestructive detection of microdefect cracks.Figure 7
Nondestructive testing results of microdefect cracks by different methods. (a) Results of crack detection in reference [9]. (b) Results of crack detection in reference [11]. (c) Results of crack detection of this study.
(a)(b)(c)For the ancient ceramic crack repair, the ancient ceramic image information is one of the main information, and the edge is the most basic information feature of the image, including the useful information for image recognition, so that the image contour trend toward the edge. Therefore, the quality of edge detection algorithm directly affects the quality of image information. In this study, two groups of cracked ceramic images were randomly selected as experimental images. The image processing software selected for the experiment is MATLAB. MATLAB, as one of the three major mathematical software, has powerful graphics processing function and simple and easy-to-understand programming language. The two groups of experimental images are imported into MATLAB, and edge detection is mainly aimed at grayscale images, as shown in Figure8.Figure 8
Grayscale image for experimental.The selection of threshold value is very important in the proposed algorithm. Figure9 shows the change curves of threshold changes of three different evaluation parameters in the crack region extracted by the algorithm in this study when T is of different values. As can be seen from the figure, when T keeps increasing, the recall rate curve gradually rises, while the recall rate curve gradually decreases. As can be seen from Figure 9(a), when T = 0.7, the proposed algorithm has the highest repair accuracy. Precision is the number of samples divided by the number of samples, and in general, the higher the accuracy, the better the classifier. And the recall rate is a measure of coverage, which has multiple positive cases divided into positive cases.Figure 9
Comparison of ceramic repair performance under different parameters.
(a)(b)(c)In addition, the size of the voting domain in the process of tensor voting also has a significant impact on the performance and running time of the proposed algorithm, as shown in Figures9(b) and 9(c). When the value of σ is small, the voting window is too small to connect the crack fragments, resulting in a low precision rate. When the value of σ is large, that is, the window of the voting domain becomes larger in the process of tensor voting, the crack connection will be affected by discrete noise points, resulting in a low recall rate, and the increase of the voting domain will also lead to an increase in the running time of the algorithm. Figures 9(b) and 9(c) show that the proposed algorithm has the highest repair rate when σ = 22.


## 5. Conclusions

This study uses the digital image processing technology to crack detection of ancient ceramics, through a series of reasonable detection process and the corresponding algorithm test after test, and the output test results show that the effect is very good. The treatment technology is a good nondestructive testing method for ancient ceramic crack detection and can be a new analysis method in the field of ancient ceramic crack detection.After the improved algorithm, the detected contour, edge direction, and crack trace are significantly enhanced and the overall clarity of the image is greatly improved, which plays a certain auxiliary and reference role in the repair of ancient ceramic cracks and is conducive to improving the accuracy and reliability of the repair of ancient ceramic relics.



---

*Source: 4932183-2022-03-11.xml*