# Computer-Aided Mural Digital Restoration under Generalized Regression Neural Network

Authors: LiYuan Liu
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Aiming at the digital protection of classical murals and according to the method of generalized regression neural network (GRNN), a digital restoration is proposed in the paper. Firstly, the existing defect photos are processed preliminarily, including the elimination of noise, the extraction of boundary pixels of the region to be repaired, and the establishment of several small block regions centered on these pixels. Then, similar known pixel regions are found as sample pixel blocks, which are used as input samples of GRNN. Finally, the GRNN is adopted to obtain the approximate estimation function, and the adaptive smoothing parameters are introduced to obtain the pixel information of the area to be repaired. Through model prediction, by acquiring the pixel information of the area to be repaired, the damaged area of the original image can be repaired. The method proposed is compared with the traditional repair methods, the results show that the method is close to the texture structure image restoration method in peak signal-to-noise ratio, and the restoration results are in line with the expectation.


---

## Body

## 1. Introduction

A classical mural is a kind of art painted on the wall. It includes task image, decorative pattern painting, story painting, landscape painting, and other types. Classical murals are not only the great treasure of the Chinese nation but also the world heritage. They have very high reference value and artistic research value for the study of ancient humanities, history, geography, art, and so on [1–3]. The wall is also unfavorable for the long-term preservation of murals. In addition, due to the long history, natural disasters, and human factors, classical murals have various damages. Therefore, it is important and necessary to protect classical murals. However, the damaged forms of classical murals are diverse. If they are repaired according to the traditional methods, the information distortion caused by image reproduction will inevitably appear, and the image data are difficult to be preserved for a long time. Therefore, the Ghent Altarpiece is also an art painting painted on the wall. Reference [4] conducted in-depth research on the cracks in Ghent Altarpiece and proposed a digital virtual repair method for crack detection and repair, which is provided for the restoration of damaged classical murals. However, classical murals are damaged in various forms, and multiple new digital restoration methods need to be studied.Digital image restoration is to use the known information around the defective region of the image to repair. It is usually expressed as that there are some incomplete regions Ω in imageI, and each pixel in Ω is filled with the inferred value of the known information around the incomplete region [5]. At present, most image restoration methods use texture-based restoration methods. In terms of texture restoration technology, the texture synthesis method is one of the most widely used methods [6]. The matching of sample pixels or sample blocks is used to fill unknown regions or to decompose images into textures and structures [7]. Detailed restoration is performed on different image layers. Among the nontexture-based restoration methods, the more classical ones are the nonlinear partial differential equation method [8, 9] and the total variational restoration method [10, 11]. These methods mainly use anisotropic diffusion to repair the pixel information of the unknown region and transmit the image information along the isoilluminance line. Its essence is a partial differential equation describing the information diffusion, so this method takes a long time. In recent years, with the continuous development of artificial intelligence technology, using neural network for the image restoration and preservation is gradually becoming a research hotspot [12–14]. Because GRNN can effectively process grayscale and color pictures, the results in image restoration are ideal, and the implementation difficulty is low, with high computational efficiency.Inspired by the structural texture image restoration method proposed in [6] and the nontexture image restoration using generalized regression neural network in [12], this paper studies the restoration of classical murals. Reference [6] combines anisotropic diffusion, transmission equation, and texture synthesis methods to repair the texture image and use dynamic samples as the value of boundary repair promotion. This method can well maintain the texture structure of the image. Reference [12] uses GRNN to study the processing methods of image scratches, text removal, image noise, and loss of continuous blocks of color images. For the damaged areas such as cracks and creases, the single-pixel boundary needs to be obtained first, which are used to train the network model and repair the damaged areas. The computational time complexity is smaller than other neural networks. However, classical murals are damaged in various forms, and the damaged regions are generally large. Therefore, GRNN is used to repair the large damaged regions in this paper. Firstly, the expanded boundary pixels were selected on the processed image, and the small block region was established with these pixels as the center. Then, the known pixel regions of similar size were found as sample pixel blocks, and these pixel blocks were used as the input samples of GRNN. Finally, the approximate estimation function obtained by GRNN was used to repair the damaged regions. At the same time, this paper automatically changed the smoothing parameters according to the change of the boundary pixel value of the region to be repaired. The proposed method can significantly improve the repair quality of murals.


## 2. Generalized Regression Neural Network

Artificial neural network is the simulation and abstraction of some characteristics of an animal neural network. It studies adaptive and nonprogrammed information processing methods based on the structure and working principle of the brain. Artificial neural network is a dynamic system, which is formed by large-scale interconnected neurons. The function of a large number of neurons in the network is the characteristic of this working mechanism. From the simulation of the brain and the function of a single neuron, certain effects can be realized. The basic functions of the neural network include knowledge processing, calculation optimization, association and memory, classification and recognition, and nonlinear mapping. Its functions are determined by the connection strength, structure, and unit processing mode of the network.Generalized regression neural network is a new function approximation neural network proposed after the BP algorithm, which has a wide range of applications and can basically cover all nonlinear regression problems [15, 16]. Besides, this method has significant advantages. It will not fall into the local minimum and has a very good function approximation performance. In the training process, this method does not need to be iterated repeatedly, and the parameters to be adjusted are only smoothing factors, so the operation speed is fast. In terms of prediction performance, GRNN can get better results than feedforward neural network or RBFNN (radial basis function neural network) and can form a very reasonable regression surface based on small samples, whose main advantages are fast learning speed and high-precision convergence effect [17]. GRNN and RBFNN are very similar. They are based on the Gaussian function as the activation function of the hidden layer in the network structure, so that the input data respond locally. Therefore, when the input data are attached to the central point of the basis function, the nodes in the hidden layer will produce large output. This is mainly because the Gaussian function is a nonnegative nonlinear function that is radially symmetrical about the center point and gradually decreases to both sides. This feature significantly accelerates the learning speed of the network, so that GRNN has excellent local approximation ability. In addition, the data samples are highly dependent on the learning of GRNN, and there is only one parameter, namely the spread, which effectively reduces the impact of subjective factors on judgment and valuation. In terms of architecture, there are four layers in GRNN: input layer, mode layer, summation layer, and output layer. The logical relationship between them is shown in Figure 1.Figure 1
Model of the GRNN.The number of neurons in the input layer and the mode layer is related to the sample. The former has the same dimension as the input vector in the sample, while the latter has the same number as the sample. Different neurons have different training samples. The Gaussian function is regarded as a kernel function, and the transfer function of mode layer neurons can be given as(1)pi=exp−X−XiTX−Xi2δ2,i=1,2,…,n,where X is the input variable of GRNN, Xi is the ith training sample, δ is an extension parameter, which is related to the smoothness of the approximation function, and the smoothness of the smoothing function is positively correlated with the value.There are two neurons in the summation layer, which are connected with all neurons in the mode layer. Each summation layer neuron accumulates output values of all mode layers. The connection weight between theith neuron and the first summation neuron in the mode layer is equal to yi, whose transfer function is expressed as(2)s1=∑i=1nyipi.The weight between theith neuron and the second summation neuron in the mode layer is equal to 1, and the transfer function is(3)s2=∑i=1npi.The final estimation result of the output neuron is(4)y=fX=S1S2.


## 3. Mural Restoration Based on GRNN

### 3.1. Morphological Expansion Mural Image Processing

Mathematical morphology is widely used in image processing, which is mainly used for the analysis of image shape and structure, such as image enhancement [18, 19], feature extraction [20, 21], and edge skeleton extraction [22, 23]. Morphological expansion is to incorporate all the background points in contact with the object into the object, so that the edge of the repair area can expand outward. In this mural restoration, morphological expansion is selected to preprocess the damaged area.(5)A⊕B=x|∃a∈A,b∈B;x=a+b=∪b∈BA=x|B^∩A≠∅,where B^ is the reflection of structural element B. When B^ has common pixels with a after being translated by all x, it is defined that image A is the expansion of B.In this paper, the binary expansion operator is used to expand the damaged region to obtain the pixel information of the boundary, since the mural to be repaired is the color missing region.


### 3.2. Anisotropic Diffusion Mural Image Processing

To solve the influence of noise and blur in the damaged mural image as much as possible, anisotropic diffusion is used to smooth the image, which overcomes the defect of Gaussian blur and preserves the image edge when smoothing the images [24–26]. By equivalent analogy, the image can be regarded as a thermal field in which each pixel is used as heat flow. Whether to diffuse into the surrounding thermal field is determined according to the relationship between the surrounding pixels and the current pixels. For example, if there is a large difference between the current pixel and the neighborhood pixel, this means that the neighborhood pixel may be a boundary, so the current pixel will not expand in this direction, and the boundary will be retained. The most classical anisotropic diffusion model is Perona–Malik (PM) model, whose basic concept is to smooth the scale-space region of the image, and the boundary between regions reduces smooth or not smooth. The diffusion model proposed in the PM model [27] is(6)∂I∂t=divc∇I⋅∇I,It=0=I0,where div and ∇ are the divergence operator and gradient operator respectively, c⋅ is the diffusion equation, I0 is the original image, and the diffusion equation determines the degree of smoothness.In order to be applied in image processing, the discrete anisotropic diffusion equation is proposed in [27](7)Ipt+1=Ipt+ληp∑q∈ηpc∇Ip,qt∇Ip,qt,where λ is the constant controlling the diffusion degree, Ipt is the discrete sampling, p is the coordinate of pixels, ηp is the region adjacent to p, and c⋅ is the monotonic decreasing function of the gradient. Anisotropic diffusion denoising filter is used to enhance the structure and texture information of the input image to be repaired. In this paper, a denoising filter is used to deal with the noise of the image to be processed. Through this method, the structural texture information in the image and the boundary blur caused by expansion can be enhanced.


### 3.3. Implementation of Mural Restoration Based on GRNN

In mural image restoration, the image to be repaired is represented by the mathematical functionU (x, y). For the convenience of processing, the mapping function f:U⟶C,U⊂R2 represents the gray images of R, G, and B, where C is the one-dimensional vector corresponding to the gray value. Therefore, equations (8) and (9) represent the pixel value of the undamaged region I=ΩC and the pixel function estimation value of the damaged region Ω in the image, respectively.(8)∀x,y∈ΩC,zx,y=fx,y,(9)∀x,y∈Ω,z˜x,y=f˜x,y,z˜x,y is represented by function f. Therefore, the key to the problem is to find the f(x,y) that can meet the requirements. Since GRNN can obtain the best function estimation and approximation ability, the pixel value of the damaged region is estimated from the network and repaired.As shown in Figure2, Ω in the figure represents the damaged region in image I, ΩC is the known rectangular pixel region around the damaged region, ∂Ω is the boundary of the damaged region, which is indicated by dotted line. p is the boundary pixel of the area to be repaired that needs to be focused on; that is, p∈∂Ω,Hnp is the n×n small square region centered on p, and Hnq is the small square region with the same size and similar pixel value to Hnp in the known pixel region ΩC. Because the region to be repaired of the image studied in this paper is relatively large, for obtaining the pixel function that can accurately predict the regions, morphological expansion is first used to limit the range of the regions, and then, the boundaries of these regions can be obtained. Then, the pixel on the boundary is taken as the center to make the block region Hnp of n×n; afterwards, Hnq similar to Hnp is found in the known pixel region. If such a region exists, the region Hnp and Hnq are taken as the input training samples of the GRNN at the same time. If there is no similar region, the known pixels Hnp∩ΩC in Hnp are taken as the input training samples of the GRNN. In order to measure the similarity between Hnp and Hnq, formula (10) proposed in [6] is used to represent the similarity block measurement method.(10)dp,qmin=p−qΔUpΔU2+qΔU2.Figure 2
Mural inpainting model of the GRNN.In formula (10),(11)p−qΔU=p−qΤΔUp−q,pΔU=pΤΔUp,qΔU=qΤΔUq,where ΔU is the Laplacian diagonal matrix of the image to be repaired after anisotropic diffusion; p, q is the column vector, representing the known pixels in Hnp and the corresponding pixels in Hnq.In order to shorten the time of finding similar sample blocks and improve the computational efficiency, the scope of search is limited in this paper. The central pixel point of the pixel block at the boundary is used as the reference, similar samples will be searched within each such reference range, and the search range is set to 5 times the range of these reference pixel blocks. Meanwhile, in order to repair using the model shown in Figure2, zigzag scanning input is adopted for the obtained sample blocks Hnp∩ΩC and Hnq.The GRNN is used for image restoration. The neuron transfer function of the mode layer is formula (1), which determines the smoothness of the predicted value. δ is expressed as(12)δ=exp1−pi∈∂Ω|∇Upi⊥·npiα,where ∂Ω is area boundary under repair, npi is unit normal vector, and Upi⊥ indicates the direction and intensity of the isolux line of pi.Asδ increases, the approximation function will become more smoother. Nevertheless, in the experimental test, it is found that the larger the value of δ, the lower the accuracy of the predicted value. Therefore, this paper will search all the boundary pixels of the region to be repaired, select the appropriate boundary pixel pi, and calculate the absolute value ∇Up⊥⋅np of the unit normal vector and the quantity product of the isoilluminance intensity of this point to determine the value of δ. Image U is the image filtered by anisotropic diffusion processing, so that the image maintains high structural information and reduces the influence of noise. The pixel values of R, G, and B channels are read, respectively, for the mural images to be repaired, so the value a in the above formula is 255.


### 3.4. Algorithm and Experimental Result Analysis

The algorithm steps are shown in Figure3. Details are as follows: firstly, the edge of the digitally obtained mural image is extracted. The line drawing obtained after element replacement and fine modification can directly provide the basis for artists to make restorative copying line drawing and then shade according to the selected shading area and the appropriate color brush model. Color scheme is provided for artists or virtual display of color research for cultural relics protectors. The flow chart is shown in Figure 3.Figure 3
Algorithm flow chart.The algorithm experiment is carried out in MATLAB 8.3.0.532 platform, Windows 7 operating system, RAM 2.9 GB system environment. Figure4(a) shows the original image to be repaired, and Figure 4(b) shows the mural image to be repaired after anisotropic processing and filtering, which is mainly to calculate the smoothing parameter mother and find similar samples in the GRNN model. Figure 4(c) shows the identified region to be repaired, as shown in the white region in the figure. Figure 4(d) shows the boundary pixel information of the region to be repaired after morphological expansion. The following repair processing is mainly to find similar samples of the block region centered on the boundary pixels and take them as the training samples of the input neural network. Figure 4(e) shows the effect diagram after repair using GRNN. Figure 4(f) is a 20×20 size image block intercepted from the known pixel domain of the original image. In order to evaluate the effectiveness of the repair method proposed in this paper and compare it with the existing methods in reference [12], an object containing 50 representative pixels is defined and tested. The results are shown in Figure 5.Figure 4
Mural restoration process. (a) Original image. (b) Anisotropic filtered image. (c) Damaged region. (d) Boundary of the damaged region. (e) Inpainting image. (f) 20×20 image block.
(a)(b)(c)(d)(e)(f)Figure 5
Comparison of the predictive pixel values between the method in [12] and this paper.It can be found that the proposed method has high consistency with the real value. In order to quantitatively evaluate the difference between the two methods, the concept of similarity rate is introduced here, which can be summarized as the ratio of similar samples to the total number of samples. Besides, the criterion for judging similar samples is similarity, which means that the difference between the predicted value and the actual value is within 3; that is,|x−xp|≤3, where x represents the original pixel value, and xp represents the predicted pixel value. For the method of reference [12], the similarity rate is 84%, and the execution time is 0.2680 s. For the proposed method in this paper, the experimental results show that the similarity rate is 96%, and the execution time is 0.4096 s. The results show that the proposed method is better than the traditional method in prediction effect, but it takes a long time in execution efficiency. One of the main reasons is that it takes more time to search similar samples. Therefore, it is necessary to further optimize the algorithm to improve the search efficiency. One of the effective methods is to select the sample database with more obvious features, so as to shorten the time of identifying similar samples. In addition, the influence of the smoothing operator on the calculation results is analyzed quantitatively, and the results are shown in Figure 6.Figure 6
Influence of theδ value on the similarity rate of test results.There are 100, 50, and 20 training samples that are used to predict 50 test values, in which different smoothing parameters are used, and the value step of parameters is set as 0.01. As shown in Figures5 and 6, when the value δ is smaller, the similarity rate increases with the increase of the number of samples. Correspondingly, when the number of samples is relatively small, large δ value is necessary to obtain satisfactory calculation results. Actually, the method adopted in ref. [12] is a smaller δ value. The gradient values of the boundary pixels in the horizontal and vertical directions are first calculated, which are selected to determine the value of the smoothing parameters. In addition, the single boundary pixel is used as the training sample in ref. [12], which is not conducive to the accuracy of the predicted value and the restoration of the image. To solve this problem, formula (12) is given in this paper for the calculation of d value. Through this method, the appropriate boundary pixels can be selected flexibly, and the best GRNN model can be established, so that the best restoration effect can be obtained in image restoration.To evaluate the effect of GRNN on the restoration and application of classical murals, the methods in reference [6] and [12] are reproduced in this paper, respectively, which are used to compare the restoration effect with the proposed method. The implementation effect is shown in Figure 7–10. Besides, several 384∗256 classical mural images were used as the experimental objects in the experiment, and three groups of images were used for the test. The PSNR (peak signal to noise ratio) and execution time were used for quantitative analysis. Figure 8 shows the original mural image to be repaired, which includes three types of damage: peeling, color discoloration, and corrosion discoloration.Figure 7
Images to be repaired.Figure 8
Repair results with structure texture method.Figure 9
Repair results with nontexture restoration method based on GRNN.Figure 10
Repair results with the proposed method.The effect diagram of image restoration is based on structure and texture according to ref. [6] is shown in Figure 8. It can be found that this method can better repair the structural texture of mural images. The image effect after restoration is based on the GRNN method in ref. [12] is shown in Figure 9. Single boundary pixels are used as the input training samples of the GRNN, it can be found that the repair effect is unsatisfactory. The effect of the proposed method in this paper is shown in Figure 10. In the process of training samples, a method of finding similar samples is adopted here, which is more effective than simply taking the single-pixel boundary as the input. The more similar sample blocks are input as the input samples of GRNN, in which the sample size is 9×9 pixel blocks. As can be seen from Figure 6, the method in this paper can better maintain the consistency between the repaired area and the original image pixels.


## 3.1. Morphological Expansion Mural Image Processing

Mathematical morphology is widely used in image processing, which is mainly used for the analysis of image shape and structure, such as image enhancement [18, 19], feature extraction [20, 21], and edge skeleton extraction [22, 23]. Morphological expansion is to incorporate all the background points in contact with the object into the object, so that the edge of the repair area can expand outward. In this mural restoration, morphological expansion is selected to preprocess the damaged area.(5)A⊕B=x|∃a∈A,b∈B;x=a+b=∪b∈BA=x|B^∩A≠∅,where B^ is the reflection of structural element B. When B^ has common pixels with a after being translated by all x, it is defined that image A is the expansion of B.In this paper, the binary expansion operator is used to expand the damaged region to obtain the pixel information of the boundary, since the mural to be repaired is the color missing region.


## 3.2. Anisotropic Diffusion Mural Image Processing

To solve the influence of noise and blur in the damaged mural image as much as possible, anisotropic diffusion is used to smooth the image, which overcomes the defect of Gaussian blur and preserves the image edge when smoothing the images [24–26]. By equivalent analogy, the image can be regarded as a thermal field in which each pixel is used as heat flow. Whether to diffuse into the surrounding thermal field is determined according to the relationship between the surrounding pixels and the current pixels. For example, if there is a large difference between the current pixel and the neighborhood pixel, this means that the neighborhood pixel may be a boundary, so the current pixel will not expand in this direction, and the boundary will be retained. The most classical anisotropic diffusion model is Perona–Malik (PM) model, whose basic concept is to smooth the scale-space region of the image, and the boundary between regions reduces smooth or not smooth. The diffusion model proposed in the PM model [27] is(6)∂I∂t=divc∇I⋅∇I,It=0=I0,where div and ∇ are the divergence operator and gradient operator respectively, c⋅ is the diffusion equation, I0 is the original image, and the diffusion equation determines the degree of smoothness.In order to be applied in image processing, the discrete anisotropic diffusion equation is proposed in [27](7)Ipt+1=Ipt+ληp∑q∈ηpc∇Ip,qt∇Ip,qt,where λ is the constant controlling the diffusion degree, Ipt is the discrete sampling, p is the coordinate of pixels, ηp is the region adjacent to p, and c⋅ is the monotonic decreasing function of the gradient. Anisotropic diffusion denoising filter is used to enhance the structure and texture information of the input image to be repaired. In this paper, a denoising filter is used to deal with the noise of the image to be processed. Through this method, the structural texture information in the image and the boundary blur caused by expansion can be enhanced.


## 3.3. Implementation of Mural Restoration Based on GRNN

In mural image restoration, the image to be repaired is represented by the mathematical functionU (x, y). For the convenience of processing, the mapping function f:U⟶C,U⊂R2 represents the gray images of R, G, and B, where C is the one-dimensional vector corresponding to the gray value. Therefore, equations (8) and (9) represent the pixel value of the undamaged region I=ΩC and the pixel function estimation value of the damaged region Ω in the image, respectively.(8)∀x,y∈ΩC,zx,y=fx,y,(9)∀x,y∈Ω,z˜x,y=f˜x,y,z˜x,y is represented by function f. Therefore, the key to the problem is to find the f(x,y) that can meet the requirements. Since GRNN can obtain the best function estimation and approximation ability, the pixel value of the damaged region is estimated from the network and repaired.As shown in Figure2, Ω in the figure represents the damaged region in image I, ΩC is the known rectangular pixel region around the damaged region, ∂Ω is the boundary of the damaged region, which is indicated by dotted line. p is the boundary pixel of the area to be repaired that needs to be focused on; that is, p∈∂Ω,Hnp is the n×n small square region centered on p, and Hnq is the small square region with the same size and similar pixel value to Hnp in the known pixel region ΩC. Because the region to be repaired of the image studied in this paper is relatively large, for obtaining the pixel function that can accurately predict the regions, morphological expansion is first used to limit the range of the regions, and then, the boundaries of these regions can be obtained. Then, the pixel on the boundary is taken as the center to make the block region Hnp of n×n; afterwards, Hnq similar to Hnp is found in the known pixel region. If such a region exists, the region Hnp and Hnq are taken as the input training samples of the GRNN at the same time. If there is no similar region, the known pixels Hnp∩ΩC in Hnp are taken as the input training samples of the GRNN. In order to measure the similarity between Hnp and Hnq, formula (10) proposed in [6] is used to represent the similarity block measurement method.(10)dp,qmin=p−qΔUpΔU2+qΔU2.Figure 2
Mural inpainting model of the GRNN.In formula (10),(11)p−qΔU=p−qΤΔUp−q,pΔU=pΤΔUp,qΔU=qΤΔUq,where ΔU is the Laplacian diagonal matrix of the image to be repaired after anisotropic diffusion; p, q is the column vector, representing the known pixels in Hnp and the corresponding pixels in Hnq.In order to shorten the time of finding similar sample blocks and improve the computational efficiency, the scope of search is limited in this paper. The central pixel point of the pixel block at the boundary is used as the reference, similar samples will be searched within each such reference range, and the search range is set to 5 times the range of these reference pixel blocks. Meanwhile, in order to repair using the model shown in Figure2, zigzag scanning input is adopted for the obtained sample blocks Hnp∩ΩC and Hnq.The GRNN is used for image restoration. The neuron transfer function of the mode layer is formula (1), which determines the smoothness of the predicted value. δ is expressed as(12)δ=exp1−pi∈∂Ω|∇Upi⊥·npiα,where ∂Ω is area boundary under repair, npi is unit normal vector, and Upi⊥ indicates the direction and intensity of the isolux line of pi.Asδ increases, the approximation function will become more smoother. Nevertheless, in the experimental test, it is found that the larger the value of δ, the lower the accuracy of the predicted value. Therefore, this paper will search all the boundary pixels of the region to be repaired, select the appropriate boundary pixel pi, and calculate the absolute value ∇Up⊥⋅np of the unit normal vector and the quantity product of the isoilluminance intensity of this point to determine the value of δ. Image U is the image filtered by anisotropic diffusion processing, so that the image maintains high structural information and reduces the influence of noise. The pixel values of R, G, and B channels are read, respectively, for the mural images to be repaired, so the value a in the above formula is 255.


## 3.4. Algorithm and Experimental Result Analysis

The algorithm steps are shown in Figure3. Details are as follows: firstly, the edge of the digitally obtained mural image is extracted. The line drawing obtained after element replacement and fine modification can directly provide the basis for artists to make restorative copying line drawing and then shade according to the selected shading area and the appropriate color brush model. Color scheme is provided for artists or virtual display of color research for cultural relics protectors. The flow chart is shown in Figure 3.Figure 3
Algorithm flow chart.The algorithm experiment is carried out in MATLAB 8.3.0.532 platform, Windows 7 operating system, RAM 2.9 GB system environment. Figure4(a) shows the original image to be repaired, and Figure 4(b) shows the mural image to be repaired after anisotropic processing and filtering, which is mainly to calculate the smoothing parameter mother and find similar samples in the GRNN model. Figure 4(c) shows the identified region to be repaired, as shown in the white region in the figure. Figure 4(d) shows the boundary pixel information of the region to be repaired after morphological expansion. The following repair processing is mainly to find similar samples of the block region centered on the boundary pixels and take them as the training samples of the input neural network. Figure 4(e) shows the effect diagram after repair using GRNN. Figure 4(f) is a 20×20 size image block intercepted from the known pixel domain of the original image. In order to evaluate the effectiveness of the repair method proposed in this paper and compare it with the existing methods in reference [12], an object containing 50 representative pixels is defined and tested. The results are shown in Figure 5.Figure 4
Mural restoration process. (a) Original image. (b) Anisotropic filtered image. (c) Damaged region. (d) Boundary of the damaged region. (e) Inpainting image. (f) 20×20 image block.
(a)(b)(c)(d)(e)(f)Figure 5
Comparison of the predictive pixel values between the method in [12] and this paper.It can be found that the proposed method has high consistency with the real value. In order to quantitatively evaluate the difference between the two methods, the concept of similarity rate is introduced here, which can be summarized as the ratio of similar samples to the total number of samples. Besides, the criterion for judging similar samples is similarity, which means that the difference between the predicted value and the actual value is within 3; that is,|x−xp|≤3, where x represents the original pixel value, and xp represents the predicted pixel value. For the method of reference [12], the similarity rate is 84%, and the execution time is 0.2680 s. For the proposed method in this paper, the experimental results show that the similarity rate is 96%, and the execution time is 0.4096 s. The results show that the proposed method is better than the traditional method in prediction effect, but it takes a long time in execution efficiency. One of the main reasons is that it takes more time to search similar samples. Therefore, it is necessary to further optimize the algorithm to improve the search efficiency. One of the effective methods is to select the sample database with more obvious features, so as to shorten the time of identifying similar samples. In addition, the influence of the smoothing operator on the calculation results is analyzed quantitatively, and the results are shown in Figure 6.Figure 6
Influence of theδ value on the similarity rate of test results.There are 100, 50, and 20 training samples that are used to predict 50 test values, in which different smoothing parameters are used, and the value step of parameters is set as 0.01. As shown in Figures5 and 6, when the value δ is smaller, the similarity rate increases with the increase of the number of samples. Correspondingly, when the number of samples is relatively small, large δ value is necessary to obtain satisfactory calculation results. Actually, the method adopted in ref. [12] is a smaller δ value. The gradient values of the boundary pixels in the horizontal and vertical directions are first calculated, which are selected to determine the value of the smoothing parameters. In addition, the single boundary pixel is used as the training sample in ref. [12], which is not conducive to the accuracy of the predicted value and the restoration of the image. To solve this problem, formula (12) is given in this paper for the calculation of d value. Through this method, the appropriate boundary pixels can be selected flexibly, and the best GRNN model can be established, so that the best restoration effect can be obtained in image restoration.To evaluate the effect of GRNN on the restoration and application of classical murals, the methods in reference [6] and [12] are reproduced in this paper, respectively, which are used to compare the restoration effect with the proposed method. The implementation effect is shown in Figure 7–10. Besides, several 384∗256 classical mural images were used as the experimental objects in the experiment, and three groups of images were used for the test. The PSNR (peak signal to noise ratio) and execution time were used for quantitative analysis. Figure 8 shows the original mural image to be repaired, which includes three types of damage: peeling, color discoloration, and corrosion discoloration.Figure 7
Images to be repaired.Figure 8
Repair results with structure texture method.Figure 9
Repair results with nontexture restoration method based on GRNN.Figure 10
Repair results with the proposed method.The effect diagram of image restoration is based on structure and texture according to ref. [6] is shown in Figure 8. It can be found that this method can better repair the structural texture of mural images. The image effect after restoration is based on the GRNN method in ref. [12] is shown in Figure 9. Single boundary pixels are used as the input training samples of the GRNN, it can be found that the repair effect is unsatisfactory. The effect of the proposed method in this paper is shown in Figure 10. In the process of training samples, a method of finding similar samples is adopted here, which is more effective than simply taking the single-pixel boundary as the input. The more similar sample blocks are input as the input samples of GRNN, in which the sample size is 9×9 pixel blocks. As can be seen from Figure 6, the method in this paper can better maintain the consistency between the repaired area and the original image pixels.


## 4. Conclusion

This paper presented a GRNN method for the digital restoration and protection of classical murals. Through experiments, it is found that when the single-pixel boundary of the damaged region is used as the input training sample of GRNN and a smaller smoothing operator is selected, the accuracy of prediction will be reduced. Meanwhile, when similar samples are used as the input training samples of GRNN in the known pixel neighborhood of the boundary of the region to be repaired, the pixel value of the region to be repaired can be better predicted. For different images to be repaired, the proposed method can select better smoothing parameters, which improves the accuracy of the prediction model. In addition, the image restoration method based on texture structure is selected as the comparison object of the proposed method. The results show that the restoration effect in this paper is satisfactory, which is close to the texture image restoration method in terms of peak signal-to-noise ratio. However, due to some other restrictions and interference factors, such as GRNN in a dynamic time-varying environment, it may bring some errors. This is because its image imaging system is defective or lack of adaptability, which makes the detected and estimated parameter values difficult to reach the accurate point, which will affect the restoration of work and results and thus affect the restoration quality of mural images. Therefore, it is necessary to further improve the research work.



---

*Source: 8776612-2022-05-06.xml*