IP Library Granted Patent US 12664700
Granted Patent B2
US 12664700 · App. 18/023,953 · Granted Jun 23, 2026

Image drawing process generation method and apparatus, device, and storage medium

Inventors: Caijin Zhou (Beijing, CN); Xinghong Hu (Beijing, CN); Xiwen Cheng (Beijing, CN); Boheng Qiu (Beijing, CN); Yuyan Wang (Beijing, CN)
Assignee: BEIJING BYTEDANCE NETWORK TECHNOLOGY CO., LTD.
G06T11/23G06T11/60G06V10/761
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12664700
App. No.
18/023,953
Granted
Jun 23, 2026
Kind
B2
Abstract

An image drawing process generation method and apparatus, a device, and a storage medium. The method comprises: determining the brush size and brush position information of a brush object on a first brush layer on the basis of a detail parameter value of a pixel sampling point on the first brush layer set for a target image (S 101 ); then, saving the brush object on the first brush layer into a brush queue corresponding to the first brush layer (S 102 ); and finally, generating, on the basis of an attribute of each brush object in the brush queue, a drawing process of a target style image corresponding to the target image (S 103 ). The brush size and brush position information of a corresponding brush object are determined on the basis of a detail parameter value of each pixel sampling point, and determinations of attributes of brush objects are independent from each other, which improves the determination efficiency of the attributes of the brush objects, thereby improving the generation efficiency of an image drawing process.

Claims (77)

1 . A method for generating an image rendering process, comprising:

determining attributes of each of brush objects on a first brush layer set for a target image, based on detail parameter values of sampled pixels on the first brush layer, wherein the attributes comprise a brush size and brush position information;

storing the brush objects on the first brush layer, into a brush queue corresponding to the first brush layer; and

generating a rendering process of a target style of image corresponding to the target image, based on the attributes of the brush objects in the brush queue,

wherein the determining the attributes of each of the brush objects on the first brush layer set for the target image, based on the detail parameter values of the sampled pixels on the first brush layer, comprises:

determining at least one target rendering region on the first brush layer set for the target image; and

determining the attributes of each of brush objects in the target rendering region based on the detail parameter values of the sampled pixels in the target rendering region; and

storing the brush objects on the first brush layer, into the brush queue corresponding to the first brush layer comprises:

storing the brush objects within the target rendering region into the brush queue corresponding to the first brush layer sequentially, in accordance with a rendering sequence of the at least one target rendering region on the first brush layer.

2 . The method according to claim 1 , wherein the determining the attributes of each of the brush objects on the first brush layer set for the target image, based on the detail parameter values of the sampled pixels on the first brush layer, comprises:

sampling pixels on the first brush layer evenly based on a preset brush interval, to obtain the sampled pixels on the first brush layer;

calculating a detail parameter value of each of the sampled pixels, and determining whether the detail parameter value is within a detail range corresponding to the preset brush interval, wherein the detail parameter value indicates a richness of details of the sampled pixel; and

determining the brush position information of the brush object based on position information of the sampled pixel, and determining a brush size corresponding to the preset brush interval as the brush size of the brush object, in response to the detail parameter value being within the detail range corresponding to the preset brush interval.

3 . The method according to claim 2 , wherein the calculating the detail parameter value of each of the sampled pixels comprises:

calculating a gradient value of the sampled pixel in a first direction and a gradient value of the sampled pixel in a second direction;

constructing a structure tensor matrix corresponding to the sampled pixel, based on the gradient value of the sampled pixel in the first direction and the gradient value of the sampled pixel in the second direction; and

performing eigen decomposition on the structure tensor matrix to obtain the detail parameter value of the sampled pixel, wherein the detail parameter value is a greater eigenvalue of two eigenvalues obtained through the eigen decomposition, and the detail parameter value indicates a richness of details of the sampled pixel.

4 . The method according to claim 3 , wherein the attributes of the brush object further comprise a brush direction, and the method further comprises:

determining the brush direction of the brush object corresponding to the sampled pixel, based on a direction vector corresponding to a smaller eigenvalue of the two eigenvalues.

5 . The method according to claim 1 , wherein before storing the brush objects within the target rendering region into the brush queue corresponding to the first brush layer sequentially, in accordance with a rendering sequence of the at least one target rendering region on the first brush layer, the method further comprises:

disrupting a rendering sequence of the brush objects within the target rendering region randomly.

6 . The method according to claim 1 , wherein the attributes of the brush object further comprise a brush color; and

the brush color is determined based on a color value of a pixel corresponding to the brush position information of the brush object on the target image.

7 . The method according to claim 1 , wherein before generating a rendering process of a target style of image corresponding to the target image, based on the attributes of the brush objects in the brush queue, the method further comprises:

determining attributes of each of brush objects on a second brush layer set for the target image; and

storing the brush objects on the second brush layer, into a brush queue corresponding to the second brush layer; and

the generating the rendering process of the target style of image corresponding to the target image based on the attributes of the brush objects in the brush queue comprises:

setting a rendering sequence for the first brush layer and the second brush layer; and

rendering the brush objects on a canvas in accordance with the rendering sequence, based on the attributes of the brush objects in the brush queue corresponding to the first brush layer and the attributes of the brush objects in the brush queue corresponding to the second brush layer, to generate the rendering process of the target style of image corresponding to the target image.

8 . The method according to claim 7 , wherein the determining attributes of each of brush objects on the second brush layer set for the target image comprises:

sampling pixels on the second brush layer evenly based on a preset brush interval, to obtain sampled pixels on the second brush layer; and

determining position information of the sampled pixels as the brush position information of the brush objects on the second brush layer, and determining a preset brush size corresponding to the preset brush interval as the brush size of the brush object.

9 . The method according to claim 1 , wherein before generating the rendering process of the target style of image corresponding to the target image, based on the brush objects in the brush queue, the method further comprises:

setting, in response to the target image comprising a human face, a facial brush layer for the target image based on a human face region on the target image;

determining attributes of each of brush objects on the facial brush layer based on an area of the human face region; and

storing the brush objects on the facial brush layer, into a brush queue corresponding to the facial brush layer; and

the generating the rendering process of the target style of image corresponding to the target image, based on the attributes of the brush objects in the brush queue, comprises:

setting a rendering sequence for the first brush layer and the facial brush layer; and

rendering the brush objects on a canvas in accordance with the rendering sequence, based on the attributes of the brush objects in the brush queue corresponding to the first brush layer and the attributes of the brush objects in the brush queue corresponding to the facial brush layer, to generate the rendering process of the target style of image corresponding to the target image.

10 . The method according to claim 1 , wherein the determining at least one target rendering region on the first brush layer set for the target image comprises:

determining the at least one target rendering region on the first brush layer set for the target image, based on a similarity of color values of pixels on the target image.

11 . The method according to claim 1 , wherein after generating the rendering process of the target style of image corresponding to the target image, based on the brush objects in the brush queue, the method further comprises:

applying a bump mapping effect on the target style of image corresponding to the target image, after generating the target style of image corresponding to the target image.

12 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and the instructions, when executed on a terminal device, cause the terminal device to:

determine attributes of each of brush objects on a first brush layer set for a target image, based on detail parameter values of sampled pixels on the first brush layer, wherein the attributes comprise a brush size and brush position information;

store the brush objects on the first brush layer, into a brush queue corresponding to the first brush layer; and

generate a rendering process of a target style of image corresponding to the target image, based on the attributes of the brush objects in the brush queue,

wherein the instructions, when executed on a terminal device, cause the terminal device to:

determine at least one target rendering region on the first brush layer set for the target image; and

determine the attributes of each of brush objects in the target rendering region based on the detail parameter values of the sampled pixels in the target rendering region; and

store the brush objects within the target rendering region into the brush queue corresponding to the first brush layer sequentially, in accordance with a rendering sequence of the at least one target rendering region on the first brush layer.

13 . An apparatus, comprising:

a memory,

a processor, and

a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs a method for generating an image rendering process, wherein the method comprises:

determining attributes of each of brush objects on a first brush layer set for a target image, based on detail parameter values of sampled pixels on the first brush layer, wherein the attributes comprise a brush size and brush position information;

storing the brush objects on the first brush layer, into a brush queue corresponding to the first brush layer; and

generating a rendering process of a target style of image corresponding to the target image, based on the attributes of the brush objects in the brush queue,

wherein the determining the attributes of each of the brush objects on the first brush layer set for the target image, based on the detail parameter values of the sampled pixels on the first brush layer, comprises:

determining at least one target rendering region on the first brush layer set for the target image; and

determining the attributes of each of brush objects in the target rendering region based on the detail parameter values of the sampled pixels in the target rendering region; and

storing the brush objects on the first brush layer, into the brush queue corresponding to the first brush layer comprises:

storing the brush objects within the target rendering region into the brush queue corresponding to the first brush layer sequentially, in accordance with a rendering sequence of the at least one target rendering region on the first brush layer.

14 . The apparatus according to claim 13 , wherein the determining the attributes of each of the brush objects on the first brush layer set for the target image, based on the detail parameter values of the sampled pixels on the first brush layer, comprises:

sampling pixels on the first brush layer evenly based on a preset brush interval, to obtain the sampled pixels on the first brush layer;

calculating a detail parameter value of each of the sampled pixels, and determining whether the detail parameter value is within a detail range corresponding to the preset brush interval, wherein the detail parameter value indicates a richness of details of the sampled pixel; and

determining the brush position information of the brush object based on position information of the sampled pixel, and determining a brush size corresponding to the preset brush interval as the brush size of the brush object, in response to the detail parameter value being within the detail range corresponding to the preset brush interval.

15 . The apparatus according to claim 14 , wherein the calculating the detail parameter value of each of the sampled pixels comprises:

calculating a gradient value of the sampled pixel in a first direction and a gradient value of the sampled pixel in a second direction;

constructing a structure tensor matrix corresponding to the sampled pixel, based on the gradient value of the sampled pixel in the first direction and the gradient value of the sampled pixel in the second direction; and

performing eigen decomposition on the structure tensor matrix to obtain the detail parameter value of the sampled pixel, wherein the detail parameter value is a greater eigenvalue of two eigenvalues obtained through the eigen decomposition, and the detail parameter value indicates a richness of details of the sampled pixel.

16 . The apparatus according to claim 15 , wherein the attributes of the brush object further comprise a brush direction, and the method further comprises:

determining the brush direction of the brush object corresponding to the sampled pixel, based on a direction vector corresponding to a smaller eigenvalue of the two eigenvalues.

17 . The apparatus according to claim 13 , wherein before storing the brush objects within the target rendering region into the brush queue corresponding to the first brush layer sequentially, in accordance with a rendering sequence of the at least one target rendering region on the first brush layer, the method further comprises:

disrupting the rendering sequence of the brush objects within the target rendering region randomly.

18 . The apparatus according to claim 13 , wherein the attributes of the brush object further comprise a brush color; and

the brush color is determined based on a color value of a pixel corresponding to the brush position information of the brush object on the target image.