CN111787240A - Video generation method, device and computer readable storage medium - Google Patents

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

Info

Publication number
CN111787240A
CN111787240A CN201910349717.XA CN201910349717A CN111787240A CN 111787240 A CN111787240 A CN 111787240A CN 201910349717 A CN201910349717 A CN 201910349717A CN 111787240 A CN111787240 A CN 111787240A
Authority
CN
China
Prior art keywords
image
mask
video
pixel information
same position
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.)
Granted
Application number
CN201910349717.XA
Other languages
Chinese (zh)
Other versions
CN111787240B (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 frames of mask images; aiming at each frame of mask image in the mask video, determining the 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 original image; and generating a video according to the processed image corresponding to each frame of mask image. According to the embodiment of the invention, the original image can be processed by utilizing 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. Moreover, the mask video is convenient to manufacture, and the learning cost and the video manufacturing time of a user are reduced. Thus, the efficiency and the applicability of video generation are improved.

Description

Video generation method, device and computer readable storage medium
Technical Field
The present invention relates to the field of multimedia technologies, and in particular, to a video generation method, apparatus, and computer-readable storage medium.
Background
In the related art, video nonlinear editing software is mainly adopted as a tool for generating a video. During use of the tool, the user needs to master the specific method of use 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 method for creating a visual effect template according to a special format requirement of a tool, and create 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 specific tools, has a narrow application range, increases the video production period and reduces the video production efficiency.
The embodiment of the invention aims to solve the technical problem that: how to improve the efficiency and the applicability of video production.
According to a first aspect of some embodiments of the present invention, there is provided a video generation method, comprising: acquiring an original image and a mask video, wherein the mask video comprises one or more frames of mask images; aiming at each frame of mask image in the mask video, determining the 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 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, from the pixel information of the pixel at the same position of the mask image as the original image, the pixel information of the pixel at the same position in the processed image corresponding to the mask image includes: performing preset operation on pixel information of pixels at the same position of the mask image and the original image; and determining pixel information of pixels located 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 binary image, and the predetermined operation is a first multiplication operation; the video generation method further includes: performing inversion processing on pixel information of each pixel in the mask image to obtain an inverted mask image; performing a second multiplication operation on the pixel information of the pixel at the same position on the reversed mask image and the other acquired original image; determining, from the calculation result, pixel information of pixels located at the same position in the processed image corresponding to the mask image, including: and determining the sum of the first multiplication result and the second multiplication result corresponding to the pixels at the same position as the pixel information of the pixels at the same position in the processed image corresponding to the mask image.
In some embodiments, determining, from the pixel information of the pixel at the same position of the mask image as the original image, the pixel information of the pixel at the same position in the processed image corresponding to the mask image includes: determining a preset operation corresponding to pixel information of pixels of a 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 the pixel information of the pixels at the same position in the processed image corresponding to the mask image.
In some embodiments, the mask image is a binarized image; in the case where the pixel information of the pixel of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixel at the same position of the original image with the acquired pixel information of the pixel at the same position of another original image.
In some embodiments, generating a video from the processed image corresponding to each frame of the mask image comprises: taking one or more frames of original images and the processed images corresponding to each frame of mask images as a video frame set corresponding to the original images; and synthesizing the video by adopting the 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: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire an original image and a mask video, and the mask video comprises one or more frames of mask images; the image processing module is configured to determine pixel information of pixels located at the same position in a processed image corresponding to a mask image according to pixel information of pixels located at the same position of the mask image and an original image in terms of 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 foregoing video generation methods 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 a computer program stored thereon, wherein the program, when executed by a processor, implements any one of the video generation methods described above.
Some embodiments of the above invention have the following advantages or benefits: the original image can be processed by 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. Moreover, the mask video is convenient to manufacture, and the learning cost and the video manufacturing time of a user are reduced. Thus, the efficiency and the applicability of video generation are improved.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flow diagram of a video generation method according to some embodiments of the invention.
FIG. 2 is a schematic diagram of determining pixel information for pixels in a processed image.
FIG. 3 is a flow diagram illustrating a method of raw image processing according to some embodiments of the invention.
FIG. 4 is a flowchart illustrating a method of processing raw images according to further 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 diagram illustrating a method of raw image processing according to some embodiments of the invention.
FIG. 7 is a flow diagram illustrating a method of generating a video from a processed image according to some embodiments of the invention.
Fig. 8 is a schematic structural diagram of a video generation apparatus according to some embodiments of the invention.
Fig. 9 is a schematic structural diagram of a video generating apparatus according to other embodiments of the present invention.
Fig. 10 is a schematic diagram of a video generation apparatus according to further embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a flow diagram 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 a video. For example, a product exhibition video is generated using a product image as an original image, a personal introduction video or an electronic album is generated using a life photograph 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 added to a 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 a mask video including these 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 can be determined from such a mask image which pixels are displayed in the original image and which pixels are hidden.
In step S104, 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 is determined based on pixel information of pixels located at the same position in the mask image and the original image. The pixel information may be a pixel value, a gray value, an RGB (Red Green Blue) value, a transparency, and the like. The type of pixel information can be selected as desired by those skilled in the art.
As shown in FIG. 2, the pixels 210 in the original image 21 and the pixels 220 in the mask image 22 are both in the second row and the second column. Then, when the original image 21 is processed from the mask image 22, the pixel information of the pixel 230 in the processed image 23 is determined from the pixel information of the pixel 210 and the pixel 220. The pixels 230 are also located in a second row and a second column.
In some embodiments, the above processing may be implemented by calling one or more interfaces provided by opensource computer vision Library (OPENCV).
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 a video from a processed image corresponding to each frame of mask image may be implemented by calling an interface of FFMPEG (Fast Forward MPEG, MPEG stands for Moving Picture Experts Group, which is collectively referred to as 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 automatic addition of video effects and automatic generation of the video can be realized. Moreover, the mask video is convenient to manufacture, and the learning cost and the video manufacturing time of a user are reduced. Thus, the efficiency and the applicability of video generation are improved.
FIG. 3 is a flow diagram illustrating a method of raw image processing according to some embodiments of the invention. As shown in fig. 3, the original image processing method of this embodiment includes steps S302 to S304.
In step S302, the pixel information of the 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 by the pixel information of the pixels at the same position of the original image to proportionally process the pixel information of the original image according to the pixel information of the mask image; alternatively, the pixel information of the pixels on the same position of the mask image and the original image may be added to perform the superimposition processing on the original image and the mask image. The operation mode can be selected by those skilled in the art according to the requirement, and is not described herein again.
In step S304, pixel information of pixels located at the same position in the processed image corresponding to the mask image is specified based on the calculation result.
In some embodiments, the operation result may be directly determined as pixel information of the processed image.
In some embodiments, a background image can be further superimposed on the operation result to obtain a richer video effect. For example, the sum of the pixel information of the pixels in the background image and the calculation result corresponding to the pixels at the same position may be determined as the pixel information of the pixels 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 the process of 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 illustrating a method of processing raw images according to further 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 0, and the white portion makes the pixel information of the corresponding position in the original image unchanged.
In step S404, the inversion process is performed on the pixel information of each pixel in the mask image, and an inverted mask image is obtained. 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, a second multiplication operation is performed on the pixel information of the pixel at the same position on the inverted mask image and the acquired other original image.
Similarly to step S402, after the second multiplication operation, the black portion in the inverted mask image makes the pixel information of the corresponding position in the other original image 0, and the white portion makes the pixel information of the corresponding position in the other original image 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 are 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 are subjected to a second multiplication operation, and the operation result can be visually represented by the second operation result image 56. The pixel information of the pixels at the same position in the first operation result image 53 and the second operation result image 56 are added to obtain a processed image 57. In the mask image 52 and the inverted mask image 55, dot-like background portions are black portions, and non-dot-like background portions are white portions.
It should be clear to those skilled in the art that the first operation result image 53 and the second operation result image 56 are merely used to pictorially explain the processing procedure of the above-described embodiment. In the application process, it is not necessary to generate the first operation result image 53 and the second operation result image 56, and only the operation results corresponding to the pixels of the respective positions may be saved.
The above-described embodiments can display 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, so that a smooth transition between different original images may be achieved in the generated video.
FIG. 6 is a flow diagram illustrating a method of raw image processing according to some embodiments of the 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, the correspondence between the pixel information and the preset operation may be established in advance. The correspondence relationship may include a correspondence relationship 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 the pixel information of the pixels located at the same position in the processed image corresponding to the mask image.
The above-described embodiment may also be processed in combination with a binarized image as a mask image. In some embodiments, in a case where the pixel information of the pixel of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixel at the same position of the original image with the acquired pixel information of the pixel at the same position of another original image. For example, in the case where the pixel value of a 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 acquired pixel information of the pixel at the same position of another original image; 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 current processed original image.
The above embodiments describe the processing manner of any one original image in the process of generating a video. Embodiments of the present invention may incorporate the methods of the above embodiments to automatically generate video using one or more raw images. An embodiment of the video generation method of the present invention is described below with reference to fig. 7.
FIG. 7 is a flow diagram illustrating a method of generating a video from a processed image 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 a mask video input by a user are acquired. If desired, an audio file input by the user may also be obtained as a soundtrack for the video.
In step S704, the mask video is resized to the same size as the original image.
In step S706, processing the nth original image by using the mask video specifically includes: and aiming at each frame of mask image in the mask video, determining the pixel information of the pixel at the same position in the processed image corresponding to the mask image according to the pixel information of the pixel at the same position of the mask image and the Nth original image.
The initial value of N is 1.
In step S708, the one or more frames of original images and the processed image corresponding to each frame of mask image are used as the set of video frames corresponding to the original images.
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, 1 is added to the value of N and the process 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, the audio may also be synthesized into the video.
By the method of the embodiment, the video with the 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 generation apparatus according to some embodiments of the invention. As shown in fig. 8, the video generation apparatus 80 of this embodiment includes: an obtaining module 810 configured to obtain an original image and a mask video, wherein the mask video includes one or more frames of mask images; an image processing module 820 configured to determine, for each frame of mask image in the mask video, pixel information of a pixel located at the same position in a processed image corresponding to the mask image according to pixel information of a pixel located at the same position of the mask image and the original image; and a video generating module 830 configured to generate 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, the image processing module 820 is further configured to perform a predetermined operation on pixel information of pixels at the same position of the mask image and the original image; and determining pixel information of pixels located 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 binary image, and the predetermined operation is a first multiplication operation; the image processing module 820 is further configured to: performing inversion processing on pixel information of each pixel in the mask image to obtain an inverted mask image; performing a second multiplication operation on the pixel information of the pixel at the same position on the reversed mask image and the other acquired original image; and determining the sum of the first multiplication result and the second multiplication result corresponding to the pixels at the same position as the 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 a 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 the pixel information of the pixels 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: in the case where the pixel information of the pixel of the mask image is a preset value, the corresponding preset operation is to replace the pixel information of the pixel at the same position of the original image with the acquired pixel information of the pixel at the same position of another original image.
In some embodiments, the video generation module 830 is further configured to take one or more frames of original images and the processed image corresponding to each frame of mask image as the set of video frames corresponding to the original images; and synthesizing the video by adopting the 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 diagram of a video generating apparatus according to other embodiments of the present invention. As shown in fig. 9, the video generation 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 a video generation method in any of the embodiments described above based on instructions stored in the memory 910.
Memory 910 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.
Fig. 10 is a schematic diagram of a video generation apparatus according to further embodiments of the present invention. As shown in fig. 10, the video generation apparatus 100 of this embodiment includes: the memory 1010 and the processor 1020 may further 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 the processor 1020 may be connected via a bus 1060, for example. The input/output interface 1030 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. Network interface 1040 provides a connection interface for various networking devices. The storage interface 1050 provides a connection interface for external storage devices such as an SD card and a usb disk.
An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein the program is configured to implement any one of the video generation methods described above when executed by a processor.
As will be appreciated by one skilled in the art, 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, and the like) 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 flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (11)

1. A video generation method, comprising:
acquiring an original image and a mask video, wherein the mask video comprises one or more frames of mask images;
aiming at each frame of mask image in a mask video, determining the pixel information of the pixel at the same position in the processed image corresponding to the mask image according to the pixel information of the pixel 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.
2. The video generation method according to claim 1, wherein the mask image is a binarized image.
3. The video generation method according to claim 1, wherein the determining, from the pixel information of the pixel at the same position of the mask image as the original image, the pixel information of the pixel at the same position in the processed image corresponding to the mask image comprises:
performing preset operation on pixel information of pixels at the same position of the mask image and the original image;
and determining the pixel information of the pixels at the same position in the processed image corresponding to the mask image according to the operation result.
4. A video generation method according to claim 3, wherein the mask image is a binarized image, and the preset operation is a first multiplication operation;
the video generation method further comprises:
performing inversion processing on pixel information of each pixel in the mask image to obtain an inverted mask image;
performing a second multiplication operation on the pixel information of the pixel at the same position on the reversed mask image and the other acquired original image;
the determining, according to the operation result, pixel information of pixels located at the same position in the processed image corresponding to the mask image includes:
and determining the sum of the first multiplication result and the second multiplication result corresponding to the pixel at the same position as the pixel information of the pixel at the same position in the processed image corresponding to the mask image.
5. The video generation method according to claim 1, wherein the determining, from the pixel information of the pixel at the same position of the mask image as the original image, the pixel information of the pixel at the same position in the processed image corresponding to the mask image comprises:
determining a preset operation corresponding to pixel information of pixels of a mask image;
executing the corresponding preset operation on the pixel information of the pixels at the same position of the original image;
and determining the result after the preset operation as the pixel information of the pixel at the same position in the processed image corresponding to the mask image.
6. The video generation method according to claim 5, wherein the mask image is a binarized image;
and under the condition that the pixel information of the pixels of the mask image is a preset value, replacing the pixel information of the pixels at the same position of the original image with the acquired pixel information of the pixels at the same position of another original image by the corresponding preset operation.
7. The video generation method of claim 1, wherein generating a video from the processed image corresponding to each frame of 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 the video frame set corresponding to one or more original images.
8. The video generation method of claim 1, further comprising:
and adjusting the size of the mask video to be the same as the size of the original image.
9. A video generation apparatus comprising:
an acquisition module configured to acquire an original image and a mask video, wherein the mask video comprises one or more frames of mask images;
the image processing module is configured to determine pixel information of pixels located at the same position in a processed image corresponding to a mask image according to pixel information of pixels located at the same position of the mask image and an original image in terms of each frame of mask image in a 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.
10. A video generation 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-8 based on instructions stored in the memory.
11. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the video generation method of any of claims 1 to 8.
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 true CN111787240A (en) 2020-10-16
CN111787240B 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)

Cited By (3)

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

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997687A (en) * 2013-02-20 2014-08-20 英特尔公司 Techniques for adding interactive features to videos
CN104506921A (en) * 2014-12-24 2015-04-08 天脉聚源(北京)科技有限公司 Dynamic image displaying method and device
CN104751503A (en) * 2013-12-26 2015-07-01 北京大学 Layer processing device and layer processing method
CN104869324A (en) * 2015-05-18 2015-08-26 成都平行视野科技有限公司 Image processing method and image processing system based on image software of intelligent equipment
CN105959724A (en) * 2016-05-24 2016-09-21 腾讯科技(深圳)有限公司 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
CN106170821A (en) * 2014-03-18 2016-11-30 株式会社Live2D Image processing apparatus, image processing method and program
CN107657638A (en) * 2017-10-30 2018-02-02 努比亚技术有限公司 A kind of image processing method, device and computer-readable recording medium
CN107734384A (en) * 2016-08-10 2018-02-23 北京光子互动科技有限公司 Image processing method and device
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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997687A (en) * 2013-02-20 2014-08-20 英特尔公司 Techniques for adding interactive features to videos
CN104751503A (en) * 2013-12-26 2015-07-01 北京大学 Layer processing device and layer processing method
CN106170821A (en) * 2014-03-18 2016-11-30 株式会社Live2D Image processing apparatus, image processing method and program
CN104506921A (en) * 2014-12-24 2015-04-08 天脉聚源(北京)科技有限公司 Dynamic image displaying method and device
CN104869324A (en) * 2015-05-18 2015-08-26 成都平行视野科技有限公司 Image processing method and image processing system based on image software of intelligent equipment
CN105959724A (en) * 2016-05-24 2016-09-21 腾讯科技(深圳)有限公司 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

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
CS石头: "《哔哩哔哩》", 23 August 2014 *
PHP中文网: ""Photoshop用文字制作动态蒙版效果教程"", 《PHP中文网,HTTPS://WWW.PHP.CN/PS-TUTORIAL-76286.HTML》 *
泱泱悲秋: ""UI 设计师 SVG 动画进阶篇——蒙版动画(下)"", 《简书,HTTPS://WWW.JIANSHU.COM/P/3A9FE0989FB5》 *
泱泱悲秋: ""UI设计师SVG动画进阶篇——蒙版动画(上)"", 《简书,HTTP://EVENTS.JIANSHU.IO/P/1677A50BA446》 *
闻竹韵赏清音: ""【动画基础】PS动画基础教程之使用蒙版制作动画"", 《个人图书馆,HTTP://WWW.360DOC.COM/CONTENT/12/0114/20/1516585_179410887.SHTML》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500726A (en) * 2021-12-27 2022-05-13 努比亚技术有限公司 Charging video display method, mobile terminal and storage medium
CN114466228A (en) * 2021-12-31 2022-05-10 山东信通电子股份有限公司 Method, equipment and storage medium for improving screen projection display fluency
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

Also Published As

Publication number Publication date
CN111787240B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN111787240B (en) Video generation method, apparatus and computer readable storage medium
KR101674284B1 (en) Method, device, program and recording medium for image processing
US9953422B2 (en) Selective local registration based on registration error
CN107622504B (en) Method and device for processing pictures
CN109600605B (en) Detection method of 4K ultra-high-definition video, electronic device and computer program product
CN104808959B (en) Information processing method and electronic equipment
CN111192190B (en) Method and device for eliminating image watermark and electronic equipment
CN106201255B (en) Information processing method and electronic equipment
EP3206387B1 (en) Image dynamic range adjustment method, terminal, and storage media
CN112396610A (en) Image processing method, computer equipment and storage medium
CN111158840B (en) Image carousel method and device
CN104516696A (en) Information processing method and electronic device
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
US20110221775A1 (en) Method for transforming displaying images
CN114119691A (en) Method and device for projecting applique material
CN113763233B (en) Image processing method, server and photographing equipment
CN113379768A (en) Image processing method, image processing device, storage medium and computer equipment
CN108769520B (en) Electronic device, image processing method, and computer-readable storage medium
CN112905005A (en) Adaptive display method and device for vehicle and storage medium
CN104954892A (en) Method and device for showing video subject content
CN109803163B (en) Image display method and device and storage medium
CN114647467B (en) Watermark updating method, device, system and storage medium
CN103544038B (en) One kind is based on 4K2K systematic difference program display method and apparatus
CN112308938B (en) Image processing method and image processing apparatus
CN112950514B (en) Image processing method and device, electronic equipment and readable 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