Video generation method and apparatus, device and readable storage medium
AssigneeBeijing Zitiao Network Technology Co., Ltd.
InventorsXu Wang, Kai Liu
Life of this patent
Estimating the term…
Abstract
A video generation method is provided. After a source image is acquired by an electronic device, sketch images of different stages in a process of simulating a painter to draw a target sketch are generated based on the source image in an order of color from light to dark, and a plurality of subgraphs in the process of simulating the painter to draw the sketch image are generated in an order of drawing completion degrees from low to high. Then, respective subgraphs of respective sketch images in the plurality of sketch images are taken as video frames of a sketch drawing video, an order of the video frames is set according to the order of color depth from light to dark and the order of drawing completion degrees from low to high.
Claims18
A video generation method, comprising:
- acquiring a source image;
- generating a plurality of sketch images according to the source image, wherein the plurality of sketch images respectively correspond to sketch images of the source image at different color depths;
- generating a plurality of subgraphs of a target sketch image based on the target sketch image, wherein the plurality of subgraphs respectively correspond to sketch images of the target sketch image at different drawing completion degrees, and the target sketch image is any one of the plurality of sketch images;
- and
- taking respective subgraphs of respective sketch images in the plurality of sketch images as video frames of a sketch drawing video, setting an order of the video frames according to an order of color depth from light to dark and an order of drawing completion degrees from low to high, and generating the sketch drawing video, wherein
- the generating the plurality of subgraphs of a target sketch image based on the target sketch image comprises:
- determining an increase order of mask values of pixels in a first mask, wherein initial mask values of the pixels in the first mask are 0, an increase of the pixels in the first mask is used to indicate that the mask values of the pixels are changed from 0 to 1, and the first mask is used for gradually transforming a background of the target sketch image into the target sketch image according to the increase order;
- and
- generating the plurality of subgraphs according to the increase order, the target sketch image and the background of the target sketch image, wherein each increase in the increase order and a subgraph in the plurality of subgraphs are in a one-to-one correspondence.
A video generating apparatus, comprising:
- at least one processor and a memory, wherein
- the memory stores computer executable instructions, and
- the at least one processor executes the computer executable instructions stored in the memory to:
- acquire a source image;
- generate a plurality of sketch images according to the source image, wherein the plurality of sketch images respectively correspond to sketch images of the source image at different color depths;
- generate a plurality of subgraphs of a target sketch image based on the target sketch image, wherein the plurality of subgraphs respectively correspond to sketch images of the target sketch image at different drawing completion degrees, and the target sketch image is any sketch image of the plurality of sketch images;
- take respective subgraphs of respective sketch images in the plurality of sketch images as video frames of a sketch drawing video, set an order of the video frames according to an order of color depth from light to dark and an order of drawing completion degrees from low to high, and generate the sketch drawing video;
- and
- determine an increase order of mask values of pixels in a first mask, wherein initial mask values of the pixels in the first mask are 0, an increase of the pixels in the first mask is used to indicate that the mask values of the pixels are changed from 0 to 1, and the first mask is used for gradually transforming a background of the target sketch image into the target sketch image according to the increase order;
- and generate the plurality of subgraphs according to the increase order, the target sketch image and the background of the target sketch image, wherein each increase in the increase order and a subgraph in the plurality of subgraphs are in a one-to-one correspondence.
Dependencies are inferred from the claim text.