Video generation method and apparatus, and electronic device and storage medium

By acquiring the original image and generating video frames containing the extended area of ​​the image, the problem of thin video content when displaying a single image is solved, and the vivid display of the image and rich video effects are achieved.

WO2025056001A1PCT designated stage expired Publication Date: 2025-03-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/118626
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-15
Filing Date
2024-09-12
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

When displaying a single image, the content of the video displayed dynamically is thin and lacks interest, which affects the image display effect.

Method used

By acquiring the original image and determining the corresponding extended image, a video frame including an image extended area and a dependent image partial area is generated to enrich the video content.

Benefits of technology

It realizes vivid display of images, increases the fun of image display, and enriches the video display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024118626_20032025_PF_FP_ABST
    Figure CN2024118626_20032025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a video generation method and apparatus, and an electronic device and a storage medium. The method comprises: in response to a video generation trigger operation, acquiring an original image; determining at least one first extended image corresponding to the original image, wherein the first extended image comprises an image extension region and at least part of image region of a first dependent image, when there is one first extended image, the first dependent image is the original image, and when there are a plurality of first extended images, the first dependent image corresponding to the first extended image to be generated is the original image or the first extended image that has been generated; and on the basis of the original image and the image extension region, generating a video corresponding to the original image, and displaying the video. In the technical solution in the embodiments of the present disclosure, an original image is dynamically presented by means of a video that is generated by the original image and an image extension region, and the presentation content of the image is extended, thereby increasing the interestingness of image presentation and enriching the video presentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Video generation method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese invention patent application entitled “Video Generation Method, Device, Electronic Device and Storage Medium” and application number 2023111993182, filed on September 15, 2023. The entire contents of that application are incorporated herein by reference. Technical Field

[0002] The embodiments of the present disclosure relate to computer application technology, and more particularly to a video generation method, device, electronic device, and storage medium. Background Art

[0003] With advancements in image processing technology, images are being used in a wide variety of scenarios. Improving the quality of image display in scenarios where multiple images are displayed has become a hot topic, especially in scenarios where a single image is being displayed.

[0004] In some scenarios, images are generated into videos for presentation. However, when displaying a single image, even in a dynamic format, the content is limited. Each frame of the video uses the same image, making the generated video appear thin and lacking in interest, thus affecting the image presentation effect.

[0005] Summary of the Invention

[0006] The present disclosure provides a video generation method, device, electronic device and storage medium to achieve vivid display of images.

[0007] In a first aspect, an embodiment of the present disclosure provides a video generation method, the method comprising: acquiring an original image in response to a video generation trigger operation; determining at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; in a case where there is one first extended image, the first dependent image is the original image; in a case where there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; generating a video corresponding to the original image based on the original image and the first extended image, and displaying the video.

[0008] In the second aspect, an embodiment of the present disclosure also provides a video generation device, which includes: an image acquisition module, used to acquire an original image in response to a video generation trigger operation; an image expansion module, used to determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; when the first extended image is one, the first dependent image is the original image; when the first extended image is multiple, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; a video generation module, used to generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

[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 a video generation method as described in any one of the embodiments of the present disclosure.

[0010] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the video generation method as described in any one 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] FIG1 is a flow chart of a video generation method provided by an embodiment of the present disclosure;

[0013] FIG2 is a flow chart of a video generation method provided by an embodiment of the present disclosure;

[0014] FIG3 is a flow chart of another video generation method provided by an embodiment of the present disclosure;

[0015] FIG4 is a schematic diagram of a process of image expansion using a video generation method provided by an embodiment of the present disclosure;

[0016] FIG5 is a schematic structural diagram of a video generating device provided by an embodiment of the present disclosure;

[0017] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] 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.

[0019] 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.

[0020] 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.

[0021] 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.

[0022] It should be noted that the modifications of "one" and "plurality" 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".

[0023] 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.

[0024] 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.

[0025] 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.

[0026] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, for example, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "Agree" or "Disagree" to provide personal information to the electronic device.

[0027] 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.

[0028] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0029] Before introducing the present technical solution, an example explanation of the application scenario can be given first. The technical solution of the embodiment of the present disclosure can be applied to the video generation scenario in any image display scenario. For example, in any image display scenario, the user can generate a video for display through the image to be displayed in the image display scene. However, since the image displayed in the image display scene is usually the original image obtained, the displayed content is limited to the content of the image itself, and the video display effect is relatively single due to the small amount of content. This problem is particularly prominent when displaying a single image. At this time, based on the technical solution of the embodiment of the present disclosure, the original image can be expanded, and then the original image and the expanded image can be displayed, thereby optimizing the image display content and enriching the display effect in the video.

[0030] FIG1 is 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 situation where an image is expanded and displayed. The method can be executed by a video generation device, which can be implemented in the form of software and / or hardware. It should be noted that the device for executing the video generation method provided by the embodiment of the present disclosure can be integrated into an application software that supports the video generation function, and the software can be installed in an electronic device. Optionally, the electronic device can be a mobile terminal or a PC terminal, etc. The application software can be a type of software for video generation, and its specific application software will not be described here one by one, as long as the generation of the video can be achieved. It can also be a specially developed application program, which is integrated into the software for achieving video generation, or integrated into the corresponding page, and the user can achieve video generation through the page integrated in the PC terminal.

[0031] As shown in FIG1 , the method of this embodiment may specifically include:

[0032] S110 : In response to a video generation triggering operation, obtaining an original image.

[0033] The video generation trigger operation can be understood as an operation for starting to generate a video after being triggered. In the embodiment of the present disclosure, the video generation trigger operation can be an image processing trigger operation acting on an image processing special effect or an image processing tool.

[0034] In the embodiment of the present disclosure, there are multiple ways to generate the video generation trigger operation. In terms of the operation trigger method, the video generation trigger operation can be a contact operation or a non-contact operation. Among them, the contact operation may include but is not limited to touch operations acting on physical buttons or virtual buttons on the application interface, such as pressing operations, clicking operations, sliding operations or rotating operations, etc.). The non-contact operation may include but is not limited to sound control operations (such as voice command control, etc.), action recognition operations (such as gesture operations or facial actions, etc.) or preset event trigger operations (such as time trigger operations, etc.), etc.

[0035] From the perspective of the source of the original image, optionally, the obtaining of the original image in response to the video generation trigger operation includes at least one of the following operations: in response to the image upload operation, obtaining the uploaded image as the original image; in response to the image capture operation, obtaining the captured image as the original image; receiving the image sent by the target device, and using the received image as the original image.

[0036] The image upload operation may be a control trigger operation acting on a preset image upload control, or a drag trigger operation of dragging an image into a preset upload area, etc. The image capture operation may be a trigger operation for activating a capture device, such as a control trigger operation acting on an image capture control (including physical and virtual controls), or an interface trigger operation of entering a target capture interface, etc. The target device may be understood as an image sending device, specifically a device that has established communication with a preset interface and / or a device corresponding to a preset device identifier, etc.

[0037] It is understood that the original image can be understood as the image obtained after receiving the video generation trigger operation, that is, the image to be processed. In the embodiment of the present disclosure, the original image can be an image containing any content, and the image information such as content, style and tone is not limited here.

[0038] S120. Determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image. When there is one first extended image, the first dependent image is the original image. When there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image and / or the generated first extended image.

[0039] Among them, the first extended image can be understood as an image obtained after one or more extension processes are performed on the basis of the original image. The first dependent image can be understood as an image that is relied upon when generating the first extended image, or it can be understood as an image used to generate the first extended image. It can be understood that the first dependent image is an image with known content. Therefore, if only one first extended image needs to be generated, the original image can be used as the first dependent image; if multiple first dependent images need to be generated, for each frame of the first extended image to be generated, the original image or other first extended images that have been generated before the first extended image can be used as the first dependent image. In other words, one or more first extended images can be generated with the original image as the first dependent image, or multiple first extended images can be generated with the original image and the generated first extended image.

[0040] Specifically, for each frame of the first extended image to be generated, the first dependent image corresponding to the first extended image may be determined from the original image or the generated first extended image. Furthermore, the first extended image corresponding to the original image may be generated based on part or all of the image region in the first dependent image.

[0041] Exemplarily, one or more first extended images corresponding to the original image can be generated based on at least a partial image area in the original image, and then one or more first extended images corresponding to the original image can be generated based on at least a partial image area in the generated first extended image.

[0042] As previously mentioned, at least a portion of the image area in the first dependent image can be a portion of the image area or the entire image area. Considering the computational space occupied by image expansion, a portion of the image area in the first dependent image can be used as the dependent area to generate the initial expanded image. This configuration has the advantage of conserving computing power during image expansion. This technical solution is particularly suitable for mobile terminals with limited resources and computing power.

[0043] It should be noted that before performing image expansion on the first dependent image, the image expansion direction corresponding to the first dependent image can be determined first, and then the target image area to be adopted in the first dependent image can be determined based on the image expansion direction, and the image content to be relied upon when generating the initial expandable image can be determined based on the image content in the target image area. In order to make the first extended image have better content extensibility relative to the original image, the image area on the side adjacent to the image expansion direction in the first dependent image can be used as the target image area, that is, the dependent area. The image expansion direction can be a direction determined with reference to the first dependent image. The number of the image expansion directions can be one or more. In other words, in the disclosed embodiment, the original image can be expanded along one image expansion direction or multiple image expansion directions. For example, specifically, when determining the display method of the first dependent image, the image expansion direction can be one or more of the left side, back side, top and bottom of the first dependent image.

[0044] In the disclosed embodiment, the image extension area can be understood as the area within the first extended image used to display the extended image content. That is, the first extended image can include both the original image content of the first dependent image and the extended image content, and the extended image content is generated based on the image content of at least a portion of the image area within the first dependent image. This ensures that the image content within the image extension area matches the image content of the first dependent image, ensuring scalability in image content when the original image and the image extension area are jointly displayed.

[0045] S130: Generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

[0046] In the embodiment of the present disclosure, specifically, multiple video frames can be constructed based on the original image and the image extension area, and then, a dynamic display method can be added to the multiple video frames to obtain a video corresponding to the original image.

[0047] Optionally, the original image is spliced ​​with a plurality of image extension areas to obtain an image to be displayed corresponding to the original image, and a video corresponding to the original image is generated based on the image to be displayed. For example, it may be a video in which the image to be displayed is gradually moved from one end to the other end according to the extension direction of the image to be displayed. Furthermore, generating a video corresponding to the original image based on the image to be displayed may include: cropping the image to be displayed into a plurality of sub-images, taking each sub-image as a video frame, and generating a video corresponding to the original image based on the plurality of video frames. There are many ways to crop the image to be displayed into a plurality of sub-images. For example, the image to be displayed may be cropped into a plurality of sub-images according to the size of the original image, or the image to be displayed may be cropped into a plurality of sub-images according to a preset number, or the image to be displayed may be cropped into a plurality of sub-images according to a preset size, etc.

[0048] Optionally, multiple video frames are constructed based on the original image and the image containing the image extension area, and a video corresponding to the original image is constructed based on the multiple video frames. Exemplarily, the original image and the image containing the image extension area are used as multiple video frames respectively; or, the original image and / or the image extension area are spliced ​​together to obtain multiple video frames, and a video corresponding to the original image is constructed based on the multiple video frames, etc. Further, the multiple video frames are obtained by splicing the original image and / or the image extension area, including: splicing the original image with each of the image extension areas to obtain multiple video frames respectively; or, taking the original image as a video frame, splicing a target number of the image extension areas to obtain multiple video frames. The target number can be a preset number or a number determined based on the size of the original image and the image extension area. For example, multiple video frames of the same size as the original image can be obtained by splicing a target number of the image extension areas.

[0049] It should be noted that in the embodiment of the present disclosure, the method of splicing the target number of image extension areas or splicing the original image with multiple image extension areas, the arrangement method and splicing number of the image extension areas can be set according to actual needs and are not specifically limited here.

[0050] After generating a video corresponding to the original image, the video can be displayed for viewing. Optionally, displaying the video includes: playing the video; and / or displaying the video file and / or video identifier corresponding to the video at a preset location. Playing the video can include playing the video on a preview interface or on a video publishing page. Exemplarily, after displaying the video file and / or video identifier corresponding to the video at a preset location, the method further includes playing the video in response to a play trigger input for the video file and / or video identifier. Exemplarily, in a special effects application scenario, the video generation method can be used to generate a video from an uploaded or captured original image, and then the video can be displayed on a preview interface for user preview. Furthermore, the video can be published on a video publishing interface in response to a publish trigger for the video. In a special effects production scenario, the video file and / or video identifier corresponding to the video can be displayed at a preset location. The video identifier can be in the form of text and / or a graphic.

[0051] The technical solution of the embodiment of the present disclosure first obtains an original image in response to a video generation trigger operation, thereby obtaining the original image on which video generation depends. Then, at least one first extended image corresponding to the original image is determined, and the first extended image can be generated based on the original image, thereby enriching the image used to generate the video. Since the first extended image includes an image extension area and at least a portion of the image area of ​​the first dependent image, and when there is only one first extended image, the original image is used as the first dependent image; when there are multiple first extended images, the original image and / or the generated first extended image are used as the first dependent image corresponding to the first extended image to be generated, thereby ensuring that the obtained first extended image can be associated with the image content of the original image and flexibly generating multiple first extended images. Finally, a video corresponding to the original image is generated based on the original image and the image extension area, and the video is displayed. Through the video, not only the original image can be dynamically displayed, but also the related image extension area is displayed on the basis of the original image, thereby expanding the image display content. This solves the technical problem of the video display content being single and uninteresting due to displaying only a single image, increases the interest of the image display, and enriches the video display effect.

[0052] Figure 2 is a flow chart of another video generation method provided by an embodiment of the present disclosure. The technical solution of this embodiment further refines the method of generating multiple first extended images on the basis of the above-mentioned embodiment. Optionally, the determination of at least one first extended image corresponding to the original image includes: for the first frame of the first extended image to be generated, taking the original image as the first dependent image, and generating the first extended image based on the first dependent image; for the second frame and subsequent first extended images to be generated, taking the first extended image of the previous frame of the first extended image to be generated as the first dependent image, and generating the first extended image based on the first dependent image. For specific implementation methods, please refer to the description of this embodiment. Among them, technical features that are the same or similar to those in the above-mentioned embodiments are not repeated here.

[0053] As shown in FIG2 , the method of this embodiment may specifically include:

[0054] S210 : In response to a video generation triggering operation, obtaining an original image.

[0055] S220 : For the first extended image to be generated in the first frame, use the original image as the first dependent image, and generate a first extended image based on the first dependent image.

[0056] The first extended image to be generated in the first frame can be understood as the first extended image to be generated, the existing image is the original image, and the first extended image has not yet been generated. Therefore, the first extended image in the first frame uses the original image as the first dependent image.

[0057] Specifically, generating a first extended image based on the first dependent image includes: determining a second dependent image based on at least a partial image area of ​​the first dependent image, and determining an extended canvas area corresponding to the second dependent image; and generating a first extended image based on the second dependent image and the extended canvas area.

[0058] As mentioned above, at least a portion of the image area of ​​the first dependent image may be a portion of the image area or the entire image area of ​​the first dependent image. Optionally, determining the second dependent image based on at least a portion of the image area of ​​the first dependent image includes: using the first dependent image as the second dependent image; or, cropping the first dependent image according to a preset image ratio to obtain a second dependent image, wherein the preset image ratio includes a preset image width ratio or an image length ratio. It is understandable that the specific numerical value corresponding to the preset image ratio can be set according to actual needs, for example, one-half or one-third, etc., and is not specifically limited here. Exemplarily, the first dependent image can be divided equally left and right or up and down.

[0059] In the above technical solution, using the first dependent image as the second dependent image can sequentially generate first extended images of larger sizes. When generating first extended images of the same total area, this can reduce the number of image extensions compared to generating the first extended image from a portion of the first dependent image. The second dependent image, obtained by cropping the first dependent image according to a preset image ratio, can save computing resources during the image expansion process, improve processing efficiency, and facilitate the rapid generation of the first extended image.

[0060] Specifically, cropping the first dependent image according to a preset image ratio to obtain a second dependent image may include: determining an image expansion direction corresponding to the first dependent image, determining a target cropping edge in the first dependent image based on the image expansion direction, wherein the target cropping edge is parallel to the image expansion direction; and cropping the target cropping edge based on a preset image ratio to obtain a second dependent image, wherein the image region in the first dependent image corresponding to the second dependent image is an image region adjacent to the image expansion direction. This arrangement has the advantage of increasing the content coherence between the first dependent image and the first extended image in the image expansion direction.

[0061] In the disclosed embodiments, the image extension direction can be understood as the direction in which the image content is extended, or as the direction in which the image content of the first extended image is arranged relative to the image content of its corresponding first dependent image. As previously mentioned, the image extension direction corresponding to the first dependent image can be pre-set and can be one or more. The image extension directions corresponding to different first dependent images can be the same or different.

[0062] Exemplarily, the image expansion direction corresponding to the original image may be the right side of the original image, and the image expansion direction corresponding to the first extended image generated based on the original image may be above or below the first extended image, etc.

[0063] The extended canvas area can be understood as the canvas area to be drawn. Optionally, the resolution and / or size of the extended canvas area and its corresponding second dependent image can be the same. This configuration has the advantage of ensuring that the first extended image obtained after expansion has a good match with the second dependent image, thereby ensuring the display effect of the generated video.

[0064] For example, when the image expansion direction corresponding to the original image is the right side of the image, for the first extended image of the first frame, the original image can be divided equally into left and right parts, and then the resolution of the right half of the image is obtained. Based on the resolution, an extended canvas area with the same resolution is constructed on the right side of the image to generate extended content in the extended canvas area based on the right half of the original image, thereby obtaining an image extension area. Similarly, when the image expansion direction corresponding to the original image is the upper side of the image, for the first extended image of the second frame, the first extended image of the previous frame (i.e., the first frame) can be divided equally into upper and lower parts, and then the resolution of the upper half of the image is obtained. Based on the resolution, an extended canvas area with the same resolution is constructed above the first extended image of the previous frame to generate extended content in the extended canvas area based on the upper half of the first extended image of the previous frame, thereby obtaining an image extension area.

[0065] In an optional technical solution of the embodiment of the present disclosure, generating a first extended image based on the second dependent image and the extended canvas area may specifically include: determining image description information corresponding to the first dependent image, and determining a target area image based on the first dependent image and the second dependent image; inputting the image description information, the target area image and the extended canvas area into a pre-trained image generation model to obtain a first extended image.

[0066] The image generation model is a preset algorithm model for rendering the image content of the expanded canvas area based on the image description information and the target area image. For example, the image generation model may be a deep learning model for generating image content. Specifically, the preset algorithm model may be an algorithm model for image expansion, such as a model based on an image expansion algorithm.

[0067] In an embodiment of the present disclosure, the image description information may be information for describing image-related information of the first dependent image. The image-related information may include at least one of image scene information, image style information, and image type information. The image scene information may specifically include the image subject contained in the image and the background information of the image subject. Exemplarily, the image description information may be an image description text. Specifically, it may be one or more text sentences for describing the image content. For example, in a lush forest, there is a towering tree, and next to the tree there is a small thatched cottage. It is understandable that the image description information can be expressed in any language, and its expression method and expression language are not limited here.

[0068] In the embodiments of the present disclosure, image description information may be generated based on an existing image understanding algorithm, or based on a pre-trained deep learning model. The form in which the image description information is generated is not limited herein.

[0069] It is understood that before inputting the image description information, the target area image, and the expanded canvas area into a pre-trained image generation model to obtain an initial expanded image corresponding to the original image, the image generation model may be trained based on the sample image, the image description information corresponding to the sample image, and the sample canvas area. The training method used for training the image generation model may be supervised training, weakly supervised training, or unsupervised training, and is not specifically limited herein.

[0070] This technical solution can obtain an initial extended image corresponding to the original image by inputting the image description information, the target area image and the extended canvas area into a pre-trained image generation model. Since the image description information and the target area image can more comprehensively describe the image content that the first extended image relies on during the generation process, this lays the foundation for expanding the first extended image associated with the target area image, and then the first extended image can be automatically generated through the image generation model, so that the generated content of the extended canvas area can not only be associated with the target area image, but also have certain differences, thereby enriching the generation effect of the first extended image.

[0071] In another optional technical solution of the embodiment of the present disclosure, a target area image can be determined based on the first dependent image and the second dependent image; an image to be used corresponding to the target area image can be obtained from a pre-established gallery based on the target area image; the image to be used can be cropped based on the extended canvas area, and the cropped image to be used can be used as the first extended image corresponding to the original image.

[0072] Optionally, acquiring the image to be used corresponding to the target area image from a pre-established image library based on the target area image may include: determining image-related information corresponding to the target area image, and acquiring the image to be used corresponding to the target area image from a pre-established image library based on the image-related information. The image-related information may include at least one of image scene information, image style information, image color information, and image type information.

[0073] By adopting this technical solution, a first extended image corresponding to the original image can be quickly acquired based on images pre-stored in a gallery, thereby improving the generation efficiency of the first extended image.

[0074] S230 : For the second frame and the first extended image to be generated subsequently, use the first extended image of the previous frame of the first extended image to be generated as a first dependent image, and generate a first extended image based on the first dependent image.

[0075] It is understood that for the second frame and subsequent first extended images to be generated, the known images include the original image and at least one already generated first extended image. In the disclosed embodiment, for the first extended image currently to be generated, the first extended image of the previous frame can be used as the first dependent image of the first extended image currently to be generated, to ensure the content correlation between the generated initial medical images of the previous and subsequent frames, thereby ensuring the scalability of image content expansion.

[0076] The method of generating the first extended image based on the first dependent image can be found in the above content and will not be repeated here.

[0077] S240: Generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

[0078] The technical solution of the embodiment of the present disclosure is to establish an association between the first extended image and the original image by taking the original image as the first dependent image, generating the first extended image of the first frame corresponding to the original image based on the first dependent image; then, for the second frame and the subsequent first extended image to be generated, taking the first extended image of the previous frame of the first extended image to be generated as the first dependent image, and generating the first extended image based on the first dependent image, which can ensure that the generated multiple frames of first extended images have a relatively smooth transition in image content, improve the integrity of the content performance of two adjacent frames of images, and thus improve the overall display effect of the video.

[0079] Figure 3 is a flow chart of another video generation method provided by an embodiment of the present disclosure. The technical solution of this embodiment further refines the process of generating a video from an original image and a first extended image on the basis of the above-mentioned embodiment. Optionally, the generation of a video corresponding to the original image based on the original image and the image extension area includes: cropping the first extended image based on the image extension area to obtain a second extended image, wherein the second extended image includes at least the image extension area; and generating a video corresponding to the original image based on the original image and the second extended image. For specific implementation methods, please refer to the description of this embodiment. Among them, technical features that are the same or similar to those in the above-mentioned embodiments are not repeated here.

[0080] As shown in FIG3 , the method of this embodiment may specifically include:

[0081] S310 : In response to a video generation triggering operation, obtain an original image.

[0082] S320: Determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image.

[0083] Specifically, when there is one first extended image, the first dependent image is the original image; when there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image or the first extended image that has been generated.

[0084] S330: Crop the first extended image based on the image extension area to obtain a second extended image, wherein the second extended image at least includes the image extension area.

[0085] Optionally, the entire image extension region in the first extended image is cropped based on the region edge corresponding to the image extension region to serve as the second extended image; or, based on a preset cropping size, a portion of the image extension region in the first extended image is cropped to serve as the second extended image. Alternatively, the image extension region in the first extended image and at least a portion of the image region of the first dependent image may be cropped to serve as the second extended image, and so on.

[0086] S340: Generate a video corresponding to the original image based on the original image and the second extended image.

[0087] Specifically, the original image and the second extended image may be arranged according to preset arrangement information; the arranged original image and the second extended image are used as video frames, and a preset animation function is called to generate a video corresponding to the original image.

[0088] The arrangement information may include an arrangement order and / or an arrangement direction. Optionally, the arrangement order is associated with the first dependent image corresponding to the second extended image and / or associated with the generation order of the first extended image corresponding to the second extended image.

[0089] In an optional technical solution of the disclosed embodiment, the arrangement order can be, for example, the original image as the first video frame, the second extended image in the previous frame of the video frame following the first video frame as the first dependent image, and the second extended image in the next frame as the first dependent image. This technical solution can fully demonstrate the content relevance between the previous and next video frames in the video, effectively ensuring the continuity of the transition between the previous and next video frames in the video.

[0090] Exemplarily, the arrangement direction may be associated with the image expansion direction of the first extended image corresponding to the second extended image relative to the first dependent image. Specifically, the arrangement direction may be the same as the image expansion direction of the first extended image corresponding to the second extended image relative to the first dependent image. Simply put, the image expansion direction along which the first dependent image is expanded to generate the first extended image is the image expansion direction along which the second extended image corresponding to the first extended image is expanded. For example, if the first extended image is generated by expanding the first dependent image along the left side of the first dependent image, the arrangement direction corresponding to the second extended image corresponding to the first extended image is the left side of the second extended image corresponding to the first dependent image.

[0091] In the disclosed embodiment, the preset animation function can be understood as a pre-set function that adds a preset animation effect to the original image and the second extended image. In the disclosed embodiment, the specific animation function used as the preset animation function can be set based on actual needs and is not specifically limited herein. For example, the preset animation function includes an animation function that controls the uniform movement of the video frames along a preset direction, frame by frame. The preset direction can be an arrangement direction.

[0092] The technical solution of the embodiment of the present disclosure is to first crop the first extended image based on the image extension area to obtain a second extended image, and then generate a video corresponding to the original image based on the original image and the second extended image. Since the second extended image includes the image extension area, it can provide richer display content for video generation, while retaining the image extension content while reducing the repeated display of the same image content, thereby improving the display effect of the generated video.

[0093] Figure 4 is a schematic diagram of a process of image expansion using the video generation method provided by the embodiment of the present disclosure. For ease of understanding, the embodiment of the present disclosure provides an optional example to illustrate the video generation method provided by the embodiment of the present disclosure.

[0094] First, in response to an image upload trigger operation, the uploaded single image is obtained as the original image 4141;

[0095] Next, a preset image understanding algorithm is used to generate image description text corresponding to the original image 41. Furthermore, the original image 41 is divided equally into two halves, obtaining the resolution of the right half 411 of the original image 41. An extended canvas area 412 of the same resolution is constructed to the right of the original image 41, as shown in the first row of FIG4 .

[0096] Then, the right half area 411 of the original image 41, the extended canvas area 412 and the image description text of the original image 41 are used as inputs of the image extension model and input into the image extension model to generate results to obtain the expanded results, that is, the extended content is drawn in the extended canvas area 412 to obtain the first extended image 42 corresponding to the original image 41. As shown in the figure, the first extended image 42 is composed of the right half area 411 of the original image 41 and the target extended area 422 (obtained after drawing the extended canvas area 412).

[0097] Then, referring to the second row in FIG4 , the newly generated first extended image 42 is divided equally into left and right parts to obtain the resolution of the right half of the newly generated first extended image 42. An extended canvas area with the same resolution is then constructed on the right side of the newly generated first extended image 42. The image description text corresponding to the right half of the newly generated first extended image 42, the canvas extension area, and the original image 41 are input into the image extension model to generate a new first extended image. This process is repeated repeatedly.

[0098] Finally, the image extension area of ​​the first extended image generated multiple times is cropped to form the second extended image. A preset animation function is called to achieve a video effect by splicing the original image with the multiple second extended images (see the last row in Figure 4), then uniformly shifting them to the left until the right edge of the last extended image aligns with the right edge of the screen, thereby producing a video corresponding to the original image.

[0099] The video generation method provided by the embodiment of the present disclosure not only supports customized expansion strategies, can solve the problem of possible deterioration in clarity after infinite expansion of the image, and ensure the clarity of the image expansion area, but also supports infinite horizontal or vertical expansion of a single image, and sets animation parameters to realize animated videos with horizontal or vertical scrolling of the screen, and realizes continuous animation of the original image combined with multiple second extended images, ensuring the continuity of the transition between the images displayed in the final animation video.

[0100] The technical solution of the embodiment of the present disclosure first obtains an original image in response to a video generation trigger operation, thereby obtaining the original image on which video generation depends. Then, at least one first extended image corresponding to the original image is determined, and the first extended image can be generated based on the original image, thereby enriching the image used to generate the video. Since the first extended image includes an image extension area and at least a portion of the image area of ​​the first dependent image, and when there is only one first extended image, the original image is used as the first dependent image, and when there are multiple first extended images, the original image and / or the generated first extended image are used as the first dependent image corresponding to the first extended image to be generated, it is ensured that the obtained first extended image can be associated with the image content of the original image, and multiple first extended images can be flexibly generated. Finally, a video corresponding to the original image is generated based on the original image and the image extension area, and the video is displayed. Through this video, not only the original image can be dynamically displayed, but also the related image extension area is displayed on the basis of the original image, thereby expanding the image display content. This solves the technical problem of the video display content being monotonous and uninteresting due to displaying only a single image, increases the interest of the image display, and enriches the video display effect.

[0101] FIG5 is a schematic diagram of the structure of a video generation device provided by an embodiment of the present disclosure. As shown in the figure, the device includes: an image acquisition module 510 , an image expansion module 520 and a video generation module 530 .

[0102] Among them, the image acquisition module 510 is used to acquire the original image in response to the video generation trigger operation; the image expansion module 520 is used to determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​the first dependent image; when the first extended image is one, the first dependent image is the original image; when the first extended image is multiple, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; the video generation module 530 is used to generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

[0103] The technical solution of the disclosed embodiment is to obtain an original image in response to a video generation trigger operation by an image acquisition module, thereby obtaining the original image on which video generation depends. Then, the image expansion module determines at least one first extended image corresponding to the original image, and can generate the first extended image based on the original image, thereby enriching the image used to generate the video. Because the first extended image includes an image extension area and at least a portion of the image area of ​​the first dependent image, and when there is only one first extended image, the original image is used as the first dependent image, and when there are multiple first extended images, the original image and / or the generated first extended image are used as the first dependent image corresponding to the first extended image to be generated, it is ensured that the obtained first extended image can be associated with the image content of the original image, and multiple first extended images can be flexibly generated. Finally, the video generation module generates a video corresponding to the original image based on the original image and the image extension area, and displays the video. The video not only dynamically displays the original image, but also displays the related image extension area based on the original image, thereby expanding the image display content. This solves the technical problem of the video display content being monotonous and uninteresting due to displaying only a single image, increases the interest of the image display, and enriches the video display effect.

[0104] On the basis of the above-mentioned optional technical solutions, optionally, in the case where there are multiple first extended images, the image extension module may specifically include: a first-frame image extension unit and a subsequent image extension unit. The first-frame image extension unit is used to generate a first extended image based on the first dependent image with the original image as the first dependent image for the first extended image to be generated in the first frame; the subsequent image extension unit is used to generate a first extended image based on the first dependent image with the first extended image of the previous frame of the first extended image to be generated as the first dependent image for the second frame and subsequent first extended images to be generated.

[0105] Based on the above optional technical solutions, optionally, the first-frame image expansion unit and / or the subsequent image expansion unit further includes: a dependent image determination subunit and an extended image generation subunit. The dependent image determination subunit is configured to determine a second dependent image based on at least a partial image area of ​​the first dependent image and determine an extended canvas area corresponding to the second dependent image; and the extended image generation subunit is configured to generate a first extended image based on the second dependent image and the extended canvas area.

[0106] Based on the above optional technical solutions, optionally, the dependent image determination subunit is used to:

[0107] Using the first dependent image as the second dependent image; or,

[0108] The first dependent image is cropped according to a preset image ratio to obtain a second dependent image, wherein the preset image ratio includes a preset image width ratio or an image length ratio.

[0109] Based on the above optional technical solutions, optionally, the dependent image determination subunit is further configured to:

[0110] determining an image extension direction corresponding to the first dependent image, and determining a target cropping edge in the first dependent image based on the image extension direction, wherein the target cropping edge is parallel to the image extension direction;

[0111] The target cropping edge is cropped based on a preset image ratio to obtain a second dependent image, wherein the image region in the first dependent image corresponding to the second dependent image is an image region adjacent to the image extension direction.

[0112] Based on the above optional technical solutions, optionally, the extended canvas area has the same resolution and / or size as the corresponding second dependent image.

[0113] Based on the above optional technical solutions, optionally, the extended image generation subunit is specifically configured to:

[0114] determining image description information corresponding to the first dependent image, and determining a target area image based on the first dependent image and the second dependent image;

[0115] The image description information, the target area image and the extended canvas area are input into a pre-trained image generation model to obtain a first extended image, wherein the image generation model is a preset algorithm model for drawing the image content of the extended canvas area based on the image description information and the target area image.

[0116] Based on the above optional technical solutions, optionally, the video generation module includes: an image cropping unit and a video generation unit. The image cropping unit is configured to crop the first extended image based on the image extension area to obtain a second extended image, wherein the second extended image at least includes the image extension area; and the video generation unit is configured to generate a video corresponding to the original image based on the original image and the second extended image.

[0117] The video generation unit includes an image arrangement subunit and an animation generation subunit. The image arrangement subunit is configured to arrange the original image and the second extended image according to preset arrangement information; and the animation generation subunit is configured to use the arranged original image and the second extended image as video frames and call a preset animation function to generate a video corresponding to the original image.

[0118] Based on the above-mentioned optional technical solutions, optionally, the arrangement information includes an arrangement order and / or an arrangement direction; the arrangement order is associated with the first dependent image corresponding to the second extended image and / or is associated with the generation order of the first extended image corresponding to the second extended image; the arrangement direction is associated with the image extension direction of the first extended image corresponding to the second extended image relative to the first dependent image.

[0119] Based on the above optional technical solutions, optionally, the preset animation function includes an animation function that controls the video frames to move at a constant speed frame by frame along a preset direction.

[0120] Based on the above optional technical solutions, optionally, the image acquisition module is configured to perform at least one of the following operations:

[0121] In response to an image upload operation, obtaining the uploaded image as an original image;

[0122] In response to an image capturing operation, acquiring a captured image as an original image;

[0123] Receive the image sent by the target device and use the received image as the original image.

[0124] 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.

[0125] 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.

[0126] FIG6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring now to FIG6 , a schematic diagram of the structure of an electronic device (e.g., a terminal device or server in FIG6 ) 600 suitable for implementing an embodiment of the present disclosure is shown. 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 (e.g., vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG6 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0127] As shown in FIG6 , the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An edit / output (I / O) interface 605 is also connected to the bus 604.

[0128] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows the electronic device 600 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.

[0129] 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 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0130] 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.

[0131] 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.

[0132] 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.

[0133] 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.

[0134] 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.

[0135] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0136] 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 is enabled to: obtain an original image in response to a video generation trigger operation; determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; when the first extended image is one, the first dependent image is the original image; when the first extended image is multiple, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

[0137] 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).

[0138] 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.

[0139] 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."

[0140] 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.

[0141] 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.

[0142] According to one or more embodiments of the present disclosure, [Example 1] provides a video generation method, including: in response to a video generation trigger operation, acquiring an original image; determining at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; in the case where the first extended image is one, the first dependent image is the original image; in the case where the first extended image is multiple, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; generating a video corresponding to the original image based on the original image and the first extended image, and displaying the video.

[0143] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, in the case where there are multiple first extended images, determining at least one first extended image corresponding to the original image includes: for the first frame of the first extended image to be generated, taking the original image as the first dependent image, and generating the first extended image based on the first dependent image; for the second frame and subsequent first extended images to be generated, taking the first extended image of the previous frame of the first extended image to be generated as the first dependent image, and generating the first extended image based on the first dependent image.

[0144] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, further including: optionally, generating a first extended image based on the first dependent image includes: determining a second dependent image based on at least a partial image area of ​​the first dependent image, and determining an extended canvas area corresponding to the second dependent image; generating a first extended image based on the second dependent image and the extended canvas area.

[0145] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 2, further including: optionally, determining the second dependent image based on at least a partial image area of ​​the first dependent image includes: using the first dependent image as the second dependent image; or, cropping the first dependent image according to a preset image ratio to obtain the second dependent image, wherein the preset image ratio includes a preset image width ratio or an image length ratio.

[0146] According to one or more embodiments of the present disclosure, [Example Five] provides the method of Example Four, further including: optionally, cropping the first dependent image according to a preset image ratio to obtain a second dependent image, including: determining an image expansion direction corresponding to the first dependent image, and determining a target cropping edge in the first dependent image based on the image expansion direction, wherein the target cropping edge is parallel to the image expansion direction; cropping the target cropping edge based on a preset image ratio to obtain a second dependent image, wherein the image area in the first dependent image corresponding to the second dependent image is an image area adjacent to the image expansion direction.

[0147] According to one or more embodiments of the present disclosure, [Example 6] provides the method of Example 3, further including: optionally, the resolution and / or size of the extended canvas area is the same as the corresponding second dependent image.

[0148] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 3, further including: optionally, generating a first extended image based on the second dependent image and the extended canvas area, including: determining image description information corresponding to the first dependent image, and determining a target area image based on the first dependent image and the second dependent image; inputting the image description information, the target area image and the extended canvas area into a pre-trained image generation model to obtain a first extended image, wherein the image generation model is a preset algorithm model for drawing the image content of the extended canvas area based on the image description information and the target area image.

[0149] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 1, further including: optionally, generating a video corresponding to the original image based on the original image and the image extension area includes: cropping the first extended image based on the image extension area to obtain a second extended image, wherein the second extended image includes at least the image extension area; generating a video corresponding to the original image based on the original image and the second extended image.

[0150] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 8, further including: optionally, generating a video corresponding to the original image based on the original image and the second extended image, including: arranging the original image and the second extended image according to preset arrangement information; using the arranged original image and the second extended image as video frames, and calling a preset animation function to generate a video corresponding to the original image.

[0151] According to one or more embodiments of the present disclosure, [Example 10] provides the method of Example 9, further including: optionally, the arrangement information includes an arrangement order and / or an arrangement direction; the arrangement order is associated with the first dependent image corresponding to the second extended image and / or is associated with the generation order of the first extended image corresponding to the second extended image; the arrangement direction is associated with the image extension direction of the first extended image corresponding to the second extended image relative to the first dependent image.

[0152] According to one or more embodiments of the present disclosure, [Example 11] provides the method of Example 9, further including: optionally, the preset animation function includes an animation function that controls the video frame to move at a constant speed frame by frame along a preset direction.

[0153] According to one or more embodiments of the present disclosure, [Example 12] provides the method of Example 1, further including: optionally, the obtaining of the original image in response to the video generation trigger operation includes at least one of the following operations: obtaining the uploaded image as the original image in response to the image upload operation; obtaining the captured image as the original image in response to the image capture operation; receiving the image sent by the target device, and using the received image as the original image.

[0154] According to one or more embodiments of the present disclosure, [Example 13] provides a video generation device, including: an image acquisition module, for acquiring an original image in response to a video generation trigger operation; an image expansion module, for determining at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; in the case where the first extended image is one, the first dependent image is the original image; in the case where the first extended image is multiple, the first dependent image corresponding to the first extended image to be generated is the original image and / or the first extended image that has been generated; a video generation module, for generating a video corresponding to the original image based on the original image and the first extended image, and displaying the video.

[0155] 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.

[0156] 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.

[0157] 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 trigger operation, acquiring an original image; Determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; when there is one first extended image, the first dependent image is the original image; when there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image and / or the generated first extended image; A video corresponding to the original image is generated based on the original image and the first extended image, and the video is displayed.

2. The video generation method according to claim 1, wherein when there are multiple first extended images, determining at least one first extended image corresponding to the original image comprises: For the first extended image to be generated in the first frame, taking the original image as the first dependent image, and generating the first extended image based on the first dependent image; For the second frame and the first extended image to be generated subsequently, the first extended image of the previous frame of the first extended image to be generated is used as the first dependent image, and the first extended image is generated based on the first dependent image.

3. The video generation method according to claim 2, wherein generating the first extended image based on the first dependent image comprises: determining a second dependent image based on at least a partial image area of ​​the first dependent image, and determining an extended canvas area corresponding to the second dependent image; A first extended image is generated based on the second dependent image and the extended canvas area.

4. The video generation method according to claim 3, wherein the determining the second dependent image based on at least a partial image area of ​​the first dependent image comprises: using the first dependent image as a second dependent image; or, The first dependent image is cropped according to a preset image ratio to obtain a second dependent image, wherein the preset image ratio includes a preset image width ratio or an image length ratio.

5. The video generation method according to claim 4, wherein the step of cropping the first dependent image according to a preset image ratio to obtain the second dependent image comprises: Determine an image extension direction corresponding to the first dependent image, and determine a target cropping edge in the first dependent image based on the image extension direction, wherein the target cropping edge is parallel to the image extension direction; The target cropping edge is cropped based on a preset image ratio to obtain a second dependent image, wherein an image region in the first dependent image corresponding to the second dependent image is an image region adjacent to an image extension direction. 6 . The video generation method according to claim 3 , wherein the resolution and / or size of the extended canvas area is the same as that of the corresponding second dependent image.

7. The video generation method according to claim 3, wherein the generating the first extended image based on the second dependent image and the extended canvas area comprises: Determine image description information corresponding to the first dependent image, and determine a target area image based on the first dependent image and the second dependent image; The image description information, the target area image and the extended canvas area are input into a pre-trained image generation model to obtain a first extended image, wherein the image generation model is used to draw the image content of the extended canvas area based on the image description information and the target area image. The preset algorithm model.

8. The video generation method according to claim 1, wherein the step of generating a video corresponding to the original image based on the original image and the first extended image comprises: Cropping the first extended image based on the image extended area to obtain a second extended image, wherein the second extended image at least includes the image extended area; A video corresponding to the original image is generated based on the original image and the first extended image.

9. The video generation method according to claim 8, wherein the step of generating a video corresponding to the original image based on the original image and the second extended image comprises: Arranging the original image and the second extended image according to preset arrangement information; The arranged original image and the second extended image are used as video frames, and a preset animation function is called to generate a video corresponding to the original image.

10. The video generation method according to claim 9, wherein the arrangement information includes an arrangement order and / or an arrangement direction; the arrangement order is associated with the first dependent image corresponding to the second extended image and / or is associated with a generation order of the first extended image corresponding to the second extended image; the arrangement direction is associated with an image extension direction of the first extended image corresponding to the second extended image relative to the first dependent image.

11. The video generation method according to claim 9, wherein the preset animation function comprises an animation function for controlling the video frames to move at a constant speed frame by frame along a preset direction.

12. The video generation method according to claim 1, wherein the acquiring of the original image in response to the video generation trigger operation comprises at least one of the following operations: In response to the image upload operation, obtaining the uploaded image as an original image; In response to the image capturing operation, acquiring the captured image as an original image; Receive the image sent by the target device, and use the received image as the original image.

13. A video generating device, comprising: An image acquisition module, used to acquire an original image in response to a video generation trigger operation; an image extension module, configured to determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; when there is one first extended image, the first dependent image is the original image; when there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image and / or the generated first extended image; A video generation module is used to generate a video corresponding to the original image based on the original image and the first extended image, and display the video.

14. 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 trigger operation, acquiring an original image; Determine at least one first extended image corresponding to the original image, wherein the first extended image includes an image extension area and at least a partial image area of ​​a first dependent image; when there is one first extended image, the first dependent image is the original image; when there are multiple first extended images, the first dependent image corresponding to the first extended image to be generated is the original image and / or the generated first extended image; Generate a signal corresponding to the original image based on the original image and the first extended image video, and displaying the video.

15. The electronic device according to claim 14, wherein when there are multiple first extended images, the determining at least one first extended image corresponding to the original image comprises: For the first extended image to be generated in the first frame, taking the original image as the first dependent image, and generating the first extended image based on the first dependent image; For the second frame and the first extended image to be generated subsequently, the first extended image of the previous frame of the first extended image to be generated is used as the first dependent image, and the first extended image is generated based on the first dependent image.

16. The electronic device according to claim 15, wherein generating the first extended image based on the first dependent image comprises: determining a second dependent image based on at least a partial image area of ​​the first dependent image, and determining an extended canvas area corresponding to the second dependent image; A first extended image is generated based on the second dependent image and the extended canvas area.

17. The electronic device according to claim 16, wherein determining the second dependency image based on at least a partial image area of ​​the first dependency image comprises: using the first dependent image as a second dependent image; or, The first dependent image is cropped according to a preset image ratio to obtain a second dependent image, wherein the preset image ratio includes a preset image width ratio or an image length ratio.

18. The electronic device according to claim 17, wherein the step of cropping the first dependent image according to a preset image ratio to obtain the second dependent image comprises: Determine an image extension direction corresponding to the first dependent image, and determine a target cropping edge in the first dependent image based on the image extension direction, wherein the target cropping edge is direction parallel; The target cropping edge is cropped based on a preset image ratio to obtain a second dependent image, wherein an image region in the first dependent image corresponding to the second dependent image is an image region adjacent to an image extension direction. 19 . The electronic device according to claim 16 , wherein the extended canvas area has the same resolution and / or size as the corresponding second dependent image.

20. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the video generation method according to any one of claims 1 to 12 when executed by a computer processor.

Citation Information

Patent Citations

  • Image encoding method and device, image decoding method and device, computing equipment and storage medium

    CN110113615A

  • Image processing method and device, storage medium and equipment

    CN113034348A

  • Video synthesis method, device, equipment, medium and product

    CN114881901A

  • Video generation method and device, electronic equipment and storage medium

    CN117241100A

  • Apparatus of processing image and method thereof

    KR102452881B1