Abstract
Traditional mural repair methods only observe the texture of murals when segmenting the repair area, but ignore the extraction of a mural damage data, resulting in incomplete damage crack information. For this reason, the method of repairing the damaged murals based on machine vision is studied. Using machine vision, it can get two-dimensional image of a mural, preprocess the image, extract the damaged data of a mural, and then divide the repair area and repair degree index. According to different types of damage, it can choose the corresponding repair methods to achieve the repair of damaged mural. The results show: Compared with the OPTICS-based unsupervised method and the machine vision for orchard navigation method, the number of repair points and repair cracks extracted by the proposed method is more than that of the two traditional methods, which can more accurately and comprehensively extract the repair information of murals.
Introduction
An ancient painted mural is an art work painted on the wall, which shows rich historical and cultural information. It has a history of more than a thousand years. It is a national treasure and a world heritage. However, due to the long history of ancient painted mural, the wall is not conducive to the long-term preservation of the mural. At the same time, affected by natural disasters and human factors, it has caused a variety of damage, such as fading, discoloration, shedding, etc., so it is important and necessary to repair the ancient painted murals. In order to repair the integrity of the mural and achieve the required visual effect, the damaged parts of the mural are repaired and filled, or the objects in the image are removed.
Therefore, a method of repairing the damaged ancient painted murals based on machine vision is proposed. In this method, machine vision is to use machine instead of human eye to measure and judge. Through machine vision products, such as CMOS and CCD image pickup devices, the ancient color murals captured are transformed into image signals, which are transmitted to a special image processing system. According to the information of pixel distribution, brightness, color, etc., they are transformed into digital signals. These signals are carried out various operations by the image system to obtain the damage characteristics of ancient painted murals, and then control the on-site equipment actions according to the discrimination results. Machine vision has an inestimable value in detecting the damage of ancient painted murals. While repairing, it can permanently preserve the image information of the painted murals, demonstrate the process and the reality of the damaged murals, and provide a reference for the damage repair of ancient painted murals.
Similar works
At present, many researchers at home and abroad have put forward many methods for repairing the damage of ancient painted murals, which can be divided into the following two categories: Reference [1] proposed an image damage repair method based on local differentiation and mutation. The repair process is to spread the known information along the structural information in the painted murals, and through the principle of variation, the partial differential formula and variation model are equivalently deduced. The main idea of the model is to first establish functional, consider the existing part and prior model in the painted mural, establish the repaired functional according to these two items, and according to the theory of variational functional, transform the restoration of ancient painted mural into an energy functional problem to find the extreme value. The edge information around the area to be repaired is used to complete the restoration. Reference [2] proposed a mural damage repair method based on transform domain. Firstly, the painted murals are transformed to the transformation domain, and then the characteristics of the transformation domain are used to repair the damaged murals. If there is an over complete dictionary, a few atoms in the dictionary can be used to represent the signals effectively, calculate the sparse coding of the painted murals, and then use the corresponding over complete dictionary and sparse coding, to complete the restoration and reconstruction of the painted murals, so as to achieve the restoration of the damaged areas in the murals. However, due to the variety of damaged forms of ancient painted murals, if they are repaired according to the above two traditional methods, there will inevitably be problems such as the distortion of information and the difficulty of long-term preservation of painted murals. Because the repair work is irreversible operation, there are certain risks. Reference [3] proposes an adaptive restoration method of damaged image lost area based on texture synthesis. The damaged image lost area is texture segmented, the edge energy feature of damaged image is extracted, and the adaptive texture density quantization estimation is completed. The texture vector of the lost region is calculated to quantify the super-pixel visual features of the region. The priority repair region is calculated according to the texture characteristics based on the Criminisi algorithm, and the reliability of the image is continuously updated to repair the lost region, so as to complete the adaptive repair of the lost region of the damaged image. Reference [4] proposes an improved sparse representation method based on similar matching block groups. The method of combining color information and cosine distance is used to define image block matching criteria to obtain matching block groups with more similar structural change trend in the target neighborhood; Then, in the process of sparse reconstruction, the known information and estimated unknown information are considered at the same time, and different weights are added to the sparse coefficients by using the matching degree between similar blocks and target blocks, so as to enhance the ability of filtering matching blocks and reduce the phenomenon of texture blur; Finally, according to the structural sparsity, the sample block size is adaptively determined in the areas with different structural complexity to reduce the error propagation phenomenon in the process of image restoration. However, the above methods only observe the texture of murals, but ignore the extraction of mural damage data, resulting in incomplete damage crack information.
The design of the method of repairing the damaged ancient painted murals based on machine vision
Obtaining mural image based on machine vision
In order to obtain high-quality ancient painted mural image, the machine vision detection technology is used to simulate the human visual function. At the same time, it is necessary to accurately perceive the mural position and control the process of capturing the painted mural image with the camera. The image acquisition process includes four controls: machine vision detection, camera control, camera photographing, segmentation and positioning of the painted mural image manufacturing process.
After the machine vision detects the damage of the painted mural, it sends the location information of the damage to the camera control unit, which controls the camera shutter to open and takes photos. The image is transferred to the image segmentation and positioning unit for processing, the position of the image in the whole mural is located, and the position deviation between the image center and the whole mural center is calculated and feedback to the camera control unit. According to the position deviation of this time, the camera control unit adjusts the opening time of the next camera shutter, realizes the accurate capture of the color mural by the camera, and obtains the two-dimensional image of all positions of the ancient color mural.
Mural image preprocessing
Image denoising
Because there is usually noise in the damaged mural image, which will affect the extraction effect of the boundary information in the damaged area of the image, so the key work of preprocessing is to denoise the image. Using anisotropic diffusion to deal with the noise of a mural image, the two-dimensional image is regarded as a thermal field, and each pixel is regarded as a thermal flow. According to the relationship between the surrounding pixels and the current pixels, it can decide whether to diffuse to the surrounding thermal field. The difference between the current pixel and the neighboring pixel is relatively large, which means that the neighboring pixel is likely to be the boundary, so the current pixel will not be in this direction. If the image above is extended, the boundary of the damaged area will be preserved [5]. If the mural image is
Four different divergence formulas are used to calculate the partial derivative of the current pixel in four directions. The formula is as follows:
Anisotropic diffusion selects PM mode, whose basic idea is to smooth mural image in the region of scale space, reduce and smooth the boundary between region and region, and the minimum coefficient is generally on the boundary. If the area coefficient is
In Eq. (3), the divergence operator and gradient operator are exp and
A monotone decreasing function of gradient is obtained. Anisotropic diffusion denoising filter is used for the input image to be repaired to enhance the texture information of the inner structure of the image and enhance the boundary blur caused by expansion.
In order to collect the damaged data of a mural image, radiation correction preprocessing is needed. The method of correction is to collect dark current data and standard white board data through instrument, so as to realize reflectivity inversion. By scanning standard white board image with reflectivity of 100%, we can get all white calibration image data. The dark current data is the all black calibration image data with zero reflectivity of the sealed light box under the same lighting conditions [7]. If the reflectivity of dark current data is dark, the reflectivity of white board data is white, the reflectivity of image acquisition data is data, and the reflectivity of corrected data is ref, then the radiation correction formula is:
The collected data are transformed by MNF to eliminate the correlation between the bands, and then the first several bands with high radiation are selected for the inverse transformation of MNF through statistical characteristic value curve after MNF transformation. After MNF transformation, the characteristic components of the image characteristic value curve are mainly concentrated in the first 10 bands with high radiation, and the first 10 characteristic bands are selected for the inverse transformation of MNF to transform the spectrum of the image. After the information is converted back to the original data space, the image processed by the minimum radiation separation forward transformation and inverse transformation can not only retain the spectral information of a mural, but also suppress the radiation in the image.
Extraction of the damage data in paint layer
After image denoising, radiation correction and other preprocessing, on the basis of this data, the ROI average spectrum of different pigment categories is directly selected from the image, the ASCII file is saved, and the average spectrum information is established. Then, the end-element spectrum of mural pigment is extracted and the end-element spectrum information is established by using the convex cone algorithm of continuous maximum angle, and two different spectral data are used as training samples. The method of spectral angle mapping is used to extract the damaged data of pigment layer, and then the extraction results are analyzed and the accuracy is evaluated [8]. The extraction process is as shown in Fig. 1.
Flow chart of damage data extraction.
The damaged data exists in a pixel in the form of mixed spectrum. Through the image of MNF inverse transformation, the region of interest at different positions is selected to obtain the spectral curve of multiple positions of each substance. The average spectral curve of each ROI is obtained by the average value, and the average spectrum is established as the basis for determining the damaged mural image. At the same time, the continuous maximum angle convex cone is used to extract the end-element spectrum and abundance image. Let the end element of the spectrum be
According to the calculation results, the end-element spectrum curves of different pigments are obtained and the end-element spectrum is established. Finally, using the method of spectral angle mapping classification, taking the mean spectrum and the end-point spectrum as training samples, the MNF inverse transformation is classified to extract the damage information of mural paint layer.
The features that can reflect the texture attributes of the image are extracted, to get the texture damage data, as the main basis to identify the damage of the painted murals [9]. According to the damage characteristics of ancient painted murals, the multi-scale characteristics of wavelet transform are used to quickly extract the texture features of any scale, so as to describe the texture operator of the local texture spatial structure of the image. The local binary mode of mural image is determined by taking a certain pixel in the image as the center and comparing with its surrounding pixel points. The local image is shown in Fig. 2.
Pixel node set of local binary mode.
Through wavelet transform, the texture image is decomposed into point sets of different scales in the figure, and the high-frequency details of the horizontal, vertical and diagonal directions of the texture are obtained. On the low-frequency and high-frequency information of each scale, the texture statistical characteristics are calculated respectively, which can fully describe the texture information and improve the identification performance of texture features [10]. If the gray value of the center pixel of a domain is
By extracting rotation related features, the rotation independent texture features in the pattern are obtained. The spatial scale and rotation attributes are considered synthetically. The spatial scale of wavelet transform is used to eliminate the influence of spatial scale and rotation, and the gray scale and rotation attributes are considered at the same time. In order to eliminate the influence of rotation, the texture features independent of rotation are:
In Eq. (8), ROR means to move right circularly for
In the formula,
Schematic diagram of two-level discrete wavelet decomposition of mural image.
The low-frequency sub image of each scale contains the main information of the image texture under the current scale. Therefore, the histogram of the original image and the low-frequency sub image of each scale is combined to form a larger histogram, which combines the average histograms of LH and HL subband images at different scales, so that the texture features of the local binary pattern of the image can be obtained, and the texture damage data of the mural can be obtained
Based on the extracted damaged data of mural image, the damaged murals are identified. In order to render the coating effect of mural surface, ancient color murals often brush transparent coating on the mural surface, which plays the role of protecting murals [12, 13]. However, after the influence of environmental changes and human factors, the materials used to make these murals will be damaged. The common damages include caustic soda, crazing, armor rising, hollowing, smoke, microorganism and pigment layer falling off, etc. The damage information of ancient color murals is analyzed, the damage types and marking diagrams of murals are summarized, and a database for identifying the damage of murals is established, as shown in Table 1.
Damage identification database
Damage identification database
The database shown in Table 1 is used as the recognition standard for the damage of ancient painted murals.
The paper divides the damaged areas of different damaged murals, and transforms the problem of region division into the problem of energy function minimization and optimization based on image segmentation. The energy function is divided into two parts. The first part is the likelihood energy, which reflects the similarity information between pixels and foreground and background in the image to be segmented. The second part is the prior energy, which reflects the correlation information between pixels in the image to be segmented, which has nothing to do with the outside world and can be directly defined from the image [14]. Firstly, the repair area is pre segmented, and the mean shift segmentation algorithm is adopted. The main body of kernel function is assumed to be the normalization constant
To find the local stable points in the feature space, it has
To carry out the clustering algorithm in the mixed domain, all the
All areas with pixels less than
By evaluating the damage degree of the mural and calculating the restoration index of the ancient painted mural, it can choose the restoration technology and determine whether the previous restoration measures are still effective or whether they will cause new damage. The relevant evaluation indexes that affect the current conditions of murals are selected, and the number of diseases, disease area and other factors is used to directly reflect the severity of the damage. Since there is more than one damage type on a mural, but each type of area is not large, four indexes, i.e. comprehensive disease area, quantity, density and aesthetic degree, are proposed to give weight, and then the color mural repair index is obtained as a quantitative method for determining repair status and repair degree [16].
The index of damaged area is selected to measure the scope of the mural damage. The statistics of the scope vary from region to region. The repair index is the ratio of the damaged area to the total area of the mural, which is used to measure the general degree of the damage. The statistics take a single mural or a specific research area as the calculation scope. The higher the damage rate of the mural in a unit area is, the greater the degree of repair is needed. If the damaged area of each mural is
The damage density index is selected, the density state is described according to the damage type, the texture of the mural itself and the damage scope of the damage type, and the damage density is introduced, which is used to analyze the spatial characteristics of the damage and describe the degree of the fragmentation of the mural. The greater the index value is, the greater the degree of the mural to be repaired is [17, 18]. If the number of damaged murals is
The damage boundary density index is selected to calculate the length of the damage boundary in unit area, which is the basic index to analyze the damage shape, reflecting the complexity of the damage boundary characteristics. The more complex the damage boundary is, the more impact the integrity of mural repair is. If the total length of the damaged boundary is
The index of mural fragmentation is selected, to evaluate the degree of mural fragmentation, represent the interference degree of environment and human influence, and judge the degree of mural to be repaired by visual characteristics. If the number of broken murals is
The extracted mural damage information is quantified into a conceptual numerical form to express the damage occurrence status in different levels, and the level of repair degree is defined. Multiple regression analysis method is used to interpret the multiple index factors of single damage and evaluate the impact on the ancient painted mural [19].
According to the type of mural damage, the restoration is carried out in the mural area. The restoration degree is mainly based on the restoration index. The restoration methods are as follows. When the pigment layer is powdered, bubbled or armoured, spray paint shall be used to make the mixture fall on the pigment layer of the mural. First, the pigment layer is reinforced, and then the mural with cotton ball row is pressed to ensure compaction. The cotton ball is made of thin and white satin wrapped with absorbent cotton. The diameter of the cotton ball is about 5 cm. The surface is sprayed with adhesive, and then the mural surface with a volume ratio of 4:11. 1.5% polyvinyl alcohol aqueous solution and 1% polyvinyl acetate emulsion mixture is sprayed [20]. Finally, the picture with a soft rubber roller is rolled. When the surface of the mural is sprayed with a mixture of paint and reaches 70% dryness, the white silk is spread on the mural, and slowly weighed and pressed with a soft rubber roller. When pressing with sulfur, even force is used to prevent the scale marks on the mural or stick the pigment layer on the white silk.
When the mural changes color and fades, the shadow line method is used to repair it. Watercolor is used to make the filling transparent and reversible. If there is any mistake, it is washed off with clear water. Firstly, the light background color of part of the coating is filled in. Then, a straight line is drawn from light to deep. The vertical line with light color similar to the background color is drawn for the first time, and the pattern color is deleted for the second time. The color matching should be more important than the first time, and the line drawing for the third time should be more important than the second time. It needs to be repeated many times so that the mural can see a complete picture from a distance, and the lines on the repaired mural will not be mixed with the original one [21].
Parameters of machine vision instrument
Parameters of machine vision instrument
Comparison results of statistical damage information
When the mural is empty, the pressure grouting and the combination of grouting and riveting are used. Using the gauze bar with epoxy resin or polyvinyl acetate emulsion fills the hollow part between the ground and the rock mass from the breach of the wall. Appropriate pressure is evenly applied to make the wall close to the rock mass and stick to the wall after the adhesive is solidified. The wall of the wall is filled with 15% polyvinyl acetate emulsion sand and lime paste, and a polyvinyl acetate emulsion is added to the front edge of the painting to make the bonding more firm. Meanwhile, the moisture in the lime paste is prevented from infiltrating to the surface of the murals, leaving traces. The filling material shall be the material similar to the ground layer material, and it shall be noted that the material shall not be too hard, shall not react with the raw material, shall not have too strong strength, shall not have too large shrinkage, and the filling degree shall be lower than the pigment layer [22]. When the mural surface is polluted, the physical method should be used to the greatest extent, and the chemical method should be used to the least, so as to destroy the combination of foreign matters and mural materials through mechanical action, to achieve the purpose of cleaning up the pollution. So far, the design of the method of repairing the damaged ancient painted murals based on machine vision has been realized [23].
In order to verify the application performance of the method of repairing the damaged ancient painted murals based on machine vision, the proposed method is compared with the methods in reference [1] and reference [2] to verify whether the designed method can solve the problem of incomplete repair of the cracks and textures of the ancient painted murals.
Comparison results of extracting and repairing cracks.
In this mural painting, there are many defective areas, and they are distributed in different texture patterns. There are not only complex texture patterns, but also simple linear structure, which affects the presentation of the complete information of the mural. First of all, three repair methods are used to judge the damage of the mural. In this paper, the image preprocessing and information extraction are carried out for the mural obtained by machine vision. The instrument used by machine vision is the portable ground object spectrometer and hyperspectral imaging spectrometer produced by ASD company. The point image data of the mural and the image data of the mural are obtained respectively. The relevant parameters of the instrument are as shown in Table 2.
Read in the mural image to be repaired, preprocess the read-in mural, set the pixel block and spectral information parameters in the mural image, and demarcate the damaged area of the mural, which is divided into four areas on average. After the preprocessing, file the mural image, so as to display and preview, sort and organize the results. The three repair methods count the damaged data of the mural image, and the comparison results are shown in Table 3.
Through the statistics and comparison of the data in the table, it can be seen that the number of mural image damage information extracted by this method is more than that of reference [1] and reference [2].
Division of fracture repair area
Three methods are used to divide the cracks in the murals. The results are as shown in Fig. 4.
It can be seen from the comparison results of Fig. 4 that compared with the methods in reference [1] and reference [2], the repair method in this paper can extract the cracks of the mural more accurately. The repair cracks cover more comprehensively in the mural. In the overall structure of the painted mural, the loss information block of the damaged area is the smallest. And the extraction time of the proposed method is 7.372 s, the extraction time of reference [1] and reference [2] are 21.472 s and 25.865 s respectively, showing that the proposed method shortens the extraction time of repairing cracks,
Conclusion
In order to improve the problem of incomplete damage crack information in traditional mural damage repair methods, the concept of replacing human eye detection with machine vision is proposed in this paper. Machine vision technology is used to extract the mural damage data and divide the mural repair area. According to the different types of damage, the corresponding repair methods can be selected to realize the repair of damaged murals. The comparison experiment shows that this paper makes the repair information in mural more comprehensive, can better judge the cracks to be repaired in the damaged area of mural, and improves the extraction accuracy of repair data. In addition, the extraction time of the three methods is compared. The extraction efficiency of this method is higher than that of the traditional method. However, the image of mural based on machine vision lacks adaptability, which makes it difficult for the parameters of detection and estimation to reach the exact point, thus affecting the restoration quality of ancient painted mural, making the overall color of the repaired mural lighter, and some parts appear unnatural phenomenon of restoration. The next work will improve the restoration method to improve the restoration accuracy and repair the mural according to the above shortcomings. The reconstructed image is clearer and more natural.
