Video generation method and apparatus, and device and storage medium
By deriving image content and generating videos on the original image, the problem of limited creative image information in the existing technology is solved, a richer display form and gameplay is achieved, and appreciation value and visual experience are enhanced.
Patent Information
- Application Number
- PCT/CN2024/119197
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-15
- Filing Date
- 2024-09-14
- Publication Date
- 2025-03-20
AI Technical Summary
The image information in a single creative image generated by the prior art is limited, resulting in limited presentation and appreciation value in special effect materials or template applications, affecting the viewer's visual experience.
By deriving image content on the original image, multiple derivative images are generated, and video files are generated based on these derivative images, showing the continuous expansion derivative effect of the original image.
It has achieved the improvement of presentation effects and enriched content in the visual application of the original image, and improved the appreciation value and visual experience in special-effect materials and template applications.
Smart Images

Figure CN2024119197_20032025_PF_FP_ABST
Abstract
Description
Video generation method, device, equipment and storage medium
[0001] This application claims priority to the Chinese invention patent application entitled “A video generation method, device, equipment and storage medium” and application number 2023111995987, filed on September 15, 2024. The entire contents of that application are incorporated herein by reference. Technical Field
[0002] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to a video generation method, apparatus, device, and storage medium. Background Art
[0003] With the development of computer vision theory and technology, it is possible to use image generation technology, such as image generation network models, to generate creative images.
[0004] However, the image information carried in a single creative image generated using image generation technology is often limited. When it is used as a special effects material or template, the presentation effect and appreciation value it can bring are also limited, which is not conducive to improving the viewer's viewing experience.
[0005] Summary of the Invention
[0006] The present disclosure provides a video generation method, apparatus, device and storage medium to achieve an improvement in the presentation effect of the generated creative images in visual applications and to enrich the content of the presented images.
[0007] In a first aspect, an embodiment of the present disclosure provides a video generation method, the method comprising: in response to a video generation operation of an original image, determining a derivative image set corresponding to the original image, the derivative image set including at least one derivative image arranged in a generation order, the derivative image having the same first image size as the original image, the derivative image including a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set including image content of a previous derivative image, and the previous derivative image of the first derivative image in the derivative image set being the original image; determining at least one video frame corresponding to the derivative image in the derivative image set, and forming a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0008] In a second aspect, an embodiment of the present disclosure further provides a video generation device, which includes: an operation response module, for determining a derivative image set corresponding to the original image in response to a video generation operation of an original image, wherein the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has the same first image size as the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of the subsequent derivative image in the derivative image set includes the image content of the previous derivative image, and the previous derivative image of the first derivative image in the derivative image set is the original image; a video frame determination module, for determining at least one video frame corresponding to the derivative image in the derivative image set, and forming a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0009] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the video generation method provided in the first aspect of the embodiment of the present disclosure.
[0010] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to implement the video generation method provided in the first aspect of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0012] FIG1a is a schematic flow chart of a video generation method provided by an embodiment of the present disclosure;
[0013] FIG1b shows an image derivative effect diagram of a derivative image in a derivative image set determined by the video generation method provided by this embodiment;
[0014] FIG2 shows another flow chart of a video generation method provided by an embodiment of the present disclosure;
[0015] FIG3 shows a schematic structural diagram of a video generation device provided by an embodiment of the present disclosure;
[0016] FIG4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0019] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0024] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0025] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0026] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0027] It should be noted that an application scenario of the video generation method provided in this embodiment can be described as: currently, images generated by neural network models are often directly used as special effects materials or templates, which cannot provide consumers with richer display forms and gameplay relative to the generated images, affecting the improvement of consumers' user experience.
[0028] Based on this, this embodiment provides a video generation method that can derive image content from the generated original image to form multiple derivative images with certain derivative characteristics, and the video file generated based on all the derivative images can show the effect of continuously expanding and deriving the original image when playing.
[0029] Specifically, Figure 1a shows a flow chart of a video generation method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the case of generating a video for an image. The method can be executed by a video generation device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device as an execution terminal, which can be a mobile terminal, a PC or a server, etc.
[0030] As shown in FIG1a , a video generation method provided by an embodiment of the present disclosure specifically includes the following operations:
[0031] S101. In response to a video generation operation of an original image, a derivative image set corresponding to the original image is determined, wherein the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has a first image size that is the same as that of the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes image content of a previous derivative image, and the previous derivative image of the first derivative image in the derivative image set is the original image.
[0032] In this embodiment, a function item for video generation can be provided for an existing image. For example, an image can be selected from an existing image list or an existing image display interface as the original image. Then, by triggering the aforementioned video generation function item, a video generation operation can be generated relative to the original image. This embodiment can respond to this video generation operation through the execution logic provided in this step.
[0033] In this embodiment, this step generates at least one derivative image relative to the original image. These derivative images can be added to a set of derivative images and arranged in the order in which they were generated. Derivative images in the set of derivative images have the same image size as the original image, which is preferably referred to as the first image size. In this embodiment, the image size of the derivative images is consistent with that of the original image, ensuring that the generated derivative images have the same resolution as the original image, thereby avoiding the problem of gradual degradation in the clarity of the generated derivative images.
[0034] In this embodiment, the image area of a derived image can be divided into two parts: one part can be designated as a fixed image area, and the other part can be designated as an image derivative area. The fixed image area can be located in the center of the derived image and have the second image size, while the image derivative area can surround the fixed image area. Furthermore, the image content of subsequent derived images within the derived image set is associated with the image content of preceding derived images. For example, the image content within the fixed image area of a subsequent derived image can be the image content of the preceding derived image after it has been reduced to the second image size, and the image content within the image derivative area can be derived based on the image content within the fixed image area.
[0035] Continuing with the above description, the subsequent derivative image and the preceding derivative image in the derivative image set can be adjacent derivative images, or they can be non-adjacent derivative images that are generated in a certain order. It can be seen that in the subsequently generated derivative image, the fixed image area it possesses can directly fill in the image content of the adjacent preceding derivative image, or it can contain all or part of the image content of the preceding derivative image within the fixed image area. In addition, it can also be considered that the image content of the first derivative image in the derivative image set is related to the image content of the original image. For example, the image content of the original image after being reduced to the second image size can be used as the image content of the first derivative image in the fixed image area, and the image content of the image derivative area in the first derivative image can also be derived from the image content in the fixed image area.
[0036] In this embodiment, the implementation of generating a derivative image relative to the original image in this step can be described as: adopting a cyclic derivation strategy, when the image derivation execution condition is met (that is, the image derivation end condition may not be met), the original image can first be regarded as the image to be processed, and then the image size of the image to be processed is reduced to form a reduced image with a second image size; thereafter, the text description information required for image derivation can be used to generate image derivative content through the image generation model, and finally, on a blank canvas with the first image size, a fixed image area and an image derivative area can be circled, and the image content of the reduced image can be filled into the fixed image area of the blank canvas, and the image derivative content can be filled into the image derivative area of the blank canvas, thereby forming a derivative image relative to the execution of the current derivation logic.
[0037] Continuing with the above description, after completing one execution logic of image derivation, it is possible to determine again whether the image derivation execution conditions are met. If so, the previously determined derivative image can be used again as a new image to be processed, and the execution logic of image derivation can be re-executed; finally, the above logic can be executed in a loop until the end condition of image derivation is met, thereby obtaining at least one derivative image relative to the original image. The obtained derivative images can be added to the derivative image set and arranged in the derivative image set in the order of generation.
[0038] To better understand the image derivation effects between the derivative images in a derivative image set, Figure 1b illustrates the image derivation effects of the derivative images in the derivative image set determined by the video generation method provided by this embodiment. As shown in Figure 1b, the determined derivative image set 1 includes four derivative images 11, which are arranged in the order of generation and can be respectively designated as derivative image A, derivative image B, derivative image C, and derivative image D. The original image can be assumed to be designated as A0.
[0039] As can be seen from Figure 1b, each derived image 11 includes a fixed image area 110 and an image derivative area 111, and it can be seen that the image derivative area 111 is arranged to surround the fixed image area 110. It is assumed that the image sizes of the original image and the derived image in Figure 1b are both recorded as the first image size, and the image size of the fixed image area 110 is recorded as the second image size.
[0040] For the first derivative image A, the image content in its fixed image area 110 is filled with the image content of the original image A0 after being reduced to the second image size, and the image derivative area 111 can be filled with the image content newly derived based on the existing image content; and so on, the image content in the fixed image area 110 of the derivative image B can be filled with the image content of the derivative image A after being reduced to the second image size, the image content in the fixed image area 110 of the derivative image C can be filled with the image content of the derivative image B after being reduced to the second image size, and the image content in the fixed image area 110 of the derivative image D can be filled with the image content of the derivative image C after being reduced to the second image size.
[0041] As shown in Figure 1b, each derived image in the derived image set can be viewed as an extension of the content of the previous derived image. The final derived image in the derived image set, relative to the original image, can be considered the result of multiple rounds of outward expansion of the derived image content centered on the original image. This derivation method further enriches the image content of the original image.
[0042] S102. Determine at least one video frame corresponding to a derived image in the derived image set, and form a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0043] It can be seen that for a video, the main content is played in the form of video frames. This is equivalent to displaying a dynamic picture composed of a group of video frames by controlling the rendering of the frame information of the group of video frames. Based on the above description and analysis, it can be seen that if a video file of a video segment is formed, it is necessary to know which video frames' frame information constitute the video file. If a video file related to a certain image is to be formed, the video frames that constitute the video file can be determined based on the related image.
[0044] In this embodiment, in order to generate a related video file relative to the original image, this step can further generate the video frames required to constitute the video file for the derivative images in the above-determined derivative image set. Specifically, this step can generate at least one video frame relative to the derivative images in the derivative image set, wherein at least one video frame can be generated for some or all of the derivative images in the derivative image set. Ultimately, the video file of the original image can be constructed using the frame description information of the generated video frames. In this embodiment, the frame description information of all the generated video frames is preferably aggregated to construct the video file of the original image, and the formed video file can be recorded as the target video file.
[0045] In this embodiment, analysis of the derived images contained in the derived image set reveals that the derived images, arranged in the order of their generation, can be considered as continuous outward extensions of the original image. In this case, each derived image can be directly treated as a video frame. Continuous playback of each derived image as a video frame can produce an effect where the image content of the original image continuously expands outward, introducing richer image content. However, video files that directly use derived images as video frames will produce significantly jumpy video frame content during playback, failing to ensure a consistent and smooth video content.
[0046] In this embodiment, a preferred implementation method may be to determine multiple video frames for each derived image. The number of video frames required to generate each derived image may be the same or different. This embodiment is described using the generation of the same number of video frames as an example. The process of generating a certain number of video frames for each derived image can be described as follows: the number of video frames to be generated for each derived image can be determined based on pre-configured video generation attribute information for the image generation video, and then each derived image can be processed (e.g., scaled) based on the desired video playback characteristics to form a video frame that meets the requirements.
[0047] Continuing with the above description, the pre-configured video generation attribute information in this embodiment may include the video playback duration and playback rate corresponding to a single derived image. Considering the uniform playback speed of each video frame, the quotient of the video playback duration and the playback rate can be rounded up to the nearest integer to be used as the number of video frames required for playback. For desired video playback characteristics, such as achieving an animation that continuously expands the original image, each derived image must be able to exhibit this animation characteristic. To achieve this characteristic, the derived image can be considered to have an animation effect that continuously shrinks from an enlarged state to a normal state.
[0048] This embodiment can determine the video frame generation parameters that the derivative image relies on when generating video frames based on the analysis of the above-mentioned video playback characteristics. Among them, the video frame generation parameters can represent the starting magnification value corresponding to the starting magnification state of the derivative image and the ending magnification value corresponding to the ending magnification state. This embodiment can process the derivative image according to the starting magnification value and the ending magnification value to generate the starting video frame and the ending video frame corresponding to the derivative image. After the number of video frames to be generated is known, the corresponding magnification value can be determined for each video frame to be generated in advance, and then the derivative image can be processed according to the corresponding magnification value to generate the corresponding remaining video frames.
[0049] In this embodiment, this step can generate at least one video frame relative to each derivative image in the derivative image set. This step can summarize all video frames according to the generation order of the video frames. The generation order of the video frames limits the playback order of the video frames. Combined with the relevant frame description information of the video frames, a video file of a video segment can be constructed.
[0050] This embodiment provides a video generation method that can expand multiple derivative images based on an original image. The original image and the multiple derivative images have the same image size, and the derivative images also have correlation in image content according to the generation order. The correlation is specifically manifested in that the subsequent derivative image can be regarded as a content derivative based on the previous derivative image, that is, the more derivative images are generated, the richer the image content derived from the original image. At the same time, the technical solution can also generate at least one video frame relative to the generated derivative image, and the video frames generated by the derivative images can constitute the target video file corresponding to the original image. Compared with the existing display of only the image information contained in the original image, deriving the image content of the original image and generating a video relative to the derived image content better enriches the display form and gameplay of the original image, and enhances the appreciation value of the original image in application scenarios such as special effects materials and templates through video generation, and also better enhances the player's viewing experience.
[0051] On the basis of the above embodiment, as a first optional embodiment of this embodiment, the implementation of determining the derivative image set corresponding to the original image can be further optimized. At the same time, at least one video frame corresponding to the derivative image in the derivative image set can be determined, and the target video file of the original image can be formed based on the video frame, wherein the implementation of the video frame having the first image size can be further optimized.
[0052] Specifically, Figure 2 shows another flow chart of a video generation method provided by an embodiment of the present disclosure. As shown in Figure 2, in this first optional embodiment, the video generation method provided by this embodiment can be specifically optimized into the following steps.
[0053] S201 : In response to a video generation operation of an original image, use the original image as an image to be processed.
[0054] In this embodiment, in the implementation of the logic corresponding to this step in response to the video generation operation, a derivative image set containing at least one derivative image is first determined relative to the original image. The generation of derivative images within the derivative image set can be considered a loop generation logic. During the execution of the loop generation logic, this step can be considered the initial step of the loop generation logic. Specifically, in this embodiment, the original image can be considered the image to be processed for generating the first derivative image.
[0055] S202: Generate a derivative image relative to the image to be processed according to predetermined text description information and the image to be processed.
[0056] In this embodiment, the textual description information can be specifically understood as descriptive information relied upon to generate image-derived content based on the image to be processed. This textual description information can be obtained by analyzing the image content of the image to be processed, or simply by analyzing the image content of the original image. The textual description information may include information about the image's environment, information about the people or other objects included, and information about derivative objects that may be included in image derivation, as determined through image content analysis.
[0057] In this embodiment, the corresponding image derivation logic can be determined based on the derivative characteristics that the derivative image to be generated is expected to have. For example, in this embodiment, the obtained derivative image is expected to include the image content of the image to be processed on which the derivative is dependent, and can also include image derivative content that conforms to the text description information. It is also necessary to limit the presentation position of the image content of the image to be processed and the image derivative content in the derivative image to be generated. For example, the image content of the image to be processed in the derivative image is located in the central area of the derivative image to be generated, while the generated derivative image content surrounds the image content of the image to be processed and is located in the edge area of the derivative image to be generated. In this way, the image content of the generated derivative image as a whole can present the effect of expanding the image content outward based on the image content of the image to be processed.
[0058] Continuing with the above description, one implementation of generating a derivative image can be described as follows: determining how to process the image to be processed based on the desired derivative presentation effect of the derivative image, such as scaling the image to be processed up or down; then, obtaining image derivative content based on the text description information combined with the image generation model; then, the processed image to be processed and the newly generated image derivative content can be filled onto a blank canvas, and finally, the canvas filled with the image content can be determined as the derivative image. In this embodiment, the size of the blank canvas used for image content filling can be limited, such as preferably limiting the size of the blank canvas to be the same as the original image.
[0059] As a preferred implementation, this first optional embodiment may optimize the following steps to generate a derivative image relative to the image to be processed based on predetermined text description information and the image to be processed.
[0060] a1) obtaining text description information generated after performing image content analysis on the original image; or performing image content analysis on the image to be processed and generating text description information according to the analysis result.
[0061] In this embodiment, the text description information relied upon by the generation of the derived image may be determined based on the image content of the original image, or may be determined based on the image content of the image to be processed in each derivation cycle, which is not specifically limited in this embodiment.
[0062] As can be seen, when the text description information comes from the original image, the image-derived content in the generated derivative image primarily expands upon the descriptive information parsed from the original image's image content. However, when the text description information comes from the processed image, the specific content of the text description information also adjusts with the number of derivation iterations. This type of text description information can be used to generate more novel image-derived content that significantly differs from the original image content.
[0063] In this embodiment, a given image understanding algorithm may be used to analyze the image content of the original image or the image content of the image to be processed.
[0064] b1) reducing the image to be processed from the first image size to the second image size according to a set ratio, and filling the reduced image content into a fixed image area of the blank canvas to be derived, wherein the blank canvas to be derived has the first image size, and the center point of the fixed image area coincides with the center point of the blank canvas to be derived.
[0065] In this embodiment, the image to be processed has the same first image size as the original image. After determining the desired display effect of the derived image to be generated, the processing method of the image to be processed can be determined according to the desired display effect. In this embodiment, it is expected that the derived image will present a display effect in which the image content of the original image continuously expands outward to form richer image content. On this basis, it can be determined that the image to be processed needs to be reduced in size. This step can reduce the image to be processed from the initial first image size to the second image size, and the image content after the size reduction can be directly filled into the blank canvas to be derived, specifically, it can be filled into the fixed image area of the blank canvas to be derived.
[0066] It should be noted that this embodiment can provide a blank canvas for generating a derivative image as a blank canvas to be derived, and the blank canvas to be derived can be set to have a first image size, and a fixed image area of a second image size can be circled in the blank canvas to be derived, and preferably the center point of the fixed image area coincides with the center point of the blank canvas to be derived, and then the area outside the fixed image area in the blank canvas to be derived can be determined as an image derivation area, and the image derivation area exists in the form of surrounding the fixed image area.
[0067] In this embodiment, the ratio used to reduce the size of the currently processed image is not specifically limited. In this embodiment, the ratio is preferably 50%, which is equivalent to reducing the size of the processed image by half, and thus the size of the second image is half the size of the first image. This step results in a blank canvas to be derived, with the fixed image area already filled with the image content of the reduced processed image.
[0068] c1) generating the derived image according to the text description information and the blank canvas to be derived after the fixed image area is filled with image content.
[0069] In this embodiment, the text description information and the blank canvas to be derived after the image content is filled in through the above steps can be input as input data to a predetermined image generation model. The image generation model can generate new image derivative content based on the text description information, and can combine the image derivative content with the existing image content in the blank canvas to be derived to complete the filling of the image derivation in the blank canvas to be derived. The final output image can be used as the derived image in this step.
[0070] Among them, the image generation model can be a generative adversarial neural network model constructed through image generation technology. Through this image generation model, when only text description information and a blank canvas as the carrier of image content are input, new image content can be intelligently generated and the image content can be filled in the blank screen.
[0071] The above technical solution of this embodiment provides a generation implementation of derivative images. This generation method ensures that the generated derivative images have the characteristics of taking the original image as the image center content and then continuously expanding outward to present new image content, thereby realizing the enrichment of the expanded image content based on the original image.
[0072] S203: Add the derived image to the derived image set corresponding to the original image.
[0073] In this embodiment, the derivative image generated by executing the above S202 can be used as a derivative image corresponding to the original image. In this step, the derivative image can be added to the pre-created derivative image set.
[0074] In this embodiment, the derivative image set can be regarded as an ordered set, and the generated derivative images can be arranged in the derivative image set in an ordered order according to the generation order.
[0075] S204: Determine whether the image derivation end condition is met, if not, execute S205; if not, execute S206.
[0076] It can be seen that the process of generating a derivative image from an original image in this embodiment can be considered as a loop of derivative logic. The operations of S202 and S203 can be considered as a completed execution of the derivative logic. After the execution of the derivative logic is completed, this step can be used to determine whether the termination condition of the derivative loop is met. The subsequent execution branch is determined based on the determination result.
[0077] In this embodiment, the termination condition of the derivation loop can also be an image derivation termination condition. In this embodiment, the image derivation termination condition can be specifically optimized to include receiving a derivation termination instruction, or the number of derived images obtained reaching a set threshold. The derivation termination instruction can be manually triggered, such as providing a derivation termination control in the relevant application, and generating a derivation termination instruction after detecting that the derivation termination control is triggered. Another way to trigger the image derivation termination condition is to pre-set a set threshold and count the derived images during the generation process of the derived images. When the counted number of images reaches the set threshold, it can be directly considered that the image derivation termination condition has been met.
[0078] S205: Use the derived image as a new image to be processed, and return to execute S202.
[0079] This step can be considered an execution branch of the aforementioned derivation loop determination. It is equivalent to entering a new round of derivation execution logic when the image derivation termination condition is determined not to be met. Specifically, this step allows the determined derived image to be used as the image to be processed in the new round of execution logic. The process then returns to S202 to execute the derived image generation logic in the new round, thereby obtaining a new derived image relative to the original image.
[0080] S206: Obtain video generation attribute information and video frame generation parameters preset relative to a single derived image.
[0081] This step can be considered another execution branch of the aforementioned derivation loop determination. It is equivalent to exiting the execution logic for generating derived images after determining that the image derivation termination condition has been met, and entering a new execution logic. It can be seen that satisfying the image derivation termination condition terminates the derivation expansion of the original image, completing the derived image generation logic in this embodiment. As a result, all derived images relative to the original image have been previously generated and added to the derived image set.
[0082] In this embodiment, the generation of a video file corresponding to the original image can be achieved through this step and the operations of S207 and S208 described below. It can be appreciated that a video file can be specifically composed of video frames. In this embodiment, the generation of a video file corresponding to the original file can be converted into the generation of video frames. This embodiment considers generating video frames for all derived images included in the derived image set. Furthermore, the specific number of video frames that can be generated for a single derived image can be determined based on the video generation attribute information and video generation parameters of the single derived image.
[0083] In this embodiment, the video generation attribute information can be understood as the configuration information that video frame generation relies on, and specifically can include the pre-configured video playback duration and video playback rate corresponding to the playback of a single derivative image. It can be understood that the video file corresponding to the original image is mainly generated based on the derivative images in the derivative image set, and the derivative images can be specifically used as video frames in the video file. After pre-designing the desired display effect for the video file to be generated, it is necessary to consider how to ensure that the video file can achieve the desired display effect based on the derivative images. Therefore, the desired display effect can be concretized as configuration information for the playback order, playback duration, and playback rate of the derivative images.
[0084] Continuing with the above description, this embodiment can set the playback order of derivative images to the order in which they were generated. It can also set video generation attribute information to include information such as the playback duration and playback rate of a single derivative image. Furthermore, this embodiment can set the same configuration information for each derivative image, so that the video generation attribute information set for a single derivative image applies to every derivative image in the derivative image set.
[0085] In this embodiment, the video generation parameters can be understood as parameter information that is relied upon for processing the derivative image during the video frame generation process. According to the desired display effect of the video file, it can be determined that the image size of the derivative image needs to be first enlarged and then gradually enlarged, and the video frames that constitute the video file are obtained during this process. For the enlargement and reduction processing of the derivative image, only the enlargement value for the starting enlargement and the enlargement value for the ending enlargement can be set. Therefore, in this embodiment, the video generation parameters can preferably be set to include a first enlargement parameter for determining the starting enlargement and a second enlargement parameter for determining the ending enlargement, and considering that the enlargement ratio of the derivative image is gradually reduced, the set first enlargement parameter is greater than the second enlargement parameter.
[0086] This embodiment can obtain the video generation attribute information and video frame generation parameters required for generating the video frame corresponding to the derived image through this step.
[0087] S207 : Generate at least one video frame corresponding to the derivative image in the derivative image set according to the video generation attribute information and the video frame generation parameters.
[0088] In this embodiment, after determining the video generation attribute information and the video frame generation parameters on which the derived images depend to generate the video frames, this step can be used to generate at least one video frame for some or all of the derived images in the derived image set.
[0089] In this embodiment, the generation of video frames for derivative images is equivalent to image processing of the derivative images. In order to achieve the animation effect of continuously expanding the original image in the final video file to be generated, this embodiment can preferably generate at least one video frame for each derivative image in the derivative image set, and the video animation presented based on the generated multiple video frames can reflect the effect of the image content continuously extending outward. Based on this, this embodiment considers enlarging the image size of the derivative image, and each video frame to be generated corresponds to a different enlargement ratio. This embodiment can determine the generation authenticity of the video frame to be generated by the derivative image based on the video generation attribute information, and can also determine the specific enlargement parameter information corresponding to each video frame generated by the derivative image based on the video frame generation parameters.
[0090] For each derived image, after determining the specific number of generated frames and the magnification parameters corresponding to each video frame to be generated, the derived image can be magnified in turn according to each determined magnification parameter through this step, and finally, the generated video frames can be generated after being magnified to different degrees according to the number of generated frames.
[0091] Based on the above optimization, this first optional embodiment can concretize the following steps to generate at least one video frame corresponding to the derivative images in the derivative image set according to the video generation attribute information and the video frame generation parameters.
[0092] a2) determining the frame generation quantity corresponding to a single derivative image in the derivative image set according to the video playback duration and the video playback rate.
[0093] In this embodiment, the video playback duration and video playback rate can be extracted from the video generation attribute information. It can be seen that, given the video playback duration and video playback rate, the number of video frames occupied when playing a derived image as video information in the video can be determined. This number of video frames can be recorded as the frame generation quantity corresponding to a single derived image. The frame generation quantity can be considered as the number of video frames required to generate the derived image during the video frame generation process. This frame generation quantity can be obtained by rounding up the quotient of the video playback duration and the video playback rate.
[0094] b2) determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter.
[0095] In this embodiment, after the frame generation amount is determined through the above steps, the present step can be used to determine the amplification parameters on which each video frame is generated. Considering that the video generation parameters include a first amplification parameter as a starting amplification parameter and a second amplification parameter as an ending amplification parameter, this step needs to determine the amplification parameters on which the remaining video frames to be generated depend.
[0096] It should be noted that this embodiment requires performing video frame generation processing for the derived images in the derived image set. Furthermore, in this embodiment, the image size obtained after amplification using the first magnification parameter is preferably set to be twice the size of the first image, while the image size obtained after amplification using the second magnification parameter is preferably set to be the same size as the first image. This is equivalent to completing the generation of all video frames for the derived image. When the amplification process for the derived image is completed, the corresponding last video frame is equivalent to the derived image itself.
[0097] In this embodiment, during the process of generating video frames from derived images, in addition to defining the starting and ending magnification parameters, a set number of intermediate magnification parameters need to be determined. These intermediate magnification parameters are used to generate a set number of intermediate video frames between the starting and ending video frames corresponding to the derived images. In this embodiment, this set number is preferably less than the number of frames generated minus 2.
[0098] As one implementation manner, this first optional embodiment may further specify determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter.
[0099] b21) Determine an amplification parameter difference between the first amplification parameter and the second amplification parameter.
[0100] The difference in the first and second magnification parameters can be determined. In this embodiment, the first and second magnification parameters can be used to process the derived image, respectively, to obtain the corresponding starting and ending video frames. Thus, between the starting and ending video frames, there are two remaining frames that need to be generated using the magnification parameters, equivalent to the number of frames generated minus two. In this embodiment, the number of frames generated minus two is preferably recorded as the set number.
[0101] In this embodiment, the set number of amplification parameters can be selected from the first amplification parameter and the second amplification parameter. Therefore, the amplification parameter difference between the first amplification parameter and the second amplification parameter can be determined in this step.
[0102] b22) Evenly dividing the amplification parameter difference according to the set quantity to obtain an amplification parameter increment.
[0103] In this embodiment, in order to ensure that each video frame generated relative to a single derivative image changes in proportion, this step can amplify the parameter difference and perform an averaging calculation. The averaging calculation result can be used as the incremental value on which the proportional change of the video frame to be generated depends, and the incremental value can be recorded as the amplification parameter increment.
[0104] b23) sequentially forming the set number of intermediate amplification parameters according to the amplification parameter increment.
[0105] In this embodiment, considering that the process from the first amplification parameter to the second amplification parameter is a process of gradually reducing the amplification parameter, this step can use the previous amplification parameter to subtract the amplification parameter increment to obtain a new amplification parameter. The new amplification parameter calculated by the amplification parameter increment can be recorded as an intermediate amplification parameter, and a set number of them can be obtained.
[0106] The above technical solution of this embodiment provides a specific method for determining the intermediate magnification parameters. The generated intermediate magnification parameters provide data support for the generation of derived image video frames.
[0107] c2) performing image magnification processing on the derivative images in the derivative image set using the first magnification parameter, the set number of intermediate magnification parameters, and the second magnification parameter in sequence to obtain the frame generation amount of video frames generated corresponding to the derivative images.
[0108] In this embodiment, for the derived images in the derived image set, the first magnification parameter determined above, the set number of intermediate magnification parameters and the second magnification parameter can all be used for image magnification processing, and the obtained magnified image can be regarded as the frame generation quantity video frames corresponding to the derived image.
[0109] It can be appreciated that in this embodiment, a derivative image can be sequentially selected from the derivative image set and image magnification processing can be performed on the selected derivative image using the first magnification parameter, a set number of intermediate magnification parameters, and the second magnification parameter in sequence, to obtain a corresponding frame generation quantity of video frames. Then, when returning to the derivative image selection operation, image magnification processing can be performed again on the selected derivative image, and the above operation can be repeated until all derivative images in the derivative image set have completed image magnification processing. Alternatively, the first magnification parameter, a set number of intermediate magnification parameters, and the second magnification parameter can be sequentially applied to all derivative images in the derivative image set to generate a frame generation quantity of video frames.
[0110] Through this step, a frame generation quantity video frames can be obtained relative to the derivative images in the derivative image set.
[0111] S208 , summarizing corresponding generated video frames according to the generation order of the derivative images in the derivative image set to form a video file containing frame description information of the video frames as the target video file of the original image.
[0112] In this embodiment, after determining the video frames of all derived images in the derived image set through the above steps, the video frames corresponding to the derived images can be aggregated according to the order in which the derived images were generated. For each video frame, corresponding frame description information can be determined. In this step, the frame description information of each video frame can be aggregated to form the target video file of the original image, or the frame description information of the generated partial video can be aggregated to form the target video file of the original image.
[0113] The above technical solution of the video generation method provided in this embodiment provides a specific implementation process of the derived image set, and also provides a specific generation process of the video frame corresponding to the derived image, and also provides an implementation process of forming a target video query based on the video frame. Through the above technical solution of this embodiment, a playable video file can be expanded for a single original image, and the video content contained in the video file can reflect the animation effect of continuously extending the image content of the original image outward. This video generation method better enriches the display form and gameplay of the original image, and the video generation method also effectively enhances the appreciation value of the original image in application scenarios such as special effects materials and templates, and better enhances the player's viewing experience.
[0114] As a second optional embodiment of this embodiment, based on the above embodiment, further optimization may be performed to include rendering and playing the picture content of the video frames in the target video file.
[0115] In this embodiment, the target video file generated by the above-mentioned technical solution of this embodiment can respond to the playback operation through the method steps added by this optional embodiment after the corresponding playback operation is triggered. Specifically, the frame description information of the video frame contained in the target video file can be rendered, thereby realizing the rendering and display of the picture content in the above-mentioned determined video frame.
[0116] The display process of the video frame content in this step better presents the animation effect of continuously deriving and expanding the image content of the original image. It can show more novel image content based on the image content of the original image, and better enrich the display form and gameplay of the original image in the form of video.
[0117] The disclosed embodiments provide a video generation method, apparatus, device, and storage medium. The video generation method first responds to a video generation operation of an original image and determines a derivative image set corresponding to the original image. The derivative image set includes at least one derivative image arranged in a generation order, the derivative image having the same first image size as the original image, the derivative image including a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes the image content of a preceding derivative image, and the preceding derivative image of the first derivative image in the derivative image set is the original image. At least one video frame corresponding to the derivative image in the derivative image set is determined, and a target video file of the original image is formed based on the video frame, wherein the video frame has the first image size. The above technical solution can expand multiple derivative images based on the original image. The original image and multiple derivative images have the same image size, and the derivative images are also related in image content according to the generation order. The specific manifestation of the relationship is that the subsequent derivative image can be regarded as a content derivative based on the previous derivative image, that is, the more derivative images are generated, the richer the image content derived from the original image. At the same time, the present technical solution can also generate at least one video frame relative to the generated derivative image, and the generated video frame can constitute the target video file corresponding to the original image. Compared with the existing display of only the image information contained in the original image, deriving the image content of the original image and generating a video relative to the derived image content better enriches the display form and gameplay of the original image, and enhances the appreciation value of the original image in application scenarios such as special effects materials and templates through video generation, and also better enhances the player's viewing experience.
[0118] FIG3 shows a schematic structural diagram of a video generating device provided by an embodiment of the present disclosure. As shown in FIG3 , the device includes: an operation response module 31 and a video frame determination module 32 .
[0119] The operation response module 31 is used to determine a derivative image set corresponding to the original image in response to a video generation operation of the original image, wherein the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has the same first image size as the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of the subsequent derivative image in the derivative image set includes the image content of the previous derivative image, and the previous derivative image of the first derivative image in the derivative image set is the original image.
[0120] The video frame determination module 32 is configured to determine at least one video frame corresponding to a derived image in the derived image set, and form a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0121] The video generation device provided by the embodiment of the present disclosure can expand multiple derivative images based on the original image. The original image and the multiple derivative images have the same image size, and the derivative images also have correlation in image content according to the generation order. The correlation is specifically manifested in that the subsequent derivative image can be regarded as a content derivative based on the previous derivative image, that is, the more derivative images are generated, the richer the image content derived from the original image. At the same time, the present technical solution can also generate at least one video frame for each derivative image, and the video frames generated by all the derivative images can constitute the target video file corresponding to the original image. Compared with the existing display of only the image information contained in the original image, deriving the image content of the original image and generating a video relative to the derived image content better enriches the display form and gameplay of the original image, and enhances the appreciation value of the original image in application scenarios such as special effects materials and templates through video generation, and also better enhances the player's viewing experience.
[0122] Furthermore, the operation response module 31 may include:
[0123] an initial response unit, configured to respond to a video generation operation of an original image and use the original image as an image to be processed;
[0124] a derivative execution unit, configured to generate a derivative image relative to the image to be processed based on predetermined text description information and the image to be processed;
[0125] The derivative loop unit is used to add the derived image to the derived image set corresponding to the original image, and use the derived image as a new image to be processed, and re-call the derivative execution unit to perform the generation operation of the derived image until the image derivation end condition is met.
[0126] Furthermore, the derived execution unit can be used to:
[0127] Obtaining text description information generated after performing image content analysis on the original image; or performing image content analysis on the image to be processed and generating text description information based on the analysis result;
[0128] Reducing the image to be processed from the first image size to the second image size according to a set ratio, and filling the reduced image content into a fixed image area of a blank canvas to be derived, wherein the blank canvas to be derived has the first image size, and the center point of the fixed image area coincides with the center point of the blank canvas to be derived;
[0129] The derived image is generated according to the text description information and the blank canvas to be derived after the fixed image area is filled with image content.
[0130] Furthermore, the image derivation termination condition is that a derivation termination instruction is received, or the number of derived images obtained reaches a set threshold.
[0131] Furthermore, the video frame determination module 32 may specifically include:
[0132] An acquisition unit, configured to acquire video generation attribute information and video frame generation parameters preset relative to a single derived image;
[0133] a frame generating unit, configured to generate at least one video frame corresponding to a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameters;
[0134] The video generation unit is used to aggregate the corresponding generated video frames according to the generation order of the derivative images in the derivative image set to form a video file containing frame description information of the video frames as the target video file of the original image.
[0135] Furthermore, the video generation attribute information includes the video playback duration and video playback rate corresponding to playing a single derivative image; the video frame generation parameters include a first amplification parameter and a second amplification parameter corresponding to a single frame derivative image, and the first amplification parameter is greater than the second amplification parameter.
[0136] Accordingly, the frame generation unit may specifically include:
[0137] A first determining subunit is configured to determine a frame generation quantity corresponding to a single derivative image in the derivative image set according to the video playback duration and the video playback rate;
[0138] a second determining subunit, configured to determine a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter;
[0139] The generating subunit is used to sequentially perform image magnification processing on the derivative images in the derivative image set using the first magnification parameter, a set number of intermediate magnification parameters and the second magnification parameter to obtain the frame generation quantity video frames corresponding to the derivative images.
[0140] Furthermore, the second determining subunit may be specifically configured to:
[0141] determining an amplification parameter difference between the first amplification parameter and the second amplification parameter;
[0142] Dividing the amplification parameter difference equally according to the set number to obtain an amplification parameter increment;
[0143] The set number of intermediate amplification parameters are sequentially formed according to the amplification parameter increment.
[0144] Furthermore, the device may also include:
[0145] The video playing module is used to render and play the picture content of the video frame in the target video file in response to the playing operation of the video generated relative to the original image.
[0146] The video generation device provided in the embodiments of the present disclosure can execute the video generation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0148] FIG4 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG4 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG4 ) 400 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG4 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0149] As shown in FIG4 , the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. Various programs and data required for the operation of the electronic device 400 are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 406. An edit / output (I / O) interface 406 is also connected to the bus 406.
[0150] Typically, the following devices may be connected to the I / O interface 406: an input device 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG3 shows the electronic device 400 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0152] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0153] The electronic device provided by the embodiment of the present disclosure and the video generation method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0154] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the video generation method provided by the above embodiment is implemented.
[0155] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0156] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0157] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0158] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: determines the current resource usage information corresponding to at least one resource item on the execution terminal when the application software is running; determines the target resource item that currently meets the resource allocation warning conditions based on each of the current resource usage information; and adjusts the resource allocation logic of the target resource item when the application software is running.
[0159] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0161] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0162] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0163] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0164] According to one or more embodiments of the present disclosure, [Example 1] provides a video generation method, which includes: in response to a video generation operation of an original image, determining a derivative image set corresponding to the original image, the derivative image set including at least one derivative image arranged in a generation order, the derivative image having the same first image size as the original image, the derivative image including a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set including image content of a previous derivative image, and the previous derivative image of the first derivative image in the derivative image set being the original image; determining at least one video frame corresponding to the derivative image in the derivative image set, and forming a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0165] According to one or more embodiments of the present disclosure, [Example 2] provides a video generation method, which includes further optimization of determining the derivative image set corresponding to the original image, and can be specifically optimized as follows: taking the original image as the image to be processed; generating a derivative image relative to the image to be processed based on predetermined text description information and the image to be processed; adding the derivative image to the derivative image set corresponding to the original image, and taking the derivative image as a new image to be processed, returning to re-execute the derivative image generation operation until the image derivation end condition is met.
[0166] According to one or more embodiments of the present disclosure, [Example Three] provides a video generation method, which includes further optimizing the generation of a derivative image relative to the image to be processed based on predetermined text description information and the image to be processed. Specifically, the optimization can be as follows: obtaining text description information generated after image content analysis of the original image; or performing image content analysis on the image to be processed, and generating text description information based on the analysis result; reducing the image to be processed from the first image size to the second image size according to a set ratio, and filling the reduced image content into the fixed image area of the blank canvas to be derived, wherein the blank canvas to be derived has a first image size, and the center point of the fixed image area coincides with the center point of the blank canvas to be derived; generating the derivative image based on the text description information and the blank canvas to be derived after the fixed image area is filled with image content.
[0167] According to one or more embodiments of the present disclosure, [Example 4] provides a video generation method, which can optimize the image derivation end condition to include receiving a derivation end instruction, or the number of images obtained as derived images reaches a set number threshold.
[0168] According to one or more embodiments of the present disclosure, [Example Five] provides a video generation method, which includes determining at least one video frame corresponding to the derived image in the derived image set, and further optimizing the target video file of the original image formed based on the video frame. Specifically, the optimization can be as follows: obtaining pre-set video generation attribute information and video frame generation parameters relative to a single derived image; generating at least one video frame corresponding to the derived image in the derived image set based on the video generation attribute information and the video frame generation parameters; and summarizing the corresponding generated video frames in the generation order of the derived images in the derived image set to form a video file containing frame description information of the video frames as the target video file of the original image.
[0169] According to one or more embodiments of the present disclosure, [Example Six] provides a video generation method, which can optimize the video generation attribute information including the video playback duration and video playback rate corresponding to playing a single derivative image; the video frame generation parameters include a first magnification parameter and a second magnification parameter corresponding to a single-frame derivative image, and the first magnification parameter is greater than the second magnification parameter.
[0170] It also includes further optimization of generating at least one video frame for a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameters. Specifically, the optimization can be as follows: determining the frame generation quantity corresponding to a single derivative image in the derivative image set according to the video playback duration and the video playback rate; determining a set number of intermediate magnification parameters according to the first magnification parameter and the second magnification parameter; and performing image magnification processing on the derivative images in the derivative image set using the first magnification parameter, the set number of intermediate magnification parameters, and the second magnification parameter in sequence to obtain the frame generation quantity of video frames generated corresponding to the derivative image.
[0171] According to one or more embodiments of the present disclosure, [Example 7] provides a video generation method, which further specifically optimizes determining a set number of intermediate magnification parameters based on the first magnification parameter and the second magnification parameter as follows: determining a magnification parameter difference between the first magnification parameter and the second magnification parameter; equally dividing the magnification parameter difference according to the set number to obtain a magnification parameter increment; and sequentially forming the set number of intermediate magnification parameters according to the magnification parameter increment.
[0172] According to one or more embodiments of the present disclosure, [Example 8] provides a video generation method, which may further include rendering and playing the picture content of the video frames in the target video file.
[0173] According to one or more embodiments of the present disclosure, [Example Nine] provides a video generation device, which includes: an operation response module, which is used to determine a derivative image set corresponding to the original image in response to a video generation operation of an original image, wherein the derivative image set includes at least one derivative image arranged in a generation order, and the derivative image has the same first image size as the original image, and the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of the subsequent derivative image in the derivative image set includes the image content of the previous derivative image, and the previous derivative image of the first derivative image in the derivative image set is the original image; a video frame determination module, which is used to determine at least one video frame corresponding to the derivative image in the derivative image set, and form a target video file of the original image based on the video frame, wherein the video frame has the first image size.
[0174] According to one or more embodiments of the present disclosure, [Example 10] provides an electronic device, which includes one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the video generation method as described in any one of Examples 1 to 8 above.
[0175] According to one or more embodiments of the present disclosure, [Example 11] provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the video generation method described in any one of Examples 1 to 8.
[0176] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0177] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0178] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A video generation method, comprising: In response to a video generation operation of an original image, a derivative image set corresponding to the original image is determined, the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has a first image size that is the same as that of the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes image content of a preceding derivative image, and the preceding derivative image of the first derivative image in the derivative image set is the original image; At least one video frame corresponding to a derived image in the derived image set is determined, and a target video file of the original image is formed according to the video frame, wherein the video frame has the first image size.
2. The method according to claim 1, wherein determining the set of derivative images corresponding to the original image comprises: Using the original image as an image to be processed; Generating a derivative image relative to the image to be processed according to predetermined text description information and the image to be processed; The derived image is added to the derived image set corresponding to the original image, and the derived image is used as a new image to be processed, and the generation operation of the derived image is returned and re-executed until the image derivation end condition is met.
3. The method according to claim 2, wherein generating a derivative image relative to the image to be processed based on the predetermined text description information and the image to be processed comprises: Obtaining text description information generated after performing image content analysis on the original image; Alternatively, performing image content analysis on the image to be processed, and generating text description information according to the analysis result; The image to be processed is reduced from the first image size to the second image size according to a set ratio, and the reduced image content is filled into a fixed image area of the blank canvas to be derived, wherein the blank canvas to be derived has the first image size, and the center point of the fixed image area coincides with the center point of the blank canvas to be derived; The derived image is generated according to the text description information and the blank canvas to be derived after the fixed image area is filled with image content.
4. The method according to claim 2, wherein the image derivation end condition is receiving a derivation end instruction, or the number of images of the derived images obtained reaches a set number threshold.
5. The method according to claim 1, wherein the determining at least one video frame corresponding to the derived image in the derived image set and forming a target video file of the original image according to the video frame comprises: Obtaining video generation attribute information and video frame generation parameters preset relative to a single derived image; Generate at least one video frame corresponding to a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameter; The corresponding generated video frames are aggregated according to the generation order of the derivative images in the derivative image set to form a video file containing frame description information of the video frames as the target video file of the original image.
6. The method according to claim 5, wherein the video generation attribute information includes the video playback duration and video playback rate corresponding to playing a single derived image; the video frame generation parameters include a first magnification parameter and a second magnification parameter corresponding to a single frame derived image, and the first magnification parameter is greater than the second magnification parameter; Generating at least one video frame corresponding to a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameter includes: Determining the frame generation quantity corresponding to a single derivative image in the derivative image set according to the video playback duration and the video playback rate; Determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter; The derived images in the derived image set are all enlarged using the first enlargement parameter, the set number of intermediate enlargement parameters and the second enlargement parameter in sequence to obtain the frame generation number of video frames generated corresponding to the derived images.
7. The method according to claim 6, wherein determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter comprises: determining an amplification parameter difference between the first amplification parameter and the second amplification parameter; Dividing the amplification parameter difference equally according to the set number to obtain an amplification parameter increment; The set number of intermediate amplification parameters are sequentially formed according to the amplification parameter increment.
8. The method according to any one of claims 1 to 7, further comprising: Render and play the video frames in the target video file.
9. A video generating device, comprising: an operation response module, configured to determine, in response to a video generation operation of an original image, a derivative image set corresponding to the original image, wherein the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has a first image size that is the same as that of the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes image content of a preceding derivative image, and the preceding derivative image of the first derivative image in the derivative image set is the original image; A video frame determination module is used to determine at least one video frame corresponding to a derived image in the derived image set, and form a target video file of the original image according to the video frame, wherein the video frame The video frame has the first image size.
10. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the device performs actions for video generation, and the actions include: In response to a video generation operation of an original image, a derivative image set corresponding to the original image is determined, the derivative image set includes at least one derivative image arranged in a generation order, the derivative image has a first image size that is the same as that of the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes image content of a preceding derivative image, and the preceding derivative image of the first derivative image in the derivative image set is the original image; At least one video frame corresponding to a derived image in the derived image set is determined, and a target video file of the original image is formed according to the video frame, wherein the video frame has the first image size.
11. The electronic device according to claim 10, wherein the step of determining the set of derivative images corresponding to the original image comprises: Using the original image as an image to be processed; Generating a derivative image relative to the image to be processed according to predetermined text description information and the image to be processed; Add the derived image to the derived image set corresponding to the original image, and use the derived image as a new image to be processed, and return to re-execute the generation operation of the derived image until the image meets the requirements. Derived end condition.
12. The electronic device according to claim 11, wherein generating a derivative image relative to the image to be processed according to the predetermined text description information and the image to be processed comprises: Obtaining text description information generated after performing image content analysis on the original image; Alternatively, performing image content analysis on the image to be processed, and generating text description information according to the analysis result; The image to be processed is reduced from the first image size to the second image size according to a set ratio, and the reduced image content is filled into a fixed image area of the blank canvas to be derived, wherein the blank canvas to be derived has the first image size, and the center point of the fixed image area coincides with the center point of the blank canvas to be derived; The derived image is generated according to the text description information and the blank canvas to be derived after the fixed image area is filled with image content. 13 . The electronic device according to claim 11 , wherein the image derivation end condition is receiving a derivation end instruction, or the number of images of the derived images obtained reaches a set number threshold.
14. The electronic device according to claim 10, wherein the determining at least one video frame corresponding to the derived image in the derived image set and forming a target video file of the original image according to the video frame comprises: Obtaining video generation attribute information and video frame generation parameters preset relative to a single derived image; Generate at least one video frame corresponding to a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameter; The corresponding generated video frames are aggregated according to the generation order of the derivative images in the derivative image set to form a video file containing frame description information of the video frames as the target video file of the original image.
15. The electronic device according to claim 14, wherein the video generation attribute information includes a video playback duration and a video playback rate corresponding to playing a single derived image; the video frame generation parameters include a first magnification parameter and a second magnification parameter corresponding to a single frame derived image, and the first magnification parameter is greater than the second magnification parameter; Generating at least one video frame corresponding to a derivative image in a derivative image set according to the video generation attribute information and the video frame generation parameter includes: Determining the frame generation quantity corresponding to a single derivative image in the derivative image set according to the video playback duration and the video playback rate; Determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter; The derived images in the derived image set are all enlarged using the first enlargement parameter, the set number of intermediate enlargement parameters and the second enlargement parameter in sequence to obtain the frame generation number of video frames generated corresponding to the derived images.
16. The electronic device according to claim 15, wherein determining a set number of intermediate amplification parameters according to the first amplification parameter and the second amplification parameter comprises: determining an amplification parameter difference between the first amplification parameter and the second amplification parameter; Dividing the amplification parameter difference equally according to the set number to obtain an amplification parameter increment; The set number of intermediate amplification parameters are sequentially formed according to the amplification parameter increment.
17. The electronic device according to any one of claims 10 to 16, wherein the action further comprises: Render and play the video frames in the target video file.
18. A storage medium comprising computer executable instructions, the computer executable instructions, when executed by a computer processor, for performing a video generation method, the method comprising: In response to a video generation operation of an original image, a set of derivative images corresponding to the original image is determined, wherein the set of derivative images includes at least one derivative image arranged in a generation order. The derivative image has the same first image size as the original image, the derivative image includes a fixed image area of a second image size and an image derivative area surrounding the fixed image area, the fixed image area of a subsequent derivative image in the derivative image set includes the image content of a previous derivative image, and the previous derivative image of the first derivative image in the derivative image set is the original image; At least one video frame corresponding to a derived image in the derived image set is determined, and a target video file of the original image is formed according to the video frame, wherein the video frame has the first image size.
19. The storage medium according to claim 18, wherein determining the set of derivative images corresponding to the original image comprises: Using the original image as an image to be processed; Generating a derivative image relative to the image to be processed according to predetermined text description information and the image to be processed; The derived image is added to the derived image set corresponding to the original image, and the derived image is used as a new image to be processed, and the generation operation of the derived image is returned and re-executed until the image derivation end condition is met.
20. The storage medium according to claim 19, wherein generating a derivative image relative to the image to be processed according to the predetermined text description information and the image to be processed comprises: Obtaining text description information generated after performing image content analysis on the original image; Alternatively, performing image content analysis on the image to be processed, and generating text description information according to the analysis result; The image to be processed is reduced from the first image size to the second image size according to a set ratio, and the reduced image content is filled into the fixed image area of the blank canvas to be derived, wherein the blank canvas to be derived has the first image size, and the center point of the fixed image area is adjacent to the blank canvas to be derived. The center points of the raw blank canvas coincide; The derived image is generated according to the text description information and the blank canvas to be derived after the fixed image area is filled with image content.
Citation Information
Patent Citations
Special effect video generation method and device, equipment and storage medium
CN114187177A
Picture-to-video conversion method and device, equipment and storage medium
CN114331828A
Image processing method and device, electronic equipment and storage medium
CN115690664A
Video generation method and device, equipment and storage medium
CN117241101A
Image processing method and apparatus, electronic device, and storage medium
WO2023109829A1