Image cartoon texture separation method, device, electronic device and storage medium

Through the convolutional dictionary learning model based on PIANO algorithm, the problem of incomplete separation of image cartoon textures is solved, and more thorough separation and better handling of cartoon part details is achieved.

CN114004872BActive Publication Date: 2025-05-16中科瑞斯(北京)科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111283226.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2025-05-16
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

In the prior art, in the separation of cartoon textures in image cartoons, the separation between the cartoon parts and the texture parts is not thorough, and the details of the cartoon parts are not processed properly.

Method used

The convolutional dictionary learning model constructed based on the PIANO algorithm is used to determine the image objective function of the image to be separated, and the cartoon part and texture part of the image are separated by updating the texture part and cartoon part variables.

Benefits of technology

This achieves a more thorough separation of the cartoon part and texture part of the image, improving the detail processing effect of the cartoon part.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004872B_ABST
    Figure CN114004872B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device and storage medium for separating cartoon texture of an image. The method comprises: determining an image objective function of an image to be separated based on a convolution dictionary learning model constructed by a PIANO algorithm, wherein the image objective function comprises a texture part variable and a cartoon part variable of the image to be separated; updating the texture part variable and the cartoon part variable respectively based on the image objective function to obtain an updated texture part variable and an updated cartoon part variable; determining a cartoon part and a texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable. The scheme can make the separation of the cartoon part and the texture part of the image more thorough.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method, a device, an electronic device and a storage medium for separating cartoon textures of an image. Background Art

[0002] Cartoon texture separation technique, as the name implies, decomposes an image into a texture component containing highly oscillating or pseudo-random patterns, and a cartoon part which is a piecewise smooth image.

[0003] Currently, many image separation algorithms solve this problem by applying priors to both components. For the cartoon part, people usually use the isotropic total variation norm. As for the texture component, texture modeling is more difficult. Papyan once used the SBDL algorithm to separate the cartoon texture part of the image, and Peng also used the AFB algorithm for separation, but the separation of the cartoon part and the texture part was not thorough, and the details of the cartoon part were not handled properly. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a method, device, electronic device and storage medium for separating cartoon textures of an image.

[0005] To solve the above technical problems, the embodiments of the present application are implemented in the following ways:

[0006] In a first aspect, the present application provides a method for separating cartoon texture of an image, the method comprising:

[0007] Based on the convolution dictionary learning model constructed by the PIANO algorithm, the image objective function of the image to be separated is determined. The image objective function includes the texture part variables and the cartoon part variables of the image to be separated.

[0008] Based on the image objective function, the texture part variables and the cartoon part variables are updated respectively to obtain updated texture part variables and updated cartoon part variables;

[0009] The cartoon part and the texture part of the image to be separated are determined according to the updated texture part variable and the updated cartoon part variable.

[0010] In one embodiment, the objective function of the PIANO algorithm is:

[0011]

[0012] Among them, D L is a local convolution dictionary with n rows and m columns; α l,i is m columns, which is the sparse code of component i of each sample l; For N rows and n columns, put the i-th position into D L αl,i operator and fill the remaining entries with zeros; y l is the obtained signal; λ1 and λ2 are hyperparameters; Ω1 is the signal applied to The sparse constraint on the column vector of the norm is defined as Ω1(x) = ||x||0; Ω2 is the indicator function, defined as follows: Where C is a unit norm sphere that limits the length of each atom, and D L Each column of norm,

[0013] Define f and g as follows:

[0014]

[0015]

[0016] The gradient of f is:

[0017]

[0018] in,

[0019]

[0020] The proximal mapping of g is:

[0021]

[0022] Among them, prox represents the proximal operator, is the intermediate variable,

[0023]

[0024]

[0025] Among them, η t is the step length.

[0026] In one embodiment, the texture part variables include a texture dictionary and a code corresponding to the texture dictionary; the cartoon part variables include a cartoon variable, a dual variable of the cartoon variable, and an error variable;

[0027] The convolution dictionary learning model built based on the PIANO algorithm determines the image objective function of the image to be separated, including:

[0028] Based on the objective function of the PIANO algorithm, the first objective function of the image to be separated is determined as:

[0029]

[0030] Among them, (D L ) l,T is the texture dictionary, (α l,i ) l,T is the encoding corresponding to the texture dictionary; y l,c is the cartoon variable; y l is the image to be separated;

[0031] Take the cartoon variable y l,c for y l,c =Z l,c , Z l,c is the dual variable of the cartoon variable;

[0032] Determine the constraints based on cartoon variables, dual variables and error variables;

[0033] Add the constraint term to the first objective function to obtain the image objective function of the image to be separated:

[0034]

[0035] Among them, V l,c is the error variable, η and ξ are the Lagrange coefficients.

[0036] In one embodiment, based on the image objective function, updating the texture part variable and the cartoon part variable respectively to obtain the updated texture part variable and the updated cartoon part variable comprises:

[0037] Update the code to obtain the updated code;

[0038] Update the cartoon variable to obtain the updated cartoon variable;

[0039] Update the dual variable to obtain the updated dual variable;

[0040] Update the error variable to obtain the updated error variable; the error variable is determined according to the cartoon variable and the dual variable;

[0041] Update the texture dictionary to obtain an updated texture dictionary;

[0042] According to the updated code and the updated texture dictionary, an updated texture part variable is obtained;

[0043] According to the updated cartoon variables, the updated dual variables and the updated error variables, the updated cartoon partial variables are obtained.

[0044] In one embodiment, the dual variable is updated by:

[0045]

[0046] Here, η is the Lagrange constant.

[0047] In one of the embodiments, the dual variables are updated using a total variation model denoising method.

[0048] In one embodiment, determining the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable includes:

[0049] According to the updated texture part variables, the texture part of the image to be separated is reconstructed;

[0050] According to the updated cartoon part variable, the cartoon part of the image to be separated is obtained.

[0051] In a second aspect, the present application provides a cartoon texture separation device for an image, the device comprising:

[0052] A first determination module is used to determine an image objective function of an image to be separated based on a convolution dictionary learning model constructed based on a PIANO algorithm, wherein the image objective function includes a texture part variable and a cartoon part variable of the image to be separated;

[0053] An updating module, used for updating the texture part variables and the cartoon part variables respectively based on the image objective function to obtain updated texture part variables and updated cartoon part variables;

[0054] The second determination module is used to determine the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable.

[0055] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for separating cartoon textures of an image as in the first aspect is implemented.

[0056] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for separating cartoon textures of an image as in the first aspect.

[0057] It can be seen from the technical solution provided in the above embodiments of this specification that:

[0058] Based on the convolution dictionary learning model constructed by the PIANO algorithm, the image objective function of the image to be separated is determined, the texture part variables and the cartoon part variables are updated based on the image objective function, and the cartoon part and texture part of the image to be separated are determined according to the updated variables, which can make the separation of the cartoon part and the texture part of the image more thorough. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0060] Figure 1 A schematic diagram of the process of separating cartoon texture of an image provided by this application;

[0061] Figure 2 The image to be separated provided for this application;

[0062] Figure 3 for Figure 2 The texture part of the image to be separated is obtained by separating the image using the cartoon texture separation method provided in this application;

[0063] Figure 4 for Figure 2 The cartoon part obtained by separating the image to be separated using the cartoon texture separation method of the image provided in the present application;

[0064] Figure 5 A schematic diagram of the structure of the cartoon texture separation device for images provided in this application;

[0065] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0066] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0067] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0068] It will be apparent to those skilled in the art that various modifications and variations may be made to the specific embodiments of the present application description without departing from the scope or spirit of the present application. Other embodiments derived from the present application description will be apparent to those skilled in the art. The present application description and examples are exemplary only.

[0069] The words “include,” “including,” “have,” “contain,” etc. used in this document are open-ended terms, meaning including but not limited to.

[0070] Unless otherwise specified, "parts" in this application are all calculated by mass.

[0071] The present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0072] Reference Figure 1 , which shows a flow chart of a cartoon texture separation method applicable to an image provided in an embodiment of the present application.

[0073] like Figure 1 As shown, the cartoon texture separation method may include:

[0074] S110, based on the convolution dictionary learning model constructed by the PIANO algorithm, determining the image objective function of the image to be separated, where the image objective function includes texture part variables and cartoon part variables of the image to be separated.

[0075] Specifically, the image to be separated is an image including a cartoon part and a texture part.

[0076] Aiming at the non-convex and non-smooth Convolutional Dictionary Learning (CDL) model problem, a PIANO algorithm is proposed to solve the CDL model problem, which can obtain the corresponding new CDL model.

[0077] In one embodiment, the PIANO algorithm adopts the idea based on local processing and proposes the objective function as:

[0078]

[0079] Among them, D L is a local convolution dictionary with n rows and m columns; α l,i is m columns, which is the sparse code of component i of each sample l; For N rows and n columns, put the i-th position into D L α l,i and fill the remaining entries with zeros; y l is the obtained signal; λ1 and λ2 are hyperparameters; Ω1 is the value imposed on The sparse constraint on the column vector of the norm is defined as Ω1(x) = ||x||0; Ω2 is the indicator function, defined as follows: Where C is a unit norm sphere that limits the length of each atom, and D L Each column of norm,

[0080] In order to formulate the objective function of the proposed CDL optimization problem by local processing within the forward-backward splitting framework, let Define f and g as follows:

[0081]

[0082]

[0083] In order to use the sequence {x t Iteration equation of Generate Sequence The gradient of f and the proximal mapping of g will be derived later.

[0084] f is a composite variable (D L , {α l,i}), then the gradient of f is expressed as: It can be deduced by and The expression for f gives the gradient of f.

[0085] and It can be calculated as follows:

[0086]

[0087]

[0088] In order to represent the descending result, an intermediate variable is introduced

[0089]

[0090]

[0091] Among them, η t is the step size or descent parameter. η t The value range of 0<η t <(1 / (τ t L t )), where {τ t} is the adaptive parameter, τ t The value range of τ t >1,Lt It can be solved by the following formula:

[0092]

[0093] In order to ensure the convergence of the algorithm, the descent theorem is used to constrain the parameters:

[0094]

[0095] Therefore, calculate g in The proximal mapping is as follows:

[0096]

[0097] Here, prox represents the proximal operator.

[0098] For the solved CDL problem, based on the proposed PIANO algorithm, the corresponding new CDL model is obtained, and the texture component will be modeled using the new CDL model. The objective function of the new CDL model (i.e., the first objective function of the image to be separated) is:

[0099]

[0100] Among them, (D L ) l,T is the texture dictionary, (α l,i ) l,T is the encoding corresponding to the texture dictionary; y l,c is the cartoon variable; y l The image to be separated.

[0101] Take the cartoon variable y l,c for y l,c =Z l,c , so that it can be minimized under the TV norm, Z l,c is the dual variable of the cartoon variable.

[0102] Determine the constraints based on cartoon variables, dual variables and error variables;

[0103] At the same time, the constraint term is added to the first objective function to obtain the image objective function of the image to be separated:

[0104]

[0105] Among them, V l,c is the error variable, η and ξ are the Lagrange coefficients.

[0106] S120 , based on the image objective function, respectively updating the texture part variables and the cartoon part variables to obtain updated texture part variables and updated cartoon part variables.

[0107] Specifically, the code is updated to obtain an updated code; this updating process has been completed in the CDL model.

[0108] Update the cartoon variable to obtain the updated cartoon variable; the update can be updated by the following formula:

[0109]

[0110] Here, η is the Lagrange constant.

[0111] Update the dual variable to obtain the updated dual variable; the update process can be directly solved by the total variation (TV) model denoising method. That is, the regularization term is constrained by the two norms, and the horizontal and vertical directions of the dual variable are constrained by the one norm gradient. The dual variable is solved by the augmented Lagrangian method, specifically the ADMM method with Gauss Seidel.

[0112] For the objective function

[0113]

[0114] Solve as follows:

[0115]

[0116] Right now

[0117] Update the error variable to obtain the updated error variable; the error variable is determined according to the cartoon variable and the dual variable; the update can update the error variable by using the iterative relationship between the error variable and the texture part. l,c The update rule can be defined as l,c and Z l,c Fixed-point iteration of the difference (when y l,c and Z l,c When they converge, V l,c converges), as shown below:

[0118] V l,c =V l,c +y l,c -Z l,c

[0119] Update the texture dictionary to obtain an updated texture dictionary;

[0120] According to the updated code and the updated texture dictionary, an updated texture part variable is obtained;

[0121] According to the updated cartoon variables, the updated dual variables and the updated error variables, the updated cartoon partial variables are obtained.

[0122] S130 , determining a cartoon part and a texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable.

[0123] Optionally, reconstructing the texture part of the image to be separated according to the updated texture part variable;

[0124] According to the updated cartoon part variable, the cartoon part of the image to be separated is obtained.

[0125] The texture part of the image to be separated and the cartoon part of the image to be separated are obtained respectively, that is, the cartoon texture separation of the image is completed.

[0126] In the embodiment of the present application, the proposed PIANO algorithm is adopted. In solving the problem of non-convex and non-smooth convolutional dictionary learning model, the PIANO algorithm is based on the forward-backward splitting framework and adopts the coding strategy to solve. The objective function of this CDL model problem is given by the sum of the data fidelity term and the regularization term. The former is a smooth coupling function with block-Lipschitz continuous gradient, and the latter is a block-separable non-smooth non-convex function, which is easy to calculate the approximate mapping. By performing gradient solution on the former and proximal mapping on the latter, the iterative formula of the algorithm is obtained, thereby updating the variables and solving the problem. The amount of calculation can be reduced.

[0127] The embodiment of the present application uses the update process in the PIANO algorithm to effectively update the variables related to the texture part and the cartoon part, thereby helping to separate the cartoon part and the texture part of the image, and the separation can be more thorough and the effect is better.

[0128] The cartoon texture separation method of the image of the embodiment of the present application is used for Figure 2 The CAT shown was separated to obtain Figure 3 The texture part shown and Figure 4 From the cartoon part shown, it can be seen that the texture part and the cartoon part are separated more thoroughly.

[0129] Reference Figure 5 , which shows a schematic structural diagram of a cartoon texture separation device for an image described according to an embodiment of the present application.

[0130] like Figure 5 As shown, the cartoon texture separation device of the image may include:

[0131] A first determination module 510 is used to determine an image objective function of an image to be separated based on a convolution dictionary learning model constructed based on a PIANO algorithm, wherein the image objective function includes a texture part variable and a cartoon part variable of the image to be separated;

[0132] An updating module 520, used for updating the texture part variables and the cartoon part variables respectively based on the image objective function to obtain updated texture part variables and updated cartoon part variables;

[0133] The second determination module 530 is used to determine the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable.

[0134] Optionally, the objective function of the PIANO algorithm is:

[0135]

[0136] Among them, D L is a local convolution dictionary with n rows and m columns; α l,i is m columns, which is the sparse code of component i of each sample l; For N rows and n columns, put the i-th position into D L α l,i operator and fill the remaining entries with zeros; y l is the obtained signal; λ1 and λ2 are hyperparameters; Ω1 is the signal applied to The sparse constraint on the column vector of the norm is defined as Ω1(x) = ||x||0; Ω2 is the indicator function, defined as follows: Where C is a unit norm sphere that limits the length of each atom, and D L Each column of norm,

[0137] Define f and g as follows:

[0138]

[0139]

[0140] The gradient of f is:

[0141]

[0142] in,

[0143]

[0144] The proximal mapping of g is:

[0145]

[0146] Among them, prox represents the proximal operator, is the intermediate variable,

[0147]

[0148]

[0149] Among them, η t is the step length.

[0150] Optionally, the texture part variables include a texture dictionary and a code corresponding to the texture dictionary; the cartoon part variables include a cartoon variable, a dual variable of the cartoon variable, and an error variable;

[0151] The first determining module 510 is further configured to:

[0152] Based on the objective function of the PIANO algorithm, the first objective function of the image to be separated is determined as:

[0153]

[0154] Among them, (D L ) l,T is the texture dictionary, (α l,i ) l,T is the encoding corresponding to the texture dictionary; y l,c is the cartoon variable; y l is the image to be separated;

[0155] Take the cartoon variable y l,c for y l,c =Z l,c , Z l,c is the dual variable of the cartoon variable;

[0156] Determine the constraints based on cartoon variables, dual variables and error variables;

[0157] Add the constraint term to the first objective function to obtain the image objective function of the image to be separated:

[0158]

[0159] Among them, V l,c is the error variable, η and ξ are the Lagrange coefficients.

[0160] Optionally, the updating module 520 is further configured to:

[0161] Update the code to obtain the updated code;

[0162] Update the cartoon variable to obtain the updated cartoon variable;

[0163] Update the dual variable to obtain the updated dual variable;

[0164] Update the error variable to obtain the updated error variable; the error variable is determined according to the cartoon variable and the dual variable;

[0165] Update the texture dictionary to obtain an updated texture dictionary;

[0166] According to the updated code and the updated texture dictionary, an updated texture part variable is obtained;

[0167] According to the updated cartoon variables, the updated dual variables and the updated error variables, the updated cartoon partial variables are obtained.

[0168] Optionally, the dual variable is updated as follows:

[0169]

[0170] Here, η is the Lagrange constant.

[0171] Optionally, the dual variables are updated using a total variation model denoising method.

[0172] Optionally, the second determining module 530 is further configured to:

[0173] According to the updated texture part variables, the texture part of the image to be separated is reconstructed;

[0174] According to the updated cartoon part variable, the cartoon part of the image to be separated is obtained.

[0175] The present embodiment provides a cartoon texture separation device for an image, which can execute the embodiment of the above method. Its implementation principle and technical effect are similar and will not be described in detail here.

[0176] Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 As shown, a schematic diagram of the structure of an electronic device 300 suitable for implementing an embodiment of the present application is shown.

[0177] like Figure 6 As shown, the electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage part 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 are also stored. The CPU 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0178] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 306 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.

[0179] In particular, according to the embodiments of the present disclosure, the above reference Figure 1 The described process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program contains program code for performing the above-mentioned cartoon texture separation method of the image. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 309, and / or installed from the removable medium 311.

[0180] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of the code, and the aforementioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0181] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not constitute limitations on the units or modules themselves in certain circumstances.

[0182] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop, a mobile phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0183] As another aspect, the present application further provides a storage medium, which may be the storage medium included in the aforementioned device in the above embodiment; or may be a storage medium that exists independently and is not assembled into the device. The storage medium stores one or more programs, and the aforementioned programs are used by one or more processors to execute the method for separating cartoon textures of images described in the present application.

[0184] Storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0185] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device 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, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0186] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for separating cartoon texture of an image, characterized in that: The method comprises: Based on the convolution dictionary learning model constructed by the PIANO algorithm, an image objective function of the image to be separated is determined, wherein the image objective function includes a texture part variable and a cartoon part variable of the image to be separated; Based on the image objective function, respectively updating the texture part variable and the cartoon part variable to obtain an updated texture part variable and an updated cartoon part variable; Determine the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable; The objective function of the PIANO algorithm is: Among them, D L is a local convolution dictionary with n rows and m columns; α l,i is m columns, which is the sparse code of component i of each sample l; For N rows and n columns, put the i-th position into D L α l,i operator and fill the remaining entries with zeros; y l is the obtained signal; λ1 and λ2 are hyperparameters; Ω1 is a sparse constraint imposed on a column vector with l0 norm, defined as Ω1(x) = ||x||0; Ω2 is an indicator function, defined as follows: Where C is a unit norm sphere that limits the length of each atom, and D L Each column of is the l2 norm, Define f and g as follows: The gradient of f is: in, The proximal mapping of g is: Among them, prox represents the proximal operator, is the intermediate variable, Among them, η t is the step length.

2. The method according to claim 1, characterized in that The texture part variables include a texture dictionary and a code corresponding to the texture dictionary; the cartoon part variables include a cartoon variable, a dual variable of the cartoon variable and an error variable; The convolution dictionary learning model constructed based on the PIANO algorithm determines the image objective function of the image to be separated, including: Based on the objective function of the PIANO algorithm, the first objective function of the image to be separated is determined as: Among them, (D L ) l,T is the first signal y l The local convolution dictionary corresponding to the texture component T of (α l,i ) l,T is the first signal y l The sparse coding of the texture component T corresponding to the component i"; y l,c is the cartoon variable; y l is the image to be separated; Take the cartoon variable y l,c for y l,c =Z l,c , the Z l,c is the dual variable of the cartoon variable; Determining constraint items according to the cartoon variables, the dual variables and the error variables; The constraint term is added to the first objective function to obtain the image objective function of the image to be separated: Among them, V l,c is the error variable, ρ and ξ are the Lagrangian coefficients.

3. The method according to claim 2, characterized in that The updating of the texture part variable and the cartoon part variable based on the image objective function to obtain updated texture part variable and updated cartoon part variable comprises: Updating the code to obtain an updated code; Updating the cartoon variable to obtain an updated cartoon variable; Updating the dual variable to obtain an updated dual variable; Updating the error variable to obtain an updated error variable; the error variable is determined according to the cartoon variable and the dual variable; Updating the texture dictionary to obtain an updated texture dictionary; Obtaining the updated texture part variable according to the updated code and the updated texture dictionary; The updated cartoon partial variables are obtained according to the updated cartoon variables, the updated dual variables and the updated error variables.

4. The method according to claim 3, characterized in that The dual variable is updated by the following formula: Where ρ is the Lagrange coefficient.

5. The method according to claim 3, characterized in that: The updating of the dual variables adopts a total variation model denoising method.

6. The method according to any one of claims 3 to 5, characterized in that: The step of determining the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable comprises: Reconstructing the texture part of the image to be separated according to the updated texture part variable; The cartoon part of the image to be separated is obtained according to the updated cartoon part variable.

7. A cartoon texture separation device for an image, characterized in that: The device comprises: A first determination module is used to determine an image objective function of an image to be separated based on a convolution dictionary learning model constructed based on a PIANO algorithm, wherein the image objective function includes a texture part variable and a cartoon part variable of the image to be separated; An updating module, used for updating the texture part variable and the cartoon part variable respectively based on the image objective function to obtain an updated texture part variable and an updated cartoon part variable; A second determination module, used for determining the cartoon part and the texture part of the image to be separated according to the updated texture part variable and the updated cartoon part variable; The objective function of the PIANO algorithm is: Among them, D L is a local convolution dictionary with n rows and m columns; α l,i is m columns, which is the sparse code of component i of each sample l; For N rows and n columns, put the i-th position into D L α l,i operator and fill the remaining entries with zeros; y l is the obtained signal; λ1 and λ2 are hyperparameters; Ω1 is a sparse constraint imposed on a column vector with l0 norm, defined as Ω1(x) = ||x||0; Ω2 is an indicator function, defined as follows: Where C is a unit norm sphere that limits the length of each atom, and D L Each column of is the l2 norm, Define f and g as follows: The gradient of f is: in, The proximal mapping of g is: Among them, prox represents the proximal operator, is the intermediate variable, Among them, η t is the step length.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for separating cartoon texture of an image as described in any one of claims 1 to 6 is implemented.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for separating cartoon texture of an image as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Single image super-resolution reconstruction method based on image nonlocal self-similarity

    CN106952228A

  • Online convolutional dictionary learning

    US20180349319A1