CN111464760A - Dynamic image generation method and device and terminal equipment - Google Patents
Dynamic image generation method and device and terminal equipment Download PDFInfo
- Publication number
- CN111464760A CN111464760A CN202010372572.8A CN202010372572A CN111464760A CN 111464760 A CN111464760 A CN 111464760A CN 202010372572 A CN202010372572 A CN 202010372572A CN 111464760 A CN111464760 A CN 111464760A
- Authority
- CN
- China
- Prior art keywords
- image
- dynamic image
- display
- instruction
- detected
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
- H04N23/632—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/95—Computational photography systems, e.g. light-field imaging systems
- H04N23/951—Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
Abstract
The application is applicable to the technical field of image processing, and provides a dynamic image generation method, a dynamic image generation device, a terminal device and a computer readable storage medium, wherein the dynamic image generation method comprises the following steps: when a first instruction is detected, acquiring a display image from a display interface of the terminal equipment every target time length, and taking the acquired display image as a dynamic image frame; and when the second instruction is detected, generating a dynamic image according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame. By the method, the problem that the manufacturing process is complex when the dynamic image is obtained can be solved.
Description
Technical Field
The present application belongs to the field of image processing technologies, and in particular, to a method for generating a moving image, a device for generating a moving image, a terminal device, and a computer-readable storage medium.
Background
Dynamic images have the advantages of small storage capacity, convenience in playing, easiness in propagation and the like, and therefore, are widely used by users in various applications such as social platforms and chat software. At present, a dynamic image is often obtained after processing such as editing and format conversion is performed on an existing video, so that a video needs to be recorded in advance, and a manufacturing process of obtaining the dynamic image by editing the video and the like is often complex.
Disclosure of Invention
The embodiment of the application provides a dynamic image generation method, a dynamic image generation device, a terminal device and a computer readable storage medium, which can solve the problem that the manufacturing process is complex when a dynamic image is obtained.
In a first aspect, an embodiment of the present application provides a method for generating a dynamic image, including:
when a first instruction is detected, acquiring a display image from a display interface of the terminal equipment every target time length, and taking the acquired display image as a dynamic image frame;
and when the second instruction is detected, generating a dynamic image according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame.
In a second aspect, an embodiment of the present application provides a dynamic image generation apparatus, including:
the acquisition module is used for acquiring a display image from a display interface of the terminal equipment every target time length when the first instruction is detected, and taking the acquired display image as a dynamic image frame;
and the generating module is used for generating dynamic images according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame when the second instruction is detected.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, a display, and a computer program stored in the memory and executable on the processor, where the processor implements the method for generating a moving image according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the method for generating a dynamic image according to the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the method for generating a dynamic image in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, when a first instruction is detected, a display image is acquired from a display interface of the terminal equipment every other target duration, the acquired display image is used as a dynamic image frame, and the dynamic image frame for manufacturing the dynamic image can be acquired from the display interface of the terminal equipment; further, when the second instruction is detected, a dynamic image is generated according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame, at this time, the dynamic image can be obtained according to the display content of the display interface of the terminal device within a period of time, video recording and reprocessing are not needed, the time for making the dynamic image is shortened, the frame rate of the dynamic image can be flexibly adjusted by adjusting the target time and the like, for example, the size of the dynamic image can be reduced by adjusting the target time in some application scenes, so that a user can store and send the dynamic image, and the use experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for generating a dynamic image according to an embodiment of the present application;
fig. 2 is a schematic flowchart of step S101 according to an embodiment of the present application;
fig. 3 is another schematic flow chart of step S101 provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a dynamic image generation apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The method for generating a dynamic image provided in the embodiment of the present application may be applied to a server, a desktop computer, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and other terminal devices, and the embodiment of the present application does not limit the specific type of the terminal device.
Specifically, fig. 1 shows a flowchart of a method for generating a dynamic image according to an embodiment of the present application, where the method for generating a dynamic image can be applied to a terminal device.
The method for generating a dynamic image may include:
step S101, when a first instruction is detected, a display image is obtained from a display interface of the terminal equipment every target duration, and the obtained display image is used as a dynamic image frame.
In the embodiment of the present application, the file type of the dynamic image may be various, and is not limited herein. For example, the file type of the Moving image may be one or more of Graphics Interchange Format (GIF), Moving Pictures Experts Group (MPEG), Audio video interleaved Format (AVI), and the like.
In an embodiment of the present application, the first instruction may instruct to acquire a dynamic image frame. In some examples, the first instruction may be generated upon receiving a first operation of the terminal device by a user. For example, the first instruction may be generated after receiving a touch operation of a user on a first virtual key on a display interface of the terminal device. Of course, the first operation may also be other operations besides the touch operation, and may be determined according to an actual application scenario. For example, the first operation may be a pressing operation of a first key on the terminal device by the user, or the like.
In this embodiment, the content of the display image in the display interface of the terminal device is not limited herein. In some examples, the display image may include a preview image acquired by a camera in real time; or, the display image may include content such as a preset application, a video, and the like displayed on the display interface, where the content may change according to the interaction operation of the user, and at this time, the plurality of dynamic image frames may reflect a change situation of the content along with the interaction operation of the user.
In the embodiment of the present application, the target duration may be preset by a user, or may be determined according to an actual application scenario. For example, in some examples, when the first instruction is detected, a scene category and/or a category of the target object in a currently displayed image in a display interface of the terminal device may be identified, and the target duration may be determined according to the scene category and/or the category of the target object. For example, if the object type in the currently displayed image includes an animal with a fast running speed, such as a cat, a dog, a horse, etc., the object duration may be made smaller, so as to shorten the time interval of the acquisition time of each dynamic image frame, so as to improve the frame rate of the dynamic image, and ensure that the content of the animal in the subsequently generated dynamic image has a better display effect.
In the embodiment of the application, after each dynamic image frame is acquired, the thumbnail of each dynamic image frame can be displayed in the preset menu bar of the display interface of the terminal device according to the sequence of the acquisition time of each dynamic image frame, so that a user can refer to and compare each dynamic image frame through the preset menu bar.
And step S102, when the second instruction is detected, generating a dynamic image according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame.
In an embodiment of the present application, the second instruction may instruct to stop acquiring the moving image frame and to generate the moving image. In some examples, the second instruction may be generated after receiving a second operation of the terminal device by the user. For example, the second instruction may be generated after receiving a touch operation of the user on a second virtual key on the display interface of the terminal device. Of course, the second operation may also be other operations besides the touch operation, and may be determined according to an actual application scenario. For example, the second operation may be a pressing operation of a second key on the terminal device by the user, or the like.
In this embodiment, the frame rate of the dynamic image may be determined according to the target duration, so that the dynamic image is generated according to the frame rate and each dynamic image frame.
In some application scenarios, the storage space required by the dynamic image is often small, so that a user can use the dynamic image as a dynamic expression package in various applications or publish dynamic and reduced content on a social platform. At this time, the user often has a low demand for display accuracy of the moving image, and is more concerned about whether it is easy to store, easy to produce, and easy to spread.
Therefore, the embodiment of the application can provide the method for generating the dynamic image, which is convenient for a user to quickly and conveniently make the dynamic image, and has shorter required storage space and operation time.
In some embodiments, when the second instruction is detected, generating a dynamic image according to the order of the acquisition time of each dynamic image frame and each dynamic image frame includes:
when a second instruction is detected, determining the frame rate of the dynamic image according to the target duration;
sequencing the dynamic image frames according to the sequence of the acquisition time of the dynamic image frames;
and generating the dynamic image according to the sequence, the frame rate and each dynamic image frame.
In this embodiment, the frame rate of the dynamic image may be derived according to the target duration. For example, if the target time length is 0.02 seconds, the frame rate may be 50 frames/second. Of course, in some embodiments, the frame rate may be adjusted according to the target duration according to the user's requirement. For example, if the user desires that the playback speed of the moving image is x times the image display speed of the display interface, the frame rate of the moving image may be obtained by calculating an initial frame rate from the target duration and then multiplying the initial frame rate by x.
In this embodiment, the dynamic video frames may be acquired through the display interface, and the frame rate of the dynamic image is determined according to the target duration, so as to quickly generate the dynamic image according to the plurality of static dynamic video frames, and the format of the generated dynamic image is often the format expected by the user, and operations such as format conversion and the like are not required, and the user does not need to record the video and then correspondingly edit the video, thereby greatly improving the generation speed of the dynamic image.
In some embodiments, the step S101 specifically includes:
step S201, displaying a preview image acquired by a camera in real time on a display interface of the terminal equipment;
step S202, when a first instruction is detected, a preview image is acquired from the display interface every target duration, and the acquired preview image is used as a dynamic image frame.
In the embodiment of the application, the preview image acquired by the camera in real time can be displayed on the display interface of the terminal device, when the first instruction is detected, a preview image is acquired from the display interface every target time length, and the acquired preview image is used as the dynamic image frame. At the moment, each dynamic image frame can reflect the change condition of the content of the preview image of the camera along with time, and meanwhile, the camera does not need to execute the operation of recording the video, so that the consumption of power consumption, storage space and the like of terminal equipment caused by recording the video is avoided.
The manner of obtaining the preview image from the display interface may be various. For example, the screen capture operation may be performed on the display interface to obtain a screen capture image, and then the screen capture image is cropped to obtain a preview image in the screen capture image. In addition, the preview image can be directly cut from the display interface.
In some embodiments, the acquiring a preview image from the display interface every target duration when the first instruction is detected, and taking the acquired preview image as a dynamic image frame includes:
when a first instruction is detected, screen capture operation is carried out on the display interface every target time length to obtain a plurality of screen capture images;
respectively identifying the areas of the preset images contained in the screen capture images;
and respectively cutting each screen capture image according to the area of the preset image contained in each screen capture image to obtain preview images respectively corresponding to each screen capture image, and taking the obtained preview images as dynamic image frames.
In this embodiment of the application, the screen capture image may be a full-screen display image of the display interface. In a specific application scenario, the preview image acquired by the camera in real time may be displayed in a full screen on the display interface, or may be displayed only in a partial area of the display interface, so that an area where a preset image included in each of the screenshot images is located may be identified, and each of the screenshot images is cropped according to the area where the preset image included in each of the screenshot images is located, so as to obtain a preview image corresponding to each of the screenshot images. In some examples, the area where the preset image included in each screenshot image is located may be identified through an edge detection algorithm, a convolutional neural network model, or the like, and a specific identification method is not limited herein.
In some embodiments, the acquiring a preview image from the display interface every target duration when the first instruction is detected, and taking the acquired preview image as a dynamic image frame includes:
when a first instruction is detected, acquiring coordinate information of a display area in which the preview image is displayed in the display interface;
and intercepting the preview image positioned in the display area from the display interface according to the coordinate information every target time length, and taking the intercepted preview image as a dynamic image frame.
In the embodiment of the application, for example, the layout information of the control displaying the preset image on the display interface may be acquired, so as to acquire the coordinate information of the display area of the preview image; in addition, the edge of the preset image may be identified by an edge detection algorithm, a convolutional neural network model, or the like, so as to acquire the coordinate information of the display area of the preview image. In some examples, the display area may be a rectangular area, and thus, the coordinate information may include information of coordinates of two diagonal vertices of the rectangular area.
In some embodiments, the acquiring a display image from a display interface of the terminal device every target duration when the first instruction is detected, and taking the acquired display image as a dynamic image frame includes:
when a first instruction is detected, acquiring a display image from a display interface of the terminal equipment every target time length;
and adjusting the resolution of the display image to a preset resolution, and taking the display image after the resolution adjustment as a dynamic image frame.
In some application scenarios, the definition requirement of a user on a dynamic image is not high, and the image resolution of a display image of a display interface is often high, so that the resolution of the display image can be adjusted to compress the size of the display image, and a dynamic image frame more meeting the user requirement is obtained, thereby avoiding the overlarge size of a subsequently generated dynamic image.
In some embodiments, the acquiring a display image from a display interface of the terminal device every target duration when the first instruction is detected, and taking the acquired display image as a dynamic image frame includes:
step S301, when a first instruction is detected, identifying a target type and/or a scene type corresponding to a current display image, wherein the current display image is an image displayed in the display interface when the first instruction is detected;
step S302, determining the target duration according to the target type and/or scene type in the current display image;
step S303, acquiring a display image from the display interface every target duration, and taking the acquired display image as a dynamic image frame.
In this embodiment, the target category may include a category of a target object in the currently displayed image. The target category and the scene category may be predetermined by a user according to an actual application scene.
For example, the target category may also include one or more of a stationary object, a slow moving object, a fast moving object, and the like, and for objects with different moving speeds, different target time lengths may be used, for example, the target time length corresponding to the stationary object in the target category is longer than the target time length corresponding to the slow moving object in the target category, and the target time length corresponding to the slow moving object in the target category is longer than the target time length corresponding to the fast moving object in the target category. Specifically, in a specific application scenario, if the object type in the currently displayed image includes an animal with a fast running speed, such as a cat, a dog, a horse, etc., the object duration may be made smaller, so as to shorten a time interval of acquiring time of each dynamic image frame, so as to improve a frame rate of the dynamic image, and ensure that content of the animal in a subsequently generated dynamic image can have a better display effect.
By the embodiment, the target duration can be determined according to the target type and/or the scene type in the currently displayed image, so that the frame rate of the dynamic image can be dynamically adjusted according to a specific application scene, and the waste of storage space can be avoided while the presentation mode of the content in the generated dynamic image meets the user's desire.
In the embodiment of the application, when a first instruction is detected, a display image is acquired from a display interface of the terminal equipment every other target duration, the acquired display image is used as a dynamic image frame, and the dynamic image frame for manufacturing the dynamic image can be acquired from the display interface of the terminal equipment; further, when the second instruction is detected, a dynamic image is generated according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame, at this time, the dynamic image can be obtained according to the display content of the display interface of the terminal device within a period of time, video recording and reprocessing are not needed, the time for making the dynamic image is shortened, the frame rate of the dynamic image can be flexibly adjusted by adjusting the target time and the like, for example, the size of the dynamic image can be reduced by adjusting the target time in some application scenes, so that a user can store and send the dynamic image, and the use experience of the user is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 shows a block diagram of a moving image generating apparatus according to an embodiment of the present application, which corresponds to the above-described moving image generating method according to the above-described embodiment.
Referring to fig. 4, the moving image generation device 4 includes:
an obtaining module 401, configured to obtain, every other target duration, a display image from a display interface of a terminal device when a first instruction is detected, and use the obtained display image as a dynamic image frame;
a generating module 402, configured to, when the second instruction is detected, generate a dynamic image according to the order of the obtaining time of each dynamic image frame and each dynamic image frame.
Optionally, the obtaining module 401 specifically includes:
the display unit is used for displaying the preview image acquired by the camera in real time on a display interface of the terminal equipment;
and the first acquisition unit is used for acquiring a preview image from the display interface every target time length when the first instruction is detected, and taking the acquired preview image as a dynamic image frame.
Optionally, the first obtaining unit specifically includes:
the screen capturing subunit is used for performing screen capturing operation on the display interface every target time length when the first instruction is detected, so as to obtain a plurality of screen capturing images;
the identification subunit is used for respectively identifying the areas of the preset images contained in the screenshot images;
and the first processing subunit is used for respectively cutting each screenshot image according to the area where the preset image contained in each screenshot image is located, obtaining the preview image corresponding to each screenshot image respectively, and taking the obtained preview image as the dynamic image frame.
Optionally, the first obtaining unit specifically includes:
the obtaining subunit is configured to, when a first instruction is detected, obtain coordinate information of a display area in the display interface, where the preview image is displayed;
and the second processing subunit is used for intercepting the preview image positioned in the display area from the display interface according to the coordinate information every target time length, and taking the intercepted preview image as a dynamic image frame.
Optionally, the obtaining module 401 specifically includes:
the second acquisition unit is used for acquiring a display image from a display interface of the terminal equipment every target time length when the first instruction is detected;
and the adjusting unit is used for adjusting the resolution of the display image to a preset resolution and taking the display image after the resolution adjustment as a dynamic image frame.
Optionally, the generating module 402 specifically includes:
a first determining unit, configured to determine, when a second instruction is detected, a frame rate of the dynamic image according to the target duration;
the ordering unit is used for ordering the dynamic image frames according to the sequence of the acquisition time of the dynamic image frames;
and a generating unit configured to generate the moving image according to the sequence, the frame rate, and each of the moving image frames.
Optionally, the obtaining module 401 specifically includes:
the identification unit is used for identifying a target type and/or a scene type corresponding to a current display image when a first instruction is detected, wherein the current display image is an image displayed in the display interface when the first instruction is detected;
a second determining unit, configured to determine the target duration according to a target category and/or a scene category in the current display image;
and the third acquisition unit is used for acquiring a display image from the display interface every other target time length and taking the acquired display image as a dynamic image frame.
In the embodiment of the application, when a first instruction is detected, a display image is acquired from a display interface of the terminal equipment every other target duration, the acquired display image is used as a dynamic image frame, and the dynamic image frame for manufacturing the dynamic image can be acquired from the display interface of the terminal equipment; further, when the second instruction is detected, a dynamic image is generated according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame, at this time, the dynamic image can be obtained according to the display content of the display interface of the terminal device within a period of time, video recording and reprocessing are not needed, the time for making the dynamic image is shortened, the frame rate of the dynamic image can be flexibly adjusted by adjusting the target time and the like, for example, the size of the dynamic image can be reduced by adjusting the target time in some application scenes, so that a user can store and send the dynamic image, and the use experience of the user is improved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one is shown in fig. 5), a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps in any of the above-mentioned embodiments of the method for generating a dynamic image when executing the computer program 52.
The terminal device 5 may be a server, a mobile phone, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a desktop computer, a notebook, a desktop computer, a palmtop computer, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of the terminal device 5, and does not constitute a limitation of the terminal device 5, and may include more or less components than those shown, or combine some of the components, or different components, such as may also include input devices, output devices, network access devices, etc. The input device may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of a fingerprint), a microphone, a camera, and the like, and the output device may include a display, a speaker, and the like.
The Processor 50 may be a Central Processing Unit (CPU), and the Processor 50 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5, the memory 51 may in other embodiments also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. the memory 51 may further comprise both an internal storage unit and an external storage device of the terminal device 5, the memory 51 may be used for storing an operating system, applications, a Boot loader (Boot L loader), data and other programs, such as program codes of the computer program, etc. the memory 51 may also be used for temporarily storing data that has been or will be output.
In addition, although not shown, the terminal device 5 may further include a network connection module, such as a bluetooth module Wi-Fi module, a cellular network module, and the like, which is not described herein again.
In this embodiment, when the processor 50 executes the computer program 52 to implement the steps in any of the above-mentioned embodiments of the method for generating a dynamic image, when a first instruction is detected, a display image is acquired from the display interface of the terminal device every target duration, and the acquired display image is used as a dynamic image frame, so that the dynamic image frame used for making the dynamic image can be acquired from the display interface of the terminal device; further, when the second instruction is detected, a dynamic image is generated according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame, at this time, the dynamic image can be obtained according to the display content of the display interface of the terminal device within a period of time, video recording and reprocessing are not needed, the time for making the dynamic image is shortened, the frame rate of the dynamic image can be flexibly adjusted by adjusting the target time and the like, for example, the size of the dynamic image can be reduced by adjusting the target time in some application scenes, so that a user can store and send the dynamic image, and the use experience of the user is improved.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A method for generating a moving image, comprising:
when a first instruction is detected, acquiring a display image from a display interface of the terminal equipment every target time length, and taking the acquired display image as a dynamic image frame;
and when the second instruction is detected, generating a dynamic image according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame.
2. The method for generating a moving image according to claim 1, wherein the acquiring a display image from a display interface of a terminal device every target duration when the first instruction is detected, and taking the acquired display image as a moving image frame comprises:
displaying a preview image acquired by a camera in real time on a display interface of the terminal equipment;
and when the first instruction is detected, acquiring a preview image from the display interface every target time length, and taking the acquired preview image as a dynamic image frame.
3. The method for generating a dynamic image according to claim 2, wherein the acquiring a preview image from the display interface every target time length when the first instruction is detected, and taking the acquired preview image as a dynamic image frame comprises:
when a first instruction is detected, screen capture operation is carried out on the display interface every other target duration to obtain a plurality of screen capture images;
respectively identifying the areas of preset images contained in the screen capture images;
and respectively cutting each screen capture image according to the area of the preset image contained in each screen capture image to obtain preview images respectively corresponding to each screen capture image, and taking the obtained preview images as dynamic image frames.
4. The method for generating a dynamic image according to claim 2, wherein the acquiring a preview image from the display interface every target time length when the first instruction is detected, and taking the acquired preview image as a dynamic image frame comprises:
when a first instruction is detected, acquiring coordinate information of a display area in which the preview image is displayed in the display interface;
and intercepting the preview image positioned in the display area from the display interface every target time according to the coordinate information, and taking the intercepted preview image as a dynamic image frame.
5. The method for generating a moving image according to claim 1, wherein the acquiring a display image from a display interface of a terminal device every target duration when the first instruction is detected, and taking the acquired display image as a moving image frame comprises:
when a first instruction is detected, acquiring a display image from a display interface of the terminal equipment every target time length;
and adjusting the resolution of the display image to a preset resolution, and taking the display image after the resolution adjustment as a dynamic image frame.
6. The method for generating a dynamic image according to claim 1, wherein when the second instruction is detected, generating a dynamic image according to the order of the acquisition time of each dynamic image frame and each dynamic image frame comprises:
when a second instruction is detected, determining the frame rate of the dynamic image according to the target duration;
sequencing the dynamic image frames according to the sequence of the acquisition time of the dynamic image frames;
and generating the dynamic image according to the sequence, the frame rate and each dynamic image frame.
7. The method for generating a dynamic image according to any one of claims 1 to 6, wherein when the first instruction is detected, acquiring a display image from a display interface of a terminal device every target time period, and taking the acquired display image as a dynamic image frame comprises:
when a first instruction is detected, identifying a target category and/or a scene category corresponding to a current display image, wherein the current display image is an image displayed in the display interface when the first instruction is detected;
determining the target duration according to the target category and/or the scene category in the current display image;
and acquiring a display image from the display interface every other target time length, and taking the acquired display image as a dynamic image frame.
8. A moving image generation device, comprising:
the acquisition module is used for acquiring a display image from a display interface of the terminal equipment every target time length when the first instruction is detected, and taking the acquired display image as a dynamic image frame;
and the generating module is used for generating dynamic images according to the sequence of the acquisition time of each dynamic image frame and each dynamic image frame when the second instruction is detected.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for generating a dynamic image according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method for generating a moving image according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010372572.8A CN111464760A (en) | 2020-05-06 | 2020-05-06 | Dynamic image generation method and device and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010372572.8A CN111464760A (en) | 2020-05-06 | 2020-05-06 | Dynamic image generation method and device and terminal equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111464760A true CN111464760A (en) | 2020-07-28 |
Family
ID=71681151
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010372572.8A Pending CN111464760A (en) | 2020-05-06 | 2020-05-06 | Dynamic image generation method and device and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111464760A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019767A (en) * | 2020-08-07 | 2020-12-01 | 北京奇艺世纪科技有限公司 | Video generation method and device, computer equipment and storage medium |
CN113676677A (en) * | 2021-10-22 | 2021-11-19 | 深圳市明源云空间电子商务有限公司 | Dynamic picture synthesis method and device, electronic equipment and readable storage medium |
CN116579964A (en) * | 2023-05-22 | 2023-08-11 | 北京拙河科技有限公司 | Dynamic frame gradual-in gradual-out dynamic fusion method and device |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101510313A (en) * | 2009-03-13 | 2009-08-19 | 腾讯科技(深圳)有限公司 | Method, system and medium player for generating GIF |
CN102957864A (en) * | 2011-08-24 | 2013-03-06 | 奥林巴斯映像株式会社 | Imaging device and control method thereof |
CN104822015A (en) * | 2014-01-30 | 2015-08-05 | 卡西欧计算机株式会社 | Image processing apparatus and image processing method |
CN105718198A (en) * | 2016-01-20 | 2016-06-29 | 广东欧珀移动通信有限公司 | Generation method of dynamic image and mobile terminal |
CN106780685A (en) * | 2017-03-23 | 2017-05-31 | 维沃移动通信有限公司 | The generation method and terminal of a kind of dynamic picture |
CN106993228A (en) * | 2017-03-02 | 2017-07-28 | 北京潘达互娱科技有限公司 | Method for processing video frequency and device |
CN107302664A (en) * | 2017-08-11 | 2017-10-27 | 维沃移动通信有限公司 | A kind of image pickup method and mobile terminal |
CN109862295A (en) * | 2019-01-18 | 2019-06-07 | 平安科技(深圳)有限公司 | GIF generation method, device, computer equipment and storage medium |
CN110086985A (en) * | 2019-03-25 | 2019-08-02 | 华为技术有限公司 | A kind of method for recording and electronic equipment of time-lapse photography |
CN110111241A (en) * | 2019-04-30 | 2019-08-09 | 北京字节跳动网络技术有限公司 | Method and apparatus for generating dynamic image |
CN110659616A (en) * | 2019-09-26 | 2020-01-07 | 新华智云科技有限公司 | Method for automatically generating gif from video |
-
2020
- 2020-05-06 CN CN202010372572.8A patent/CN111464760A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101510313A (en) * | 2009-03-13 | 2009-08-19 | 腾讯科技(深圳)有限公司 | Method, system and medium player for generating GIF |
CN102957864A (en) * | 2011-08-24 | 2013-03-06 | 奥林巴斯映像株式会社 | Imaging device and control method thereof |
CN104822015A (en) * | 2014-01-30 | 2015-08-05 | 卡西欧计算机株式会社 | Image processing apparatus and image processing method |
CN105718198A (en) * | 2016-01-20 | 2016-06-29 | 广东欧珀移动通信有限公司 | Generation method of dynamic image and mobile terminal |
CN106993228A (en) * | 2017-03-02 | 2017-07-28 | 北京潘达互娱科技有限公司 | Method for processing video frequency and device |
CN106780685A (en) * | 2017-03-23 | 2017-05-31 | 维沃移动通信有限公司 | The generation method and terminal of a kind of dynamic picture |
CN107302664A (en) * | 2017-08-11 | 2017-10-27 | 维沃移动通信有限公司 | A kind of image pickup method and mobile terminal |
CN109862295A (en) * | 2019-01-18 | 2019-06-07 | 平安科技(深圳)有限公司 | GIF generation method, device, computer equipment and storage medium |
CN110086985A (en) * | 2019-03-25 | 2019-08-02 | 华为技术有限公司 | A kind of method for recording and electronic equipment of time-lapse photography |
CN110111241A (en) * | 2019-04-30 | 2019-08-09 | 北京字节跳动网络技术有限公司 | Method and apparatus for generating dynamic image |
CN110659616A (en) * | 2019-09-26 | 2020-01-07 | 新华智云科技有限公司 | Method for automatically generating gif from video |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019767A (en) * | 2020-08-07 | 2020-12-01 | 北京奇艺世纪科技有限公司 | Video generation method and device, computer equipment and storage medium |
CN113676677A (en) * | 2021-10-22 | 2021-11-19 | 深圳市明源云空间电子商务有限公司 | Dynamic picture synthesis method and device, electronic equipment and readable storage medium |
CN116579964A (en) * | 2023-05-22 | 2023-08-11 | 北京拙河科技有限公司 | Dynamic frame gradual-in gradual-out dynamic fusion method and device |
CN116579964B (en) * | 2023-05-22 | 2024-02-02 | 北京拙河科技有限公司 | Dynamic frame gradual-in gradual-out dynamic fusion method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108010112B (en) | Animation processing method, device and storage medium | |
CN111464760A (en) | Dynamic image generation method and device and terminal equipment | |
CN111698553A (en) | Video processing method and device, electronic equipment and readable storage medium | |
KR101968977B1 (en) | Cartoon providing system, cartoon providing device and cartoon providing method | |
CN111159594A (en) | Information processing method, information processing device and terminal equipment | |
CN111290684A (en) | Image display method, image display device and terminal equipment | |
CN110765799A (en) | Client code scanning identification method, device, equipment and storage medium | |
US9779093B2 (en) | Spatial seeking in media files | |
US20200244869A1 (en) | Method for capturing images, terminal, and storage medium | |
US20140313361A1 (en) | Image obtaining method and electronic device | |
CN111597009B (en) | Application program display method and device and terminal equipment | |
JP2024505597A (en) | Image processing methods, apparatus, devices and media | |
CN111669599A (en) | Video decoding method, video decoding device and terminal equipment | |
CN111385599B (en) | Video processing method and device | |
CN116095413A (en) | Video processing method and electronic equipment | |
US11600300B2 (en) | Method and device for generating dynamic image | |
CN111757177B (en) | Video clipping method and device | |
CN113873319A (en) | Video processing method and device, electronic equipment and storage medium | |
CN114387402A (en) | Virtual reality scene display method and device, electronic equipment and readable storage medium | |
CN114331808A (en) | Action posture storage method, device, medium and electronic equipment | |
CN112367487A (en) | Video recording method and electronic equipment | |
CN112328351A (en) | Animation display method, animation display device and terminal equipment | |
CN111325656B (en) | Image processing method, image processing device and terminal equipment | |
CN113207037B (en) | Template clipping method, device, terminal, system and medium for panoramic video animation | |
CN116456131B (en) | Special effect rendering method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200728 |
|
RJ01 | Rejection of invention patent application after publication |