Virtual restoration method and device for mural, computer device and readable storage medium
By using a hyperspectral imager and image processing technology, combined with principal component analysis, multi-scale cap transformation, and fast travel algorithm, the problems of background information interference and disease diversity in mural disease restoration were solved, achieving efficient and accurate virtual restoration results.
Patent Information
- Application Number
- CN202310860967.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2043-07-13
AI Technical Summary
In existing technologies, the use of digital images for mural damage analysis is easily affected by background information, resulting in poor restoration effects. Furthermore, different methods only target single defects, making it difficult to effectively restore murals with large areas and diverse defects, resulting in low restoration efficiency and accuracy.
The mural images were acquired using a hyperspectral imager and radiometrically corrected. Information enhancement was performed by combining principal component analysis and high-pass filtering algorithms. Non-disease area masks were created using a remote sensing image processing platform. Disease information was extracted and segmented using a multi-scale bottom-hat transform algorithm and Otsu's algorithm. Finally, a fast-moving algorithm was used for virtual restoration.
It improves the precision and efficiency of mural repair, effectively handles large-area and diverse murals with various defects, overcomes the influence of minor noise, and achieves high-precision virtual repair.
Smart Images

Figure CN117058015B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mural disease detection and image processing technology, and in particular to a virtual restoration method, device, computer equipment, and readable storage medium for murals. Background Technology
[0002] With the rapid development of network and computer technology, the use of digital image restoration technology has become a trend in the virtual restoration of murals. Murals not only possess extremely high artistic value but are also important cultural carriers. However, due to the passage of time, various types of damage have begun to appear on the surface of murals, the most common being scratches and cracks. Scratches are mainly caused by external forces damaging the surface structure of the mural, while cracks are mainly caused by changes in temperature and humidity in the air causing the supporting structure of the mural to shrink or expand. These typically appear as narrow, elongated lines in images and are easily confused with the lines in the background.
[0003] In related technologies, digital images are used to analyze the characteristics of damage on murals. However, the applicant recognizes that analysis using digital images is easily affected by background information, leading to poor restoration results. Furthermore, since most extraction and virtual restoration methods only target a single type of damage, the use of digital images has certain limitations when dealing with murals with large areas and diverse damage in actual projects, resulting in low restoration efficiency and low restoration accuracy. Summary of the Invention
[0004] In view of this, this application provides a virtual restoration method, apparatus, computer equipment, and readable storage medium for murals. The main purpose is to address the issue that analysis using digital images is easily affected by background information, leading to poor restoration results. Furthermore, since most extraction and virtual restoration methods only target a single type of damage, the use of digital images has limitations when dealing with murals with large areas and diverse damage in actual engineering projects, resulting in low restoration efficiency and low restoration accuracy.
[0005] According to a first aspect of this application, a virtual restoration method for murals is provided, the method comprising:
[0006] In response to the mural restoration order, the mural image is acquired by a hyperspectral imager, and the mural image is radiometrically corrected to obtain the hyperspectral reflectance image of the target object;
[0007] The hyperspectral reflectance image of the target object is enhanced by using principal component analysis and high-pass filtering enhancement algorithms to obtain an enhanced image. The enhanced image is then processed by image operation formulas to obtain a preprocessed image.
[0008] Based on the remote sensing image processing platform, a non-disease area mask is created on the preprocessed image. The multi-scale bottom-hat transform algorithm is used to extract information from the masked image to obtain disease information. The Otsu algorithm is used to perform threshold segmentation on the disease information to obtain a disease binary image.
[0009] The connected component labeling and denoising operation is performed on the binary image of the disease. A fast traversal algorithm is then used to perform a virtual repair operation on the denoised binary image of the disease to obtain a target repair image. The target repair image is then sent to the user who initiated the mural repair command.
[0010] Optionally, the step of performing radiometric correction on the mural image to obtain a hyperspectral reflectance image of the target object includes:
[0011] Read the hyperspectral data and dark current data of the standard reflector from the mural image, and use the difference between the hyperspectral data and the dark current data of the standard reflector as the standard reflector correction data.
[0012] Obtain the number of rows and columns of the mural image, and perform an expansion operation on the dark current data according to the number of rows and columns to obtain dark current correction data;
[0013] Reflectance data is read from the mural image, and the difference between the reflectance data and the dark current data is used as target object correction data.
[0014] The ratio of the target object correction data to the standard reflector correction data is used as the correction data to obtain the standard reflectance value. The hyperspectral reflectance image of the target object is generated by multiplying the correction data and the standard reflectance value.
[0015] Optionally, the step of performing information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis algorithm and high-pass filtering enhancement algorithm to obtain an enhanced image, and performing image operations on the enhanced image using image operation formulas to obtain a preprocessed image, includes:
[0016] The principal component analysis algorithm is used to perform a forward transform operation on the hyperspectral reflectance image of the target object to obtain a transformed image. The transformed image includes multiple target bands, which are arranged in order in the transformed image.
[0017] The target band ranked first in the transformed image is obtained, and the high-pass filtering enhancement algorithm is used to enhance the target band ranked first to obtain the enhanced image.
[0018] A contrast equalization algorithm is obtained, and the enhanced image is subjected to an adaptive histogram contrast enhancement operation using the contrast equalization algorithm to obtain a contrast image.
[0019] Obtain a preset Gaussian kernel function and a preset mask size, and based on the mask size, perform a Gaussian blur operation on the enhanced image using the preset Gaussian kernel function to obtain a blurred image;
[0020] The image processing formula is used to perform image operations on the enhanced image, the contrast image, and the blurred image to obtain the preprocessed image.
[0021] Optionally, the step of using the high-pass filtering enhancement algorithm to enhance the top-ranked target band to obtain the enhanced image includes:
[0022] High-frequency signal data is determined in the primary target band, and enhancement operation is performed on the high-frequency signal data to obtain a preliminary enhanced image. The preliminary enhanced image includes multiple designated bands, which are arranged in order in the transformed image.
[0023] The first specified band in the preliminary enhanced image is obtained, low-frequency signal data is determined in the first specified band, and the low-frequency signal data is filtered to obtain the enhanced image.
[0024] Optionally, based on the remote sensing image processing platform, a non-disease area mask is created on the preprocessed image, and a multi-scale bottom-hat transform algorithm is used to extract information from the masked image to obtain disease information, including:
[0025] The original image data is extracted from the mural image, the original image data is analyzed, and based on the remote sensing image processing platform, the non-disease area mask is created on the preprocessed image using the analysis results.
[0026] Obtain the structural shape and structural elements, wherein the structural elements include multiple sub-elements;
[0027] Based on the structural shape and the structural elements, the multi-scale bottom-hat transformation algorithm is used to perform a bottom-hat transformation operation on the preprocessed image after masking to obtain the bottom-hat transformation image corresponding to each sub-element;
[0028] Information extraction is performed on the bottom-hat transformation image corresponding to each sub-element to obtain the disease information.
[0029] Optionally, the step of performing connected component labeling and denoising on the binary image of the lesion, and then using a fast traversal algorithm to perform a virtual restoration operation on the denoised binary image of the lesion to obtain the target restoration image, includes:
[0030] Obtain a preset number of sub-elements, and perform image processing on the binary image of the disease based on the preset number of sub-elements to obtain the disease extraction result;
[0031] Obtain a preset crack disease threshold and a preset scratch disease threshold, determine the disease results to be filtered from the disease extraction results, and filter the disease results to be filtered to obtain the target disease results, wherein the crack disease value of the disease results to be filtered is less than the preset crack disease threshold and the scratch disease value is less than the preset scratch disease threshold.
[0032] The target disease results are subjected to connected component labeling and denoising operation to obtain a continuous disease information map, and the continuous disease information map is virtually repaired using the fast traversal algorithm to obtain the target repair image.
[0033] Optionally, the step of performing image processing on the binary map of the disease based on the preset number of sub-elements to obtain the disease extraction result includes:
[0034] Obtain the multiple sub-elements included in the structural element, wherein the multiple sub-elements are arranged in order;
[0035] Determine the arrangement order of the multiple sub-elements, and based on the arrangement order, extract multiple sub-elements from the multiple sub-elements as multiple target sub-elements according to the preset number of sub-elements;
[0036] Extract the target disease image corresponding to each target sub-element from the binary disease image to obtain multiple target disease images. Perform an image overlay operation on the multiple target disease images to obtain a disease baseline image.
[0037] The sub-elements other than the target sub-elements among the multiple sub-elements are taken as designated sub-elements to obtain multiple designated sub-elements. The designated disease image corresponding to each designated sub-element is extracted from the disease binary image to obtain multiple designated disease images.
[0038] The disease extraction results are obtained by connecting the multiple specified disease images with the disease baseline map.
[0039] According to a second aspect of this application, a virtual restoration device for murals is provided, the device comprising:
[0040] The image correction module is used to respond to mural restoration instructions by acquiring mural images through a hyperspectral imager, performing radiometric correction on the mural images, and obtaining a hyperspectral reflectance image of the target object.
[0041] The information enhancement module is used to perform information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis algorithm and high-pass filtering enhancement algorithm to obtain an enhanced image, and to perform image operations on the enhanced image using image operation formulas to obtain a preprocessed image;
[0042] The information extraction module is used to create a non-disease area mask on the preprocessed image based on the remote sensing image processing platform, extract information from the masked image using a multi-scale bottom-hat transform algorithm to obtain disease information, and perform threshold segmentation on the disease information using the Otsu algorithm to obtain a disease binary image.
[0043] The virtual repair module is used to perform connected component labeling and denoising operations on the binary image of the disease, and to perform virtual repair operations on the denoised binary image of the disease using a fast traversal algorithm to obtain a target repair image, and to send the target repair image to the user who initiated the mural repair command.
[0044] Optionally, the image correction module is configured to: read standard reflector hyperspectral data and dark current data from the mural image; use the difference between the standard reflector hyperspectral data and the dark current data as standard reflector correction data; obtain the row and column number of the mural image; perform an expansion operation on the dark current data according to the row and column number to obtain dark current correction data; read reflectance data from the mural image; use the difference between the reflectance data and the dark current data as target object correction data; use the ratio of the target object correction data to the standard reflector correction data as correction data; obtain a standard reflectance value; and generate a hyperspectral reflectance image of the target object using the product of the correction data and the standard reflectance value.
[0045] Optionally, the information enhancement module is used to perform a forward transform operation on the hyperspectral reflectance image of the target object using the principal component analysis algorithm to obtain a transformed image, the transformed image including multiple target bands arranged sequentially in the transformed image; to obtain the first target band in the transformed image, and to perform an enhancement operation on the first target band using the high-pass filtering enhancement algorithm to obtain the enhanced image; to obtain a contrast equalization algorithm, and to perform an adaptive histogram contrast enhancement operation on the enhanced image using the contrast equalization algorithm to obtain a contrast image; to obtain a preset Gaussian kernel function and a preset mask size, and to perform a Gaussian blur operation on the enhanced image using the preset Gaussian kernel function based on the mask size to obtain a blurred image; and to perform image operations on the enhanced image, the contrast image, and the blurred image using the image operation formula to obtain the preprocessed image.
[0046] Optionally, the information enhancement module is further configured to: determine high-frequency signal data in the target band that is ranked first; perform enhancement operations on the high-frequency signal data to obtain a preliminary enhanced image; the preliminary enhanced image includes multiple designated bands arranged sequentially in the transformed image; obtain the designated band that is ranked first in the preliminary enhanced image; determine low-frequency signal data in the designated band that is ranked first; and filter the low-frequency signal data to obtain the enhanced image.
[0047] Optionally, the information extraction module is used to extract original image data from the mural image, analyze the original image data, and, based on the remote sensing image processing platform, create a mask of the non-disease area on the preprocessed image using the analysis results; obtain the structural shape and structural elements, wherein the structural elements include multiple sub-elements; based on the structural shape and the structural elements, perform a bottom-hat transformation operation on the masked preprocessed image using the multi-scale bottom-hat transformation algorithm to obtain a bottom-hat transformation image corresponding to each sub-element; and perform an information extraction operation on the bottom-hat transformation image corresponding to each sub-element to obtain the disease information.
[0048] Optionally, the virtual repair module is used to obtain a preset number of sub-elements, perform image processing on the binary image of the disease based on the preset number of sub-elements to obtain disease extraction results; obtain a preset crack disease threshold and a preset scratch disease threshold, determine the disease results to be filtered from the disease extraction results, and filter the disease results to be filtered to obtain target disease results, wherein the crack disease value of the disease results to be filtered is less than the preset crack disease threshold and the scratch disease value is less than the preset scratch disease threshold; perform connected component labeling and denoising operation on the target disease results to obtain a continuous disease information map, and perform virtual repair operation on the continuous disease information map using the fast traversal algorithm to obtain the target repair image.
[0049] Optionally, the virtual repair module is further configured to: acquire multiple sub-elements included in the structural element, the multiple sub-elements being arranged in sequence; determine the arrangement order of the multiple sub-elements; based on the arrangement order, extract multiple sub-elements from the multiple sub-elements as multiple target sub-elements according to the preset number of sub-elements; extract the target disease image corresponding to each target sub-element from the disease binary image to obtain multiple target disease images; perform an image overlay operation on the multiple target disease images to obtain a disease baseline image; designate the sub-elements other than the multiple target sub-elements from the multiple sub-elements as designated sub-elements to obtain multiple designated sub-elements; extract the designated disease image corresponding to each designated sub-element from the disease binary image to obtain multiple designated disease images; and connect the multiple designated disease images with the disease baseline image to obtain the disease extraction result.
[0050] According to a third aspect of this application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the first aspects above.
[0051] According to a fourth aspect of this application, a readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.
[0052] By means of the above technical solution, this application provides a virtual restoration method, apparatus, computer equipment, and readable storage medium for murals. Responding to a mural restoration instruction, this application acquires mural images using a hyperspectral imager, performs radiometric correction on the mural images to obtain a hyperspectral reflectance image of the target object, uses principal component analysis and high-pass filtering enhancement algorithms to perform information enhancement operations on the hyperspectral reflectance image of the target object to obtain an enhanced image, and performs image operations on the enhanced image using image processing formulas to obtain a preprocessed image. Based on a remote sensing image processing platform, a non-disease area mask is created on the preprocessed image, and a multi-scale bottom-hat transform algorithm is used to extract information from the masked image to obtain disease information. The Otsu algorithm is used to perform threshold segmentation on the disease information to obtain a disease binary map, and a connected component labeling and denoising operation is performed on the disease binary map. A fast marching algorithm is then used to process the disease binary map after connected component labeling and denoising. The virtual restoration operation obtains the target restoration image and sends it to the user who initiated the mural restoration command. Principal component analysis and high-pass filtering are used to initially enhance the crack or scratch information on the mural image. The enhanced image data is then further enhanced using image processing formulas to obtain a pre-processed image. A mask for non-disease areas is then created on the pre-processed image. Next, multi-scale bottom-hat transformation is performed on the masked image to extract disease information. Otsu's algorithm is used for threshold segmentation of the extracted image. Then, a combination of connected component labeling and morphological transformation is used to denoise the resulting binary image of the disease. Finally, a fast-moving image restoration algorithm is used to virtually restore the mural image. This method has a certain degree of universality for large-area murals with diverse diseases in practical engineering projects. It not only improves restoration efficiency but also overcomes the influence of fine noise while enhancing the accuracy of mural restoration.
[0053] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0054] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0055] Figure 1 This illustration shows a flowchart of a virtual restoration method for a mural provided in an embodiment of this application;
[0056] Figure 2AThis illustration shows a flowchart of a virtual restoration method for a mural provided in an embodiment of this application;
[0057] Figure 2B A schematic diagram of an image processing flow provided in an embodiment of this application is shown;
[0058] Figure 2C A flowchart illustrating an information extraction operation provided in an embodiment of this application is shown;
[0059] Figure 2D A flowchart illustrating an information extraction operation provided in an embodiment of this application is shown;
[0060] Figure 2E The illustration shows a schematic diagram of the virtual repair results of various methods provided in the embodiments of this application;
[0061] Figure 3 This illustration shows a schematic diagram of a virtual restoration structure for a mural provided in an embodiment of this application;
[0062] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0063] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.
[0064] This application provides a virtual restoration method for murals, such as... Figure 1 As shown, the method includes:
[0065] 101. In response to the mural restoration order, the mural image is acquired by a hyperspectral imager, and radiometric correction is performed on the mural image to obtain the hyperspectral reflectance image of the target object.
[0066] Virtual restoration of mural defects can be broadly divided into three steps: information enhancement, information extraction, and virtual restoration. Information enhancement primarily involves adjusting the local contrast between defect features and background information to improve the contrast and enable more precise defect extraction. Information extraction refers to the automatic extraction of defects from the image; the extraction of feature information for scratches and cracks is often referred to as ridge and valley line extraction. Virtual restoration involves supplementing and restoring missing parts of unknown areas based on information from known areas in the image. Currently, most scholars use digital images to analyze defect features on murals, but this method suffers from limitations in its application to single data sources and single types of defects, which is insufficient for large-area, diverse mural defects encountered in practical engineering projects.
[0067] To address this issue, this application proposes a virtual restoration method for murals. It utilizes spectral technology to acquire mural image data, and employs a combination of PCA (Principal Component Analysis) transformation and high-pass filtering to initially enhance the crack or scratch information on the mural. The enhanced image data is then further enhanced using a modified CLAHE (Contrast Limited Adaptive Histogram Equalization) method, achieving enhancement of image damage information while suppressing the influence of background information. Next, a mask is created for the non-damaged areas of the preprocessed image to avoid the influence of similar linear information on damage information enhancement and extraction. Multi-scale bottom-hat transformation is then performed on the masked image to extract damage information. Otsu's algorithm is then used to perform threshold segmentation on the extracted image to distinguish damage information from the background. Finally, a combination of connected component labeling and morphological transformation is used to denoise the binary image of the damage to obtain the final binary image of the damage. Finally, a fast-moving image restoration algorithm is used to virtually restore the mural image.
[0068] The implementing entity of this application can be a mural restoration system. The mural restoration system provides services to users by relying on the computing power of a server. The server can be an independent server or a server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. This allows the mural restoration system to enhance the information of linear defects such as scratches and cracks on the mural, making their features more prominent in the image. Then, information extraction based on the enhanced data can obtain a binary map of the defects on the mural. Finally, virtual restoration of the mural is completed based on the binary map of the defects.
[0069] In this embodiment, in response to a mural restoration command, the mural restoration system acquires mural images using a hyperspectral imager. Utilizing hyperspectral images as the data source for virtual mural restoration allows for the analysis of different damage information using different spectral band characteristics, solving the problem of single data source and simplistic analysis methods in traditional image restoration algorithms. Next, the mural restoration system performs radiometric correction on the mural images to obtain hyperspectral reflectance images of the target object, which can correct for the effects of different ambient lighting and dark current noise.
[0070] 102. Principal component analysis and high-pass filtering enhancement algorithms are used to perform information enhancement operations on the hyperspectral reflectance image of the target object to obtain an enhanced image. Image operation formulas are then used to perform image operations on the enhanced image to obtain a preprocessed image.
[0071] In this embodiment, the mural restoration system employs principal component analysis and high-pass filtering enhancement algorithms to enhance the hyperspectral reflectance image of the target object, obtaining an enhanced image that strengthens the linear features such as scratches and cracks in the image. Next, the system uses image processing formulas to perform image operations on the enhanced image, obtaining a preprocessed image. This preprocessed image adjusts the contrast between the image's damage information and background information, enhancing the damage information while suppressing the influence of the background information, thus improving the accuracy of mural restoration.
[0072] 103. Based on the remote sensing image processing platform, a mask of non-disease areas is made on the preprocessed image. The multi-scale bottom-hat transform algorithm is used to extract information from the masked image to obtain disease information. The Otsu algorithm is used to perform threshold segmentation on the disease information to obtain a binary image of the disease.
[0073] In this embodiment, the mural restoration system, based on the remote sensing image processing platform (ENVI, The Environment for Visualizing Images), creates a mask of non-disease areas on the pre-processed image. Next, the system employs a multi-scale cap transform algorithm to extract information from the masked image, obtaining disease information. Because the multi-scale cap transform covers the extraction results of structural elements of different sizes, it can overcome the influence of fine noise on disease information extraction while preserving extraction accuracy. Subsequently, the system uses Otsu's algorithm to perform threshold segmentation on the disease information, obtaining a binary image of the disease. Thus, by using multi-scale cap transform to extract and process the enhanced image, the system can obtain most of the scratches and cracks on the mural, facilitating subsequent analysis of disease features. Finally, noise reduction processing is performed on the disease information on the mural using both non-disease area mask creation and connected component labeling methods, filtering out most of the noise information.
[0074] 104. Perform connected component labeling and denoising on the binary image of the mural damage, and use the fast traversal algorithm to perform virtual repair on the denoised binary image of the mural damage to obtain the target repair image, and send the target repair image to the user who initiated the mural repair command.
[0075] In this embodiment, the mural restoration system performs connected component labeling and denoising on the binary image of the affected area, and then uses a fast traversal algorithm to perform virtual restoration on the denoised binary image to obtain the target restoration image. This further overcomes the influence of minor noise during mural defect extraction. The mural restoration system then sends the target restoration image to the user who initiated the mural restoration command. Therefore, the information enhancement, information extraction, and virtual restoration method proposed in this application, which is universally applicable to scratches and cracks, has high accuracy and fast restoration speed, and is applicable to large-area murals with diverse defects in practical engineering projects.
[0076] The method provided in this application embodiment, in response to a mural restoration command, acquires mural images using a hyperspectral imager, performs radiometric correction on the mural images to obtain a hyperspectral reflectance image of the target object, performs information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis and high-pass filtering enhancement algorithms to obtain an enhanced image, and performs image operations on the enhanced image using image operation formulas to obtain a preprocessed image, creates a non-disease area mask on the preprocessed image based on a remote sensing image processing platform, extracts information from the masked image using a multi-scale bottom-hat transform algorithm to obtain disease information, performs threshold segmentation on the disease information using the Otsu algorithm to obtain a disease binary map, performs connected component labeling and denoising operations on the disease binary map, and performs virtual restoration operations on the connected component labeling and denoising disease binary map using a fast traversal algorithm to obtain a target restoration image. The system sends the target restoration image to the user who initiated the mural restoration command. Principal component analysis and high-pass filtering are used to initially enhance the crack or scratch information on the mural image. The enhanced image data is then further enhanced using image processing formulas to obtain a pre-processed image. A mask for non-disease areas is then created on the pre-processed image. Next, multi-scale bottom-hat transformation is performed on the masked image to extract disease information. The Otsu algorithm is used for threshold segmentation of the extracted image. Then, noise is removed from the resulting binary image of the disease through a combination of connected component labeling and morphological transformation. Finally, a fast-moving image restoration algorithm is used to virtually restore the mural image. This method has a certain degree of universality for large-area murals with diverse diseases in practical engineering projects. It not only improves restoration efficiency but also overcomes the influence of fine noise while enhancing the accuracy of mural restoration.
[0077] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and in order to fully illustrate the specific implementation process of this embodiment, this application provides another virtual restoration method for murals, such as... Figure 2A As shown, the method includes:
[0078] 201. In response to the mural restoration order, images of the murals were acquired using a hyperspectral imager.
[0079] Ancient murals often suffer from various damages due to natural weathering, such as cracks, flaking, peeling, blisters, and mold. Therefore, this application proposes a virtual restoration method for murals. This method involves precisely and automatically locating and extracting these damaged areas, segmenting them into different objects, and finally integrating the image information of the objects themselves to select an appropriate restoration algorithm for recovery. In this embodiment, in response to a mural restoration command, the mural restoration system acquires mural images using a hyperspectral imager. The spectral data is acquired by the Themis Vision System VNIR / 400H (hyperspectral image analysis system), with an image spatial resolution of 1392×1000 pixels, a sampling interval of 0.6nm, and a spectral resolution of 2.8nm, capturing images in 1040 bands from 377.45nm (ultraviolet) to 1033.10nm (near-infrared). The mural restoration system uses hyperspectral data to enhance the information of scratches and cracks on the mural, avoiding the problem of low restoration accuracy caused by a single data source.
[0080] 202. Perform radiometric correction on the mural image to obtain the hyperspectral reflectance image of the target object.
[0081] In this embodiment, the mural restoration system reads standard reflector hyperspectral data and dark current data from the mural image, and uses the difference between the standard reflector hyperspectral data and the dark current data as the standard reflector correction data. Next, the system obtains the row and column numbers of the mural image and expands the dark current data according to these numbers to obtain dark current correction data. Then, the system reads reflectance data from the mural image and uses the difference between the reflectance data and the dark current data as the target object correction data. Finally, the system uses the ratio of the target object correction data to the standard reflector correction data as correction data, obtains a standard reflectance value, and generates a target object hyperspectral reflectance image by multiplying the correction data by the standard reflectance value. This is achieved by dividing the target object correction data by the obtained standard reflector correction data and then multiplying by the standard reflectance value of the standard reflector, thus completing the reflectance correction. It should be noted that radiometric correction can be performed on the original image in ENVI (The Environment for Visualizing Images, a remote sensing image processing platform) to correct for the effects of different ambient lighting and dark current noise. ENVI is a complete remote sensing image processing platform. The software processing technologies it integrates cover image data input and output, image calibration, image enhancement, correction, orthorectification, mosaicking, data fusion and various transformations, information extraction, image classification, knowledge-based decision tree classification, integration with GIS (Geographic Information System), DEM (Digital Elevation Model) and terrain information extraction, radar data processing, 3D stereoscopic display analysis, etc. It can accurately complete the reflectivity correction of mural images, eliminate the influence of different ambient lighting and dark current noise, thereby improving the accuracy of mural restoration.
[0082] 203. The hyperspectral reflectance image of the target object is enhanced by using principal component analysis and high-pass filtering enhancement algorithms to obtain the enhanced image.
[0083] To improve the accuracy and versatility of mural restoration, this application employs an information enhancement method that includes PCA transformation, high-pass filtering enhancement, and improved local contrast enhancement. Specifically, it combines PCA transformation with high-pass filtering to analyze and enhance the information of scratches and cracks on the mural. In this embodiment, the mural restoration system uses principal component analysis (PCA) to perform a forward transformation on the hyperspectral reflectance image of the target object, obtaining a transformed image. This transformed image includes multiple target bands arranged sequentially. This concentrates the information from the hyperspectral image primarily into the first ten target bands, and scratches and cracks in the first target band exhibit similar characteristics. Next, the mural restoration system obtains the first target band in the transformed image and uses a high-pass filtering enhancement algorithm to enhance it, obtaining an enhanced image.
[0084] Specifically, the mural restoration system identifies high-frequency signal data in the primary target band, enhances this data to obtain a preliminary enhanced image, which includes multiple designated bands arranged sequentially in the transformed image. Then, the system acquires the primary designated band from the preliminary enhanced image, identifies low-frequency signal data within this band, and filters it to obtain another enhanced image. In this way, the system can perform high-pass filtering enhancement on the primary target band, which contains the most information, enhancing the high-frequency signal portion of the image while filtering out the low-frequency signal portion, preserving linear defects in the primary target band, and thus enhancing the characteristics of linear information such as scratches and cracks in the image.
[0085] 204. Perform image operations on the enhanced image using image operation formulas to obtain a preprocessed image.
[0086] In this embodiment, the mural restoration system acquires a contrast equalization algorithm and applies it to the enhanced image using an adaptive histogram contrast enhancement operation to obtain a contrast image. The mural restoration system performs adaptive histogram contrast enhancement on the high-pass filtered enhanced image, adjusting the local contrast of the image and thus adjusting the contrast between the defect information and the background information. Next, the mural restoration system acquires a preset Gaussian kernel function and a preset mask size, and based on the mask size, performs a Gaussian blur operation on the enhanced image using the preset Gaussian kernel function to obtain a blurred image. The selected Gaussian kernel function σ is 15, and the mask size is 45*45. Subsequently, the mural restoration system uses image operation formulas to perform image operations on the enhanced image, contrast image, and blurred image to obtain a preprocessed image. The image operation formula is as follows: Formula 1:
[0087] Formula 1: I=(1-w)I_orig+wI_CLAHE
[0088] Where I_orig is the enhanced image, I_CLAHE is the contrast image, w is the blurred image, and I is the preprocessed image. Thus, the mural restoration system performs image operations on the high-pass filtered enhanced image, the high-contrast enhanced image with adaptive histogram contrast enhancement, and the Gaussian blurred image to obtain the preprocessed final image. The flowchart of the image operation is described below:
[0089] like Figure 2B As shown, image operations are performed on the high-pass filtered image, the high-contrast image enhanced by adaptive histogram contrast enhancement, and the Gaussian blurred image. The specific operation formula is I = (1-w)I_orig + wI_CLAHE, where the high-pass filtered image is I_orig, the adaptive histogram contrast enhancement image is I_CLAHE, the Gaussian blurred image is w, and the preprocessed final image is I.
[0090] In this way, the mural restoration system utilizes PCA transformation, high-pass filtering enhancement, and improved local contrast enhancement methods to enhance the information of linear defects such as scratches and cracks on the mural, making their features more prominent in the image, thereby improving the efficiency of mural restoration.
[0091] 205. Based on the remote sensing image processing platform, a mask of non-disease areas is created on the preprocessed image. The multi-scale bottom-hat transform algorithm is used to extract information from the masked image to obtain disease information.
[0092] After enhancing the disease information, information extraction is required from the enhanced image. This application extracts image features through non-disease area masking, multi-scale bottom-hat transformation, Otsu's algorithm threshold segmentation, connected component labeling, and morphological transformation. In this embodiment, the mural restoration system extracts original image data from the mural image, analyzes the original image data, and uses the analysis results to create a non-disease area mask on the preprocessed image based on a remote sensing image processing platform. By creating a non-disease area mask that does not contain disease information, the influence of background line information on information extraction can be avoided. Next, the mural restoration system obtains the structural shape and structural elements. The structural elements include multiple sub-elements, where the structural shape can be selected as a square, and the structural elements can be 3, 4, 5, 6, 7, 8, 9, and 10. Subsequently, based on the structural shape and structural elements, the mural restoration system uses a multi-scale bottom-hat transformation algorithm to perform a bottom-hat transformation operation on the masked preprocessed image, obtaining the bottom-hat transformed image corresponding to each sub-element. Finally, the mural restoration system performs information extraction operations on the bottom-hat transformed image corresponding to each sub-element to obtain the disease information. Thus, based on the information enhancement results, using multi-scale cap transformation to extract disease information from the murals can obtain most of the scratches and cracks on the murals, making the disease information extraction more accurate.
[0093] 206. The Otsu algorithm is used to perform threshold segmentation on the disease information to obtain a binary image of the disease.
[0094] In this embodiment, the mural restoration system uses the Otsu algorithm to perform threshold segmentation on the disease information, which can enhance the contrast between the disease information and the background and obtain a binary image of the disease.
[0095] 207. Perform connected component labeling and denoising on the binary image of the mural damage, and use the fast traversal algorithm to perform virtual repair on the denoised binary image of the mural damage to obtain the target repair image, and send the target repair image to the user who initiated the mural repair command.
[0096] In this embodiment, the mural restoration system acquires a preset number of sub-elements. Based on this preset number of sub-elements, it performs image processing on the binary image of the disease to obtain disease extraction results. Specifically, the extraction results of structural elements 3, 4, and 5 are overlaid to obtain a baseline image of the disease. Then, the extraction results of structural elements 6, 7, 8, 9, and 10 are connected to the baseline image of the disease to obtain the final disease extraction result. Specifically, the mural restoration system acquires multiple sub-elements included in the structural elements, and these sub-elements are arranged in sequence. Next, the mural restoration system determines the arrangement order of the multiple sub-elements. Based on this arrangement order, it extracts multiple sub-elements from the multiple sub-elements according to a preset number of sub-elements as multiple target sub-elements. Subsequently, the mural restoration system extracts the target disease image corresponding to each target sub-element from the binary image of the disease, obtaining multiple target disease images. These multiple target disease images are then overlaid to obtain the baseline image of the disease. Then, the mural restoration system uses all sub-elements other than the target sub-elements as designated sub-elements, resulting in multiple designated sub-elements. It then extracts the designated disease image corresponding to each designated sub-element from the disease binary map, resulting in multiple designated disease images. Finally, the mural restoration system connects these multiple designated disease images with the disease baseline map to obtain the disease extraction result.
[0097] Next, the mural restoration system acquires preset thresholds for crack and scratch defects, with the crack threshold set to 5 and the scratch threshold set to 50. Then, the system identifies defects to be filtered from the defect extraction results and filters them to obtain target defects. The crack values and scratch values of the defects to be filtered are less than the preset crack threshold and scratch threshold, respectively, thus identifying defects smaller than these areas. Fine noise in the defect image is then filtered out. Next, the system performs connected component labeling and denoising on the target defects to obtain a continuous defect information map. To address the discontinuity of defect information in the binary image, this application uses dilation operations from morphological filtering to dilate the binary defect image, ensuring continuity of defect information on the mural. Finally, the system uses the Fast Marching Method to perform virtual restoration on the continuous defect information map, obtaining the target restoration image, which is then sent to the user who initiated the mural restoration command. The fast traversal algorithm selected in this application is suitable for large-area linear defects, making the mural restoration process universal and highly efficient.
[0098] Therefore, the flowchart of an information extraction operation proposed in this application is as follows:
[0099] like Figure 2CAs shown, a multi-scale cap transform is used to extract disease information from the preprocessed image. Specifically, cap transform is performed on images with a square shape and structuring elements of 3, 4, 5, 6, 7, 8, 9, and 10. The transformed results are then subjected to threshold segmentation using the Otsu algorithm to enhance the contrast between the disease information and the background, forming a binary disease map. The extracted results with structuring elements of 3, 4, and 5 are overlaid to obtain a baseline disease map. The extracted results with structuring elements of 6, 7, 8, 9, and 10 are then concatenated with the baseline disease map to obtain the final disease extraction result. Finally, connected component labeling denoising is performed on the final disease extraction result to remove small noise, resulting in a continuous disease information map, i.e., a scratch map.
[0100] In an optional implementation, after obtaining the target restoration image, a simulated mural sample can be created. Information enhancement, extraction, and virtual restoration are then performed by manually adding fine linear graffiti to the simulated sample. The features of this graffiti in the image are similar to those of cracks, and after information enhancement using hyperspectral data, these features are also similar to those of scratches. The results of the virtual restoration are then compared with traditional TV (Total Variation) models, CDD (Curvature Driven Diffusions) models, and the Criminisi (image restoration) algorithm. By comparing the applicability of different virtual restoration methods to the repair of scratches and cracks on murals, the diffusion-based image restoration method of this application can significantly improve the efficiency of virtual restoration. The virtual restoration results of various methods are described below:
[0101] like Figure 2DAs shown, the selected accuracy evaluation metrics are RMSE (Root Mean Squared Error), PSNR (Peak Signal-to-Noise Ratio), SSIM (Structural Similarity), and the time required to complete the same image restoration. Specifically, for the evaluation metric RMSE, the value is 34.7331 for the TV model, 35.3696 for the CDD model, 36.5139 for the Criminisi algorithm, and 32.6641 for the method proposed in this application; for the evaluation metric PSNR, the value is 39.8714 for the TV model, 39.5082 for the CDD model, 38.8714 for the Criminisi algorithm, and 41.0997 for the method proposed in this application; for the evaluation metric SSIM, the value is 0.9614 for the TV model, 0.9604 for the CDD model, 0.9631 for the Criminisi algorithm, and 0.9646 for the method proposed in this application; and for the evaluation metric repair time, the value is 13.1934 seconds for the TV model, 31.5347 seconds for the CDD model, 120.1212 seconds for the Criminisi algorithm, and 0.4240 seconds for the method proposed in this application. As can be seen, compared with traditional TV models, CDD models and Criminisi algorithms, the restoration method proposed in this application has slightly improved accuracy and greatly increased restoration speed when creating simulated mural samples and manually adding linear markings of defects. Virtual restoration of a 500*500 simulated mural takes less than 1 second.
[0102] In summary, the flowchart of a virtual restoration method for murals proposed in this application is as follows:
[0103] like Figure 2E As shown, the original hyperspectral image of the mural was acquired, and data preprocessing and reflectance correction were performed. Next, the corrected hyperspectral image underwent damage enhancement, specifically PCA transformation and high-pass filtering followed by local contrast enhancement to obtain the enhanced image. Subsequently, damage information was extracted from the enhanced image using non-damaged area masking, multi-scale bottom-hat transformation, Otsu's algorithm thresholding, connected component labeling, and morphological transformations to extract image features, resulting in a damage mask map. Finally, a fast-moving method was used to virtually restore the original image and the damage mask map, yielding the restored image.
[0104] The method provided in this application embodiment, in response to a mural restoration command, acquires mural images using a hyperspectral imager, performs radiometric correction on the mural images to obtain a hyperspectral reflectance image of the target object, performs information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis and high-pass filtering enhancement algorithms to obtain an enhanced image, and performs image operations on the enhanced image using image operation formulas to obtain a preprocessed image, creates a non-disease area mask on the preprocessed image based on a remote sensing image processing platform, extracts information from the masked image using a multi-scale bottom-hat transform algorithm to obtain disease information, performs threshold segmentation on the disease information using the Otsu algorithm to obtain a disease binary map, performs connected component labeling and denoising operations on the disease binary map, and performs virtual restoration operations on the connected component labeling and denoising disease binary map using a fast traversal algorithm to obtain a target restoration image. The system sends the target restoration image to the user who initiated the mural restoration command. Principal component analysis and high-pass filtering are used to initially enhance the crack or scratch information on the mural image. The enhanced image data is then further enhanced using image processing formulas to obtain a pre-processed image. A mask for non-disease areas is then created on the pre-processed image. Next, multi-scale bottom-hat transformation is performed on the masked image to extract disease information. The Otsu algorithm is used for threshold segmentation of the extracted image. Then, noise is removed from the resulting binary image of the disease through a combination of connected component labeling and morphological transformation. Finally, a fast-moving image restoration algorithm is used to virtually restore the mural image. This method has a certain degree of universality for large-area murals with diverse diseases in practical engineering projects. It not only improves restoration efficiency but also overcomes the influence of fine noise while enhancing the accuracy of mural restoration.
[0105] Furthermore, as Figure 1 To specifically implement the method, this application provides a virtual restoration device for murals, such as... Figure 3 As shown, the device includes: an image correction module 301, an information enhancement module 302, an information extraction module 303, and a virtual repair module 304.
[0106] Image correction module 301 is used to respond to mural restoration instructions by acquiring mural images through a hyperspectral imager, performing radiometric correction on the mural images, and obtaining a hyperspectral reflectance image of the target object.
[0107] The information enhancement module 302 is used to perform information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis algorithm and high-pass filter enhancement algorithm to obtain an enhanced image, and to perform image operations on the enhanced image using image operation formulas to obtain a preprocessed image;
[0108] The information extraction module 303 is used to create a non-disease area mask on the preprocessed image based on the remote sensing image processing platform, extract information from the masked image using a multi-scale bottom-hat transform algorithm to obtain disease information, and perform threshold segmentation on the disease information using the Otsu algorithm to obtain a disease binary image.
[0109] The virtual repair module 304 is used to perform connected component labeling and denoising operations on the binary image of the disease, and to perform virtual repair operations on the binary image of the disease after connected component labeling and denoising using a fast traversal algorithm to obtain a target repair image, and to send the target repair image to the user who initiated the mural repair command.
[0110] In a specific application scenario, the image correction module 301 is used to read standard reflector hyperspectral data and dark current data from the mural image, and use the difference between the standard reflector hyperspectral data and the dark current data as standard reflector correction data; obtain the row and column number of the mural image, and perform an expansion operation on the dark current data according to the row and column number to obtain dark current correction data; read reflectance data from the mural image, and use the difference between the reflectance data and the dark current data as target object correction data; use the ratio of the target object correction data to the standard reflector correction data as correction data, obtain a standard reflectance value, and generate a target object hyperspectral reflectance image by multiplying the correction data and the standard reflectance value.
[0111] In a specific application scenario, the information enhancement module 302 is used to perform a forward transformation operation on the hyperspectral reflectance image of the target object using the principal component analysis algorithm to obtain a transformed image. The transformed image includes multiple target bands arranged sequentially in the transformed image. The module then obtains the first target band in the transformed image and performs enhancement operations on it using the high-pass filtering enhancement algorithm to obtain the enhanced image. Next, it obtains a contrast equalization algorithm and performs adaptive histogram contrast enhancement operations on the enhanced image using the contrast equalization algorithm to obtain a contrast image. Finally, it obtains a preset Gaussian kernel function and a preset mask size, and performs Gaussian blur operations on the enhanced image based on the mask size using the preset Gaussian kernel function to obtain a blurred image. Finally, it performs image operations on the enhanced image, the contrast image, and the blurred image using the image operation formula to obtain the preprocessed image.
[0112] In a specific application scenario, the information enhancement module 302 is further used to determine high-frequency signal data in the target band that is ranked first, perform enhancement operations on the high-frequency signal data to obtain a preliminary enhanced image, the preliminary enhanced image including multiple specified bands, the multiple specified bands being arranged in order in the transformed image; to obtain the specified band that is ranked first in the preliminary enhanced image, to determine low-frequency signal data in the specified band that is ranked first, and to filter the low-frequency signal data to obtain the enhanced image.
[0113] In a specific application scenario, the information extraction module 303 is used to extract original image data from the mural image, analyze the original image data, and, based on the remote sensing image processing platform, create a mask of the non-disease area on the preprocessed image using the analysis results; obtain the structural shape and structural elements, wherein the structural elements include multiple sub-elements; based on the structural shape and the structural elements, perform a bottom-hat transformation operation on the masked preprocessed image using the multi-scale bottom-hat transformation algorithm to obtain a bottom-hat transformation image corresponding to each sub-element; and perform an information extraction operation on the bottom-hat transformation image corresponding to each sub-element to obtain the disease information.
[0114] In a specific application scenario, the virtual repair module 304 is used to obtain a preset number of sub-elements, perform image processing on the binary image of the disease based on the preset number of sub-elements to obtain disease extraction results; obtain preset crack disease thresholds and preset scratch disease thresholds, determine the disease results to be filtered from the disease extraction results, and filter the disease results to be filtered to obtain target disease results, wherein the crack disease value of the disease results to be filtered is less than the preset crack disease threshold and the scratch disease value is less than the preset scratch disease threshold; perform connected component labeling and denoising operation on the target disease results to obtain a continuous disease information map, and use the fast traversal algorithm to perform virtual repair operation on the continuous disease information map to obtain the target repair image.
[0115] In a specific application scenario, the virtual repair module 304 is further used to acquire multiple sub-elements included in the structural element, wherein the multiple sub-elements are arranged in sequence; determine the arrangement order of the multiple sub-elements; based on the arrangement order, extract multiple sub-elements from the multiple sub-elements as multiple target sub-elements according to the preset number of sub-elements; extract the target disease image corresponding to each target sub-element from the disease binary image to obtain multiple target disease images; perform image overlay operation on the multiple target disease images to obtain a disease baseline image; select the sub-elements other than the multiple target sub-elements from the multiple sub-elements as designated sub-elements to obtain multiple designated sub-elements; extract the designated disease image corresponding to each designated sub-element from the disease binary image to obtain multiple designated disease images; and connect the multiple designated disease images with the disease baseline image to obtain the disease extraction result.
[0116] The apparatus provided in this application embodiment, in response to a mural restoration command, acquires mural images using a hyperspectral imager, performs radiometric correction on the mural images to obtain a hyperspectral reflectance image of the target object, performs information enhancement operations on the hyperspectral reflectance image of the target object using principal component analysis and high-pass filtering enhancement algorithms to obtain an enhanced image, and performs image operations on the enhanced image using image operation formulas to obtain a preprocessed image. Based on a remote sensing image processing platform, a non-disease area mask is created on the preprocessed image, and information is extracted from the masked image using a multi-scale bottom-hat transform algorithm to obtain disease information. The disease information is then thresholded using the Otsu algorithm to obtain a disease binary map, a connected component labeling and denoising operation is performed on the disease binary map, and a fast traversal algorithm is used to perform virtual restoration operations on the connected component labeling and denoising disease binary map to obtain a target restoration image. The system sends the target restoration image to the user who initiated the mural restoration command. Principal component analysis and high-pass filtering are used to initially enhance the crack or scratch information on the mural image. The enhanced image data is then further enhanced using image processing formulas to obtain a pre-processed image. A mask for non-disease areas is then created on the pre-processed image. Next, multi-scale bottom-hat transformation is performed on the masked image to extract disease information. The Otsu algorithm is used for threshold segmentation of the extracted image. Then, noise is removed from the resulting binary image of the disease through a combination of connected component labeling and morphological transformation. Finally, a fast-moving image restoration algorithm is used to virtually restore the mural image. This method has a certain degree of universality for large-area murals with diverse diseases in practical engineering projects. It not only improves restoration efficiency but also overcomes the influence of fine noise while enhancing the accuracy of mural restoration.
[0117] It should be noted that other corresponding descriptions of the functional units involved in the virtual mural restoration device provided in this application embodiment can be found in the following references. Figure 1 and Figures 2A to 2E The corresponding descriptions in [the document] will not be repeated here.
[0118] In an exemplary embodiment, see Figure 4 The invention also provides a computer device including a bus, a processor, a memory, and a communication interface. It may also include an input / output interface and a display device, wherein the various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the virtual restoration method for the mural described in the above embodiments.
[0119] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the virtual restoration method for the mural.
[0120] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented in hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0121] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.
[0122] Those skilled in the art will understand that the modules in the apparatus of the implementation scenario can be distributed within the apparatus of the implementation scenario as described, or they can be located in one or more apparatuses different from this implementation scenario, with corresponding changes. The modules of the above-described implementation scenario can be combined into one module, or they can be further divided into multiple sub-modules.
[0123] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of the implementation scenario.
[0124] The above disclosures are only a few specific implementation scenarios of this application. However, this application is not limited to these. Any variations that can be conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for virtual restoration of a mural, characterized in that, The method comprises the steps of: in response to a mural repair instruction, acquiring a mural image by a hyperspectral imager, performing radiation correction on the mural image to obtain a target hyperspectral reflectance image; performing information enhancement operation on the target hyperspectral reflectance image by using a principal component analysis algorithm and a high-pass filter enhancement algorithm to obtain an enhanced image, and performing image operation on the enhanced image by using an image operation formula to obtain a preprocessed image, including: performing a forward transformation operation on the target hyperspectral reflectance image by using the principal component analysis algorithm to obtain a transformed image, obtaining a target waveband ranked first in the transformed image, performing enhancement operation on the target waveband ranked first by using the high-pass filter enhancement algorithm to obtain the enhanced image, obtaining a contrast equalization algorithm, performing adaptive histogram contrast enhancement operation on the enhanced image by using the contrast equalization algorithm to obtain a contrast image, obtaining a preset Gaussian kernel function and a preset mask size, and performing Gaussian blur operation on the enhanced image by using the preset Gaussian kernel function based on the mask size to obtain a blurred image, and performing operation between images on the enhanced image, the contrast image and the blurred image by using the image operation formula to obtain the preprocessed image, the transformed image comprises a plurality of target wavebands, the plurality of target wavebands are arranged in order in the transformed image, and the image operation formula is I=(1-w)I_orig+wI_CLAHE, wherein I_orig is the enhanced image, I_CLAHE is the contrast image, w is the blurred image, and I is the preprocessed image; based on a remote sensing image processing platform, making a non-disease area mask on the preprocessed image, performing information extraction on the masked image by using a multi-scale bottom-hat transform algorithm to obtain disease information, and performing threshold segmentation operation on the disease information by using an Otsu algorithm to obtain a disease binary image; performing connected domain labeling and denoising operation on the disease binary image, performing virtual repair operation on the disease binary image after the connected domain labeling and denoising operation by using a fast marching algorithm to obtain a target repair image, and sending the target repair image to a user who initiates the mural repair instruction.
2. The method of claim 1, wherein, The method comprises the steps of: reading standard reflector hyperspectral data and dark current data in the mural image, taking the difference between the standard reflector hyperspectral data and the dark current data as standard reflector correction data; obtaining the number of rows and columns of the mural image, performing expansion operation on the dark current data according to the number of rows and columns to obtain dark current correction data; reading reflectance data in the mural image, taking the difference between the reflectance data and the dark current data as target correction data; taking the ratio of the target correction data and the standard reflector correction data as correction data, obtaining a reflectance standard value, and generating the target hyperspectral reflectance image by using the product of the correction data and the reflectance standard value.
3. The method of claim 1, wherein, The high-pass filter enhancement algorithm is used to enhance the first target waveband to obtain the enhanced image, including: High-frequency signal data is determined in the first target waveband, and the high-frequency signal data is enhanced to obtain a preliminary enhanced image, the preliminary enhanced image including a plurality of specified wavebands arranged in order in the transformed image; A first specified waveband is obtained in the preliminary enhanced image, low-frequency signal data is determined in the first specified waveband, and the low-frequency signal data is filtered to obtain the enhanced image.
4. The method of claim 1, wherein, The remote sensing image processing platform is used to make a non-disease area mask on the preprocessed image, and a multi-scale bottom-hat transformation algorithm is used to extract information from the masked image to obtain disease information, including: Original image data is extracted from the mural image, the original image data is analyzed, and the remote sensing image processing platform is used to make the non-disease area mask on the preprocessed image based on the analysis result; A structure shape and a structure element are obtained, the structure element including a plurality of sub-elements; The multi-scale bottom-hat transformation algorithm is used to perform bottom-hat transformation on the preprocessed image after masking based on the structure shape and the structure element to obtain a bottom-hat transformed image corresponding to each sub-element; Information extraction is performed on the bottom-hat transformed image corresponding to each sub-element to obtain the disease information.
5. The method of claim 1, wherein, The fast marching algorithm is used to perform virtual repair on the disease binary image after connected component labeling and denoising to obtain a target repair image, including: A preset number of sub-elements is obtained, and the disease binary image is processed based on the preset number of sub-elements to obtain a disease extraction result; A preset crack disease threshold and a preset scratch disease threshold are obtained, a to-be-filtered disease result is determined in the disease extraction result, and the to-be-filtered disease result is filtered to obtain a target disease result, the to-be-filtered disease result having a crack disease value less than the preset crack disease threshold and a scratch disease value less than the preset scratch disease threshold; Connected component labeling and denoising are performed on the target disease result to obtain a continuous disease information graph, and the fast marching algorithm is used to perform virtual repair on the continuous disease information graph to obtain the target repair image.
6. The method of claim 5, wherein, The disease binary image is processed based on the preset number of sub-elements to obtain a disease extraction result, including: A plurality of sub-elements included in a structure element are obtained, the plurality of sub-elements being arranged in order; The arrangement order of the plurality of sub-elements is determined, a plurality of target sub-elements are extracted from the plurality of sub-elements according to the preset number of sub-elements based on the arrangement order; A target disease image corresponding to each target sub-element is extracted from the disease binary image to obtain a plurality of target disease images, and image superposition is performed on the plurality of target disease images to obtain a disease reference image; The sub-elements in the plurality of sub-elements except the plurality of target sub-elements are taken as specified sub-elements, a plurality of specified sub-elements are obtained, a specified disease image corresponding to each of the specified sub-elements is extracted in the disease binary image, and a plurality of specified disease images are obtained; The plurality of specified disease images are connected with the disease reference image, and the disease extraction result is obtained.
7. A virtual restoration device of a mural, characterized by, It comprises: An image correction module is configured to, in response to a mural restoration instruction, acquire a mural image by using a hyperspectral imager, perform radiation correction on the mural image, and obtain a target object hyperspectral reflectance image; An information enhancement module is configured to perform information enhancement operation on the target object hyperspectral reflectance image by using a principal component analysis algorithm and a high-pass filter enhancement algorithm, obtain an enhanced image, and perform image operation on the enhanced image by using an image operation formula to obtain a preprocessed image. The information enhancement module comprises: performing a forward transformation operation on the target object hyperspectral reflectance image by using the principal component analysis algorithm to obtain a transformed image, obtaining a target waveband ranked first in the transformed image, performing enhancement operation on the target waveband ranked first by using the high-pass filter enhancement algorithm to obtain the enhanced image, obtaining a contrast equalization algorithm, performing adaptive histogram contrast enhancement operation on the enhanced image by using the contrast equalization algorithm to obtain a contrast image, obtaining a preset Gaussian kernel function and a preset mask size, and performing Gaussian blur operation on the enhanced image by using the preset Gaussian kernel function based on the mask size to obtain a blurred image. The information enhancement module performs image operation between the enhanced image, the contrast image and the blurred image by using the image operation formula to obtain the preprocessed image. The transformed image comprises a plurality of target wavebands, the plurality of target wavebands are arranged in order in the transformed image, and the image operation formula is I=(1-w)I_orig+wI_CLAHE, where I_orig is the enhanced image, I_CLAHE is the contrast image, w is the blurred image, and I is the preprocessed image. An information extraction module is configured to, based on a remote sensing image processing platform, make a non-disease area mask on the preprocessed image, perform information extraction on the masked image by using a multi-scale bottom-hat transformation algorithm to obtain disease information, and perform threshold segmentation operation on the disease information by using the Otsu algorithm to obtain a disease binary image. A virtual restoration module is configured to perform connected domain label denoising operation on the disease binary image, perform virtual restoration operation on the disease binary image after the connected domain label denoising by using a fast marching algorithm to obtain a target restoration image, and send the target restoration image to a user who initiates the mural restoration instruction.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 6.
9. A readable storage medium, having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Aircraft target recognition method and device, computer equipment and storage medium
CN112560722A
Automatic marking method for fresco crack and falling-off diseases
CN115482235A