Image generation method and device, electronic equipment and storage medium
By acquiring and superimposing pixel parameters of the target video frame to generate images, the problem that real-time photography cannot generate moving track images is solved, and offline processing and high-quality image generation are realized.
Patent Information
- Application Number
- CN202410008921.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, shooting images with subject movement trajectories require real-time photography, and if they leave the shooting scene, they cannot be generated again, and the shooting parameters cannot be adjusted, resulting in complex early settings and poor image quality.
By obtaining multi-frame video frames of the target video, selecting and superimposing pixel parameters containing the same position, generating a target image, including the moving track of the moving object, and adjusting the shooting parameters to improve video quality.
The method of processing target videos to generate images offline is realized, without real-time shooting, simplifying the operation process and improving image quality.
Smart Images

Figure CN120259360A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technologies, and in particular, to an image generation method, apparatus, electronic device, and storage medium. Background Art
[0002] During the process of taking images, images with moving trajectories of objects such as star trails and motion blur can be obtained by means of long exposure or exposure once at fixed intervals. In the related art, real-time photography is required. If the shooting scene is left, it is impossible to generate images with moving trajectories of objects again. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides an image generation method, apparatus, electronic device, and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, an image generation method is provided. The method includes:
[0005] Obtain a target video, where the target video includes multiple video frames, and the multiple video frames include the same moving object;
[0006] Generate a target image based on the multiple video frames, where the target image includes the moving trajectory of the moving object.
[0007] In some embodiments, the generating a target image based on the multiple video frames includes:
[0008] Select multiple target video frames from the multiple video frames;
[0009] Superimpose the multiple target video frames to obtain the target image.
[0010] In some embodiments, the superimposing the multiple target video frames to obtain the target image includes:
[0011] Determine the pixel parameters of a target pixel point based on the pixel parameters of multiple pixel points at the same position in the multiple target video frames, where the target pixel point is a pixel point in the to-be-determined target image that is at the same position as the multiple pixel points;
[0012] Determine the target image based on the pixel parameters of multiple target pixel points.
[0013] In some embodiments, the determining the pixel parameters of a target pixel point based on the pixel parameters of multiple pixel points at the same position in the multiple target video frames includes:
[0014] Determine the average value of the pixel parameters of multiple pixel points at the same position as the pixel parameter of the target pixel point.
[0015] In some embodiments, the selecting multiple target video frames from the multiple video frames includes:
[0016] Determine the video frames in a changing state among the multiple video frames as the target video frames; wherein, the video frame being in a changing state means that the position of the moving object in the video frame is different from the position of the moving object in the previous video frame of the video frame.
[0017] In some embodiments, before superimposing the multiple target video frames to obtain the target image, the method further includes:
[0018] Perform a correction process on the target video frame to obtain a corrected target video frame, so that the background object in the corrected target video frame has the same position as the background object in other target video frames.
[0019] In some embodiments, the obtaining the target video includes:
[0020] Shoot the target video based on adaptive shooting parameters.
[0021] According to the second aspect of the embodiments of the present disclosure, there is provided an image generation device, the device includes:
[0022] A video acquisition module, configured to acquire a target video, the target video includes multiple video frames, and the multiple video frames include the same moving object;
[0023] An image generation module, configured to generate a target image based on the multiple video frames, and the target image includes the moving trajectory of the moving object.
[0024] In some embodiments, the image generation module is configured to:
[0025] Select multiple target video frames from the multiple video frames;
[0026] Superimpose the multiple target video frames to obtain the target image.
[0027] In some embodiments, the image generation module is configured to:
[0028] Determine the pixel parameter of a target pixel point based on the pixel parameters of multiple pixel points at the same position in the multiple target video frames, where the target pixel point is the pixel point at the same position as the multiple pixel points in the target image to be determined;
[0029] Determine the target image based on the pixel parameters of multiple target pixels.
[0030] In some embodiments, the image generation module is configured to determine the pixel parameters of the target pixel as the average value of the pixel parameters of multiple pixels at the same position.
[0031] In some embodiments, the image generation module is configured to determine the video frames in a changing state among the multiple video frames as the target video frames; wherein, the video frame being in a changing state means that the position of the moving object in the video frame is different from the position of the moving object in the previous video frame of the video frame.
[0032] In some embodiments, the image generation module is further configured to perform a correction process on the target video frame to obtain a corrected target video frame, so that the background object in the corrected target video frame has the same position as the background object in other target video frames.
[0033] In some embodiments, the video acquisition module is configured to capture the target video based on adaptive shooting parameters.
[0034] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0035] A processor;
[0036] A memory for storing instructions executable by the processor;
[0037] Wherein, the processor is configured to execute the method described in the first aspect of the embodiments of the present disclosure.
[0038] According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, enabling the electronic device to execute the method described in the first aspect of the embodiments of the present disclosure.
[0039] Adopting the above method of the present disclosure has the following beneficial effects:
[0040] The method provided by the embodiments of the present disclosure can acquire a target video, and then generate a target image with the moving trajectory of the moving object based on multiple video frames in the target video, providing a new way of video-to-image conversion. The target image can be obtained by processing the target video offline, without the need for real-time shooting, that is, without obtaining the target image through real-time photography, thus making the acquisition method of the target image simpler.
[0041] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings
[0042] The drawings herein are incorporated into and form a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.
[0043] Figure 1 is a schematic diagram of a ghost image shown according to an exemplary embodiment;
[0044] Figure 2 is a flowchart of an image generation method shown according to an exemplary embodiment;
[0045] Figure 3 is a flowchart of an image generation method shown according to an exemplary embodiment;
[0046] Figure 4 is a block diagram of an image generation device shown according to an exemplary embodiment;
[0047] Figure 5 is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed Description of the Embodiments
[0048] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0049] In the related art, if you want to capture a ghost image as shown in Figure 1 , you need to first set the exposure time and the number of exposures of the camera, then fix the camera with a tripod, and then start shooting. During the shooting process, the camera will open the shutter for an exposure at intervals, and expose it onto a negative until the shooting is completed, producing a ghost image. The places that do not move during the shooting are completely captured, and the places with movement will leave a movement track on the ghost image. As shown in Figure 1 , there is a movement track of a person in the ghost image, while the ground remains unchanged.
[0050] In this way in the related art, it is necessary to capture the afterimage image in real time. If the camera leaves the shooting scene, the afterimage image cannot be generated again. Moreover, during the shooting process, the shooting parameters of the camera cannot be adjusted. When the shooting scene changes, the shooting effect of the changed shooting scene with the original shooting parameters is not good, resulting in poor quality of the finally obtained afterimage image. Further, since the shooting parameters of the camera cannot be adjusted, in order to better capture the afterimage image, it is necessary to carefully set the shooting parameters before starting shooting, resulting in a relatively complex process of setting the shooting parameters in the early stage. The method provided by the embodiments of the present disclosure can effectively improve the above problems.
[0051] The method provided by the embodiments of the present disclosure can be applied to any scenario where it is necessary to obtain an afterimage image. For example, it can be applied to scenarios such as shooting star trails, motion afterimages, and the construction process of a certain object.
[0052] The method provided by the embodiments of the present disclosure is executed by an electronic device, and the electronic device can be a mobile phone, a tablet computer, a laptop computer, a vehicle-mounted terminal, a smart home device, a server, or other devices.
[0053] Figure 2 is a flowchart of an image generation method shown according to an exemplary embodiment, executed by an electronic device. Refer to Figure 2 This method includes the following steps:
[0054] Step S201, obtain a target video, where the target video includes multiple video frames, and the multiple video frames include the same moving object.
[0055] Among them, the target video can be a video captured by the electronic device, or a video downloaded from the network, or a video sent to the electronic device by other devices. The embodiments of the present disclosure do not limit the source of the target video.
[0056] The target video is any video including a moving object. The moving object can be a person, an animal, a building, an object, or other objects. The target video includes multiple video frames, and the same moving object is included in the multiple video frames, and the moving object is moving in the target video. Of course, the moving object can be moving in some video frames and stationary in some video frames. Among them, the moving object moving in the video frame means that the position of the moving object in the current video frame has changed compared with the previous video frame of the current video frame, and the moving object being stationary in the video frame means that the position of the moving object in the current video frame has not changed compared with the previous video frame of the current video frame.
[0057] In addition to the moving object, the video frame can also include a background object, and the position of the background object remains unchanged in the multiple video frames.
[0058] Step S202: generating a target image based on multiple video frames, wherein the target image includes a moving track of the moving object.
[0059] Since multiple video frames can reflect the overall moving trajectory of the moving object, a target image can be generated based on the multiple video frames, and the target image includes the moving trajectory of the moving object.
[0060] It should be noted that the target video may include one or more moving objects. When the target video frame includes multiple moving objects, the generated target image includes the motion trajectory of each moving object. Figure 1 The afterimage image shown includes the motion trajectories of two people.
[0061] The method provided by the embodiment of the present disclosure can obtain a target video, and then generate a target image with a moving trajectory of the moving object based on multiple video frames in the target video, providing a new video-to-image method, and can obtain a target image by processing the target video offline. The target image can be obtained by processing the target video offline without real-time shooting, that is, without obtaining the target image through real-time photography, thereby making the method of obtaining the target image simpler.
[0062] Figure 3 is a flowchart of an image generation method according to an exemplary embodiment, which is executed by an electronic device, see Figure 3 , the method comprises the following steps:
[0063] Step S301, obtaining a target video, where the target video includes multiple video frames.
[0064] The target video may be a video shot by the electronic device, a video downloaded from the Internet, or a video sent to the electronic device by other devices. The embodiment of the present disclosure does not limit the source of the target video.
[0065] In some embodiments, when the target video is a video shot by an electronic device, the target video is shot based on adaptive shooting parameters. The adaptive shooting parameters refer to that during the shooting process, the shooting parameters can be adjusted according to the shooting environment. For example, when the shooting environment is dark, one shooting parameter is used, and when the shooting environment becomes brighter, another shooting parameter is adjusted to make each frame of the captured target video have better quality. The shooting parameters include exposure time, ISO (sensitivity), white balance and other parameters.
[0066] Optionally, in order to obtain a video with better quality, a tripod may be used to fix the electronic device during the video shooting process to increase the stability of the electronic device and prevent the electronic device from shaking during the shooting process.
[0067] Compared with the shooting method in the related art where the shooting parameters cannot be adjusted, in the embodiments of the present disclosure, through adjustable shooting parameters, a target video with better quality is shot. When the quality of the target video is better, a target image with better quality can also be generated subsequently. Moreover, the shooting parameters are automatically adjusted during the shooting process, eliminating the need for the user to set the shooting parameters in advance and reducing the complexity of user operations.
[0068] It should be noted that when the target video is a video obtained from the network or from other devices, the target video can also be a video shot based on adaptive shooting parameters.
[0069] Step S302: Select multiple target video frames from multiple video frames.
[0070] Among them, the multiple target video frames can be all the video frames or some of the video frames.
[0071] In some embodiments, considering that a target video with the moving trajectory of a moving object needs to be generated, if the position of the moving object remains unchanged in at least two consecutive video frames, the content of these at least two video frames is the same. When generating the target image, if these at least two video frames are used, it will increase the processing amount without bringing more information. Therefore, only one video frame needs to be selected from the at least two video frames for generating the target image. That is, the video frames in a changing state among the multiple video frames are determined as the target video frames; where a video frame is in a changing state means that the position of the moving object in the video frame is different from the position of the moving object in the previous video frame of the video frame.
[0072] In some embodiments, other methods can also be used to select multiple target video frames. For example, first detect the moving speed of the moving object in the target video. If the moving speed of the moving object is relatively fast, it means that the position of the moving object in each video frame may change compared with the position of the moving object in the previous video frame. In this case, all the video frames can be used as the target video frames; if the moving speed of the moving object is relatively slow, it means that the position of the moving object in each video frame changes little compared with the position of the moving object in the previous video frame. In this case, one video frame can be selected as the target video frame every preset number of video frames from the multiple video frames. For example, the preset number can be 2, 3, or other numbers.
[0073] It should be noted that when the target video includes multiple moving objects, when there are both stationary and moving moving objects in the video frame, the video frame is determined to be in a moving state.
[0074] In some embodiments, ideally, the background object in the target video is in a stationary state. However, considering that if the shooting device shakes during the shooting process, it is possible that the position of the background object changes between two adjacent frames. In this case, in order to obtain a target image with better quality subsequently, the target video frame is corrected to make the position of the background object in the corrected target video frame the same as that of the background object in other target video frames. For example, an object that remains stationary all the time is used as a reference object, and the position of this reference object is fixed in each video frame. When it is found that the position of the reference object in the target video frame changes, the target video frame is corrected based on the change in the position of the reference object. Another example is to use an image correction model to process the target video frame to be corrected based on other video frames that do not need to be corrected, so as to obtain the corrected target video frame. Of course, other methods can also be used to correct the target video frame, and there is no limitation in the embodiments of the present disclosure.
[0075] In some embodiments, the target video frame can also be denoised, filtered, image-enhanced, etc., to obtain a target video frame with better quality, so as to generate a target image with better quality subsequently.
[0076] Step S303: Superimpose multiple target video frames to obtain a target image.
[0077] Among them, the target image includes the movement trajectory of the moving object. This movement trajectory can be the motion trajectory of the moving object, or it can also be the change trajectory of the moving object from nothing to something. For example, if the moving object is a building under construction, then from the start of construction to the completion of construction, the entire construction process can be presented in the target image, and from the part where construction starts first to the part where construction ends last, a change trajectory with the color changing from dark to light can be presented in the target image.
[0078] In some embodiments, superimposing multiple target video frames includes: determining the pixel parameters of the target pixel points based on the pixel parameters of multiple pixel points at the same position in multiple target video frames, where the target pixel points are the pixel points in the target image to be determined and are at the same position as the multiple pixel points; determining the target image based on the pixel parameters of multiple target pixel points. The target pixel points are the pixel points in the target image. For example, for the pixel parameters of the target pixel point in the first row and first column of the target image, they can be determined based on the pixel parameters of the pixel points in the first row and first column of multiple target video frames. For the pixel parameters of the target pixel point in the second row and first column of the target image, they can be determined based on the pixel parameters of the pixel points in the second row and first column of multiple target video frames. The determination of the pixel parameters of other target pixel points is the same by analogy.
[0079] Among them, the pixel parameters can be RGB (red, green, blue) values, brightness values, or other values representing information of pixel points.
[0080] In some embodiments, the average value of the pixel parameters of multiple pixel points at the same position is determined as the pixel parameter of the target pixel point. For example, if there are N target video frames, the pixel parameter of the target pixel point is determined by the following formula: Pixel parameter of the target pixel point = (Pixel parameter of the first pixel point in the first frame + Pixel parameter of the second pixel point in the second frame +... + Pixel parameter of the Nth pixel point in the Nth frame) / N, where the first pixel point, the second pixel point,... the Nth pixel point are pixel points at the same position in the N target video frames.
[0081] It should be noted that the above implementation manner describes the determination process of the pixel parameters of the target pixel point at a certain position. For each target pixel point, the above implementation manner is used to determine the pixel parameters of the target pixel point.
[0082] The method provided by the embodiments of the present disclosure can obtain a target video, and then generate a target image with a moving trajectory of a moving object based on multiple video frames in the target video, providing a new way of video-to-image conversion. The target image can be obtained by offline processing of the target video without real-time shooting, that is, without obtaining the target image through real-time photography, thus making the acquisition method of the target image simpler.
[0083] Moreover, compared with the shooting method in the related art where the shooting parameters cannot be adjusted, in the embodiments of the present disclosure, a target video with better quality is obtained through adjustable shooting parameters. When the quality of the target video is better, a target image with better quality can also be generated subsequently. And the shooting parameters are automatically adjusted during the shooting process without the user having to set the shooting parameters in advance, reducing the complexity of user operations.
[0084] Figure 4 is a block diagram of an image generation device shown according to an exemplary embodiment, configured in an electronic device. Refer to Figure 4 , and the device includes:
[0085] A video acquisition module 401, configured to acquire a target video, where the target video includes multiple video frames, and the multiple video frames include the same moving object;
[0086] An image generation module 402, configured to generate a target image based on the multiple video frames, where the target image includes the moving trajectory of the moving object.
[0087] In some embodiments, the image generation module 402 is configured to:
[0088] Select multiple target video frames from the multiple video frames;
[0089] Overlay multiple frames of target video frames to obtain a target image.
[0090] In some embodiments, the image generation module 402 is configured to:
[0091] Determine the pixel parameters of a target pixel point based on the pixel parameters of multiple pixel points at the same position in multiple frames of target video frames, where the target pixel point is the pixel point in the to-be-determined target image that is at the same position as the multiple pixel points;
[0092] Determine the target image based on the pixel parameters of multiple target pixel points.
[0093] In some embodiments, the image generation module 402 is configured to determine the average value of the pixel parameters of multiple pixel points at the same position as the pixel parameters of the target pixel point.
[0094] In some embodiments, the image generation module 402 is configured to determine the video frames in a changing state among multiple video frames as target video frames; wherein, a video frame being in a changing state means that the position of a moving object in the video frame is different from its position in the previous video frame of the video frame.
[0095] In some embodiments, the image generation module 402 is further configured to perform a correction process on the target video frames to obtain corrected target video frames, so that the background objects in the corrected target video frames have the same position as the background objects in other target video frames.
[0096] In some embodiments, the video acquisition module 401 is configured to capture a target video based on adaptive shooting parameters.
[0097] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0098] Embodiments of the present disclosure further provide an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the image generation method in the above embodiments.
[0099] Figure 5 It is a block diagram of an electronic device 500 shown according to an exemplary embodiment.
[0100] Referring to Figure 5 , the electronic device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.
[0101] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0102] The memory 504 is configured to store various types of data to support the operation of the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0103] The power component 506 provides power to various components of the electronic device 500. The power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 500.
[0104] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0105] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.
[0106] The I / O interface 512 provides an interface between the processing component 502 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0107] The sensor component 514 includes one or more sensors for providing status assessments of various aspects of the electronic device 500. For example, the sensor component 514 can detect the on / off state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500. The sensor component 514 can also detect a change in the position of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and a change in the temperature of the electronic device 500. The sensor component 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 514 may further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 516 is configured to facilitate communication between the electronic device 500 and other devices in a wired or wireless manner. The electronic device 500 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0109] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0110] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the above instructions can be executed by a processor 520 of the electronic device 500 to complete the above method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0111] The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image generation method in the above embodiments.
[0112] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.
[0113] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. An image generation method, characterized in that, The method includes: Obtaining a target video, where the target video includes multiple video frames, and the multiple video frames include the same moving object; Generating a target image based on the multiple video frames, where the moving trajectory of the moving object is included in the target image.
2. The method according to claim 1, characterized in that The generating a target image based on the multiple video frames includes: Selecting multiple target video frames from the multiple video frames; Overlaying the multiple target video frames to obtain the target image.
3. The method according to claim 2, wherein The overlaying the multiple target video frames to obtain the target image includes: Determining the pixel parameters of a target pixel point based on the pixel parameters of multiple pixel points at the same position in the multiple target video frames, where the target pixel point is the pixel point in the to-be-determined target image that is at the same position as the multiple pixel points; Determining the target image based on the pixel parameters of multiple target pixel points.
4. The method according to claim 3, characterized in that, The determining the pixel parameters of a target pixel point based on the pixel parameters of multiple pixel points at the same position in the multiple target video frames includes: Determining the average value of the pixel parameters of the multiple pixel points at the same position as the pixel parameters of the target pixel point.
5. The method according to claim 2, wherein The selecting multiple target video frames from the multiple video frames includes: Determining the video frames in a changing state among the multiple video frames as the target video frames; where a video frame being in a changing state means that the position of the moving object in the video frame is different from its position in the previous video frame of the video frame.
6. The method according to claim 2, characterized in that, Before the overlaying the multiple target video frames to obtain the target image, the method further includes: Performing a correction process on the target video frames to obtain corrected target video frames, so that the background objects in the corrected target video frames are in the same position as the background objects in other target video frames.
7. The method according to claim 1, wherein The obtaining a target video includes: Shooting the target video based on adaptive shooting parameters.
8. An image generation device, characterized in that, The device includes: A video acquisition module configured to obtain a target video, where the target video includes multiple video frames, and the multiple video frames include the same moving object; An image generation module configured to generate a target image based on the multiple video frames, where the moving trajectory of the moving object is included in the target image.
9. An electronic device, characterized in that, Including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 - 7.
10. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the method according to any one of claims 1 - 7.