WO2021135320A1 - 一种视频的生成方法、装置及计算机系统 - Google Patents

一种视频的生成方法、装置及计算机系统 Download PDF

Info

Publication number
WO2021135320A1
WO2021135320A1 PCT/CN2020/111952 CN2020111952W WO2021135320A1 WO 2021135320 A1 WO2021135320 A1 WO 2021135320A1 CN 2020111952 W CN2020111952 W CN 2020111952W WO 2021135320 A1 WO2021135320 A1 WO 2021135320A1
Authority
WO
WIPO (PCT)
Prior art keywords
key frame
rendering
video
frame
preset
Prior art date
Application number
PCT/CN2020/111952
Other languages
English (en)
French (fr)
Inventor
黄敏敏
董邦发
杨现
Original Assignee
苏宁云计算有限公司
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 苏宁云计算有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3166347A priority Critical patent/CA3166347A1/en
Publication of WO2021135320A1 publication Critical patent/WO2021135320A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/812Monomedia components thereof involving advertisement data

Definitions

  • the present invention relates to the field of computer technology, and in particular to a video generation method, device and computer system.
  • the above three methods have the following problems: the use of video shooting methods to obtain display videos requires extremely high labor and time costs, and it is difficult to apply to short-cycle and large-scale display video production scenarios, especially when the number of videos is required to reach one After a very high level, even if a large amount of labor is added, the actual production demand cannot be met. Similar problems exist in the way of video production through graphics and video processing software such as Adobe After Effects. The labor cost is difficult to reduce, the production efficiency is difficult to improve, and the production scale is very limited. Neither of the above two methods can meet today's fast-paced e-commerce environment for the cost, efficiency, and scale requirements of commodity display video production.
  • the third type of video production based on FFmpeg's video image processing capabilities, although it can realize the mass generation of large-scale commodity videos and meet the needs of commodity video production scale, but because it directly uses the commodity image as the key frame of the video, And the only function provided is to add filters and transitions, which cannot meet the individual needs of the richness and diversity of video content.
  • the main purpose of the present invention is to provide a video generation method to solve the problems of low cost, high efficiency, scale, and content customization that cannot be achieved in the prior art.
  • the present invention provides a video generation method, the method includes:
  • a video corresponding to the key frame is generated, and the video is composed of the key frame and an intermediate frame corresponding to the key frame.
  • the preset rendering method includes:
  • the three-dimensional image is composed of vertices and the connection relationship of the vertices, the picture to be processed is the original picture or the key frame ;
  • a target frame corresponding to the picture to be processed is obtained, the target frame corresponding to the original picture is the key frame, and the target frame corresponding to the key frame is an intermediate frame corresponding to the key frame.
  • the obtaining the target frame corresponding to the picture to be processed according to the two-dimensional image includes:
  • the modifying the connection relationship between the vertices and the vertices according to the rendering parameters corresponding to the picture to be processed, and obtaining the adjusted three-dimensional image further includes:
  • the part of the modified three-dimensional image that is not within the visible range of the preset camera angle of view is deleted to obtain the adjusted three-dimensional image.
  • the method further includes:
  • the rendering of the original picture according to a preset rendering method to obtain a key frame includes:
  • the rendering the key frame according to the preset rendering method, and obtaining the intermediate frame corresponding to the key frame includes:
  • the key frame is rendered according to the preset rendering method to obtain an intermediate frame corresponding to the key frame.
  • the method further includes:
  • All the videos corresponding to the key frames are spliced in a preset order to obtain the target video.
  • the splicing the videos corresponding to each of the key frames in a preset order to obtain the target video includes:
  • the video corresponding to the key frame and the transition video corresponding to the key frame are sorted and spliced according to a preset key frame order to obtain a complete video.
  • the present application provides a video generation device, the device includes:
  • a rendering module configured to render the original picture according to a preset rendering method to obtain key frames
  • the generating module is configured to generate a video corresponding to the key frame, and the video is composed of the key frame and an intermediate frame corresponding to the key frame.
  • the obtained key frames have at least two frames
  • the device further includes a splicing module for splicing all the videos corresponding to the key frames in a preset order to obtain the target video.
  • this application provides a computer system, which includes:
  • One or more processors are One or more processors;
  • a memory associated with the one or more processors where the memory is used to store program instructions, and when the program instructions are read and executed by the one or more processors, perform the following operations:
  • a video corresponding to the key frame is generated, and the video is composed of the key frame and an intermediate frame corresponding to the key frame.
  • This application proposes obtaining the original picture; rendering the original picture according to a preset rendering method to obtain a key frame; rendering the key frame according to the preset rendering method to obtain an intermediate frame corresponding to the key frame ; Generate the video corresponding to the key frame, the video is composed of the key frame and the intermediate frame corresponding to the key frame, realizes the automatic generation of the video, and the original picture can be rendered to obtain the key frame, reducing the original Restrictions on the quality of pictures;
  • This application also discloses a specific method of rendering.
  • the picture to be processed is converted into a three-dimensional image by using a preset three-dimensional image processing technology.
  • the edge of the three-dimensional image is composed of vertices and the connection relationship between the vertices.
  • the picture to be processed is the original picture or the key frame; the rendering parameters corresponding to the picture to be processed are read; the connection relationship between the vertices and the vertices is based on the rendering parameters corresponding to the picture to be processed Modify to obtain the adjusted three-dimensional image; project the adjusted three-dimensional image into a two-dimensional image; obtain the target frame corresponding to the picture to be processed according to the two-dimensional image, the The target frame corresponding to the original picture is the key frame, and the target frame corresponding to the key frame is the intermediate frame corresponding to the key frame.
  • the original picture can be stacked, translated, and rotated in all directions by modifying the rendering parameters.
  • the adjustment to meet the individual needs in terms of the richness and diversity of video content;
  • This application also proposes to splice the videos corresponding to each of the key frames in a preset order to obtain the target video, which meets the requirements for videos of different durations.
  • FIG. 1 is a diagram of a video generation interface provided by an embodiment of the present application.
  • Figure 2 is an appearance diagram of a product provided by an embodiment of the present application.
  • Figure 3 is an appearance diagram of a product provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of image rendering provided by an embodiment of the present application.
  • Fig. 5 is a diagram of a three-dimensional mesh model provided by an embodiment of the present application.
  • Figure 6 is a key frame generation diagram provided by an embodiment of the present application.
  • Figure 7 is a key frame generation diagram provided by an embodiment of the present application.
  • Fig. 8 is an example diagram of a mixing effect provided by an embodiment of the present application.
  • FIG. 9 is an example diagram of a video frame provided by an embodiment of the present application.
  • FIG. 10 is a flowchart of a method provided by an embodiment of the present application.
  • FIG. 11 is a structural diagram of an apparatus provided by an embodiment of the present application.
  • Fig. 12 is a system structure diagram provided by an embodiment of the present application.
  • a video usually contains components such as video track, audio track, subtitle track, etc., and multi-track synchronized playback of these components constitutes a video in the traditional sense.
  • the expression of video content is mainly done through a video track, which is essentially a collection of a group of video frames. Due to the visual persistence effect, when the video is played at a speed of 25 continuous progressive video frames in 1 second, what the human eye sees becomes a continuous video image.
  • Video frames are divided into key frames and intermediate frames.
  • the key frame determines the content expressed in a video frame
  • the intermediate frame provides a transition between two key frames. It can be a continuation of the content of the previous key frame or the connection of the next key frame.
  • the collection of key frames and intermediate frames constitutes a video.
  • the present invention proposes to generate video by making key frames based on original pictures and making intermediate frames based on key frames. Specifically, taking the generation of a display video for a product as an example, it can be achieved through the following steps:
  • Step 1 The user inputs the picture to be processed, selects the target output size, key path and background music;
  • the user can directly input the product code of the product to be processed, and automatically obtain the corresponding image to be processed.
  • This application pre-configures a variety of rendering critical paths for users to choose, and each rendering critical path corresponds to a video presentation method, such as translation, cropping, filters, special effects, etc., and pre-configured pictures to be processed corresponding to each presentation method
  • a video presentation method such as translation, cropping, filters, special effects, etc.
  • pre-configured pictures to be processed corresponding to each presentation method
  • the number of key frames required varies according to the key path selected by the user, and it can be one frame or more than one frame. When the required number of key frames exceeds one frame, the sequence frame animation corresponding to each key frame can be spliced to obtain a complete video.
  • the critical path is to abstract the parameters of the geometric transformation of the influence matrix involved in the video rendering process and the time variable parameters involved, extract the general part of the logic of the video frame generation process, and encapsulate it, and get a set that can be freely carried out. Optimized combination of video generation logic components.
  • Step 2 According to the key path selected by the user, the image to be processed is processed to obtain the key frame;
  • the pictures to be processed can be directly preprocessed, and the preprocessed pictures to be processed can be directly used as key frames use.
  • the picture to be processed input by the user cannot be directly used as the key frame of the video.
  • the picture to be processed needs to be preprocessed first, and then processed using the processing parameters of the picture to be processed corresponding to the selected key path to generate the key Frame, the key frame is processed according to the key frame processing parameters corresponding to the selected key path to obtain the intermediate frame.
  • the processing parameters of the picture to be processed and the processing parameters of the key frame include processing methods for the corresponding pictures, including conversion methods and conversion parameters for variables such as vertex coordinates, direction vectors, and colors.
  • the preprocessing process includes image preprocessing operations such as matting the image to be processed and obtaining the image of the main body of the commodity.
  • OpenGL can be used to complete the process of converting the image to be processed into key frames.
  • OpenGL is a cross-language and cross-platform application programming interface for rendering 2D and 3D vector graphics. It consists of nearly 350 different function calls. It can be used to draw various graphics from simple graphics to complex three-dimensional scenes. .
  • Figure 4 shows the specific process of image processing, which is divided into a geometric phase and a rasterization phase.
  • the specific process includes:
  • the key frame result obtained can be the key frame shown in Fig. 6 and Fig. 7, and the geometric transformation process includes:
  • the coordinates of the vertices included in the picture to be processed are adjusted to obtain the adjusted picture to be processed.
  • Linear transformation refers to the transformation of vector addition and scalar multiplication, and is represented by scaling, rotation, staggering, mirroring, and orthogonal projection.
  • translation transformation can be combined, and affine transformation can be obtained through translation transformation and linear transformation. A variety of image processing effects can be obtained by combining these transformations.
  • the matrix represents the translation of the vertex (x, y, z, 1) along the X axis by t x units, along the Y axis by t y units, and along Z Axis translation t z units.
  • the matrix indicates that the coordinates (x, y, z, 1) are expanded by K x units along the X axis, K y units along the Y axis , and K z units along the Z axis. .
  • the corresponding matrix can be used to perform linear transformation on the image to be processed.
  • the vertex coordinates are calculated again according to the preset time variable parameters, and the effect of each frame changing over time can be realized, and the adjusted picture to be processed can be obtained.
  • the corresponding frustum and light source of the angle of view camera delete the adjusted part of the image to be processed that is not in the field of view of the angle of view camera, and obtain the visible part and pass it to step E;
  • the target rendering effect of the key frame is preset in the processing parameters of the picture to be processed.
  • the pixel coverage of the visible part is calculated according to the preset target rendering effect, and each preset pixel is checked whether it is covered. According to the conversion to two-dimensional coordinates
  • the triangular grid contained in the visible part is interpolated with preset pixels.
  • Step 3 Process the key frames according to the key frame processing parameters to obtain intermediate frames
  • the processing method for the key frame is the same as the processing method of the picture to be processed in the above step two, according to the preset time variable parameters included in the corresponding key frame processing parameters, the preset translation amount, the zoom amount, and the preset pixels. Parameters, the key frame is processed as a picture to be processed, and the intermediate frame corresponding to each key frame is made.
  • Step 4 According to each key frame and the corresponding intermediate frame, synthesize the sequence frame animation
  • Step 5 Splicing the sequence frame animation corresponding to each key frame to obtain the product display video
  • the sequence frame animations obtained in step 4 are independent video clips, but a complete video needs to be combined and spliced by sequence frame animations generated by several key frames.
  • the multiple sets of sequence frame animations obtained in the previous step are encoded and compressed through video encoding to obtain the corresponding sequence frame animation files, and then need to perform image mixing processing on them to generate corresponding transition video files to achieve the intermediate transition between video clips Effect video, so as to stitch between multiple sequence frame animation files.
  • the generation of the intermediate transition effect can actually be regarded as the mixing operation of two images, and further abstraction, the image mixing is essentially the mixing of pixel colors from a microscopic point of view, then the mixing is related to the two operands: The color of the last frame of a video and the color of the first frame of the following video.
  • the values of the four channels of RGBA are included.
  • Blending is a piece-by-segment operation, and the blending factor can be obtained according to the calculation to affect the blending effect.
  • the above-mentioned mixing equation needs to be used, and the former is used for mixing s RGB channel and d, the latter is used to mix the A channel of s and d.
  • the A channel is used to control the transparency of the image, and the RGB channel is used to control the color of the image.
  • the neutralization factor of the above-mentioned mixing equation is preset, and the available factors of SrcFactor and DstFactor in the above-mentioned mixing equation are shown in Table 2 below.
  • step 5 Arrange the sequence frame animation obtained in step 5 in order, insert the corresponding intermediate transition effect video into it, and stitch the obtained video queue to assemble a complete video composed of multiple video clips, which can be compressed, Adjust the size of the video according to the preset size, etc., to generate a video that meets the needs of the user.
  • the present application provides a method for generating a video. As shown in FIG. 9, the method includes:
  • the preset rendering method includes:
  • a target frame corresponding to the picture to be processed is obtained, the target frame corresponding to the original picture is the key frame, and the target frame corresponding to the key frame is an intermediate frame corresponding to the key frame.
  • the obtaining a key frame according to the two-dimensional image includes:
  • the modifying the connection relationship between the vertices and the vertices according to the rendering parameters corresponding to the picture to be processed, and obtaining the adjusted three-dimensional image further includes:
  • the part of the modified three-dimensional image that is not within the visible range of the preset camera angle of view is deleted to obtain the adjusted three-dimensional image.
  • the method further includes:
  • the rendering of the original picture according to a preset rendering method to obtain a key frame includes:
  • the rendering the key frame according to the preset rendering method, and obtaining the intermediate frame corresponding to the key frame includes:
  • the method further includes:
  • All the videos corresponding to the key frames are spliced in a preset order to obtain a target video.
  • the splicing the video corresponding to each of the key frames according to a preset order to obtain the target video includes:
  • the video corresponding to the key frame and the transition video corresponding to the key frame are sorted and spliced according to a preset key frame order to obtain a complete video.
  • the present application provides a video generation device, which includes:
  • the obtaining module 1110 is used to obtain the original picture
  • the rendering module 1120 is configured to render the original picture according to a preset rendering method to obtain key frames
  • the generating module 1130 is configured to generate a video corresponding to the key frame, and the video is composed of the key frame and an intermediate frame corresponding to the key frame.
  • the obtained key frames are at least two frames
  • the device further includes a splicing module 1140 for splicing the videos corresponding to each of the key frames in a preset order to obtain the target video.
  • the rendering module 1120 can also be used to use a preset three-dimensional image processing technology to convert the picture to be processed into a three-dimensional image, the three-dimensional image is composed of vertices and the connection relationship of the vertices, the to-be-processed
  • the picture is the original picture or the key frame;
  • a target frame corresponding to the picture to be processed is obtained, the target frame corresponding to the original picture is the key frame, and the target frame corresponding to the key frame is an intermediate frame corresponding to the key frame.
  • the rendering module 1120 may also be used for the rendering module 1120 .
  • the rendering module 1120 may also be used for the rendering module 1120 .
  • the part of the modified three-dimensional image that is not within the visible range of the preset camera angle of view is deleted to obtain the adjusted three-dimensional image.
  • the acquisition module 1120 may also be used to:
  • the rendering module 1120 may also be used for the rendering module 1120 .
  • the key frame is rendered according to the preset rendering method to obtain an intermediate frame corresponding to the key frame.
  • the splicing module 1140 can also be used for
  • the video corresponding to the key frame and the transition video corresponding to the key frame are sorted and spliced according to a preset key frame order to obtain a complete video.
  • the fourth embodiment of the present application provides a computer system, including: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions When the program instructions are read and executed by the one or more processors, the following operations are performed:
  • a video corresponding to the key frame is generated, and the video is composed of the key frame and an intermediate frame corresponding to the key frame.
  • FIG. 12 exemplarily shows the architecture of the computer system, which may specifically include a processor 1510, a video display adapter 1511, a disk drive 1512, an input/output interface 1513, a network interface 1514, and a memory 1520.
  • the processor 1510, the video display adapter 1511, the disk drive 1512, the input/output interface 1513, the network interface 1514, and the memory 1520 may be communicatively connected through the communication bus 1530.
  • the processor 1510 can be implemented in a general-purpose CPU (Central Processing Unit, central processing unit), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., for Perform relevant procedures to realize the technical solutions provided in this application.
  • a general-purpose CPU Central Processing Unit, central processing unit
  • microprocessor microprocessor
  • ASIC Application Specific Integrated Circuit
  • integrated circuits etc.
  • the memory 1520 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory, random access memory), static storage device, dynamic storage device, etc.
  • the memory 1520 may store an operating system 1521 for controlling the operation of the computer system 1500, and a basic input output system (BIOS) for controlling the low-level operation of the computer system 1500.
  • BIOS basic input output system
  • a web browser 1523, a data storage management system 1524, and an icon font processing system 1525 can also be stored.
  • the foregoing icon font processing system 1525 may be an application program that specifically implements the foregoing steps in the embodiment of the present application.
  • the related program code is stored in the memory 1520 and is called and executed by the processor 1510.
  • the input/output interface 1513 is used to connect input/output modules to realize information input and output.
  • the input/output/module can be configured in the device as a component (not shown in the figure), or can be connected to the device to provide corresponding functions.
  • the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and an output device may include a display, a speaker, a vibrator, an indicator light, and the like.
  • the network interface 1514 is used to connect a communication module (not shown in the figure) to realize communication interaction between the device and other devices.
  • the communication module can realize communication through wired means (such as USB, network cable, etc.), or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).
  • the bus 1530 includes a path to transmit information between various components of the device (for example, the processor 1510, the video display adapter 1511, the disk drive 1512, the input/output interface 1513, the network interface 1514, and the memory 1520).
  • various components of the device for example, the processor 1510, the video display adapter 1511, the disk drive 1512, the input/output interface 1513, the network interface 1514, and the memory 1520.
  • the computer system 1500 can also obtain information about specific receiving conditions from the virtual resource object receiving condition information database 1541 for condition judgment, and so on.
  • the above device only shows the processor 1510, the video display adapter 1511, the disk drive 1512, the input/output interface 1513, the network interface 1514, the memory 1520, the bus 1530, etc., in the specific implementation process, the The device may also include other components necessary for normal operation.
  • the above-mentioned device may also include only the components necessary to implement the solution of the present application, and not necessarily include all the components shown in the figure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Biophysics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Processing Or Creating Images (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本申请公开了一种视频的生成方法、装置及计算机系统,其中所述方法包括:获取原始图片;按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成,实现了对视频生成过程中的低成本、高效率、规模化与内容的个性化问题的兼顾。

Description

一种视频的生成方法、装置及计算机系统 技术领域
本发明涉及计算机技术领域,尤其涉及一种视频的生成方法、装置及计算机系统。
背景技术
在在线销售平台上,往往上架了大量的商品。为了更好地展现商品的特性,帮助用户进行商品甄别及决策,可以为用户提供商品的展示视频。
当前业内对于商品的展示视频的生产制作有以下三种方法:一种是直接通过对商品实物进行拍摄的方式获得展示视频,另一种是使用Adobe After Effects为代表的图形视频处理软件,以人工方式,对已有的商品图像或者视频素材进行添加特效等加工处理,获得展示视频;还有一种是基于FFmpeg的视频图像处理能力,直接将商品图作为视频的关键帧,通过使用一些提供的滤镜、转场生成视频的中间帧,从而实现展示视频的自动生成。
上述三种方法存在以下的问题:采用视频拍摄方式获取展示视频,需要消耗极高的人力成本及时间成本,且难以应用于短周期大批量的展示视频生产场景,特别是当视频数量需求到达一个很高的量级之后,即使增加大量的人工,也无法满足实际的生产需求。通过Adobe After Effects等图形视频处理软件进行视频生产的方式也存在着相似的问题,人力成本难以降低、生产效率难以提升、生产规模十分有限。以上两种方式都无法满足当今快节奏的电商环境对商品展示视频生产的成本、效率以及规模上的需求。第三种基于FFmpeg的视频图像处理能力进行视频的生产,虽然能实现大批量的商品视频的批量生成,满足商品视频生产规模上的需求,然而由于其直接将商品图作为了视频的关键帧,且提供的功能仅有添加滤镜及转场,无法满足在视频内容的丰富度、多样性方面的个性化需求。
发明内容
为了解决现有技术的不足,本发明的主要目的在于提供一种视频的生成方法,以解决现有技术中无法兼顾视频生成的低成本、高效率、规模化与内容的个性化的问题。
为了达到上述目的,第一方面本发明提供了一种视频的生成方法,所述方法包括:
获取原始图片;
按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
在一些实施例中,所述预设的渲染方法包括:
使用预设的三维图像处理技术,将待处理图片转换为三维立体图像,所述三维立体图像由顶点及所述顶点的连接关系组成,所述待处理图片为所述原始图片或所述关键帧;
读取所述待处理图片对应的渲染参数;
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像;
将所述调整后的所述三维立体图像投影为二维图像;
根据所述二维图像,获得所述待处理图片对应的目标帧,所述原始图片对应的目标帧为所述关键帧,所述关键帧对应的目标帧为所述关键帧对应的中间帧。
在一些实施例中,所述根据所述二维图像,获得所述待处理图片对应的目标帧包括:
根据所述待处理图片对应的渲染参数,获得所述待处理图片对应的特效对象;
根据所述二维图像及所述对应的特效对象进行渲染,获得所述待处理图片 对应的目标帧。
在一些实施例中,所述根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像还包括:
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得修改后的所述三维立体图像;
删除修改后的所述三维立体图像不在预设的相机视角的可见范围内的部分,获得调整后的所述三维立体图像。
在一些实施例中,所述方法还包括:
读取预设的参数配置文件,获得原始图片处理参数及关键帧处理参数;
所述按照预设的渲染方法对所述原始图片进行渲染,获得关键帧包括:
根据所述原始图片处理参数,按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
所述按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧包括:
根据所述关键帧处理参数,按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧。
在一些实施例中,获得的所述关键帧至少有两帧,所述方法还包括:
将所有所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
在一些实施例中,所述将每一所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频包括:
按照预设的图像处理方法,生成每一所述关键帧对应的过渡视频;
将所述关键帧对应的视频、所述关键帧对应的过渡视频按照预设的关键帧顺序进行排序并拼接,获得完整视频。
第二方面,本申请提供了一种视频的生成装置,所述装置包括:
获取模块,用于获取原始图片;
渲染模块,用于按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
及按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
生成模块,用于生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
在一些实施例中,获得的所述关键帧至少有两帧,所述装置还包括拼接模块,用于将所有所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
第三方面,本申请提供了一种计算机系统,所述系统包括:
一个或多个处理器;
以及与所述一个或多个处理器关联的存储器,所述存储器用于存储程序指令,所述程序指令在被所述一个或多个处理器读取执行时,执行如下操作:
获取原始图片;
按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
本发明实现的有益效果为:
本申请提出了通过获取原始图片;按照预设的渲染方法对原始图片进行渲染,获得关键帧;按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成,实现了视频的自动化生成,同时原始图片可进行渲染获得关键帧,降低了对原始图片的质量的限制;
本申请还公开了一种渲染的具体方法,通过使用预设的三维图像处理技术,将待处理图片转换为三维立体图像,所述三维立体图像的边缘由顶点及所述顶点的连接关系组成,所述待处理图片为所述原始图片或所述关键帧;读取所述待处理图片对应的渲染参数;根据所述待处理图片对应的渲染参数,对所述顶点、 所述顶点的连接关系进行修改,获得调整后的所述三维立体图像;将所述调整后的所述三维立体图像投影为二维图像;根据所述二维图像,获得所述待处理图片对应的目标帧,所述原始图片对应的目标帧为所述关键帧,所述关键帧对应的目标帧为所述关键帧对应的中间帧,可通过对渲染参数的修改实现对原始图片进行层叠、平移、旋转等全方位的调整,满足了在视频内容的丰富度、多样性方面的个性化需求;
本申请还提出了将每一所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频,满足了对不同时长的视频的需求。
本发明所有产品并不需要具备上述所有效果。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的视频生成界面图;
图2是本申请实施例提供的产品外观图;
图3是本申请实施例提供的产品外观图;
图4是本申请实施例提供的图像渲染流程图;
图5是本申请实施例提供的三维网格模型图;
图6是本申请实施例提供的关键帧生成图;
图7是本申请实施例提供的关键帧生成图;
图8是本申请实施例提供的混合效果示例图;
图9是本申请实施例提供的视频帧示例图;
图10是本申请实施例提供的方法流程图;
图11是本申请实施例提供的装置结构图;
图12是本申请实施例提供的系统结构图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
一个视频通常了包含视频轨、音频轨、字幕轨等组成部分,对这些组成部分进行多轨同步播放,就构成了传统意义上的视频。视频内容的表达主要通过视频轨完成,视频轨实质上就是一组视频帧的集合。由于视觉暂留效应,当视频以1秒播放25张连续渐进的视频帧的速度进行播放时,人眼所看到的就成为了一段连续的视频影像。
视频帧分为关键帧与中间帧。关键帧确定了一段视频画面表达的内容,中间帧则为两个关键帧之间提供了过渡,它可以是前一个关键帧画面内容的延续,或者是下一个关键帧的衔接。关键帧以及中间帧的集合就构成了一段视频。
因此,本发明提出了通过根据原始图片制作关键帧、根据关键帧制作中间帧的方式来生成视频。具体的,以对商品生成展示视频为例,可通过如下步骤实现:
步骤一、用户输入待处理图片,选择目标输出尺寸、关键路径及背景音乐;
如图1所示,用户可直接输入待处理商品的商品编码,自动获取对应的待处理图片。
本申请预先配置了多种渲染关键路径供用户选择,每个渲染关键路径对应一种视频视频的表现方法,例如平移、裁剪、滤镜、特效等,预先配置了对应各个表现方法的待处理图片的处理参数、关键帧的处理参数及所需的关键帧数量及要求。
根据用户选择的关键路径的不同,所需的关键帧的数量也不相同,可以为一帧或者超过一帧。当所需的关键帧数量超过一帧时,可以对生成的每一关键帧对应的序列帧动画进行拼接,获得完整视频。
关键路径是通过对视频渲染过程中涉及到的影响矩阵的几何变换的运算结果的参数及涉及的时间变量参数进行抽象,提取出视频帧生成过程的通用部分逻辑进行封装,得到一组可以进行自由优化组合的视频生成逻辑组件。
步骤二、根据用户选择的关键路径,对待处理图片进行处理,获得关键帧;
当判断用户输入的待处理图片的数量及内容已经满足了用户选择的关键路径对关键帧预设的要求时,可直接对待处理图片进行预处理,将经过预处理的待处理图片直接作为关键帧使用。
如图2、图3所示,用户输入的待处理图片无法直接作为视频的关键帧,需要先对待处理图片进行预处理,然后使用选择的关键路径对应的待处理图片处理参数进行处理,生成关键帧,根据选择的关键路径对应的关键帧处理参数对关键帧进行处理,获得中间帧。
待处理图片的处理参数及关键帧的处理参数中包含了对对应的图片的处理方法,包含对顶点坐标、方向矢量、颜色等变量的转换方法及转换参数。
所述预处理过程包含了将待处理图片抠图、获得商品主体的图像等图像预处理操作。
在完成对待处理图片的预处理过程后,可使用OpenGL完成将待处理图片转换为关键帧的过程。
OpenGL是一种用于渲染2D、3D矢量图形的跨语言、跨平台的应用程序编程接口,由近350个不同的函数调用组成,可用于绘制从简单的图形到复杂的三维景象的各种图形。
图4示出了图片处理的具体流程,分为几何阶段和光栅化阶段,具体的过程包括:
A、使用OpenGL构建一个渲染场景,包含固定位置的待处理图片、视角相机、视角相机对应的视锥体和光源;
B、将待处理图片转换为三维的三角形网格模型,如图5所示,所述三角形网格模型由连接的顶点组成;
C、根据选择的关键路径对应的待处理图片处理参数,对所述网格模型进行几何变换;
例如,当用户选择的关键路径为偏移、层叠、裁剪操作时,获得的关键帧结果可以是图6、图7所示的关键帧,其中的几何变换过程包括:
使用线性变换的方法,根据预设的计算参数,计算待处理图片包含的顶点的坐标;
根据预设的时间变量参数,对待处理图片包含的顶点的坐标进行调整,获得调整后的待处理图片。
线性变换指矢量加和标量乘的变换,以缩放、旋转、错切、镜像、正交投影等为代表。此外还可以结合平移变换,通过平移变换与线性变换又可以获取仿射变换。通过这些变换组合得到各种图像处理效果。
例如,实现图像平移效果时,可以使用平移矩阵
Figure PCTCN2020111952-appb-000001
Figure PCTCN2020111952-appb-000002
计算三维网格模型中的每个点平移后的坐标,所述矩阵表示将顶点(x,y,z,1)沿X轴平移t x个单位,沿Y轴平移t y个单位,沿Z轴平移t z个单位。
在实现图像缩放效果时,可以使用缩放矩阵
Figure PCTCN2020111952-appb-000003
计算每个点缩放后的坐标,所述矩阵表示将坐标(x,y,z,1)沿X轴扩大K x个单位,沿Y轴扩大K y个单位,沿Z轴扩大K z个单位。
根据待处理图片处理参数中预设的平移量、缩放量等,即可使用对应的矩阵对待处理图片进行线性变换。
由于视频中的每一帧的画面存在一个随着时间连续渐进的过程,因此为了实现动画效果,需要将时间添加到对定点的计算中,以便在时间变化时每一帧的 画面也可以随之变化,因此预先定义了如表1所示的时间变量。
Figure PCTCN2020111952-appb-000004
表1
根据预设的时间变量参数对顶点坐标进行再次计算,即可实现每一帧随着时间变化的效果,获得调整后的待处理图片。
D、根据预设的视角相机、视角相机对应的视锥体和光源,将调整后的待处理图片不在视角相机视野内的部分删除,获得可见部分传入步骤E;
E、将可见部分包含的顶点的坐标转换二维坐标并进行光栅化渲染;
待处理图片处理参数中预设了关键帧的目标渲染效果,根据预设的目标渲染效果计算可见部分的像素覆盖情况,并检查每个预设的像素是否被覆盖,根据转换为二维坐标的可见部分包含的三角网格进行对预设的像素进行插值。
根据插值的结果,使用OpenGL提供的材质与着色器完成关键帧的输出。
步骤三、根据关键帧处理参数,对关键帧进行处理,获得中间帧;
对关键帧的处理方法与上述步骤二中对待处理图片的处理方法相同,根据对应的关键帧处理参数包含的预设时间变量参数、预设的平移量、缩放量、预设的像素等预设参数,将关键帧作为待处理图片进行处理,制作每个关键帧对应的中间帧。
步骤四、根据每一关键帧及对应的中间帧,合成序列帧动画;
步骤五、将每一关键帧对应得序列帧动画进行拼接,获得商品展示视频;
步骤四获得的序列帧动画是一个个独立的视频片段,但一个完整的视频需 要由若干个关键帧生成的序列帧动画进行组合拼接而成。
将上一步获取的多组序列帧动画通过视频编码进行编码压缩,获得对应的序列帧动画文件,然后需要通过对其进行图像混合处理,生成对应的过渡视频文件以实现视频片段之间的中间过渡效果视频,从而进行多个序列帧动画文件之间的拼接。
中间过渡效果的生成实际上可以看作是对两个图像的混合操作,再进一步的抽象,图像的混合从微观的角度实质上就是像素颜色的混合,那么混合就和两个操作数有关:前一段视频最后一帧的颜色和后一段视频第一帧的颜色。
使用s指代前一段视频最后一帧的颜色即源颜色、用d指代后一段视频第一帧的颜色即目标颜色、用o表示对他们进行混合后得到的输出颜色。对于每一种颜色,都包含了RGBA四个通道的值。
混合是一个逐片元的操作,可以根据运算获得混合因子来影响混合效果。预先建立了混合等式O rgb=SrcFactor*S rgb+DstFactor*D rgb、O a=SrcFactorA*S a+DstFactorA*D a,当进行混合时,需要使用上述的混合等式,前者用于混合s与d的RGB通道,后者用于混合s与d的A通道。A通道用于控制图像的透明度,RGB通道用于控制图像的颜色。在关键路中,预设了上述的混合等式中和因子,上述混合等式中SrcFactor以及DstFactor可用的因子如下表2所示。
Figure PCTCN2020111952-appb-000005
Figure PCTCN2020111952-appb-000006
表2
在上述的混合等式中,把s和d与对应的混合因子相乘后,可以使用颜色相加、颜色相减、逐分量取小、逐分量取大等逻辑操作。通过上述的操作,实现比如透明度混合、柔和相加、正片叠底、两倍相乘、变暗、变亮、滤色、等同于、线性减淡等效果,如图8所示。
使用如图2所示的图片处理方法,将其适用范围从单张图像拓展到两张图像,通过深度测试及深度写入,把两张图像按照设定的距离视角相机的远近进行排序,按照从后往前的顺序渲染,通过深度缓冲中的像素排序值,渲染出一个重叠图像。通过加上线性变换等效果,由此生成的一系列序列帧动画就是可用于将两段视频拼接在一起的中间过渡效果视频。
将步骤五获得的序列帧动画顺序排列,并将对应的中间过渡效果视频插入其中,对获得的视频队列进行拼接,组装成一段有多个视频片段组成的完整视频,并可对其进行压缩,根据预设的尺寸等对视频大小进行调整,生成符合用户需求的视频。
实施例二
对应上述实施例,本申请提供了一种视频的生成方法,如图9所示,所述方 法包括:
1010、获取原始图片;
1020、按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
优选的,所述预设的渲染方法包括:
1021、使用预设的三维图像处理技术,将待处理图片转换为三维立体图像,所述三维立体图像由顶点及所述顶点的连接关系组成,所述待处理图片为所述原始图片或所述关键帧;
读取所述待处理图片对应的渲染参数;
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像;
将所述调整后的所述三维立体图像投影为二维图像;
根据所述二维图像,获得所述待处理图片对应的目标帧,所述原始图片对应的目标帧为所述关键帧,所述关键帧对应的目标帧为所述关键帧对应的中间帧。
优选的,所述根据所述二维图像,获得关键帧包括:
1022、根据所述待处理图片对应的渲染参数,获得所述待处理图片对应的特效对象;
根据所述二维图像及所述对应的特效对象进行渲染,获得所述待处理图片对应的目标帧。
优选的,所述根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像还包括:
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得修改后的所述三维立体图像;
删除修改后的所述三维立体图像不在预设的相机视角的可见范围内的部分,获得调整后的所述三维立体图像。
1030、按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
优选的,所述方法还包括:
1031、读取预设的参数配置文件,获得原始图片处理参数及关键帧处理参数;
所述按照预设的渲染方法对所述原始图片进行渲染,获得关键帧包括:
1032、根据所述原始图片处理参数,按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
所述按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧包括:
1033、根据所述关键帧处理参数,按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧。
1040、生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
优选的,获得的所述关键帧至少有两帧,所述方法还包括:
1041、将所有所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
优选的,所述将每一所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频包括:
1042、按照预设的图像处理方法,生成每一所述关键帧对应的过渡视频;
将所述关键帧对应的视频、所述关键帧对应的过渡视频按照预设的关键帧顺序进行排序并拼接,获得完整视频。
实施例三
对应上述方法实施例,如图11所示,本申请提供了一种视频的生成装置,所述装置包括:
获取模块1110,用于获取原始图片;
渲染模块1120,用于按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
及按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应 的中间帧;
生成模块1130,用于生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
优选的,获得的所述关键帧至少有两帧,所述装置还包括拼接模块1140,用于将每一所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
优选的,所述渲染模块1120还可用于使用预设的三维图像处理技术,将待处理图片转换为三维立体图像,所述三维立体图像由顶点及所述顶点的连接关系组成,所述待处理图片为所述原始图片或所述关键帧;
读取所述待处理图片对应的渲染参数;
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像;
将所述调整后的所述三维立体图像投影为二维图像;
根据所述二维图像,获得所述待处理图片对应的目标帧,所述原始图片对应的目标帧为所述关键帧,所述关键帧对应的目标帧为所述关键帧对应的中间帧。
优选的,所述渲染模块1120还可用于
根据所述待处理图片对应的渲染参数,获得所述待处理图片对应的特效对象;
根据所述二维图像及所述对应的特效对象进行渲染,获得所述待处理图片对应的目标帧。
优选的,所述渲染模块1120还可用于
根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得修改后的所述三维立体图像;
删除修改后的所述三维立体图像不在预设的相机视角的可见范围内的部分,获得调整后的所述三维立体图像。
优选的,所述获取模块1120还可用于,
读取预设的参数配置文件,获得原始图片处理参数及关键帧处理参数;
所述渲染模块1120还可用于
根据所述原始图片处理参数,按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;及
根据所述关键帧处理参数,按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧。
优选的,所述拼接模块1140还可用于
按照预设的图像处理方法,生成每一所述关键帧对应的过渡视频;
将所述关键帧对应的视频、所述关键帧对应的过渡视频按照预设的关键帧顺序进行排序并拼接,获得完整视频。
实施例四
对应上述方法、设备及系统,本申请实施例四提供一种计算机系统,包括:一个或多个处理器;以及与所述一个或多个处理器关联的存储器,所述存储器用于存储程序指令,所述程序指令在被所述一个或多个处理器读取执行时,执行如下操作:
获取原始图片;
按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
其中,图12示例性的展示出了计算机系统的架构,具体可以包括处理器1510,视频显示适配器1511,磁盘驱动器1512,输入/输出接口1513,网络接口1514,以及存储器1520。上述处理器1510、视频显示适配器1511、磁盘驱动器1512、输入/输出接口1513、网络接口1514,与存储器1520之间可以通过通信总线1530进行通信连接。
其中,处理器1510可以采用通用的CPU(Central Processing Unit,中央处 理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请所提供的技术方案。
存储器1520可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器1520可以存储用于控制计算机系统1500运行的操作系统1521,用于控制计算机系统1500的低级别操作的基本输入输出系统(BIOS)。另外,还可以存储网页浏览器1523,数据存储管理系统1524,以及图标字体处理系统1525等等。上述图标字体处理系统1525就可以是本申请实施例中具体实现前述各步骤操作的应用程序。总之,在通过软件或者固件来实现本申请所提供的技术方案时,相关的程序代码保存在存储器1520中,并由处理器1510来调用执行。输入/输出接口1513用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。
网络接口1514用于连接通信模块(图中未示出),以实现本设备与其他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。
总线1530包括一通路,在设备的各个组件(例如处理器1510、视频显示适配器1511、磁盘驱动器1512、输入/输出接口1513、网络接口1514,与存储器1520)之间传输信息。
另外,该计算机系统1500还可以从虚拟资源对象领取条件信息数据库1541中获得具体领取条件的信息,以用于进行条件判断,等等。
需要说明的是,尽管上述设备仅示出了处理器1510、视频显示适配器1511、磁盘驱动器1512、输入/输出接口1513、网络接口1514,存储器1520,总线1530等,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。 此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本申请方案所必需的组件,而不必包含图中所示的全部组件。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,云服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统或系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的系统及系统实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种视频的生成方法,其特征在于,所述方法包括:
    获取原始图片;
    按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
    按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
    生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
  2. 根据权利要求1所述的方法,其特征在于,所述预设的渲染方法包括:
    使用预设的三维图像处理技术,将待处理图片转换为三维立体图像,所述三维立体图像由顶点及所述顶点的连接关系组成,所述待处理图片为所述原始图片或所述关键帧;
    读取所述待处理图片对应的渲染参数;
    根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像;
    将所述调整后的所述三维立体图像投影为二维图像;
    根据所述二维图像,获得所述待处理图片对应的目标帧,所述原始图片对应的目标帧为所述关键帧,所述关键帧对应的目标帧为所述关键帧对应的中间帧。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述二维图像,获得所述待处理图片对应的目标帧包括:
    根据所述待处理图片对应的渲染参数,获得所述待处理图片对应的特效对象;
    根据所述二维图像及所述对应的特效对象进行渲染,获得所述待处理图片对应的目标帧。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述待处理图片对 应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得调整后的所述三维立体图像还包括:
    根据所述待处理图片对应的渲染参数,对所述顶点、所述顶点的连接关系进行修改,获得修改后的所述三维立体图像;
    删除修改后的所述三维立体图像不在预设的相机视角的可见范围内的部分,获得调整后的所述三维立体图像。
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述方法还包括:
    读取预设的参数配置文件,获得原始图片处理参数及关键帧处理参数;
    所述按照预设的渲染方法对所述原始图片进行渲染,获得关键帧包括:
    根据所述原始图片处理参数,按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
    所述按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧包括:
    根据所述关键帧处理参数,按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧。
  6. 根据权利要求1-4任一所述的方法,其特征在于,获得的所述关键帧至少有两帧,所述方法还包括:
    将所有所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
  7. 根据权利要求6所述的方法,其特征在于,所述将每一所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频包括:
    按照预设的图像处理方法,生成每一所述关键帧对应的过渡视频;
    将所述关键帧对应的视频、所述关键帧对应的过渡视频按照预设的关键帧顺序进行排序并拼接,获得完整视频。
  8. 一种视频的生成装置,其特征在于,所述装置包括:
    获取模块,用于获取原始图片;
    渲染模块,用于按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
    及按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
    生成模块,用于生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
  9. 根据权利要求8所述的生成装置,其特征在于,获得的所述关键帧至少有两帧,所述装置还包括拼接模块,用于将所有所述关键帧对应的视频进行按照预设顺序进行拼接,获得目标视频。
  10. 一种计算机系统,其特征在于,所述系统包括:
    一个或多个处理器;
    以及与所述一个或多个处理器关联的存储器,所述存储器用于存储程序指令,所述程序指令在被所述一个或多个处理器读取执行时,执行如下操作:
    获取原始图片;
    按照预设的渲染方法对所述原始图片进行渲染,获得关键帧;
    按照所述预设的渲染方法对所述关键帧进行渲染,获得所述关键帧对应的中间帧;
    生成所述关键帧对应的视频,所述视频由所述关键帧及所述关键帧对应的中间帧组成。
PCT/CN2020/111952 2019-12-30 2020-08-28 一种视频的生成方法、装置及计算机系统 WO2021135320A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3166347A CA3166347A1 (en) 2019-12-30 2020-08-28 Video generation method and apparatus, and computer system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911396267.6A CN111182367A (zh) 2019-12-30 2019-12-30 一种视频的生成方法、装置及计算机系统
CN201911396267.6 2019-12-30

Publications (1)

Publication Number Publication Date
WO2021135320A1 true WO2021135320A1 (zh) 2021-07-08

Family

ID=70657587

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111952 WO2021135320A1 (zh) 2019-12-30 2020-08-28 一种视频的生成方法、装置及计算机系统

Country Status (3)

Country Link
CN (1) CN111182367A (zh)
CA (1) CA3166347A1 (zh)
WO (1) WO2021135320A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545462A (zh) * 2018-05-29 2019-12-06 优酷网络技术(北京)有限公司 视频处理方法及装置
CN111161392B (zh) * 2019-12-20 2022-12-16 苏宁云计算有限公司 一种视频的生成方法、装置及计算机系统
CN112132931B (zh) * 2020-09-29 2023-12-19 新华智云科技有限公司 一种模板化视频合成的处理方法、装置及系统
CN112632326B (zh) * 2020-12-24 2022-02-18 北京风平科技有限公司 一种基于视频脚本语义识别的视频生产方法及装置
CN113676671B (zh) * 2021-09-27 2023-06-23 北京达佳互联信息技术有限公司 视频剪辑方法、装置、电子设备及存储介质
CN115460446A (zh) * 2022-08-19 2022-12-09 上海爱奇艺新媒体科技有限公司 一种多路视频信号的对齐方法、装置及电子设备
CN115442660B (zh) * 2022-08-31 2023-05-19 杭州影象官科技有限公司 自监督对抗视频摘要提取方法、装置、设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395222A (zh) * 2001-06-29 2003-02-05 三星电子株式会社 映射和渲染三维目标和活动的三维目标的基于图像的方法
CN104871213A (zh) * 2012-11-13 2015-08-26 谷歌公司 对于对象的全方位视图的视频编码
CN107484428A (zh) * 2015-03-25 2017-12-15 “实验室24”股份有限公司 用于显示对象的方法
CN107767432A (zh) * 2017-09-26 2018-03-06 盐城师范学院 一种采用三维虚拟技术的房地产宣传系统
US10147226B1 (en) * 2016-03-08 2018-12-04 Pixelworks, Inc. 2D motion vectors from 3D model data
CN110312117A (zh) * 2019-06-12 2019-10-08 北京达佳互联信息技术有限公司 数据刷新方法及装置
CN111161392A (zh) * 2019-12-20 2020-05-15 苏宁云计算有限公司 一种视频的生成方法、装置及计算机系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100530189C (zh) * 2007-02-13 2009-08-19 华为技术有限公司 一种自适应生成足球视频摘要的方法和装置
CN101252646A (zh) * 2008-01-24 2008-08-27 王志远 实现视频宣传片模块化制作的方法
US20160255139A1 (en) * 2016-03-12 2016-09-01 Yogesh Chunilal Rathod Structured updated status, requests, user data & programming based presenting & accessing of connections or connectable users or entities and/or link(s)
US10776440B2 (en) * 2018-03-15 2020-09-15 Microsoft Technology Licensing, Llc Query interpolation in computer text input
CN109121021A (zh) * 2018-09-28 2019-01-01 北京周同科技有限公司 一种视频集锦的生成方法、装置、电子设备及存储介质
CN109657100B (zh) * 2019-01-25 2021-10-29 深圳市商汤科技有限公司 视频集锦生成方法及装置、电子设备及存储介质
CN110232357A (zh) * 2019-06-17 2019-09-13 深圳航天科技创新研究院 一种视频镜头分割方法及系统
CN110602526B (zh) * 2019-09-11 2021-09-21 腾讯科技(深圳)有限公司 视频处理方法、装置、计算机设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395222A (zh) * 2001-06-29 2003-02-05 三星电子株式会社 映射和渲染三维目标和活动的三维目标的基于图像的方法
CN104871213A (zh) * 2012-11-13 2015-08-26 谷歌公司 对于对象的全方位视图的视频编码
CN107484428A (zh) * 2015-03-25 2017-12-15 “实验室24”股份有限公司 用于显示对象的方法
US10147226B1 (en) * 2016-03-08 2018-12-04 Pixelworks, Inc. 2D motion vectors from 3D model data
CN107767432A (zh) * 2017-09-26 2018-03-06 盐城师范学院 一种采用三维虚拟技术的房地产宣传系统
CN110312117A (zh) * 2019-06-12 2019-10-08 北京达佳互联信息技术有限公司 数据刷新方法及装置
CN111161392A (zh) * 2019-12-20 2020-05-15 苏宁云计算有限公司 一种视频的生成方法、装置及计算机系统

Also Published As

Publication number Publication date
CA3166347A1 (en) 2021-07-08
CN111182367A (zh) 2020-05-19

Similar Documents

Publication Publication Date Title
WO2021135320A1 (zh) 一种视频的生成方法、装置及计算机系统
CN111656407B (zh) 对动态三维模型的视图进行融合、纹理化和绘制
CN111161392B (zh) 一种视频的生成方法、装置及计算机系统
JP5531093B2 (ja) コンピュータグラフィックスでオブジェクトにシャドウを付ける方法
WO2017113488A1 (zh) 一种虚拟现实设备中显示2d应用界面的方法和装置
US20100060652A1 (en) Graphics rendering system
US9799134B2 (en) Method and system for high-performance real-time adjustment of one or more elements in a playing video, interactive 360° content or image
US20130278600A1 (en) Rendering interactive photorealistic 3d model representations
CN101189643A (zh) 3d图像生成和显示系统
US7409248B2 (en) Layer based paint operations
US8698830B2 (en) Image processing apparatus and method for texture-mapping an image onto a computer graphics image
US11282292B2 (en) Method based on unique metadata for making direct modifications to 2D, 3D digital image formats quickly and rendering the changes on AR/VR and mixed reality platforms in real-time
JP2011023902A (ja) 画像処理装置および画像処理方法
JP7425196B2 (ja) ハイブリッドストリーミング
JP2017111719A (ja) 映像処理装置、映像処理方法、及び映像処理プログラム
JP4987124B2 (ja) グラフィックデータ提供方法及びグラフィックデータ表示方法
JP2011022728A (ja) 画像処理装置および画像処理方法
CN116958344A (zh) 虚拟形象的动画生成方法、装置、计算机设备及存储介质
JP2003168130A (ja) リアルタイムで合成シーンのフォトリアルなレンダリングをプレビューするための方法
JP2014146162A (ja) 画像合成処理方法及び遊技機
JP2004201004A (ja) 3次元映像表示装置、プログラム、及び記録媒体
KR102666871B1 (ko) Ar 디바이스용 대용량 3차원 모델 출력 방법 및 장치
CN108805964B (zh) 基于OpenGL ES的VR机顶盒启动动画制作方法及系统
US12034787B2 (en) Hybrid streaming
RU2810701C2 (ru) Гибридный рендеринг

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20908648

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3166347

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20908648

Country of ref document: EP

Kind code of ref document: A1