A color image completion method, device, equipment and medium
By introducing the idea of subspace low-rank clustering and tensor low-rank expression into the color image completion model, combined with the alternating direction multiplier method optimization algorithm, the problem of poor color image completion effect in the existing technology is solved, and a better Efficient information recovery and accuracy improvement.
Patent Information
- Application Number
- CN202410905170.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Existing color image completion methods are difficult to effectively characterize the low-dimensional clustering subspace inherent in the image, resulting in spatial and color information distortion during the color image completion process, and poor completion effects.
Adopt a color image completion model based on regular term constraints, introduce the idea of subspace low-rank clustering, use dictionaries, expression coefficients and interference noise to model color images with missing information, and express and alternate directions through tensor low-rank clustering The multiplier method optimization algorithm is updated iteratively to improve the completion effect.
It improves the effect of color image completion, enhances high-dimensional linear structure representation and low-dimensional spatial expression, reduces information distortion, and improves completion accuracy and robustness.
Smart Images

Figure CN118446939B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing and provides a color image completion method, device, equipment and medium. Background Art
[0002] With the rapid development of information science and Internet technology, digital image technology has penetrated into all aspects of life and has been widely used in consumer terminals, visual medical equipment, industrial detection equipment, remote sensing and other fields. Due to equipment failure, acquisition environment and other reasons, it is easy to cause information loss in color head images. In order to ensure the information integrity of color images, some color image completion methods have emerged.
[0003] Common color image completion models usually use constraints such as sparse representation, low-rank regularization, tensor modeling and deep priors, but there is a common problem that it is difficult to characterize the intrinsic low-dimensional clustering subspace of color images, which leads to serious distortion of spatial and color information in the process of color image completion, and thus causes poor color image completion effect. Summary of the invention
[0004] The present application provides a color image completion method, device, equipment and medium, which are used to solve the problem of poor color image completion effect.
[0005] In a first aspect, a color image completion method is provided, comprising:
[0006] Get color images with missing information;
[0007] The color image with missing information is input into the color image completion model to obtain the color image after information completion; wherein the color image completion model is constructed based on the regularization term constraint, and the regularization term constraint is , X represents the color image after the information is completed, represents the product between tensors, D represents a dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents interference noise.
[0008] Optionally, the dictionary is obtained through the following steps:
[0009] Restoring the information-missing color image using a method based on tensor nuclear norm to obtain a restored image;
[0010] Performing tensor singular value decomposition on the restored image to obtain a basis space of rows and a basis space of columns;
[0011] The product of the basis space of the rows and the basis space of the columns is used as the dictionary.
[0012] Optionally, the color image completion model includes the following formula (1):
[0013] (1)
[0014] Where L( ) represents the augmented Lagrangian function, represents the nuclear norm, represents the L1 norm, W is the auxiliary variable, λ is the regularization parameter between sparse and low rank, P1 and P2 are Lagrange multipliers, μ is the penalty term parameter, represents the F-norm, and <,> represents the inner product between matrices.
[0015] Optionally, the formula (1) is obtained by the following steps:
[0016] A degradation model is constructed; the degradation model is shown in formula (2):
[0017] Y=Ω(X)(2)
[0018] Wherein, Y represents the color image with missing information, Ω is a binary support index tensor with the same size as the color image after the information is completed, the zero element in Ω represents the missing element in the color image with missing information, Ω(X)=Ω⊙X, ⊙ represents the element-by-element product between tensors;
[0019] Determine the objective function of the degradation model; the objective function of the degradation model is as follows:
[0020] (3)
[0021] Wherein, min represents the minimum function, and Φ(X) represents the prior information constraint of the color image after the information is completed;
[0022] Constructing the regularization term constraint based on the dictionary, the expression coefficient and the interference noise;
[0023] Based on the regularization term constraint and the objective function of the degradation model, the objective function of the color image completion model is determined; the objective function of the color image completion model is shown in formula (4):
[0024] (4)
[0025] By introducing the auxiliary variable, the formula (4) is converted into the following formula (5):
[0026] (5)
[0027] The formula (5) is converted into the formula (1).
[0028] Optionally, inputting the information-missing color image into a color image completion model to obtain the information-completed color image includes:
[0029] Substituting the color image with missing information into formula (2) to obtain the initial color image after the information is completed;
[0030] Substitute the color image with missing information into formula (1) and perform loop iteration;
[0031] In each iteration, the alternating direction multiplier method is used to alternately solve and update each variable in formula (1) by fixing other variables;
[0032] Until the preset conditions are met, the final color image with complete information is output.
[0033] Optionally, the step of outputting a final color image after information completion until a preset condition is met includes:
[0034] Until the error between the color image updated in this round of iteration and the color image updated in the previous round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
[0035] Optionally, until the error between the color image updated in the current round of iteration and the color image updated in the previous round of iteration is less than a preset threshold, outputting the color image updated in the current round of iteration includes:
[0036] Calculate the difference between the color image updated in this round of iteration and the color image updated in the previous round of iteration;
[0037] If the ratio between the F norm of the difference and the F norm of the color image after the current round of iterative update is less than the preset threshold, the color image after the current round of iterative update is output.
[0038] In a second aspect, a color image completion device is provided, comprising:
[0039] An image acquisition module, used to acquire color images with missing information;
[0040] The image acquisition module is used to input the color image with missing information into the color image completion model to obtain the color image after information completion; wherein the color image completion model is constructed based on the regularization term constraint, and the regularization term constraint is , X represents the color image after the information is completed, represents the product between tensors, D represents a dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents interference noise.
[0041] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the color image completion method described in the first aspect.
[0042] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and a processor executes the computer program to implement the color image completion method described in the first aspect.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The present application provides a color image completion method, which includes obtaining a color image with missing information; inputting the color image with missing information into a color image completion model to obtain a color image after information completion; wherein the color image completion model is constructed based on a regularization term constraint, and the regularization term constraint is , X represents the color image after information completion, represents the product between tensors, D represents the dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents the interference noise. This method introduces the idea of subspace low-rank clustering, uses the dictionary D, expression coefficient Z and interference noise E to model the color image X with missing information, and uses the promotion effect of subspace clustering on reconstruction performance to express the tensor low-rank clustering. When embedded as a constraint item into the color image completion model, it can not only characterize the correlation of high-dimensional linear structures, but also introduce mid-level visual task constraints based on clustering ideas in the low-dimensional space expression process, thereby improving the color image completion effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0046] Attached Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0047] Attached Figure 2 A schematic diagram of a process flow of a color image completion method provided in an embodiment of the present application;
[0048] Attached Figure 3 A schematic diagram of the overall framework of the color image completion method provided in an embodiment of the present application;
[0049] Attached Figure 4 A schematic diagram of the structure of a color image completion device provided in an embodiment of the present application.
[0050] Marks in the figure: 10-color image completion device, 20-color image acquisition device. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0052] Various reasons may lead to missing information in color images, for example, original scratches or damaged color paintings need to be converted into digital color images of artworks, and the missing parts in the color images need to be repaired for easy viewing. Or for example, during the acquisition, processing, compression, transmission and decompression of color images, information loss may also cause information loss in color images. In order to facilitate subsequent image processing tasks, it is often necessary to first fill in the missing information in the color images.
[0053] Although the research on color image completion technology has achieved certain results in applications such as cultural relics protection, virtual reality, and the removal of redundant objects, the completion technology still has great defects in utilizing image structural information. The completion method based on tensor decomposition regards the restoration problem as solving the optimal tensor sparse coding and dictionary learning, but the dictionary is often learned from degraded data, which reduces the feature expression ability of the dictionary and causes distortion of information in the image; in addition, the current tensor modeling method ignores the low-rank prior of the data in the subspace, which brings the problem of difficulty in restoring low-dimensional information to the completion result.
[0054] The low-rank tensor completion method based on total variation regularization independently considers the smooth structure of high-dimensional data in each dimension, but lacks consideration of the correlation between data in each dimension and the high-dimensional linear structure of data. The completion model based on the tensor nuclear norm can overcome the problems caused by total variation to a certain extent. However, the regularization term based on total variation and tensor nuclear norm is only a constraint model for the underlying visual task, and has no constraints on the correlation between different categories in the data, resulting in poor completion effect of color images.
[0055] In view of this, the present application provides a color image completion method. The following briefly introduces the application scenarios to which the technical solution of the embodiment of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiment of the present application and are not limited. In the specific implementation process, the technical solution provided by the embodiment of the present application can be flexibly applied according to actual needs.
[0056] Please refer to the attached Figure 1 , is a schematic diagram of an application scenario provided in an embodiment of the present application. The application scenario includes a color image acquisition device 20 and a color image completion device 10. The color image acquisition device 20 and the color image completion device 10 communicate with each other, and the color image acquisition device 20 is, for example, a terminal device or a camera, etc. The terminal device includes, for example, a camera, a mobile phone, or a tablet computer, etc., and may also include other devices with a shooting function. The color image completion device 10 can be implemented through a terminal or a server, such as a personal computer, a mobile phone, or an embedded device, etc., and a server such as a physical server or a virtual server, etc.
[0057] Specifically, after the color image acquisition device 20 acquires the color image with missing information, it sends the color image with missing information to the color image completion device 10, and the color image completion device 10 completes the color image with missing information to obtain the color image after information completion. The specific image completion process will be introduced below.
[0058] It should be noted that the Figure 1 The color image acquisition device 20 and the color image completion device 10 are taken as two independent devices as an example, but in fact, the color image acquisition device 20 can also be coupled with the color image completion device 10, or the color image acquisition device 20 and the color image completion device 10 can be the same device. In this case, the color image completion device 10 can acquire color images with missing information by itself.
[0059] As described above, the application scenarios of the embodiments of the present application are described below. Figure 1 The color image completion device 10 in the embodiment of the present application performs the color image completion method as an example, and the attached Figure 2 The color image completion method shown in the figure is introduced.
[0060] S201, obtaining a color image with missing information.
[0061] In a specific implementation, a color image with missing information refers to a color image in which the pixel values of certain parts are missing or unavailable, resulting in these areas being unable to present the original colors and details. A color image with missing information usually presents features such as pixel loss areas, color distortion, holes, and artifacts. After acquiring a color image with missing information, the color image acquisition device 20 can actively transmit the color image with missing information to the color image completion device 10 via a mobile network such as 4G or 5G. The color image completion device 10 can also obtain a color image with missing information by photographing it by itself, or downloading a color image with missing information from a network resource, or obtaining a color image with missing information based on user input.
[0062] S202: Input the color image with missing information into a color image completion model to obtain a color image with completed information.
[0063] In the specific implementation process, the computer device can pre-store the constructed color image completion model. After obtaining the color image with missing information, the color image with missing information is input into the color image completion model, thereby outputting the color image with completed information.
[0064] Among them, the color image completion device is built based on the regularization term constraint, and the regularization term constraint is , X represents the color image after information completion, represents the product between tensors, D represents the dictionary (also called basis space), which refers to the minimum number of atoms used to represent high-dimensional signals in the process of low-dimensional representation, and contains redundant information. Z represents the expression coefficient corresponding to the dictionary, which refers to the corresponding relationship between the dictionary D and the low-dimensional features of the high-dimensional signal. E represents interference noise, , M represents the height of the color image, and N represents the width of the color image.
[0065] This involves a dictionary, and the following describes how to obtain the dictionary.
[0066] In a possible embodiment, a color image with missing information is restored using a method based on tensor nuclear norm to obtain a restored image; a tensor singular value decomposition is performed on the restored image to obtain a basis space of rows and a basis space of columns; and the product of the basis space of rows and the basis space of columns is used as a dictionary.
[0067] In a specific implementation, a benchmark method based on tensor nuclear norm (TNN) is used to restore the color image Y with missing information to obtain a restored image Y', and then tensor singular value decomposition (tensor-SVD, t-SVD) is performed on the restored image Y' to obtain , where U is the row tensor basis space of Y', V is the column tensor basis space of Y', and S is the singular value tensor of Y'. According to the row tensor basis space U and the column tensor basis space V, the basis space of high-quality data, i.e., the dictionary, is obtained. .
[0068] In an embodiment of the present application, in order to ensure that the learned dictionary can contain important features in color images with missing information, a benchmark completion method based on the tensor nuclear norm is adopted. A more complete and high-quality basis space is learned from the completion results of the benchmark completion method, providing important information support for completing the color image.
[0069] The following describes how to build a color image completion model based on regularization constraints.
[0070] In a possible embodiment, the color image completion model includes the following formula (1):
[0071] (1)
[0072] Where L( ) represents the augmented Lagrangian function, represents the nuclear norm, represents the L1 norm, W is the auxiliary variable, λ is the regularization parameter between sparse and low rank, P1 and P2 are Lagrange multipliers, μ is the penalty term parameter, represents the F-norm (Frobenius norm), and <,> represents the inner product between matrices.
[0073] In a possible embodiment, formula (1) is obtained by the following steps:
[0074] S1.1. Construct a degradation model.
[0075] The degradation model is shown in formula (2):
[0076] Y=Ω(X)(2)
[0077] Among them, Y represents the degraded image, that is, the color image with missing information, , , X represents the color image after information completion, M represents the height of the color image, N represents the width of the color image, Ω is a binary support index tensor with the same size as the color image after information completion, the zero elements in Ω represent the missing elements in the color image with missing information, Ω(X)=Ω⊙X, ⊙ represents the element-by-element product between tensors.
[0078] S1.2. Determine the objective function of the degradation model.
[0079] Solving X directly from (2) is an ill-posed problem and can be solved by minimizing the objective function,
[0080] The objective function of the degradation model is shown in formula (3):
[0081] (3)
[0082] Among them, min represents the minimum function, and Ф(X) represents the prior information constraint of the color image after information completion.
[0083] S1.3. Based on the dictionary, expression coefficients and interference noise, construct regular term constraints.
[0084] The information-missing image is modeled using tensor low-rank clustering expression as follows: , where X represents the color image after information completion, represents the product between tensors, D represents the dictionary, and Z represents the expression coefficient corresponding to D.
[0085] Considering that the tensor low-rank clustering expression modeling process may be disturbed by noise, the regular term constraint is derived as follows: , where X represents the color image after information completion, represents the product between tensors, D represents the dictionary, Z represents the expression coefficient corresponding to D, and E represents interference noise.
[0086] S1.4. Based on the regularization term constraint and the objective function of the degradation model, determine the objective function of the color image completion model.
[0087] In order to In order to accurately restore the image, the subspace low-rank clustering idea is introduced to model the expression coefficient Z and the interference noise E, and the objective function of the color image completion model is shown in formula (4):
[0088] (4)
[0089] S1.5. Introduce the auxiliary variable W and transform formula (4) into the following formula (5):
[0090] (5)
[0091] In order to facilitate the solution, an auxiliary variable W is introduced and W=Z.
[0092] S1.6. Convert formula (5) into formula (1).
[0093] It is difficult to solve (5) directly. With the help of the alternating direction multiplier method, the constraint problem in formula (5) is expressed as the following augmented Lagrangian function:
[0094] (1)
[0095] Since Y = Ω (X) is an identity and does not need to be iteratively updated during the solution process, Y = Ω (X) is not included in formula (1).
[0096] In a possible embodiment, a color image with missing information is substituted into formula (2) to obtain an initial color image after information completion; the initial color image after information completion is substituted into formula (1) for cyclic iteration; in each iteration, an alternating direction multiplication method is used to alternately solve and update each variable in formula (1) by fixing other variables; until a preset condition is met, a final color image after information completion is output.
[0097] In the specific implementation process, under the framework of the alternating direction multiplier method, the variables W, Z, E, X, P1, P2 in (1) are alternately solved by fixing other variables. The following describes how to solve each variable.
[0098] 1. Update the auxiliary variable W.
[0099] When the variables Z, E, X, P1, and P2 remain unchanged, the objective function for optimizing W is shown in formula (6).
[0100] (6)
[0101] in, It means that the objective function W takes the minimum value.
[0102] Formula (6) is a least squares problem of tensor nuclear norm regularization, so the closed-form solution of this formula can be solved by the singular value threshold method of t-SVD as follows:
[0103] (7)
[0104] in, , t-SVD represents tensor singular value decomposition, ,in, , ifft represents inverse Fourier transform, is the real tensor of S, Represents the real part of t.
[0105] 2. Update the expression coefficient Z.
[0106] When the variables W, E, X, P1, and P2 remain unchanged, the objective function for optimizing Z is shown in formula (8).
[0107] (8)
[0108] in, It means that the objective function Z is minimized.
[0109] This is a ridge regression problem. By taking the first-order partial derivative of the variable Z and setting it to zero, we have:
[0110] (9)
[0111] in, Denotes the pseudo-inverse of dictionary D.
[0112] Then, the closed-form solution of formula (9) is:
[0113] (10)
[0114] 3. Update the interference noise E.
[0115] When the variables W, Z, X, P1, and P2 remain unchanged, the objective function of optimizing E is shown in formula (11).
[0116] (11)
[0117] in, It means that the objective function E is minimized, λ is the regularization parameter, μ is the penalty parameter, and <,> represents the inner product of two matrices.
[0118] This problem can be solved by the following soft threshold operator:
[0119] (12)
[0120] Where S is a soft threshold operator, x is a real number, and δ>0, δ is the threshold, δ=λ / μ, and the closed-form solution of formula (11) can be calculated as follows:
[0121] (13)
[0122] 4. Update the color image X.
[0123] When the variables W, Z, E, P1, and P2 remain unchanged, the objective function of optimizing X is shown in formula (14):
[0124] (14)
[0125] in, It means that the objective function X takes the minimum value, and its closed-form solution is:
[0126] (15)
[0127] in, is the complement of Ω.
[0128] 5. Update the Lagrange multipliers P1 and P2.
[0129] When the variables W, Z, E, and X remain unchanged, the formula for updating the Lagrange multipliers P1 and P2 is as follows:
[0130] (16)
[0131] Here, ρ represents the scale factor.
[0132] As described above, the process of updating each variable in each iteration process is introduced. Each variable is continuously iterated and updated according to the above formula until the preset conditions are met, and the final color image after information completion is output, wherein the preset condition may be that the number of iterations reaches the maximum number of iterations, or the error between the color image updated after the n+1th iteration and the color image updated after the nth iteration is less than a preset threshold.
[0133] In a possible embodiment, until a preset condition is met, outputting a color image after information completion includes:
[0134] Until the error between the color image updated in this round of iteration and the color image updated in the previous round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
[0135] In a possible embodiment, the difference between the color image updated in this round of iteration and the color image updated in the previous round of iteration is calculated; if the F norm of the difference is less than a preset threshold, the color image updated in this round of iteration is output.
[0136] In another possible embodiment, the difference between the color image updated in this round of iteration and the color image updated in the previous round of iteration is calculated; if the ratio between the F norm of the difference and the F norm of the color image updated in this round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
[0137] For example, the F-norm of the difference is ; Where n represents the number of iterations, n is a positive integer greater than 1, X (n) represents the color image updated after the nth iteration, that is, the color image updated after the previous iteration, X (n+1) represents the color image after the n+1th iteration update, that is, the color image after the current iteration update, represents the F norm. If it is less than the preset threshold, then output X (n+1) ,like If it is greater than the preset threshold, the next iteration will be continued.
[0138] The following is an introduction to the algorithm program logic of the color image completion method provided in the embodiment of the present application.
[0139] Input: Y, Ω, D, ρ=1.05, θ=1e-6;
[0140] Initialization: μ = 1e-4, μ max =1e20, , P1=P2=0;
[0141] Solve for X using Y=Ω(X) 0 ;
[0142] forn=1:Ado
[0143] Update W using formula (7) (n) ;
[0144] Update Z using formula (10) (n) ;
[0145] Update E using formula (13) (n) ;
[0146] Update X using formula (15) (n) ;
[0147] Update p1 using formula (16) (n) and p2 (n) ;
[0148] Update μ (n+1) =min(ρμ (n) , μ max );
[0149] n=n+1;
[0150] While ;
[0151] end for
[0152] Output: X (n+1) .
[0153] Among them, Y is the color image with missing information, Ω is the index set of known elements, that is, the binary support index tensor with the same size as the color image with complete information, X 0 represents the initial color image after information completion, D represents the dictionary, ρ is the scale factor, θ is the preset threshold, μ is the penalty parameter, μ max represents the maximum value of the multiplier parameter, λ is the regularization parameter, M represents the height of the color image, N represents the width of the color image, P1 and P2 are Lagrange multipliers, A is the maximum number of iterations, μ (n+1)represents the updated u value after the n+1th iteration, μ (n) represents the updated u value after the nth iteration, min(ρμ (n) , μ max ) represents ρμ (n) and μ max The minimum value among them. (n) Represents the auxiliary variables W, Z after the nth iteration update (n) Represents the expression coefficient Z after the nth iteration update, E (n) represents the interference noise E after the nth iteration update, X (n) represents the color image after the nth iteration update, P1 (n) and P2 (n) represents the Lagrange multiplier after the nth iteration update, X (n+1) It represents the color image updated after the n+1th iteration, that is, the final color image after information completion.
[0154] In order to more clearly illustrate the color image completion method provided in the embodiment of the present application, Figure 3 The overall framework of the color image completion method provided in the embodiment of the present application is introduced.
[0155] First, obtain the color image X with missing information, use the TNN algorithm on the color image X with missing information, obtain the TNN-based completion result, and then use the t-SVD algorithm on the TNN-based completion result to learn the dictionary D, and then construct the tensor low-rank expression based on the low-rank coefficient Z and the dictionary D , Finally, the low-rank expression of the tensor is embedded into the color image completion model, and the color image after information completion is output through the color image completion model.
[0156] In order to quantitatively and qualitatively evaluate the completion effect of the color image completion method provided in the embodiment of the present application, four benchmark completion algorithms were selected as comparison methods, namely, the high-accuracy low-rank tensor completion (HaLRTC) method, the Kronecker basis-representation tensor completion (KBRTC) method, the low-tube rank based on tensor singular value decomposition (t-SVD) method, and the tensor nuclear norm (TNN) method.
[0157] The color image completion method provided in the embodiment of the present application and the four comparison methods are used to complete and reconstruct three color images with 50% pixel missing, and the completion results are quantitatively evaluated using three quality evaluation indicators: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM) and Feature SIMilarity (FSIM). As shown in Table 1, this is the average quantitative evaluation result of the three color images with 50% pixel missing.
[0158] Table 1
[0159]
[0160] According to Table 1, the PSNR value, SSIM value, and FSIM value obtained by the color image completion method provided by the present application are all higher than those of the four comparison methods, HaLRTC, KBRTC, t-SVD, and TNN. This also illustrates the advantage of the color image completion method provided by the present application in maintaining feature consistency, and the result obtained can obtain smaller feature distortion. The experimental results on multiple color images show that the color image completion method provided by the embodiment of the present application has strong data adaptability, high robustness, and high completion accuracy.
[0161] In summary, the embodiment of the present application provides a color image completion method, which can be used in the fields of image and video restoration, missing information completion in compressed images, remote sensing image declouding, etc., based on the inspiration of tensor low-rank clustering expression and the advantages of mid-level visual tasks over underlying tasks, by considering the low-dimensional subspace priors in the spatial and spectral domains, the inherent low-rank features in the hyperspectral image are sunk into the expression coefficient Z, so as to use the advantages of clustering in mid-level visual tasks to mine lower-dimensional features in the data. In order to ensure that the expression dictionary can contain important features in the image, a more complete dictionary is learned using the completion results of the benchmark completion method, and the learned dictionary is used as a feature dictionary to characterize the low-rank structure of the image and the lowest-rank subspace in the data, and the low-rank clustering expression advantage is used to ensure the accurate restoration of the low-dimensional structure. It can be expressed as a problem based on the tensor clustering framework, and the problem can be solved by the alternating direction multiplier method optimization algorithm.
[0162] Based on the same inventive concept, as shown in the attached Figure 4 As shown, the embodiment of the present application also provides a color image completion device, including:
[0163] An image acquisition module, used to acquire color images with missing information;
[0164] The image acquisition module is used to input the color image with missing information into the color image completion model to obtain the color image after information completion; wherein the color image completion model is constructed based on the regularization term constraint, and the regularization term constraint is , X represents the color image after information completion, represents the product between tensors, D represents the dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents interference noise.
[0165] Optionally, the dictionary is obtained by:
[0166] A method based on tensor nuclear norm is used to restore the color image with missing information to obtain a restored image;
[0167] Perform tensor singular value decomposition on the restored image to obtain the basis space of rows and the basis space of columns;
[0168] Take the product between the basis space of rows and the basis space of columns as a dictionary.
[0169] Optionally, the color image completion model includes the following formula (1):
[0170] (1)
[0171] Where L( ) represents the augmented Lagrangian function, represents the nuclear norm, represents the L1 norm, W is the auxiliary variable, λ is the regularization parameter between sparse and low rank, P1 and P2 are Lagrange multipliers, μ is the penalty term parameter, represents the F-norm, and <,> represents the inner product between matrices.
[0172] Optionally, formula (1) is obtained by the following steps:
[0173] Construct a degradation model; the degradation model is shown in formula (2):
[0174] Y=Ω(X)(2)
[0175] Where Y represents the color image with missing information, Ω is a binary support index tensor with the same size as the color image after information completion, the zero elements in Ω represent the missing elements in the color image with missing information, Ω(X)=Ω⊙X, ⊙ represents the element-by-element product between tensors;
[0176] Determine the objective function of the degradation model; the objective function of the degradation model is as follows:
[0177] (3)
[0178] Among them, min represents the minimum function, Ф(X) represents the prior information constraint of the color image after information completion;
[0179] Based on the dictionary, expression coefficients and interference noise, regular term constraints are constructed;
[0180] Based on the regularization term constraint and the objective function of the degradation model, the objective function of the color image completion model is determined; the objective function of the color image completion model is shown in formula (4):
[0181] (4)
[0182] By introducing auxiliary variables, formula (4) is transformed into the following formula (5):
[0183] (5)
[0184] Convert formula (5) into formula (1).
[0185] Optionally, the image acquisition module is specifically used for:
[0186] Substitute the color image with missing information into formula (2) to obtain the initial color image with complete information;
[0187] Substitute the initial color image after information completion into formula (1) for loop iteration;
[0188] In each iteration, the alternating direction multiplier method is used to alternately solve and update each variable in formula (1) by fixing other variables;
[0189] Until the preset conditions are met, the final color image with complete information is output.
[0190] Optionally, the image acquisition module is specifically used for:
[0191] Until the error between the color image updated in this round of iteration and the color image updated in the previous round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
[0192] Optionally, the image acquisition module is specifically used for:
[0193] Calculate the difference between the color image updated in this round of iteration and the color image updated in the previous round of iteration;
[0194] If the ratio between the F norm of the difference and the F norm of the color image updated in this round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
[0195] It should be noted that each module in the color image completion device in this embodiment corresponds one-to-one to each step in the color image completion method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned color image completion method, which will not be repeated here.
[0196] In addition, in one embodiment, the present application further provides a computer device, which includes a processor, a memory, and a computer program stored in the memory, wherein the computer program implements the aforementioned color image completion method when executed by the processor.
[0197] In addition, in one embodiment, the present application further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the aforementioned color image completion method is implemented.
[0198] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0199] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0200] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0201] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0202] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0203] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0205] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A color image completion method, characterized in that: The method comprises: Get color images with missing information; The color image with missing information is input into the color image completion model to obtain the color image after information completion; wherein the color image completion model is constructed based on the regularization term constraint, and the regularization term constraint is , X represents the color image after the information is completed, represents the product between tensors, D represents a dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents interference noise; The color image completion model includes the following formula (1): (1) Where L( ) represents the augmented Lagrangian function, represents the nuclear norm, represents the L1 norm, W is the auxiliary variable, λ is the regularization parameter between sparse and low rank, P1 and P2 are Lagrange multipliers, μ is the penalty term parameter, represents the F norm, <, > represents the inner product between matrices; The formula (1) is obtained by the following steps: A degradation model is constructed; the degradation model is shown in formula (2): Y=Ω(X)(2) Wherein, Y represents the color image with missing information, X represents the color image after the information is completed, Ω is a binary support index tensor with the same size as the color image after the information is completed, the zero element in Ω represents the missing element in the color image with missing information, Ω(X)=Ω⊙X, ⊙ represents the element-by-element product between tensors; Determine the objective function of the degradation model; the objective function of the degradation model is as follows: (3) Wherein, min represents the minimum function, and Φ(X) represents the prior information constraint of the color image after the information is completed; Constructing the regularization term constraint based on the dictionary, the expression coefficient and the interference noise; Based on the regularization term constraint and the objective function of the degradation model, the objective function of the color image completion model is determined; the objective function of the color image completion model is shown in formula (4): (4) By introducing the auxiliary variable, the formula (4) is converted into the following formula (5): (5) The formula (5) is converted into the formula (1).
2. The color image completion method according to claim 1, characterized in that: The dictionary is obtained by the following steps: Restoring the information-missing color image using a method based on tensor nuclear norm to obtain a restored image; Performing tensor singular value decomposition on the restored image to obtain a basis space of rows and a basis space of columns; The product of the basis space of the rows and the basis space of the columns is used as the dictionary.
3. The color image completion method according to claim 1, characterized in that: The step of inputting the information-missing color image into a color image completion model to obtain the information-completed color image comprises: Substituting the color image with missing information into formula (2) to obtain the initial color image after the information is completed; Substitute the initial color image after the information is completed into formula (1) for loop iteration; In each iteration, the alternating direction multiplier method is used to alternately solve and update each variable in formula (1) by fixing other variables; Until the preset conditions are met, the final color image with complete information is output.
4. The color image completion method according to claim 3, characterized in that: The method of outputting a final color image after information completion until a preset condition is met includes: Until the error between the color image updated in this round of iteration and the color image updated in the previous round of iteration is less than a preset threshold, the color image updated in this round of iteration is output.
5. The color image completion method according to claim 4, characterized in that: The step of outputting the color image updated in the current round of iteration until the error between the color image updated in the current round of iteration and the color image updated in the previous round of iteration is less than a preset threshold comprises: Calculate the difference between the color image updated in this round of iteration and the color image updated in the previous round of iteration; If the ratio between the F norm of the difference and the F norm of the color image after the current round of iterative update is less than the preset threshold, the color image after the current round of iterative update is output.
6. A color image completion device, characterized in that: include: An image acquisition module, used to acquire color images with missing information; The image acquisition module is used to input the color image with missing information into the color image completion model to obtain the color image after information completion; wherein the color image completion model is constructed based on the regularization term constraint, and the regularization term constraint is , X represents the color image after the information is completed, represents the product between tensors, D represents a dictionary, Z represents the expression coefficient corresponding to the dictionary, and E represents interference noise; the color image completion model includes the following formula (1): (1) Where L( ) represents the augmented Lagrangian function, represents the nuclear norm, represents the L1 norm, W is the auxiliary variable, λ is the regularization parameter between sparse and low rank, P1 and P2 are Lagrange multipliers, μ is the penalty term parameter, represents the F norm, <, > represents the inner product between matrices; The formula (1) is obtained by the following steps: A degradation model is constructed; the degradation model is shown in formula (2): Y=Ω(X)(2) Wherein, Y represents the color image with missing information, X represents the color image after the information is completed, Ω is a binary support index tensor with the same size as the color image after the information is completed, the zero element in Ω represents the missing element in the color image with missing information, Ω(X)=Ω⊙X, ⊙ represents the element-by-element product between tensors; Determine the objective function of the degradation model; the objective function of the degradation model is as follows: (3) Wherein, min represents the minimum function, and Φ(X) represents the prior information constraint of the color image after the information is completed; Constructing the regularization term constraint based on the dictionary, the expression coefficient and the interference noise; Based on the regularization term constraint and the objective function of the degradation model, the objective function of the color image completion model is determined; the objective function of the color image completion model is shown in formula (4): (4) By introducing the auxiliary variable, the formula (4) is converted into the following formula (5): (5) The formula (5) is converted into the formula (1).
7. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the color image completion method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the color image completion method according to any one of claims 1 to 5.
