Image restoration method and device based on AI and CG algorithms
By combining AI-based image restoration with wavelet transform, TV operator, and L1 norm conjugate gradient algorithm, this method solves the problems of traditional methods relying on prior image characteristics and AI platform generalization, achieving higher-precision image restoration applicable to various image types.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, traditional conjugate gradient algorithms rely on prior image characteristics, resulting in poor restoration accuracy and stability. The image restoration accuracy of AI platforms is limited by unified generalization parameter indicators, and traditional sparsity modeling methods are only applicable to images with sparsity.
By combining AI-restored images as prior information with traditional modeling methods using wavelet transform, TV operator, and L1 norm prior information, an effective conjugate gradient algorithm is derived. Through wavelet coefficient sparsity and image smoothness constraints, the accuracy of image restoration is improved.
It improves the accuracy and stability of image restoration, resulting in restoration effects that are superior to using AI or traditional methods alone. It is applicable to more types of images, including sparse and smooth natural images.
Smart Images

Figure CN121860892A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image restoration technology, and in particular to an image restoration method and apparatus based on AI and CG algorithms. Background Technology
[0002] Image inpainting, as an important image processing technique, can reconstruct clear, uncontaminated images from incomplete or degraded data through analysis and processing, thus providing high-quality data support for subsequent applications. Image inpainting technology involves the interdisciplinary integration of knowledge from mathematics, computer science, signal processing, and other disciplines. Its research process has promoted the development and innovation of theories such as inverse problem solving, optimization algorithms, and deep learning models.
[0003] Image inpainting is a typical inverse problem. Solving inverse problems usually requires iterative optimization using optimization algorithms. Among traditional optimization algorithms, the conjugate gradient (CG) algorithm is an efficient iterative optimization algorithm with advantages such as low memory consumption and fast convergence speed, making it particularly suitable for handling large-scale linear systems and optimization problems. However, in the process of image inpainting using the CG algorithm, the solution to its modeling equation is not unique, or the solution is very sensitive to small perturbations in the data. Generally, the solution space can be limited by introducing prior information regularization constraint operators (such as TV operators, wavelet transform operators, etc.) to make the solution more consistent with the characteristics of the actual problem, thereby improving the accuracy and stability of the solution. However, traditional optimization methods rely on certain prior characteristics inherent in the image, such as sparsity under TV operation due to smoothness, sparsity in the wavelet transform domain, and low rank of the image transformation matrix or tensor. Therefore, traditional optimization methods cannot be applied to images without prior characteristics.
[0004] In recent years, deep learning technology has become increasingly popular in the field of image inpainting due to its powerful feature extraction and learning capabilities. Typical image inpainting network frameworks include methods based on convolutional neural networks (CNNs) and generative adversarial networks (GANs). Image artificial intelligence (AI) processing platforms generally employ cutting-edge deep learning network technologies for image inpainting, image enhancement, image denoising, and image target recognition. However, the accuracy of AI platforms in image inpainting is often limited by the use of uniform, generalized parameter metrics, resulting in relatively poor accuracy for certain types of images. Summary of the Invention
[0005] In order to solve the problems existing in the prior art, the present invention provides the following technical solution.
[0006] The first aspect of this invention provides an image restoration method based on AI and CG algorithms, comprising: Obtain the original image and the damaged image; The AI-restored image of the damaged image is obtained, and the AI-restored image is preprocessed to obtain an AI reference image that is consistent with the pixel value range of the damaged image. Obtain the difference map between the AI reference map and the real map, and the damaged map of the difference map; Using the CG algorithm, the wavelet coefficients of the difference map are calculated according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; Initialize the wavelet coefficients of the difference plot; The inverse wavelet transform is performed on the wavelet coefficients of the repaired difference map to obtain the repaired difference map; The repaired image is obtained by using the repaired difference image and the AI reference image.
[0007] Preferably, the difference map is obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map is obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
[0008] Preferably, the inverse wavelet transform of the wavelet coefficients of the repaired difference map is performed using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
[0009] Preferably, the restored image is obtained using the following formula, which combines the restored difference image and the AI reference image: ; in, The image after restoration; These are the wavelet coefficients of the repaired difference map; This is a reference image for AI.
[0010] Preferably, for two-dimensional images in the discrete case, the norm of the total variational term of the prior constraint on image smoothness is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. Representing images respectively Length and width.
[0011] A second aspect of the present invention provides an image restoration apparatus based on AI and CG algorithms, comprising: The data acquisition module is used to acquire a real image and a damaged image; it is also used to acquire an AI-restored image of the damaged image, and preprocess the AI-restored image to obtain an AI reference image that is consistent with the pixel value range of the damaged image; it is also used to acquire a difference image between the AI reference image and the real image, and a damaged image of the difference image; The calculation module is used to calculate the wavelet coefficients of the difference map using the CG algorithm according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; Initialize the wavelet coefficients of the difference plot; The module for obtaining the repaired difference map is used to perform inverse wavelet transform on the wavelet coefficients of the repaired difference map to obtain the repaired difference map. The repaired image acquisition module is used to obtain the repaired image by utilizing the repaired difference image and the AI reference image.
[0012] Preferably, the difference map is obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map is obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
[0013] Preferably, the inverse wavelet transform of the wavelet coefficients of the repaired difference map is performed using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
[0014] Preferably, the restored image is obtained using the following formula, which combines the restored difference image and the AI reference image: ; in, The image after restoration; These are the wavelet coefficients of the repaired difference map; This is a reference image for AI.
[0015] Preferably, for two-dimensional images in the discrete case, the norm of the total variational term of the prior constraint on image smoothness is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. Representing images respectively Length and width.
[0016] The beneficial effects of this invention are as follows: This invention provides an image restoration method and apparatus based on AI and CG algorithms. It combines AI-restored images with traditional conjugate gradient algorithms based on prior information modeling. Using the AI-restored image as prior information, it combines it with traditional modeling methods using wavelet transform, TV operator, and L1 norm prior information to derive an effective CG solution algorithm. Experiments show that the invented method further improves the accuracy of image restoration using both AI platforms and traditional modeling methods. It solves the problems of insufficient restoration accuracy due to parameter generalization issues in AI platforms and blurred restoration using traditional modeling methods. The effective combination of the two can further improve restoration accuracy indicators, providing new ideas and a higher-performance effective approach for the field of image restoration. This is of great significance for promoting the application of image restoration technology in multiple fields such as SAR images, medical images, remote sensing images, and video processing. Furthermore, traditional image restoration methods based on the sparsity of prior information are only applicable to images with sparseness. This invention, however, transforms the prior information constraint object into a difference map that is inherently sparse, making it applicable to a wider range of images than traditional sparse modeling methods. In other words, it is applicable not only to sparse image restoration, such as SAR images, but also to smooth, natural images. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the image restoration method based on AI and CG algorithms described in this invention. Figure 2 This is a schematic diagram illustrating the iterative solution process using the conjugate gradient CG algorithm described in this invention; Figure 3 This is a schematic diagram of the actual image used in the comparative examples of this invention; Figure 4 This is a schematic diagram of the contaminated image, the repaired image, and the error image between the repaired image and the real image used in the comparative examples of this invention; Figure 5 This is a functional structure diagram of the image restoration device based on AI and CG algorithms described in this invention. Detailed Implementation
[0018] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0019] The method provided by this invention can be implemented in a terminal environment that may include one or more of the following components: a processor, a memory, and a display screen. The memory stores at least one instruction, which is loaded and executed by the processor to implement the method described in the following embodiments.
[0020] A processor may include one or more processing cores. The processor connects various parts of the terminal using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets or instruction sets stored in memory, and by calling data stored in memory.
[0021] Memory can include random access memory (RAM) or read-only memory (ROM). Memory can be used to store instructions, programs, code, code sets, or instructions.
[0022] The display screen is used to show the user interface of each application.
[0023] In addition, those skilled in the art will understand that the structure of the terminal described above does not constitute a limitation on the terminal. The terminal may include more or fewer components, or combine certain components, or have different component arrangements. For example, the terminal may also include radio frequency circuits, input units, sensors, audio circuits, power supplies, and other components, which will not be described in detail here.
[0024] The development of deep learning neural networks has promoted the development of artificial intelligence (AI), leading to the gradual emergence of image restoration techniques, along with traditional image optimization algorithms, as two major categories of restoration methods.
[0025] However, in related technologies, relying on certain prior characteristics inherent in the image for modeling and solving the CG algorithm results in poor restoration accuracy and stability. The image restoration accuracy of AI platforms is limited by uniformly generalized parameter indicators. Therefore, the goal of this invention is to combine the advantages of both to provide an effective image restoration method to improve image restoration accuracy. This invention proposes an image restoration technique that combines a reference map for AI restoration with sparsity prior information regularization constraints. This method uses the image restored by the AI platform as prior information for the CG algorithm, combining it with traditional modeling methods using wavelet transform, TV operator, and L1 norm prior information, and derives an effective CG solution algorithm, which can significantly improve the accuracy of the restored image. This solves the problems of insufficient restoration accuracy due to parameter generalization issues in AI platforms and blurry restoration by traditional modeling methods. Traditional image restoration methods based on the sparsity of prior information are only applicable to images with sparseness, while this invention transforms the prior information constraint object into a difference map that inherently possesses sparsity, making it applicable to a wider range of images than traditional sparse modeling methods. That is, in addition to sparse image restoration, such as SAR images, it can also be applied to smooth, natural images.
[0026] Example 1 like Figure 1As shown, this embodiment of the invention provides an image restoration method based on AI and CG algorithms, which may include the following steps: S101: Obtain the real image and the damaged image; obtain the AI-restored image of the damaged image, and preprocess the AI-restored image to obtain an AI reference image with the same pixel value range as the damaged image; obtain the difference image between the AI reference image and the real image, and the damaged image of the difference image. The real image can be understood as an intact image, and the damaged image can be understood as an image that has been contaminated to a certain extent, i.e., a contaminated image. The degree of contamination can be represented by the contamination rate; the smaller the contamination rate, the greater the degree of contamination of the image. Conversely, the greater the degree of contamination, the smaller the degree. The real image and the damaged image can be existing images in a database, images acquired by devices such as cameras, or synthetic aperture radar (SAR) images, etc. The AI-restored image can be obtained using existing internet AI image restoration platforms. In practice, it can be pre-restored for later use. The AI reference image can be obtained by preprocessing the repaired image based on the damaged image. Preprocessing ensures that the pixel value range between the AI reference image and the damaged image is consistent. The difference image can be understood as an image composed of the pixel differences at corresponding positions between the AI reference image and the real image. The damaged map of the difference map can be obtained based on the damaged map, the AI reference map, and the damaged area.
[0027] S102, using the CG algorithm, the wavelet coefficients of the difference map are calculated according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; The wavelet coefficients are used to initialize the difference map.
[0028] In the above formula, the AI-restored image is used as prior information, combined with wavelet transform, TV operator, and L1 norm prior information. Then, the CG algorithm is used to solve for the wavelet coefficients of the restored difference image. Before constructing the formula and solving, the operation operators can be set first, including... Wavelet transform operators (for sparse images, the Daubechies4 wavelet, which has better sparsity, can be used). The inverse wavelet transform operator can also be configured with parameters. Specifically, parameters can be set empirically, such as for sparse synthetic aperture radar (SAR) images and wavelet sparse term constraint balancing. Difference constraint term balance parameter Maximum number of iterations in the outer loop = 2. Find the minimum value of the derivative Maximum number of iterations in the inner loop. = 50, Internal Iteration Convergence Tolerance Maximum number of backtracking linear search iterations = 150, Initial step size 、 Linear search parameters Step size decay coefficient It can also initialize the wavelet coefficients of the difference plot. .
[0029] S103, Perform inverse wavelet transform on the wavelet coefficients of the repaired difference map to obtain the repaired difference map; S104. Using the repaired difference image and the AI reference image, the repaired image is obtained.
[0030] In one embodiment of the present invention, the difference map can be obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map can be obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
[0031] In one embodiment of the present invention, the wavelet coefficients of the repaired difference map are subjected to inverse wavelet transform using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
[0032] In one embodiment of the present invention, the repaired image is obtained using the following formula, which combines the repaired difference image and the AI reference image: ; in, The image after restoration; These are the wavelet coefficients of the repaired difference map; This is a reference image for AI.
[0033] In one embodiment of the present invention, for a two-dimensional image in the discrete case, the norm of the total variational term of the prior constraint on image smoothness is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. Representing images respectively Length and width.
[0034] The method provided by this invention uses an AI reference image as prior information and combines it with modeling methods based on wavelet transform, TV operator, and L1 norm prior information to derive an effective CG solution algorithm. Experiments show that this method can further improve the accuracy of image restoration using both AI platforms and traditional modeling methods. It solves the problems of insufficient restoration accuracy due to parameter generalization issues in AI platforms and blurred restoration using traditional modeling methods. The effective combination of the two can further improve restoration accuracy, providing a new approach and a higher-performance effective method for image restoration. This is of great significance for promoting the application of image restoration technology in multiple fields such as SAR images, medical images, remote sensing images, and video processing.
[0035] Furthermore, traditional image inpainting methods based on the sparsity of prior information are only applicable to images with sparsity. However, this invention transforms the prior information constraint object into a difference map that is inherently sparse, making it applicable to a wider range of images than traditional sparsity modeling methods. In other words, it can be applied not only to sparse image inpainting, such as SAR images, but also to smooth and natural images.
[0036] This invention provides an image restoration method based on AI and CG algorithms. The solution process can utilize the conjugate gradient CG algorithm for iterative solving, such as... Figure 2As shown, the process begins with the input image to be repaired entering the CG algorithm. Simultaneously, the image is processed by the AI platform to generate an AI-repaired image, which is then entered into the CG algorithm. Both the image to be repaired and the AI-repaired image undergo initialization steps such as damaged location detection, preprocessing, and parameter and operation settings. Next, the CG algorithm enters its iterative optimization loop structure, divided into inner and outer iterations. The outer iteration controls the overall optimization rounds based on set conditions. If the outer iteration conditions are met, the cost function gradient and iteration direction are calculated, and the inner iteration begins. The inner iteration includes steps such as cost function calculation and step size update, and incorporates "backtracking linear search" conditions to optimize and update the step size, gradient, iteration direction, and difference map wavelet coefficients. Finally, if the outer iteration conditions are not met, the difference map wavelet coefficients generated through the inner and outer iterations are output, and an inverse wavelet transform is performed to recover the difference map. The difference map is then added to the AI-repaired image, and the finally repaired image is output.
[0037] The specific implementation can be carried out as follows.
[0038] Input: Input the damaged image Damaged area AI reference image. Specifically, an AI-restored image of the damaged image can be obtained, and the AI-restored image can be preprocessed to obtain an AI reference image with pixel value ranges consistent with the damaged image. .
[0039] Calculate: Damaged map of the difference map Among them, the real image AI Reference Image difference graph satisfy .
[0040] Operation settings: Wavelet transform (using Daubechies4 wavelet) Inverse wavelet transform.
[0041] Initialization: Difference map wavelet coefficients Iterative convergence .
[0042] Parameter settings: Maximum number of outer loop iterations = 2. Wavelet sparse term constraint balance parameters Difference constraint term balance parameters Find the minimum value of the derivative Maximum number of iterations in the inner loop. = 50, Internal Iteration Convergence Tolerance Maximum number of backtracking linear search iterations = 150, Initial step size 、 Linear search parameters Step size decay coefficient .
[0043] Outer loop iteration: for = 1 to do Calculate the cost function about gradient Right now: ( (Indicates transpose) Initialize the current number of internal iterations: Inner loop iteration: While or do: Calculate the cost function : Initialize the current number of backtracking linear search iterations: Backtracking linear search iteration: While or end While End backtracking linear search iteration if , ; if , .
[0044] Update cost function about gradient Right now: renew renew renew calculate end While Ends the inner loop iteration end for ends the outer loop iteration. Output: The upper right corner mark This represents the optimal solution for the repair model.
[0045] Comparative Example This comparison uses SAR images; the actual images are available in a database (website: [website address missing]). https: / / opendatalab.com Select from ), such as Figure 3 The invention employs three methods: AI platform repair, traditional CG algorithm repair, and the method of this invention, to address the contamination rate. Damaged images (contaminated images) at 20%, 40%, 60%, 80%, and 90% contamination levels were restored. The following results were compared: PSNR and SSIM numerical values, visual comparison of the restored images, and error maps between the restored and ground truth images. PSNR and SSIM values are shown in Table 1. The restored images and error maps between the restored and ground truth images are shown in Table 2. Figure 4 As shown. Figure 4 In the diagram, arranged from top to bottom: the first row, from left to right, shows contamination images with contamination rates of 20%, 40%, 60%, 80%, and 90%; the second row shows the error between the contamination image and the real image corresponding to the first row. Rows 3, 5, and 7 show the restoration images for different contamination rates using the AI platform restoration method, traditional modeling CG algorithm restoration, and the restoration method of this invention, respectively. Rows 4, 6, and 8 show the error between the restored image and the real image corresponding to the previous row. The color scale range of the error images is 0-0.2, while the color scale range of the other images is 0-1.
[0046] Table 1. PSNR / SSIM results of three methods for restoring test maps with different contamination rates. From Table 1 and Figure 4The results show that the AI platform restoration method is not effective in restoring remote sensing images generated by synthetic aperture radar systems, and the restoration effect decreases with increasing contamination rate. The method of this invention performs excellently in image detail restoration and noise suppression, improving image restoration effects compared to AI platform restoration and traditional modeling-based CG algorithm restoration methods. It results in smaller errors between the restored image and the original image, and superior restoration performance. Specifically, compared to traditional modeling-based CG algorithm restoration methods, the method of this invention can improve the PSNR index by an average of approximately 13.5 dB and the SSIM index by an average of approximately 0.59%.
[0047] Example 2 like Figure 5 As shown, another aspect of the present invention also includes a functional module architecture that is completely consistent with the aforementioned method flow. That is, the embodiments of the present invention also provide an image restoration device based on AI and CG algorithms, including: The data acquisition module 501 is used to acquire a real image and a damaged image; it is also used to acquire an AI restoration image of the damaged image, and preprocess the AI restoration image to obtain an AI reference image that is consistent with the pixel value range of the damaged image; it is also used to acquire a difference image between the AI reference image and the real image, and a damaged image of the difference image; Calculation module 502 is used to calculate the wavelet coefficients of the difference map using the CG algorithm according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; Initialize the wavelet coefficients of the difference plot; The repaired difference map acquisition module 503 is used to perform inverse wavelet transform on the wavelet coefficients of the repaired difference map to obtain the repaired difference map. The repaired image acquisition module 504 is used to obtain the repaired image by utilizing the repaired difference image and the AI reference image.
[0048] Furthermore, the difference map is obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map is obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
[0049] Furthermore, the inverse wavelet transform of the wavelet coefficients of the repaired difference map is performed using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
[0050] Furthermore, the restored image is obtained using the following formula, combining the repaired difference image and the AI reference image: ; in, The image after restoration; These are the wavelet coefficients of the repaired difference map; This is a reference image for AI.
[0051] Furthermore, for two-dimensional images in the discrete case, the norm of the total variational term of the prior constraint on image smoothness is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. Representing images respectively Length and width.
[0052] This device can be implemented using the image restoration method based on AI and CG algorithms provided in Embodiment 1 above. For the specific implementation method, please refer to the description in Embodiment 1, which will not be repeated here.
[0053] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.
Claims
1. An image restoration method based on AI and CG algorithms, characterized in that, include: Obtain the original image and the damaged image; The AI-restored image of the damaged image is obtained, and the AI-restored image is preprocessed to obtain an AI reference image with the same pixel value range as the damaged image. Obtain the difference map between the AI reference map and the real map, and the damaged map of the difference map; Using the CG algorithm, the wavelet coefficients of the difference map are calculated according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; Initialize the wavelet coefficients of the difference plot; The inverse wavelet transform is performed on the wavelet coefficients of the repaired difference map to obtain the repaired difference map; The repaired image is obtained by using the repaired difference image and the AI reference image.
2. The image restoration method based on AI and CG algorithms as described in claim 1, characterized in that, The difference map is obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map is obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
3. The image restoration method based on AI and CG algorithms as described in claim 1, characterized in that, The inverse wavelet transform of the wavelet coefficients of the repaired difference map is performed using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
4. The image restoration method based on AI and CG algorithms as described in claim 1, characterized in that, The restored image is obtained using the following formula, which combines the repaired difference image and the AI reference image: ; in, The image after restoration; The difference image after repair; This is a reference image for AI.
5. The image restoration method based on AI and CG algorithms as described in claim 1, characterized in that, For a two-dimensional image in the discrete case, the norm of the total variational term of the image smoothness prior constraint is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. = ; = ; Representing images respectively Length and width.
6. An image restoration device based on AI and CG algorithms, characterized in that, include: The data acquisition module is used to acquire a real image and a damaged image; it is also used to acquire an AI-restored image of the damaged image, and preprocess the AI-restored image to obtain an AI reference image that is consistent with the pixel value range of the damaged image; it is also used to acquire a difference image between the AI reference image and the real image, and a damaged image of the difference image; The calculation module is used to calculate the wavelet coefficients of the difference map using the CG algorithm according to the following formula: ; in, These are the wavelet coefficients of the repaired difference map; , All are balance parameters; To balance the fidelity terms; Prior constraints for sparsity of wavelet coefficients Normative terms; The total variational term constrained by prior constraints for image smoothness; The damaged map is a difference map; The damaged area; The inverse wavelet transform operator is set; Initialize the wavelet coefficients of the difference plot; The module for obtaining the repaired difference map is used to perform inverse wavelet transform on the wavelet coefficients of the repaired difference map to obtain the repaired difference map. The repaired image acquisition module is used to obtain the repaired image by utilizing the repaired difference image and the AI reference image.
7. The image restoration device based on AI and CG algorithms as described in claim 6, characterized in that, The difference map is obtained according to the following formula: ; in, This is a real image; For AI reference only; For difference graphs; The damaged map of the difference map is obtained according to the following formula: ; The damaged map is a difference map; The image shows a damaged image. This is the damaged area.
8. The image restoration device based on AI and CG algorithms as described in claim 6, characterized in that, The inverse wavelet transform of the wavelet coefficients of the repaired difference map is performed using the following formula to obtain the repaired difference map: ; in, The difference image after repair; The inverse wavelet transform operator is set; These are the wavelet coefficients of the repaired difference map.
9. The image restoration device based on AI and CG algorithms as described in claim 6, characterized in that, The restored image is obtained using the following formula, which combines the repaired difference image and the AI reference image: ; in, The image after restoration; These are the wavelet coefficients of the repaired difference map; This is a reference image for AI.
10. The image restoration device based on AI and CG algorithms as described in claim 6, characterized in that, For a two-dimensional image in the discrete case, the norm of the total variational term of the image smoothness prior constraint is expressed by the following formula: ; in, It is a two-dimensional image; and These represent the differences in the image in the horizontal and vertical directions, respectively. = ; = ; Representing images respectively Length and width.