CN-122023617-A - Dynamic image generation method, device, equipment, medium and product
Abstract
The application relates to the technical field of image processing and discloses a method, a device, equipment, a medium and a product for generating a dynamic image, wherein the method comprises the steps of generating a model based on artificial intelligence and generating a target video representing dynamic change of the image; the method comprises the steps of selecting original frames in a target video, determining effective frames in the target video, sequentially splicing the effective frames to generate a texture map containing the effective frames, sequentially performing texture sampling on areas corresponding to the effective frames in the texture map, and rendering according to texture sampling results to obtain dynamic images. The application can realize one-key assembly line generation of the dynamic image by utilizing one texture map, obviously reduce the manpower dependence, greatly shorten the production period of the dynamic image and reduce the manufacturing cost.
Inventors
- XIANG YU
Assignees
- 网易(杭州)网络有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260107
Claims (12)
- 1. A method of generating a dynamic image, the method comprising: Generating a target video representing dynamic changes of the image based on the artificial intelligence generation model; screening original frames in the target video, and determining effective frames in the target video; sequentially splicing the effective frames to generate texture maps containing the effective frames; And sequentially performing texture sampling on the areas corresponding to the effective frames in the texture map, and rendering according to the texture sampling results to obtain a dynamic image.
- 2. The method according to claim 1, wherein the method further comprises: determining indexes of the effective frames and corresponding time points in the target video; Establishing a corresponding relation between the index and the time point according to the index and the time point of each effective frame; The sequentially performing texture sampling on the area corresponding to each effective frame in the texture map includes: determining a target index corresponding to the current rendering time according to the corresponding relation at the current rendering time; and performing texture sampling on an area corresponding to a target effective frame in the texture map, wherein the target effective frame is an effective frame corresponding to the target index.
- 3. The method of claim 2, wherein said determining the index of each of said active frames and the corresponding point in time in said target video comprises: Setting corresponding indexes for each effective frame according to the sequence of each effective frame; Determining the effective duration of each effective frame in the target video, wherein the effective duration of each effective frame is the sum of the duration of the effective frame and the duration of other original frames between the effective frame and the next effective frame; And determining a time point corresponding to each effective frame according to the effective duration of each effective frame.
- 4. A method according to claim 3, wherein said determining a time point corresponding to each of said valid frames according to the valid duration of each of said valid frames comprises: For a first effective frame, carrying out normalization processing on the effective duration of the first effective frame according to the total duration of the target video, and determining a time point corresponding to the first effective frame; And for the following i effective frames, carrying out normalization processing on the effective duration of the i effective frames according to the total duration of the target video, and increasing the duration corresponding to the normalization processing result on the basis of the time point corresponding to the i-1 effective frames to obtain the time point corresponding to the i effective frames.
- 5. The method according to claim 2, wherein the texture sampling the region corresponding to the target valid frame in the texture map comprises: determining the coordinate offset of the target effective frame in the texture map according to the target index; scaling original texture coordinates for texture sampling according to the number of rows and columns of the effective frames in the texture map, adding the coordinate offset to the scaled texture coordinates, and determining corrected target texture coordinates; and performing texture sampling on the texture map according to the target texture coordinates.
- 6. The method of claim 1, wherein the filtering the original frames in the target video to determine valid frames in the target video comprises: and carrying out de-duplication treatment on the original frames in the target video, and taking the original frames reserved after de-duplication as effective frames.
- 7. The method according to claim 1, wherein the method further comprises: Determining depth information of the effective frame, wherein the depth information comprises depth values of pixels of the effective frame; The sequentially performing texture sampling on the area corresponding to each effective frame in the texture map includes: When texture sampling is carried out on an area corresponding to a target effective frame in the texture map, determining target texture coordinates corresponding to the target effective frame in the texture map; Performing parallax shielding processing on the target texture coordinates according to the depth information of the target effective frame, and determining parallax corrected texture coordinates; And performing texture sampling on the texture map according to the texture coordinates after parallax correction.
- 8. The method of claim 1, wherein the dynamic image is a dynamic card, wherein the artificial intelligence based generation model generates a target video representing dynamic changes of the image, comprising: The card demand information comprises a card description text or a card reference picture; Generating an original card corresponding to the card demand information based on an image generation model; and generating a target video corresponding to the original card based on the video generation model.
- 9. A device for generating a dynamic image is provided, characterized in that the device comprises: the video generation module is used for generating a target video representing dynamic change of the image based on the artificial intelligence generation model; The screening module is used for screening the original frames in the target video and determining the effective frames in the target video; the generation module is used for sequentially splicing the effective frames to generate a texture map containing the effective frames; and the processing module is used for sequentially carrying out texture sampling on the areas corresponding to the effective frames in the texture map and rendering according to the texture sampling results to obtain dynamic images.
- 10. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of generating a dynamic image according to any one of claims 1 to 8.
- 11. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the dynamic image generating method according to any one of claims 1 to 8.
- 12. A computer program product comprising computer instructions for causing a computer to perform the method of generating a dynamic image according to any one of claims 1 to 8.
Description
Dynamic image generation method, device, equipment, medium and product Technical Field The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, a medium, and a product for generating a dynamic image. Background The moving image refers to an image in which a subject or a background can be dynamically changed with time, and has a better display effect than a still image. Taking a game scene as an example, a moving image may be used to represent a character, prop, etc. in a game, or may be applied to scenes such as virtual surroundings and digital collections. For example, dynamic images are designed for individual cards in card games, and dynamic cards (e.g., dynamic stereoscopic cards) are becoming a mainstream demand in order to enhance the immersion of players and the artistic expression of cards. Dynamic images such as dynamic cards are generally realized mainly by two-dimensional layering or three-dimensional modeling. However, the two-dimensional layering mode has lower efficiency, the three-dimensional modeling mode has higher manufacturing cost, and is difficult to adapt to application scenes in which a large number of dynamic cards are required to be produced. Disclosure of Invention In view of the above, the present application provides a method, apparatus, device, medium and product for generating dynamic images, so as to solve the problems of complex and low efficiency of dynamic image generation methods such as dynamic cards. In a first aspect, the present application provides a method for generating a dynamic image, the method comprising: Generating a target video representing dynamic changes of the image based on the artificial intelligence generation model; screening original frames in the target video, and determining effective frames in the target video; sequentially splicing the effective frames to generate texture maps containing the effective frames; And sequentially performing texture sampling on the areas corresponding to the effective frames in the texture map, and rendering according to the texture sampling results to obtain a dynamic image. In a second aspect, the present application provides a moving image generating apparatus, the apparatus comprising: the video generation module is used for generating a target video representing dynamic change of the image based on the artificial intelligence generation model; The screening module is used for screening the original frames in the target video and determining the effective frames in the target video; the generation module is used for sequentially splicing the effective frames to generate a texture map containing the effective frames; and the processing module is used for sequentially carrying out texture sampling on the areas corresponding to the effective frames in the texture map and rendering according to the texture sampling results to obtain dynamic images. In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory and the processor are communicatively connected to each other, and the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the method for generating a dynamic image according to the first aspect or any one of the embodiments corresponding to the first aspect. In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the method for generating a dynamic image according to the first aspect or any one of its corresponding embodiments. In a fifth aspect, the present application provides a computer program product comprising computer instructions for causing a computer to perform the method of generating a dynamic image of the first aspect or any of its corresponding embodiments. The method for generating the dynamic image provided by the application generates the video by utilizing an artificial intelligence technology, screens out partial effective frames from the video, sequentially arranges each effective frame into the texture map, only renders the area corresponding to one effective frame in the texture map at each time point when the texture map is rendered, dynamically adjusts the areas which are respectively rendered, realizes the sequential rendering of each effective frame in the texture map, and can realize the one-key assembly line generation of the dynamic image by utilizing one texture map. The method can be fully and automatically realized, remarkably reduces the manpower dependence, can greatly shorten the production period of the dynamic images, reduces the manufacturing cost, is particularly suitable for generating the batch dynamic images, and can also generate a proper target video by utilizing an AI technology according to the personalized customization requirement of users, thereby automatically g