A method and image processing system for watercolor stylization of an image
Patent Information
- Application Number
- CN202610061126.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]现有技术普遍采用单阶段处理流程,将图像风格化视为一次性变换过程,无法模仿画家“先铺大色调、后加细节、最后提亮”的层次化作画步骤,这种处理方式导致生成的图像要么细节全部丢失,要么缺乏水彩特有的虚实对比和留白艺术效果,难以达到专业级水彩画作的标准;
1、本发明通过构建“颜料扩散与沉积”的物理模型仿真框架,将传统静态滤镜方法提升为动态过程仿真,实现了水彩风格生成机制的本质创新,通过引入水分层、颜料浓度层和纸张纹理层的三层分解架构,并结合改进的流体动力学简化方程,本发明能够精确模拟颜料在湿润状态下的非均匀扩散行为和在干燥状态下的颗粒沉积效应,这种基于物理的仿真方法不仅使生成的“湿边”渗化效果具有高度的真实感,而且通过水流动方向场的引入,能够复现自然重力作用下颜料的定向流动特征,相比传统卷积-based方法产生了更具生命力的动态美感,用户可通过调节水含量、干燥速度等直观物理参数实时控制效果,大幅提升了创作的可解释性和艺术表达的精确性,使数字水彩创作过程更接近真实绘画体验;
Smart Images

Figure CN122888041A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image watercolorization technology, specifically to a method and image processing system for watercolor-style image processing. Background Technology
[0002] Watercolor painting, as an important traditional art form, is renowned for its unique pigment fluidity, transparent layering effects, and random diffusion aesthetics. With the development of digital image processing technology, transforming ordinary digital photographs into artistically compelling watercolor-style images has become a research hotspot in the field of computer graphics.
[0003] Existing technologies generally adopt a single-stage processing flow, treating image stylization as a one-time transformation process. This cannot imitate the painter's layered painting steps of "first laying down the main color tone, then adding details, and finally brightening". This processing method results in the generated image either losing all details or lacking the unique contrast between light and dark and the artistic effect of white space in watercolor, making it difficult to reach the standard of professional-grade watercolor paintings. In addition, while this method based on Generative Adversarial Networks (GANs) or Style Transfer Neural Networks can produce visually realistic watercolor effects, these methods are "black box" operations, meaning users cannot intervene in or understand the internal processing. Therefore, we propose a method and image processing system for watercolor stylizing images. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, at least one technical problem raised in the background art is solved.
[0005] The present invention solves the above-mentioned technical problems by adopting the following technical solutions: Firstly, a method for stylizing images using watercolor techniques is provided, including the following steps: S1. Decompose the input digital image into three basic physical property layers: water layer, pigment concentration layer, and paper texture layer. S2. Based on the water stratification, the wet area is detected, and the non-uniform diffusion process of pigment in the wet area is simulated by the improved simplified equation of fluid dynamics, forming a wet edge diffusion effect. S3. Perform pigment deposition simulation in the dry area, convolve and fuse the pigment particles with the paper texture layer to generate deposition texture features; S4. Extract the main color tone and brightness relationship of the input image to generate a low-saturation, large-color-block underlying rendering image; S5. Identify important edges and texture details in the input image, convert them into dry brush stroke effects, and overlay them onto the underlying rendered image with transparent blending. S6. Detect highlight areas based on brightness threshold and probability model, perform white space protection operation, and generate the final watercolor-style image.
[0006] Preferably, the non-uniform diffusion process in step S2 employs the following improved simplified hydrodynamic equations:
[0007] Where C(x,y,t) is the pigment concentration at position (x,y) at time t, and D w (x,y) is the location-dependent water diffusion coefficient, v(x,y) is the water flow direction field derived from the image gradient, and S(x,y,t) is the source term representing the continuous release of pigment.
[0008] Preferably, the moisture diffusion coefficient D w (x,y) is defined as:
[0009] Where W(x,y)∈[0,1] is the water content normalized by the water layer, T(x,y) is the roughness of the paper texture layer, D0 is the basic diffusion coefficient, and α is the texture influence weighting factor.
[0010] Preferably, the pigment deposition simulation in step S3 uses the following deposition equation:
[0011] Where Cdry is the pigment concentration in the dry region, P(·) is the point diffusion function based on paper texture, and Θ(x′,y′) is the deposition mask function, with a value of 1 in the dry region and a value of 0 in the wet region.
[0012] Preferably, the dry brushstroke effect generation in step S5 includes: Edge detection is performed on the input image to obtain the structure tensor S = ∇I⊗∇I, where ∇I is the image gradient; The stroke path is generated by sampling along the edge tangent direction: r(s) = r0 + ∫0 s t(u)du, where t is the tangential direction; Apply the pigment opacity decay function A(s) = A0·e along the brush stroke path -βs , where β is the brushstroke drying coefficient.
[0013] Preferably, the white space protection operation in step S6 adopts a dual-threshold probability model:
[0014] Among them, I lum For the image luminance component, T high and T lowThese are the high and low brightness thresholds, respectively. Let γ be the probability of leaving blank space, and let γ be the random factor for hand-drawing.
[0015] Secondly, an image processing system for stylizing images in a watercolor style is provided, including: The physical parameter mapping module is configured to receive an input image and generate the water layer, pigment concentration layer, and paper texture layer. A diffusion simulation engine, configured to perform numerical solutions to the improved simplified hydrodynamic equations, simulates the non-uniform diffusion process of pigments in wet regions; The deposition synthesis module is configured to perform pigment deposition simulation in the dry area and blend it with the paper texture. The hierarchical processing pipeline includes a series of low-level generation modules, brush-stroke detail modules, and white space decision and compositing modules. The user interface is configured to receive user input for adjusting physical parameters such as water content, drying speed, and brush stroke intensity.
[0016] Preferably, the diffusion simulation engine uses a semi-Lagrangian method to numerically solve the improved simplified hydrodynamic equations, with the time step Δt adaptively adjusted according to the CFL conditions.
[0017] Among them, C CFL ∈(0,1] is the CFL number, and Δx is the grid spacing.
[0018] Preferably, the hierarchical processing pipeline adopts an interruptible and editable architecture, with each module outputting intermediate layer image data, allowing users to manually correct any intermediate layer before continuing subsequent processing.
[0019] Preferably, the paper texture layer is generated in the following manner: Texture primitives were extracted by wavelet decomposition based on scanned images of real watercolor paper. Alternatively, controllable textures can be created by superimposing Burmester noise.
[0020] Where w i These are the weighting coefficients for each scale.
[0021] Compared with existing technologies, the present invention provides a method and image processing system for stylizing images using watercolor techniques, which has the following beneficial effects: 1. This invention elevates the traditional static filter method to a dynamic process simulation by constructing a physical model simulation framework for "pigment diffusion and deposition," achieving a fundamental innovation in the watercolor style generation mechanism. By introducing a three-layer decomposition architecture of water layer, pigment concentration layer, and paper texture layer, and combining it with improved simplified fluid dynamics equations, this invention can accurately simulate the non-uniform diffusion behavior of pigments in a wet state and the particle deposition effect in a dry state. This physics-based simulation method not only makes the generated "wet edge" diffusion effect highly realistic, but also reproduces the directional flow characteristics of pigments under natural gravity by introducing the water flow direction field. Compared with the traditional convolution-based method, it produces a more vibrant dynamic aesthetic. Users can control the effect in real time by adjusting intuitive physical parameters such as water content and drying speed, which greatly improves the interpretability of creation and the accuracy of artistic expression, making the digital watercolor creation process closer to the real painting experience. 2. The hierarchical processing architecture of "painting step decomposition" proposed in this invention can fundamentally solve the pain points of "black box" operation and uninterrupted operation in existing technologies. Through the interconnected underlying generation module, brushstroke detail module, and white space decision and synthesis module, this invention completely reproduces the creative process of a professional watercolor painter. Each module can be independently optimized and adjusted, and users can manually correct it at any intermediate layer. This editable pipeline architecture not only makes the algorithm more fault-tolerant and flexible, but also realizes the artistic intelligent processing of detail brushstrokes and highlight white space through the dry brushstroke generation algorithm based on structural tensor and the white space protection mechanism based on dual threshold probability model. In particular, the white space decision module, by combining the probability model of optical laws and hand-drawn random factors, can introduce appropriate artistic randomness while maintaining the semantic key highlights of the image, perfectly capturing the essence of "white space is light" in watercolor painting. Compared with deep learning methods that require retraining the model to adjust the style, this invention realizes a new digital watercolor creation paradigm that is parameterized, modular, and interventionist, achieving significant improvements in computational efficiency, artistic controllability, and result diversity. It can be widely used in digital art creation, photography post-processing, animation production, and other fields. Attached Figure Description
[0022] Figure 1 This is a flowchart of a method for stylizing images using watercolor techniques according to the present invention; Figure 2 This is a structural diagram of an image processing system module for stylizing images using watercolor techniques, as described in this invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1 Please see Figure 1 As shown, a method for stylizing an image using watercolor techniques includes the following steps: S1. Decompose the input digital image into three basic physical property layers: water layer, pigment concentration layer, and paper texture layer. S2. Based on water stratification, wet area detection is performed. The non-uniform diffusion process of pigment in the wet area is simulated by an improved simplified equation of fluid dynamics, forming a wet edge diffusion effect. S3. Perform pigment deposition simulation in the dry area, convolve and fuse pigment particles with the paper texture layer to generate deposition texture features; S4. Extract the main color tone and brightness relationship of the input image to generate a low-saturation, large-color-block underlying rendering image; S5. Identify important edges and texture details in the input image, convert them into dry brush stroke effects, and overlay them onto the underlying rendered image with transparent blending. S6. Detect highlight areas based on brightness threshold and probability model, perform white space protection operation, and generate the final watercolor-style image.
[0025] The non-uniform diffusion process in step S2 is represented by the following improved simplified hydrodynamic equations:
[0026] Where C(x,y,t) is the pigment concentration at position (x,y) at time t, and D w (x,y) is the location-dependent water diffusion coefficient, v(x,y) is the water flow direction field derived from the image gradient, and S(x,y,t) is the source term representing the continuous release of pigment.
[0027] Moisture diffusion coefficient D w (x,y) is defined as:
[0028] Where W(x,y)∈[0,1] is the water content normalized by the water layer, T(x,y) is the roughness of the paper texture layer, D0 is the basic diffusion coefficient, and α is the texture influence weighting factor.
[0029] The pigment deposition simulation in step S3 uses the following deposition equation:
[0030] Where Cdry is the pigment concentration in the dry region, P(·) is the point diffusion function based on paper texture, and Θ(x′,y′) is the deposition mask function, with a value of 1 in the dry region and a value of 0 in the wet region.
[0031] The dry brush stroke effect generation in step S5 includes: Edge detection is performed on the input image to obtain the structure tensor S = ∇I⊗∇I, where ∇I is the image gradient; The stroke path is generated by sampling along the edge tangent direction: r(s) = r0 + ∫0 s t(u)du, where t is the tangential direction; Apply the pigment opacity decay function A(s) = A0·e along the brush stroke path -βs , where β is the brushstroke drying coefficient.
[0032] The white space protection operation in step S6 adopts a dual-threshold probability model:
[0033] Among them, I lum For the image luminance component, T high and T low These are the high and low brightness thresholds, respectively. Let γ be the probability of leaving blank space, and let γ be the random factor for hand-drawing.
[0034] Specifically, the core innovation of this invention lies in treating watercolor stylization as a time-varying physical process rather than a static transformation. The input digital image is first decomposed into three basic physical property layers: 1. Water layer W(x,y)∈[0,1]: Represents the virtual water content at each pixel location, which is set by the user through the interactive interface or automatically inferred from the image content. Automatic inference can be achieved by using a saliency detection algorithm to map high saliency areas to low water content (dry areas) and background areas to high water content (wet areas). 2. Pigment concentration layer C0(x,y): It is directly converted from the RGB channels of the input image. It can be extracted from the ab channel of the Lab color space or the saturation channel of the HSV color space to better reflect the physical meaning of pigment concentration. 3. Paper texture layer T(x,y)∈[0,1]: provides substrate roughness information for pigment deposition; This system provides two generation methods: (1) High-resolution scanning of real watercolor paper (such as Archis 300g coarse texture paper) was performed, and texture primitives of different scales were extracted by wavelet decomposition to construct a texture dictionary; (2) The program generation method adopts an improved Burmester noise superposition: Where w i =[0.5,0.3,0.15,0.05] Controls the contribution at each scale.
[0035] Diffusion simulation in humid regions: For regions where water stratification W(x,y)>0.3, the system activates the diffusion simulation engine. This invention employs an improved convection and diffusion equation to describe the time-varying behavior of pigment concentration C(x,y,t):
[0036] The numerical solution uses a semi-Lagrange method to ensure stability. The specific implementation steps are as follows: Step 1.1, calculate the water flow direction field from the image gradient:
[0037] Where I gray The image is grayscale, and κ is a user-controllable flow intensity parameter. Step 1.2, at each time step, for grid points (x i y j Tracing the trajectory:
[0038] Concentration values at the traceback location were obtained using bilinear interpolation. Step 1.3, perform diffusion update:
[0039] Where the diffusion coefficient D w Adjust dynamically based on moisture content:
[0040] The value of D0 ranges from [0.5, 2.0], in pixels. 2 / time step; Step 1.4: Repeat the iteration until the moisture content in the wetted area drops below the threshold (simulating the drying process) or the maximum number of iterations is reached. The time step adaptive control satisfies the CFL condition.
[0041] Arid zone sedimentation simulation: For regions where W(x,y)≤0.3, the system performs a pigment deposition operation, which is modeled as the convolution of pigment concentration and paper texture:
[0042] Where P TThe texture-based point spread function is constructed as the product of a Gaussian kernel and texture modulation:
[0043] σ T It is determined by the roughness of the paper texture.
[0044] Example 2 Please see Figure 2 As shown, an image processing system for stylizing images using a watercolor style includes: The physical parameter mapping module is configured to receive an input image and generate a water layer, a pigment concentration layer, and a paper texture layer. A diffusion simulation engine is configured to perform numerical solutions to improved fluid dynamics simplification equations, simulating the non-uniform diffusion process of pigments in wet regions; The deposition synthesis module is configured to perform pigment deposition simulation in the dry area and blend it with the paper texture. The hierarchical processing pipeline includes a series of low-level generation modules, brush-stroke detail modules, and white space decision and compositing modules. The user interface is configured to receive user input for adjusting physical parameters such as water content, drying speed, and brush stroke intensity.
[0045] The diffusion simulation engine uses a semi-Lagrangian method to numerically solve the improved simplified fluid dynamics equations, with the time step Δt adaptively adjusted according to the CFL conditions.
[0046] Among them, C CFL ∈(0,1] is the CFL number, and Δx is the grid spacing.
[0047] The hierarchical processing pipeline adopts an interruptible and editable architecture. Each module outputs intermediate layer image data, allowing users to manually correct any intermediate layer before continuing subsequent processing.
[0048] The paper texture layer is generated in the following way: Texture primitives were extracted by wavelet decomposition based on scanned images of real watercolor paper. Alternatively, controllable textures can be created by superimposing Burmester noise.
[0049] Where w i These are the weighting coefficients for each scale.
[0050] Specifically, the second core innovation of this invention is to simulate the hierarchical creative process of a painter, with the processing pipeline consisting of three serially connected modules: The underlying generation module (lays out the main color tone). This module outputs the base layer I of a watercolor painting. base Emphasizing the blending effect of large color blocks: Step 2.1: Perform mean-shift clustering on the input image and extract 5-7 dominant colors as background color candidates; Step 2.2: Divide the image into 32×32 pixel superpixel blocks, calculate the average color within each block, and map it to the nearest dominant color; Step 2.3: Apply diffusion simulation to each superpixel boundary region, with parameters set to high water content (W=0.8) and low diffusion coefficient (D0=0.5) to simulate the watercolor "blend" technique and produce a soft boundary blending. Step 2.4, output a low-saturation (30% reduction in saturation) and low-contrast bottom layer image I. base .
[0051] Stroke detail module (add strokes) This module identifies important structures and transforms them into artistic brushstrokes: Step 2.5, calculate the image structure tensor:
[0052] Where I x I y Image gradient components; Step 2.6: Perform eigenvalue decomposition on the structure tensor to obtain the principal direction e1 and coherence. , where λ 1,2 For eigenvalues; Step 2.7: Generate a stroke path along the main direction e1. The path length l is proportional to the coherence.
[0053] Discrete pen touch point sequences are generated using the Bresenham algorithm or curve fitting. Step 2.8, apply paint opacity attenuation along the brushstroke path:
[0054] Among them, η introduces controllable random noise to simulate the "flying white" effect; Step 2.9: Overlay the generated brushstrokes onto I in Multiply mode. base Set the transparency to 60-80%.
[0055] White space decision and compositing module (highlight white space) This module intelligently determines the blank areas, embodying the essence of watercolor painting: Step 3.1: Convert the image to the CIELab color space and extract the luminance channel L. *Calculate the local average value μ L and standard deviation σ L ; Step 3.2, apply a dual threshold strategy: high threshold τ high =μ L +1.5σ L The above areas are forced to be left blank, with a low threshold τ. low =μ L +1.5σ L The following areas should not be left blank; Step 3.3, for the intermediate brightness region, a probabilistic model is used for decision-making:
[0056] The hand-drawn random factor γ∈[0.1,0.3] controls the white space density, and the Mersenne Twister random number generator is used for sampling. Step 3.4, combined with semantic information correction: forcibly remove the white space within 2 pixels around key structures such as facial areas and building outlines to avoid damaging the structural integrity; Step 3.5, generate the whitespace mask M reserve Synthesized with the underlying image:
[0057] Where I paper The background color of the paper.
[0058] System Architecture and Interaction Design Specifically, the processing system of this invention adopts a modular design, with each module exchanging data through a standard image buffer. The system provides a graphical user interface (GUI) including: Physical parameter panel: slider controls water content W (0-1), drying rate β (0.01-0.1), and diffusion coefficient D0 (0.5-2.0). Hierarchical editing panel: Displays three intermediate result previews: bottom layer, brush stroke layer, and white space mask. Users can manually modify these layers (such as adding or removing white space areas with a brush) before continuing the subsequent process. Preset Manager: Stores commonly used parameter combinations (such as "wet and bleed style" and "dry brush sketch style").
[0059] The system is implemented using GPU acceleration, and the diffusion simulation and convolution operations are parallelized using OpenCL or CUDA. The average processing time for 4K images is less than 3 seconds (NVIDIA RTX 3060).
[0060] Parameter adaptive optimization Specifically, to simplify operation, the system provides an automatic parameter inference function: Content-adaptive: Automatically increases water content for landscape images and decreases water content and enhances brush strokes for portrait images; Style transfer learning: Learns users' historical parameter selection through a lightweight neural network (3 convolutional layers, number of parameters <100K) to predict personalized preferences. The network input is the statistical features of the image (color histogram, gradient distribution), and the output is the recommendation parameter vector.
[0061] The network adopts an offline training and online inference mode, which does not increase runtime computational overhead.
[0062] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0063] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for stylizing images using watercolor techniques, characterized in that, Includes the following steps: S1. Decompose the input digital image into three basic physical property layers: water layer, pigment concentration layer, and paper texture layer. S2. Based on the water stratification, the wet area is detected, and the non-uniform diffusion process of pigment in the wet area is simulated by the improved simplified equation of fluid dynamics, forming a wet edge diffusion effect. S3. Perform pigment deposition simulation in the dry area, convolve and fuse the pigment particles with the paper texture layer to generate deposition texture features; S4. Extract the main color tone and brightness relationship of the input image to generate a low-saturation, large-color-block underlying rendering image; S5. Identify important edges and texture details in the input image, convert them into dry brush stroke effects, and overlay them onto the underlying rendered image with transparent blending. S6. Detect highlight areas based on brightness threshold and probability model, perform white space protection operation, and generate the final watercolor-style image.
2. The method for stylizing an image using watercolor techniques according to claim 1, characterized in that, The non-uniform diffusion process in step S2 employs the following improved simplified hydrodynamic equations: ; Where C(x,y,t) is the pigment concentration at position (x,y) at time t, and D w (x,y) is the location-dependent water diffusion coefficient, v(x,y) is the water flow direction field derived from the image gradient, and S(x,y,t) is the source term representing the continuous release of pigment.
3. The method for stylizing an image using watercolor techniques according to claim 2, characterized in that, The moisture diffusion coefficient D w (x,y) is defined as: ; Where W(x,y)∈[0,1] is the water content normalized by the water layer, T(x,y) is the roughness of the paper texture layer, D0 is the basic diffusion coefficient, and α is the texture influence weighting factor.
4. The method for stylizing an image using watercolor techniques according to claim 1, characterized in that, The pigment deposition simulation in step S3 uses the following deposition equation: ; Where Cdry is the pigment concentration in the dry region, P(·) is the point diffusion function based on paper texture, and Θ(x′,y′) is the deposition mask function, with a value of 1 in the dry region and a value of 0 in the wet region.
5. A method for stylizing an image using watercolor techniques according to claim 1, characterized in that, The dry brushstroke effect generation in step S5 includes: Edge detection is performed on the input image to obtain the structure tensor S = ∇I⊗∇I, where ∇I is the image gradient; The stroke path is generated by sampling along the edge tangent direction: r(s) = r0 + ∫0 s t(u)du, where t is the tangential direction; Apply the pigment opacity decay function A(s) = A0·e along the brush stroke path -βs , where β is the brushstroke drying coefficient.
6. A method for stylizing an image using watercolor techniques according to claim 1, characterized in that, The white space protection operation in step S6 adopts a dual-threshold probability model: ; Among them, I lum For the image luminance component, T high and T low These are the high and low brightness thresholds, respectively. Let γ be the probability of leaving blank space, and let γ be the random factor for hand-drawing.
7. An image processing system for watercolor stylizing an image, used to implement the method for watercolor stylizing an image according to any one of claims 1-6, characterized in that, include: The physical parameter mapping module is configured to receive an input image and generate the water layer, pigment concentration layer, and paper texture layer. A diffusion simulation engine, configured to perform numerical solutions to the improved simplified hydrodynamic equations, simulates the non-uniform diffusion process of pigments in wet regions; The deposition synthesis module is configured to perform pigment deposition simulation in the dry area and blend it with the paper texture. The hierarchical processing pipeline includes a series of low-level generation modules, brush-stroke detail modules, and white space decision and compositing modules. The user interface is configured to receive user input for adjusting physical parameters such as water content, drying speed, and brush stroke intensity.
8. The image processing system for watercolor stylizing an image according to claim 7, characterized in that, The diffusion simulation engine employs a semi-Lagrangian method to numerically solve the improved simplified hydrodynamic equations, with the time step Δt adaptively adjusted according to the CFL conditions. ; Among them, C CFL ∈(0,1] is the CFL number, and Δx is the grid spacing.
9. The image processing system for watercolor stylizing an image according to claim 7, characterized in that, The hierarchical processing pipeline adopts an interruptible and editable architecture. Each module outputs intermediate layer image data, allowing users to manually correct any intermediate layer before continuing subsequent processing.
10. The image processing system for watercolor stylizing an image according to claim 7, characterized in that, The paper texture layer is generated in the following manner: Texture primitives were extracted by wavelet decomposition based on scanned images of real watercolor paper. Alternatively, controllable textures can be created by superimposing Burmester noise. ; Where w i These are the weighting coefficients for each scale.