Nothing Special   »   [go: up one dir, main page]

CN111787240B - Video generation method, apparatus and computer readable storage medium - Google Patents

Video generation method, apparatus and computer readable storage medium Download PDF

Info

Publication number
CN111787240B
CN111787240B CN201910349717.XA CN201910349717A CN111787240B CN 111787240 B CN111787240 B CN 111787240B CN 201910349717 A CN201910349717 A CN 201910349717A CN 111787240 B CN111787240 B CN 111787240B
Authority
CN
China
Prior art keywords
image
video
mask
pixel information
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910349717.XA
Other languages
Chinese (zh)
Other versions
CN111787240A (en
Inventor
莫钟林
安山
周芳汝
车广富
陈宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910349717.XA priority Critical patent/CN111787240B/en
Publication of CN111787240A publication Critical patent/CN111787240A/en
Application granted granted Critical
Publication of CN111787240B publication Critical patent/CN111787240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a video generation method, a video generation device and a computer readable storage medium, and relates to the technical field of multimedia. The video generation method comprises the following steps: acquiring an original image and a mask video, wherein the mask video comprises one or more mask images; for each frame of mask image in the mask video, determining pixel information of pixels at the same position in the processed image corresponding to the mask image according to pixel information of pixels at the same position of the mask image and the original image; and generating a video according to the processed image corresponding to each frame of mask image. The embodiment of the invention can process the original image by using the mask video and generate the video according to the processed image, thereby realizing the automatic addition of the video effect and the automatic generation of the video. And moreover, the mask video is convenient to manufacture, and the learning cost and video manufacturing time of a user are reduced. Therefore, the efficiency and the applicability of video generation are improved.

Description

Video generation method, apparatus and computer readable storage medium
Technical Field
The present invention relates to the field of multimedia technologies, and in particular, to a video generating method, apparatus, and computer readable storage medium.
Background
In the related art, video nonlinear editing software is mainly used as a tool for generating video. In the process of using the tool, the user needs to grasp the specific use method of the tool and manually add materials and visual effects. In order to make the generated video have a specific visual effect, a user needs to learn a manufacturing method of a visual effect template according to a special format requirement of a tool, and generate a template for the tool by writing a program script or the like.
Disclosure of Invention
The inventor recognizes that the current video generation method needs to install and learn a specific tool, has a narrow application range, increases the video production period, and reduces the video production efficiency.
One technical problem to be solved by the embodiment of the invention is as follows: how to improve the efficiency and applicability of video production.
According to a first aspect of some embodiments of the present invention, there is provided a video generating method, comprising: acquiring an original image and a mask video, wherein the mask video comprises one or more mask images; for each frame of mask image in the mask video, determining pixel information of pixels at the same position in the processed image corresponding to the mask image according to pixel information of pixels at the same position of the mask image and the original image; and generating a video according to the processed image corresponding to each frame of mask image.
In some embodiments, the mask image is a binarized image.
In some embodiments, determining pixel information for pixels located at the same location in the processed image corresponding to the mask image based on pixel information for pixels located at the same location in the mask image as the original image includes: carrying out preset operation on pixel information of pixels at the same position of the mask image and the original image; and determining pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image according to the operation result.
In some embodiments, the mask image is a binarized image and the predetermined operation is a first multiplication operation; the video generation method further comprises the following steps: inverting pixel information of each pixel in the mask image to obtain an inverted mask image; performing second multiplication operation on pixel information of pixels at the same position on the inverted mask image and the acquired other original image; determining pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image according to the operation result comprises the following steps: and determining the sum of the first multiplication operation result and the second multiplication operation result corresponding to the pixels at the same position as pixel information of the pixels at the same position in the processed image corresponding to the mask image.
In some embodiments, determining pixel information for pixels located at the same location in the processed image corresponding to the mask image based on pixel information for pixels located at the same location in the mask image as the original image includes: determining a preset operation corresponding to pixel information of pixels of the mask image; executing corresponding preset operation on pixel information of pixels at the same position of the original image; and determining the result after the preset operation as pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image.
In some embodiments, the mask image is a binarized image; when the pixel information of the pixels of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixels at the same position of the original image with the pixel information of the pixels at the same position of the obtained other original image.
In some embodiments, generating video from the processed image corresponding to each frame of mask image includes: taking one or more frames of original images and the processed image corresponding to each frame of mask image as a video frame set corresponding to the original images; and synthesizing the video by adopting a video frame set corresponding to one or more original images.
In some embodiments, the video generation method further comprises: the mask video is resized to the same size as the original image.
According to a second aspect of some embodiments of the present invention, there is provided a video generating apparatus comprising: an acquisition module configured to acquire an original image and a mask video, wherein the mask video comprises one or more mask images; the image processing module is configured to determine pixel information of pixels at the same position in the processed image corresponding to the mask image according to the pixel information of pixels at the same position of the mask image and the original image for each frame of mask image in the mask video; and the video generation module is configured to generate a video according to the processed image corresponding to each frame of mask image.
According to a third aspect of some embodiments of the present invention, there is provided a video generating apparatus comprising: a memory; and a processor coupled to the memory, the processor configured to perform any of the video generation methods described above based on instructions stored in the memory.
According to a fourth aspect of some embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements any of the foregoing video generation methods.
Some of the embodiments of the above invention have the following advantages or benefits: the mask video can be utilized to process the original image, and the video is generated according to the processed image, so that the automatic addition of the video effect and the automatic generation of the video can be realized. And moreover, the mask video is convenient to manufacture, and the learning cost and video manufacturing time of a user are reduced. Therefore, the efficiency and the applicability of video generation are improved.
Other features of the present invention and its advantages will become apparent from the following detailed description of exemplary embodiments of the invention, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of a video generation method according to some embodiments of the invention.
Fig. 2 is a schematic diagram of determining pixel information of pixels in a processed image.
Fig. 3 is a flow chart of an original image processing method according to some embodiments of the present invention.
Fig. 4 is a flowchart of an original image processing method according to other embodiments of the present invention.
Fig. 5 is a schematic diagram of an image processing process according to some embodiments of the invention.
Fig. 6 is a flow chart of an original image processing method according to some embodiments of the present invention.
Fig. 7 is a flow chart of a method of generating video from processed images according to some embodiments of the invention.
Fig. 8 is a schematic structural diagram of a video generating apparatus according to some embodiments of the present invention.
Fig. 9 is a schematic structural view of a video generating apparatus according to other embodiments of the present invention.
Fig. 10 is a schematic structural view of a video generating apparatus according to still other embodiments of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Fig. 1 is a flow chart of a video generation method according to some embodiments of the invention. As shown in fig. 1, the video generation method of this embodiment includes steps S102 to S106.
In step S102, an original image and a mask video are acquired, wherein the mask video includes one or more mask images.
The original image refers to an image used to generate video. For example, a product display video is generated using a product image as an original image, a personal introduction video or an electronic album is generated using a life photo as an original image, and the like.
The mask video is used to add video effects to the video generated from the original image. When a new effect is desired to be added to the video, only a new mask video needs to be generated or acquired, and a template special for a certain tool does not need to be made by writing a program or the like.
In some embodiments, one or more mask images may be generated or acquired, and then mask video including the mask images is generated. Each mask image may play one or more frames.
In some embodiments, the mask image is a binarized image. The binarized image includes only black pixels having a gradation value of 0 and white pixels having a gradation value of 1. For example, it is possible to determine which pixels are displayed and which are hidden in the original image based on such a mask image.
In step S104, for each frame of mask image in the mask video, pixel information of a pixel located at the same position in the processed image corresponding to the mask image is determined from pixel information of a pixel located at the same position in the mask image as the original image. The pixel information may be a pixel value, a gray value, an RGB (Red Green Blue) value, transparency, or the like. The type of pixel information can be selected by those skilled in the art as desired.
As shown in fig. 2, the pixels 210 in the original image 21 and the pixels 220 in the mask image 22 are located in the second row and the second column. When the original image 21 is processed according to the mask image 22, the pixel information of the pixel 230 in the processed image 23 is determined according to the pixel information of the pixel 210 and the pixel 220. The pixels 230 are also located in the second row and the second column.
In some embodiments, the above-described process may be implemented by invoking one or more interfaces provided by OPENCV (Open Source Computer Vision Library ).
In step S106, a video is generated from the processed image corresponding to each frame of mask image. That is, each frame in the generated video is a respective processed image.
In some embodiments, the process of generating video from the corresponding processed image of each frame mask image may be implemented by invoking an interface of FFMPEG (Fast Forward MPEG, fast forward MPGE, MPEG stands for moving picture expert group, collectively Moving Picture Experts Group).
By the method of the embodiment, the original image can be processed by using the mask video, and the video is generated according to the processed image, so that the automatic addition of the video effect and the automatic generation of the video can be realized. And moreover, the mask video is convenient to manufacture, and the learning cost and video manufacturing time of a user are reduced. Therefore, the efficiency and the applicability of video generation are improved.
Fig. 3 is a flow chart of an original image processing method according to some embodiments of the present invention. As shown in fig. 3, the original image processing method of this embodiment includes steps S302 to S304.
In step S302, pixel information of pixels at the same position of the mask image and the original image is subjected to a predetermined operation.
For example, the mask image may be multiplied with the pixel information of the pixels at the same position of the original image to process the pixel information of the original image proportionally according to the pixel information of the mask image; alternatively, pixel information of pixels at the same position of the mask image and the original image may be added to perform superimposition processing on the original image and the mask image. The manner in which the skilled person can select the operation according to need is not described here in detail.
In step S304, pixel information of the co-located pixels in the processed image corresponding to the mask image is determined based on the operation result.
In some embodiments, the result of the operation may be determined directly as pixel information of the processed image.
In some embodiments, the background image may also be superimposed on the basis of the result of the operation to obtain a richer video effect. For example, the sum of the pixel information of the pixel in the background image and the calculation result corresponding to the pixel at the same position may be determined as the pixel information of the pixel at the same position in the processed image corresponding to the mask image.
The background image may be other acquired original images, or may be an image obtained by processing other original images. An embodiment of the present invention for superimposing other images in processing an original image is described below with reference to fig. 4. In this embodiment, the mask image is a binarized image.
Fig. 4 is a flowchart of an original image processing method according to other embodiments of the present invention. As shown in fig. 4, the original image processing method of this embodiment includes steps S402 to S408.
In step S402, a first multiplication operation is performed on pixel information of pixels at the same position of the mask image and the original image.
Since the mask image in this embodiment is a binarized image, after the first multiplication operation is performed, the black portion in the mask image makes the pixel information of the corresponding position in the original image set to 0, and the white portion makes the pixel information of the corresponding position in the original image unchanged.
In step S404, pixel information of each pixel in the mask image is subjected to inversion processing to obtain an inverted mask image. That is, a pixel having a pixel value of 0 in the mask image is converted into a pixel having a pixel value of 1, and a pixel having a pixel value of 1 is converted into a pixel having a pixel value of 0.
In step S406, the pixel information of the pixel at the same position on the inverted mask image and the acquired other original image is subjected to a second multiplication operation.
Similar to step S402, after the second multiplication operation, the black portion in the inverted mask image causes the pixel information of the corresponding position in the other original image to be set to 0, and the white portion causes the pixel information of the corresponding position in the other original image to be unchanged.
Steps S404 to S406 may be performed before step S402.
In step S408, the sum of the first multiplication result and the second multiplication result corresponding to the pixel at the same position is determined as the pixel information of the pixel at the same position in the processed image corresponding to the mask image.
As shown in fig. 5, the pixel information of the pixels at the same position of the original image 51 and the mask image 52 is subjected to a first multiplication operation, and the operation result can be intuitively represented by a first operation result image 53; the pixel information of the pixels at the same position of the other original image 54 and the inverted mask image 55 is subjected to a second multiplication operation, and the operation result can be intuitively represented by a second operation result image 56. Pixel information of the pixels at the same position of the first operation result image 53 and the second operation result image 56 is added to obtain a processed image 57. In the mask image 52 and the inverted mask image 55, the dot-like background portions are black portions, and the non-dot-like background portions are white portions.
It should be clear to a person skilled in the art that the first operation result image 53 and the second operation result image 56 are only used to visually illustrate the processing procedure of the above embodiment. In the application process, the first operation result image 53 and the second operation result image 56 may not be generated, but only the operation results corresponding to the pixels at the respective positions may be stored.
The above-described embodiments are capable of displaying information of an original image or another original image according to different pixel values in a binarized image. In some embodiments, the other original image may be the next image to the currently processed original image, such that a smooth transition between different original images may be achieved in the generated video.
Fig. 6 is a flow chart of an original image processing method according to some embodiments of the present invention. As shown in fig. 6, the original image processing method of this embodiment includes steps S602 to S606.
In step S602, a preset operation corresponding to pixel information of a pixel of the mask image is determined.
For example, a correspondence relationship between pixel information and a preset operation may be established in advance. The correspondence may include a correspondence between a value of the pixel information or a value range to which the pixel information belongs and a preset operation.
In step S604, a corresponding preset operation is performed on the pixel information of the pixels at the same position of the original image.
In step S606, the result of the preset operation is determined as pixel information of the pixel located at the same position in the processed image corresponding to the mask image.
The above embodiment may also be processed in combination with a binarized image as a mask image. In some embodiments, in the case that the pixel information of the pixels of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixels at the same position of the original image with the pixel information of the pixels at the same position of the acquired other original image. For example, in the case where the pixel value of the pixel of the mask image is 0, the pixel information of the pixel at the same position of the original image may be replaced with the pixel information of the pixel at the same position of the other original image that is acquired; when the pixel value of the pixel of the mask image is 1, the pixel information of the pixel at the same position in the original image is directly used as the pixel information of the pixel at the same position in the processed image.
In some embodiments, the other original image may be the next image to the currently processed original image.
The above embodiments describe the manner in which any one of the original images is processed in the process of generating a video. Embodiments of the present invention may employ one or more original images to automatically generate video in conjunction with the methods of the above embodiments. An embodiment of the video generation method of the present invention is described below with reference to fig. 7.
Fig. 7 is a flow chart of a method of generating video from processed images according to some embodiments of the invention. As shown in fig. 7, the method of generating a video from a processed image of this embodiment includes steps S702 to S714.
In step S702, one or more original images and mask videos input by a user are acquired. An audio file entered by the user may also be retrieved as an audio track of the video, as desired.
In step S704, the size of the mask video is adjusted to the same size as the original image.
In step S706, the nth original image is processed using the mask video, which specifically includes: for each frame of mask image in the mask video, determining pixel information of the pixels at the same position in the processed image corresponding to the mask image according to the pixel information of the pixels at the same position of the mask image and the Nth original image.
The initial value of N is 1.
In step S708, the processed image corresponding to the one or more original images and each frame of mask image is taken as a set of video frames corresponding to the original image.
In step S710, it is determined whether N is equal to the number of original images, and if not, step S712 is performed; if so, step S714 is performed.
In step S712, the value of N is added by 1, and the flow returns to step S706 to process the next original image.
In step S714, a video is synthesized using a set of video frames corresponding to one or more original images. When the user inputs audio, it is also possible to synthesize audio into video.
By the method, the video with visual effect can be automatically generated through the original image and the mask video input by the user, so that the video generation efficiency is improved.
An embodiment of the video generating apparatus of the present invention is described below with reference to fig. 8.
Fig. 8 is a schematic structural diagram of a video generating apparatus according to some embodiments of the present invention. As shown in fig. 8, the video generating apparatus 80 of this embodiment includes: an acquisition module 810 configured to acquire an original image and a mask video, wherein the mask video comprises one or more mask images; an image processing module 820 configured to determine, for each frame of mask image in the mask video, pixel information of pixels located at the same position in the processed image corresponding to the mask image from pixel information of pixels located at the same position in the mask image as the original image; the video generation module 830 is configured to generate a video according to the processed image corresponding to each frame mask image.
In some embodiments, the mask image is a binarized image.
In some embodiments, the image processing module 820 is further configured to perform a preset operation on pixel information of pixels at the same position of the mask image and the original image; and determining pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image according to the operation result.
In some embodiments, the mask image is a binarized image and the predetermined operation is a first multiplication operation; the image processing module 820 is further configured to: inverting pixel information of each pixel in the mask image to obtain an inverted mask image; performing second multiplication operation on pixel information of pixels at the same position on the inverted mask image and the acquired other original image; and determining the sum of the first multiplication operation result and the second multiplication operation result corresponding to the pixels at the same position as pixel information of the pixels at the same position in the processed image corresponding to the mask image.
In some embodiments, the image processing module 820 is further configured to: determining a preset operation corresponding to pixel information of pixels of the mask image; executing corresponding preset operation on pixel information of pixels at the same position of the original image; and determining the result after the preset operation as pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image.
In some embodiments, the mask image is a binarized image; the image processing module 820 is further configured to: when the pixel information of the pixels of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixels at the same position of the original image with the pixel information of the pixels at the same position of the obtained other original image.
In some embodiments, the video generation module 830 is further configured to use the one or more original images and the processed image corresponding to each frame of mask image as a set of video frames corresponding to the original image; and synthesizing the video by adopting a video frame set corresponding to one or more original images.
In some embodiments, the acquisition module 810 is further configured to resize the mask video to the same size as the original image.
Fig. 9 is a schematic structural view of a video generating apparatus according to other embodiments of the present invention. As shown in fig. 9, the video generating apparatus 90 of this embodiment includes: a memory 910 and a processor 920 coupled to the memory 910, the processor 920 being configured to perform the video generation method of any of the foregoing embodiments based on instructions stored in the memory 910.
The memory 910 may include, for example, system memory, fixed nonvolatile storage media, and so forth. The system memory stores, for example, an operating system, application programs, boot Loader (Boot Loader), and other programs.
Fig. 10 is a schematic structural view of a video generating apparatus according to still other embodiments of the present invention. As shown in fig. 10, the video generating apparatus 100 of this embodiment includes: the memory 1010 and the processor 1020 may also include an input-output interface 1030, a network interface 1040, a storage interface 1050, and the like. These interfaces 1030, 1040, 1050 and the memory 1010 and processor 1020 may be connected by, for example, a bus 1060. The input/output interface 1030 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, a touch screen, and the like. Network interface 1040 provides a connection interface for a variety of networking devices. Storage interface 1050 provides a connection interface for external storage devices such as SD cards, U-discs, and the like.
An embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements any one of the video generation methods described above.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A video generation method, comprising:
acquiring a plurality of original images and mask videos, wherein the mask videos comprise one or more frames of mask images, and the mask images are binarized images;
processing an nth original image using a mask video, comprising:
for each frame of mask image in the mask video, determining pixel information of pixels located at the same position in a processed image corresponding to the mask image according to pixel information of pixels located at the same position of the mask image and the original image, wherein the determining comprises the following steps:
determining a preset operation corresponding to pixel information of pixels of a mask image, wherein when the pixel information of the pixels of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixels at the same position of an original image with the pixel information of the pixels at the same position of another acquired original image, and the other original image is a next image of the original image; executing the corresponding preset operation on the pixel information of the pixels at the same position of the original image; and determining a result after the preset operation as pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image;
generating a video according to the processed image corresponding to each frame mask image, and taking the video as a video frame set corresponding to the original image;
adding 1 to the value of N to continue processing the Nth original image by using the mask video under the condition that N is not equal to the number of the original images;
in the case that N is equal to the number of the original images, one or more video frame sets corresponding to the original images are adopted to synthesize the video.
2. The video generation method of claim 1, wherein the mask image is a binarized image.
3. The video generating method according to claim 1, wherein the determining, from pixel information of pixels at the same position of a mask image as an original image, pixel information of pixels located at the same position in a processed image corresponding to the mask image includes:
carrying out preset operation on pixel information of pixels at the same position of the mask image and the original image;
and determining pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image according to the operation result.
4. A video generating method according to claim 3, wherein the mask image is a binarized image, and the predetermined operation is a first multiplication operation;
the video generation method further comprises the following steps:
inverting pixel information of each pixel in the mask image to obtain an inverted mask image;
performing second multiplication operation on pixel information of pixels at the same position on the inverted mask image and the acquired other original image;
the determining, according to the operation result, pixel information of the pixels located at the same position in the processed image corresponding to the mask image includes:
and determining the sum of the first multiplication operation result and the second multiplication operation result corresponding to the pixels at the same position as pixel information of the pixels at the same position in the processed image corresponding to the mask image.
5. The video generation method according to claim 1, wherein the generating video from the processed image corresponding to each frame mask image comprises:
taking one or more frames of the original image and the processed image corresponding to each frame of mask image as a video frame set corresponding to the original image;
and synthesizing the video by adopting a video frame set corresponding to one or more original images.
6. The video generation method of claim 1, further comprising:
the mask video is resized to the same size as the original image.
7. A video generating apparatus comprising:
an acquisition module configured to acquire a plurality of original images and a mask video, wherein the mask video comprises one or more mask images, wherein the mask images are binarized images;
an image processing module configured to process an nth original image using a mask video, comprising: for each frame of mask image in the mask video, determining pixel information of pixels located at the same position in a processed image corresponding to the mask image according to pixel information of pixels located at the same position of the mask image and the original image, wherein the determining comprises the following steps: determining a preset operation corresponding to pixel information of pixels of a mask image, wherein when the pixel information of the pixels of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixels at the same position of an original image with the pixel information of the pixels at the same position of another acquired original image, and the other original image is a next image of the original image; executing the corresponding preset operation on the pixel information of the pixels at the same position of the original image; determining a result after the preset operation as pixel information of the pixels positioned at the same position in the processed image corresponding to the mask image; and adding 1 to the value of N to continue processing the Nth original image with the mask video if N is not equal to the number of original images;
the video generation module is configured to generate a video according to the processed image corresponding to each frame mask image, and the video is used as a video frame set corresponding to the original image; in the case that N is equal to the number of the original images, one or more video frame sets corresponding to the original images are adopted to synthesize the video.
8. A video generating apparatus comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the video generation method of any of claims 1-6 based on instructions stored in the memory.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements the video generation method of any one of claims 1 to 6.
CN201910349717.XA 2019-04-28 2019-04-28 Video generation method, apparatus and computer readable storage medium Active CN111787240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910349717.XA CN111787240B (en) 2019-04-28 2019-04-28 Video generation method, apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910349717.XA CN111787240B (en) 2019-04-28 2019-04-28 Video generation method, apparatus and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111787240A CN111787240A (en) 2020-10-16
CN111787240B true CN111787240B (en) 2023-05-02

Family

ID=72754895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910349717.XA Active CN111787240B (en) 2019-04-28 2019-04-28 Video generation method, apparatus and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111787240B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500726B (en) * 2021-12-27 2024-08-23 努比亚技术有限公司 Charging video display method, mobile terminal and storage medium
CN114466228B (en) * 2021-12-31 2023-09-05 山东信通电子股份有限公司 Method, equipment and storage medium for improving smoothness of screen projection display
CN114598923A (en) * 2022-03-08 2022-06-07 北京达佳互联信息技术有限公司 Video character removing method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106170821A (en) * 2014-03-18 2016-11-30 株式会社Live2D Image processing apparatus, image processing method and program

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997687B (en) * 2013-02-20 2017-07-28 英特尔公司 For increasing the method and device of interaction feature to video
CN104751503A (en) * 2013-12-26 2015-07-01 北京大学 Layer processing device and layer processing method
CN104506921B (en) * 2014-12-24 2017-12-15 天脉聚源(北京)科技有限公司 A kind of method and device of dynamic displaying pictures
CN104869324A (en) * 2015-05-18 2015-08-26 成都平行视野科技有限公司 Image processing method and image processing system based on image software of intelligent equipment
CN105959724B (en) * 2016-05-24 2020-08-25 腾讯科技(深圳)有限公司 Video data processing method and device
CN106127841A (en) * 2016-06-22 2016-11-16 丁焱 A kind of method generating individual cartoon Dynamic Graph based on human face photo
CN107734384A (en) * 2016-08-10 2018-02-23 北京光子互动科技有限公司 Image processing method and device
CN107657638A (en) * 2017-10-30 2018-02-02 努比亚技术有限公司 A kind of image processing method, device and computer-readable recording medium
CN108881995A (en) * 2018-07-17 2018-11-23 上海哔哩哔哩科技有限公司 Video barrage masking-out method for drafting, barrage playback method, device and medium
CN109302619A (en) * 2018-09-18 2019-02-01 北京奇艺世纪科技有限公司 A kind of information processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106170821A (en) * 2014-03-18 2016-11-30 株式会社Live2D Image processing apparatus, image processing method and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
cs石头."【stone】会声会影X6实例教程第七期 制作动态蒙版,https://www.bilibili.com/video/BV1Gx411K7V3".《哔哩哔哩》.2014, *

Also Published As

Publication number Publication date
CN111787240A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN109670558B (en) Digital image completion using deep learning
JP4782105B2 (en) Image processing apparatus and image processing method
CN111787240B (en) Video generation method, apparatus and computer readable storage medium
US10417742B2 (en) System and apparatus for editing preview images
US9953422B2 (en) Selective local registration based on registration error
CN107622504B (en) Method and device for processing pictures
EP2871560A1 (en) Image processing method and apparatus
CN111192190B (en) Method and device for eliminating image watermark and electronic equipment
CN108427589B (en) Data processing method and electronic equipment
CN109600605B (en) Detection method of 4K ultra-high-definition video, electronic device and computer program product
CN111986601B (en) Screen display method, device, terminal equipment and storage medium
CN104808959B (en) Information processing method and electronic equipment
CN112396610A (en) Image processing method, computer equipment and storage medium
JP6101661B2 (en) Image composition apparatus, image composition method, image composition program, and recording medium storing image composition program
US20120169759A1 (en) Method and apparatus for creating a live artistic sketch of an image
CN109065001B (en) Image down-sampling method and device, terminal equipment and medium
CN108876866B (en) Media data processing method, device and storage medium
CN112700456A (en) Image area contrast optimization method, device, equipment and storage medium
CN102566870A (en) Adjusting system and method of stacking sequence of images
CN107992256B (en) Window control method, device and system
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
US20160203617A1 (en) Image generation device and display device
CN113379768A (en) Image processing method, image processing device, storage medium and computer equipment
CN114119691A (en) Method and device for projecting applique material
CN109803163B (en) Image display method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant