Image restoration method, device and equipment based on Newton integral neurodynamics, medium and program product
The image repair model is constructed and solved by Newton's integral neurodynamic method, and the problems of high computational complexity, low universality and insufficient noise resistance in the prior art are solved, and a fast and accurate image repair effect is achieved.
Patent Information
- Application Number
- CN202510357210.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-07-11
AI Technical Summary
The existing image repair technology has high computational complexity, low universality, low recognition accuracy and insufficient noise resistance, especially when applied in actual environments.
Combining traditional numerical iterative algorithms and neural network methods, Newton's integral neurodynamics is used to construct a mathematical model of image repair, and the Newton's integral neurodynamic evolution model is solved, the anti-noise interference term is added, and the frequency domain solution is used to solve it using Fourier transform, and the image is finally restored in the time domain.
It realizes fast and robust image repair, reduces the computational complexity, improves the accuracy and noise resistance of the repaired image, and adapts to actual environmental changes.
Smart Images

Figure CN120298261A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular, to an image restoration method, device, equipment, medium and program product based on Newton integral neural dynamics. Background Art
[0002] Currently, digital image processing technology has been widely applied to many fields such as scientific research, industrial and agricultural production, military technology, government departments, medical and health, etc. The research on image restoration algorithms is a very important field in digital image processing. During the image imaging process, there are many degradation sources in the image system, and there are many reasons for image degradation. If the degradation model is simplified as the result of the convolution of the real image and the convolution operator, then the image restoration process can be regarded as an anti-convolution problem. Anti-convolution belongs to a class of "inverse problems" in mathematical physics. A common and important property of inverse problems is their ill-posedness, that is, the solution of their equations does not continuously depend on the observed data. In other words, a small change in the observed data may lead to a large change in the solution. Therefore, due to the influence of noise on the acquired image, the final image restoration result may deviate far from the real image. Currently, image restoration work can be roughly divided into two categories: traditional numerical iterative algorithms and neural network algorithms. The former needs to perform patch matching when restoring complex images, and there are problems of low accuracy and slow speed. In the latter, few works take environmental factors into account, resulting in performance fluctuations of such methods in the actual application process. Summary of the Invention
[0003] The present invention aims to provide an image restoration method, device, equipment, medium and program product based on Newton integral neural dynamics, which combines the advantages of traditional numerical methods and neural network methods, quickly restores complex images, and has strong anti-noise ability for the actual environment, effectively solving problems such as high computational complexity, low universality, and low recognition accuracy in the image restoration process.
[0004] In a first aspect, an image restoration method based on Newton integral neural dynamics provided by the present invention includes the following steps:
[0005] Step S1: Preprocess the original image to be processed;
[0006] Step S2: Construct a mathematical model for image restoration based on the original image to be processed;
[0007] Step S3: Solve the mathematical model using Newton integral neural dynamics;
[0008] Step S4: Complete image restoration based on the optimal solution obtained in Step S3.
[0009] In some embodiments, in step S2, constructing a mathematical model for image inpainting based on the original image to be processed includes the following sub-steps;
[0010] Step S201: Let f(x, y) represent the original image to be processed, g(x, y) represent the observed degraded image, and h(x, y) represent the spatially invariant point spread function;
[0011] Step S202: Discretize the original image f(x, y) and the degraded image g(x, y) respectively to obtain the discrete observed image g0 and the discrete original image f0, and vectorize them column-wise to obtain the vectors g = vec(g0) and f = vec(f0), where vec(·) represents column-wise vectorization;
[0012] Step S203: Incorporate the constant into the discretized point spread function h(x, y) and denote it as h. Perform a convolution operation on the discretized point spread function h(x, y) and the discrete original image f0 and vectorize it column-wise. The resulting vector is denoted as H·f, where H is an m 2 ×m 2 block Toeplitz matrix, and m is the dimension size of the picture matrix;
[0013] Step S204: Based on the preparations in steps S201 - S203, perform Tikhonov regularization discretization to obtain the objective function expressed as where α is the weight coefficient;
[0014] Step S205: Use the variational method to obtain the gradient of the objective function in step S204. Then H * H·f - H * g + αf = (H * H + αI)·f - H * g. In the formula, H * is the conjugate matrix of H, and I is the identity matrix; Let Then
[0015] Step S206: Take the partial derivative of with respect to f to obtain the mathematical model for image inpainting as
[0016] In some embodiments, in step S300, using Newton integral neurodynamics to solve the mathematical model includes the following sub-steps;
[0017] Step S301: Parameter initialization: including setting the maximum number of iterations, setting the termination condition error ∈; setting the original image f to be solved, setting the weight coefficient α; setting the initial iteration term k = 0;
[0018] Step S302: Calculate the gradient of the mathematical model for image inpainting and its norm
[0019] Step S303: Construct a Newton integral neural dynamics evolution model, and use this Newton integral neural dynamics evolution model to obtain
[0020] Step S304: Perform a Fourier transform on the formula of f in Step S303 k+1 so that it can be used to solve the mathematical model for image inpainting in the frequency domain.
[0021] In some embodiments, the Newton integral neural dynamics evolution model is a model proposed based on the Newton method with an additional integral term for anti-noise interference added.
[0022] In some embodiments, in Step S304, solving the mathematical model for image inpainting includes:
[0023] Perform a two-dimensional Fourier transform on h and g, where fft2(·) represents performing a two-dimensional Fourier transform on a matrix;
[0024] Let Perform a two-dimensional Fourier transform on f in Step S303 k+1 then where vec(·) represents column vectorization and diag(·) represents matrix diagonalization;
[0025] If k ≥ max is satisfied k or is satisfied, then stop the calculation and output the optimal solution
[0026] If k ≥ max is not satisfied k and is not satisfied Let k = k + 1, and transfer to Step 302.
[0027] In some embodiments, in Step S400, completing image inpainting based on the optimal solution obtained in Step S3 specifically means performing an inverse two-dimensional Fourier transform on the optimal solution obtained in Step S300 to convert it from the frequency domain to the time domain to obtain the inpainted image, where ifft2(·) represents performing an inverse two-dimensional Fourier transform on a matrix.
[0028] In a second aspect, the present invention provides an image inpainting device based on Newton integral neurodynamics, comprising:
[0029] A first processing unit for preprocessing the original image to be processed;
[0030] A second processing unit for constructing a mathematical model for image inpainting based on the original image to be processed;
[0031] A third processing unit for solving the mathematical model by using Newton integral neurodynamics;
[0032] A fourth processing unit for completing image inpainting based on the optimal solution obtained by solving the mathematical model.
[0033] In a third aspect, the present invention provides an electronic device, comprising:
[0034] At least one processor; and a memory communicatively connected to the at least one processor;
[0035] Wherein, the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, causes the at least one processor to execute the above method.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium for storing instructions, which, when executed, implement the above method.
[0037] In a fifth aspect, the present invention provides a computer program product, which, when called by a computer, causes the computer to execute the above method.
[0038] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are:
[0039] 1. The present invention introduces an integral feedback term on the basis of the traditional Newton iteration algorithm, effectively suppressing the interference of noise on the model during the extraction process, and having strong robustness.
[0040] 2. The present invention can realize image inpainting affected by atmospheric disturbance and imperfect optical systems, and simplifies the constrained energy minimization extraction model into the solution of a linear equation mathematical model.
[0041] 3. The present invention combines the actual application effects and requirements of the current image, has the advantages of fast convergence speed, strong robustness, short calculation time, and high extraction accuracy. Compared with the traditional gradient method and the image inpainting algorithm based on Fourier transform, it can solve problems more quickly and simultaneously improve the peak signal-to-noise ratio of the inpainted image. Description of the Drawings
[0042] Figure 1 It is a flowchart of an image inpainting method based on Newton integral neurodynamics provided by an embodiment of the present invention.
[0043] Figure 2 It is a schematic structural diagram of an image inpainting device based on Newton integral neurodynamics provided by an embodiment of the present invention.
[0044] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed Embodiments
[0045] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.
[0046] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0047] To make up for the deficiencies of existing work, the present invention mainly addresses the problems of high computational complexity, low universality, and low recognition accuracy in the process of image inpainting. This embodiment proposes an image inpainting method based on Newton integral neurodynamics. Specifically, the following problems are solved:
[0048] (1) How to improve the traditional Newton iteration algorithm to make it have strong anti-noise ability.
[0049] (2) How to construct an image inpainting model, simplify it into a linear equation mathematical model, and solve it with the improved Newton iteration algorithm.
[0050] As Figure 1 shown, an image inpainting method based on Newton integral neurodynamics proposed in this embodiment includes the following steps:
[0051] Step S1: Preprocess the original image to be processed;
[0052] Step S2: Construct a mathematical model for image inpainting based on the original image to be processed;
[0053] Step S3: Solve the mathematical model using Newton integral neurodynamics;
[0054] Step S4: Complete image inpainting based on the optimal solution obtained in Step S3.
[0055] In some embodiments, constructing the mathematical model for image inpainting in Step S2 based on the original image to be processed includes the following sub-steps;
[0056] Step S201: Let f(x, y) represent the original image to be processed, which is equivalent to the quantity to be solved in the function, g(x, y) represent the observed degraded image, which is equivalent to the known quantity in the function, and h(x, y) represent the spatially invariant point spread function;
[0057] Step S202: Discretize the original image f(x, y) and the degraded image g(x, y) respectively to obtain the discrete observed image g0 and the discrete original image f0, and vectorize them column-wise to obtain the vectors h = vec(g0) and f = vec(f0), where vec(·) represents column-wise vectorization;
[0058] Step S203: Incorporate the constant into the discretized point spread function h(x, y) and denote it as h. Perform a convolution operation on the discretized point spread function h(x, y) and the discrete original image f0 and vectorize it column-wise. The resulting vector is denoted as H·f, where H is an m 2 ×m 2 block Toeplitz matrix, and m is the dimension size of the image matrix;
[0059] Step S204: Based on the preparations in Steps S201 - S203, perform discrete Tikhonov regularization to obtain the objective function expressed as where α is the weight coefficient;
[0060] Step S205: Use the variational method to obtain the gradient of the objective function in Step S204, then H * H·f - H * g + αf = (H * H + αI)·f - H * G, where H * is the conjugate matrix of H, and I is the identity matrix; let then
[0061] Step S206: Take the partial derivative of with respect to f to obtain the mathematical model for image inpainting as
[0062] In some embodiments, in step S300, the use of Newton integral neural dynamics to solve the mathematical model includes the following sub-steps;
[0063] Step S301: Parameter initialization: including giving the maximum number of iterations (which can be set as needed, for example, 100), giving the termination condition error ∈ (which can be set as needed, for example, ∈ = 10 -7 ); giving the original image f to be solved, giving the weight coefficient α (which can be set as needed, for example, 0.000005157 and 0.000006768); giving the initial iteration term k = 0.
[0064] Step S302: Calculate the gradient of the mathematical model for image inpainting and its norm
[0065] Step S303: Construct a Newton integral neural dynamics evolution model. This Newton integral neural dynamics evolution model adds an integral term for anti-noise interference on the basis of the model proposed based on Newton's method. Hence, it is called the Newton integral method. Use this Newton integral neural dynamics evolution model to obtain
[0066] Step S304: Perform Fourier transform on the formula of f in step S303 k+1 so that it can be used to solve the mathematical model for image inpainting in the frequency domain. The specific solution steps are as follows:
[0067] ① Perform two-dimensional Fourier transform on h and g, where fft2(·) represents performing two-dimensional Fourier transform on the matrix;
[0068] ② Let Perform two-dimensional Fourier transform on f in step S303 k+1 then where vec(·) represents column vectorization and diag(·) represents matrix diagonalization;
[0069] ③ If k ≥ max k or satisfies then stop the calculation and output the optimal solution
[0070] ④ If k < max k and does not satisfy let k = k + 1, and go to step 302.
[0071] In some embodiments, in step S400, the image restoration is completed based on the optimal solution obtained in step S3. Specifically, the optimal solution obtained in step S300 is subjected to two-dimensional inverse Fourier transform, converted from the frequency domain to the time domain to obtain the restored image. In the formula, ifft2(·) represents the two-dimensional inverse Fourier transform of the matrix.
[0072] Based on the same inventive concept, this embodiment also provides an image restoration device based on Newton integral neurodynamics, as Figure 2 shown, including:
[0073] A first processing unit for preprocessing the original image to be processed;
[0074] A second processing unit for constructing a mathematical model for image restoration based on the original image to be processed;
[0075] A third processing unit for solving the mathematical model using Newton integral neurodynamics;
[0076] A fourth processing unit for completing image restoration based on the optimal solution obtained by solving the mathematical model.
[0077] As for the specific processing methods of the respective processing units in the above device, reference may be made to the specific description of the above method, which will not be elaborated here.
[0078] Based on the same technical concept, an embodiment of the present application also provides an electronic device, which can implement the image restoration method flow based on Newton integral neurodynamics provided in the above embodiments of the present application. In one embodiment, the electronic device may be a server, or a terminal device or other electronic devices. As Figure 3 shown, the electronic device may include:
[0079] At least one processor, and a memory connected to at least one processor. In the embodiments of the present application, the specific connection medium between the processor and the memory is not limited. Figure 3 Here, it is taken as an example that the processor and the memory are connected through a bus. The bus is Figure 3 shown by a thick line in the figure. The connection manners between other components are only for illustrative purposes and are not to be construed as limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 3 only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor may also be referred to as a controller, and no limitation is imposed on the name.
[0080] In an embodiment of the present application, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can execute an image inpainting method based on Newton integral neurodynamics described above. The processor can implement Figure 3 the functions of each module in the device shown.
[0081] Among them, the processor is the control center of the device, and can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory and calling the data stored in the memory, various functions of the device and process data, so as to monitor the device as a whole.
[0082] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor. In some embodiments, the processor and the memory may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0083] The processor may be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of an image inpainting method based on Newton integral neurodynamics disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0084] A memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disc, and so on. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.
[0085] By designing and programming the processor, the code corresponding to the image restoration method based on Newton integral neurodynamics introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute the steps of the method of the embodiments shown when running. How to design and program the processor is a well-known technology to those skilled in the art and will not be elaborated here. Figure 1 The steps of the method of the embodiments shown. How to design and program the processor is a well-known technology to those skilled in the art and will not be elaborated here.
[0086] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, which when run on a computer, cause the computer to execute an image restoration method based on Newton integral neurodynamics described above.
[0087] In some optional embodiments, various aspects of an image restoration method based on Newton integral neurodynamics provided by the present application can also be implemented in the form of a program product, which includes program code that, when the program product runs on a device, is used to cause the control device to execute the steps in an image restoration method based on Newton integral neurodynamics according to various exemplary embodiments of the present application described above in this specification.
[0088] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described units can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0089] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0090] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a server, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one or more of the flows or multiple flows and / or blocks Figure 1 one or more of the blocks or multiple blocks.
[0091] Program code for performing the operations of the present application can be written using any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0092] In the case of a remote computing device, the remote computing device may be connected to the user computing device via any kind of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by using an Internet service provider to connect via the Internet).
[0093] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0095] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An image inpainting method based on Newton integral neurodynamics, characterized in that, It includes the following steps: Step S1: Preprocess the original image to be processed; Step S2: Construct a mathematical model for image inpainting based on the original image to be processed; Step S3: Solve the mathematical model using Newton integral neural dynamics; Step S4: Complete image inpainting based on the optimal solution obtained in Step S3.
2. The image inpainting method based on Newton integral neural dynamics according to claim 1, characterized in that The step of constructing a mathematical model for image inpainting based on the original image to be processed in Step S2 includes the following sub-steps; Step S201: Let f(x,y) represent the original image to be processed, g(x,y) represent the observed degraded image, and h(x,y) represent the spatially invariant point spread function; Step S202: Discretize the original image f(x,y) and the degraded image g(x,y) respectively to obtain the discrete observed image g0 and the discrete original image f0, and vectorize them column-wise to obtain the vectors g = vec(g0) and f = vec(f0), where vec(·) represents column-wise vectorization; Step S203: Based on step S202, incorporate the constant into the discretized point spread function h(x, y) and denote it as h. Perform a convolution operation on the discretized point spread function h(x, y) and the discretized original image f0 and vectorize them column by column. The resulting vector is denoted as H·f, where H is an m 2 ×m 2 block Toeplitz matrix, and m is the dimension size of the picture matrix; Step S204: After the preparations in steps S201 to S203, the discretization of Tikhonov regularization is carried out, and the objective function is expressed as where α is the weight coefficient; Step S205: Obtain the gradient of the objective function in Step S204 using the variational method, then H * H·f - H * g + αf = (H * H + αI)·f - H * g, where H * is the conjugate matrix of H, and I is the identity matrix; let then Step S206: For Take the partial derivative with respect to f, and the mathematical model for image inpainting is 3. The image inpainting method based on Newton integral neurodynamics according to claim 2, wherein In Step S300, the step of solving the mathematical model using Newton integral neural dynamics includes the following sub-steps; Step S301: Parameter initialization: including setting the maximum number of iterations, setting the termination condition error ∈; setting the original image f to be solved, setting the weight coefficient α; setting the initial iteration term k = 0; Step S302: Calculate the gradient of the mathematical model for the image inpainting and its norm Step S303: Construct a Newton integral neural dynamics evolution model, and use this Newton integral neural dynamics evolution model to obtain Step S304: Perform a Fourier transform on the f k+1 formula in step S303 so that it can be used to solve the mathematical model for image inpainting in the frequency domain.
4. The image inpainting method based on Newton integral neurodynamics according to claim 3, wherein The Newton integral neural dynamics evolution model is a model proposed based on Newton's method with an added integral term for anti-noise interference.
5. The image inpainting method based on Newton integral neural dynamics according to claim 3, characterized in that In Step S304, solving the mathematical model for image inpainting includes: Perform a two-dimensional Fourier transform on h and g, where fft2(·) represents performing a two-dimensional Fourier transform on a matrix; Let Perform two-dimensional Fourier transform on f in step S303, then k+1 where vec(·) represents column vectorization and diag(·) represents matrix diagonalization; In the formula If k ≥ max k or if then stop the calculation and output the optimal solution If k ≥ max is not satisfied k and Let k = k + 1 and go to step 302.
6. The image inpainting method based on Newton integral neural dynamics according to claim 5, wherein In step S400, the image restoration is completed based on the optimal solution obtained in step S3. Specifically, for the optimal solution obtained in step S300 perform an inverse two-dimensional Fourier transform to convert it from the frequency domain to the time domain, obtaining the restored image. In the formula, ifft2(·) represents performing an inverse two-dimensional Fourier transform on the matrix.
7. An image inpainting device based on Newton integral neurodynamics, characterized in that, It includes: A first processing unit for preprocessing the original image to be processed; A second processing unit for constructing a mathematical model for image inpainting based on the original image to be processed; A third processing unit for solving the mathematical model using Newton integral neural dynamics; A fourth processing unit for completing image inpainting based on the optimal solution obtained by solving the mathematical model.
8. An electronic device, characterized in that, It includes: At least one processor; And a memory communicatively connected to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, causes the at least one processor to execute the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions, and when the instructions are executed, the method according to any one of claims 1-6 is implemented.
10. A computer program product, characterized in that, When the computer program product is called by a computer, the computer is caused to execute the method according to any one of claims 1-6.