CN110675473A - Method, device, electronic equipment and medium for generating GIF dynamic graph - Google Patents

Method, device, electronic equipment and medium for generating GIF dynamic graph Download PDF

Info

Publication number
CN110675473A
CN110675473A CN201910875157.1A CN201910875157A CN110675473A CN 110675473 A CN110675473 A CN 110675473A CN 201910875157 A CN201910875157 A CN 201910875157A CN 110675473 A CN110675473 A CN 110675473A
Authority
CN
China
Prior art keywords
frame data
image frame
image
data
dividing
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.)
Granted
Application number
CN201910875157.1A
Other languages
Chinese (zh)
Other versions
CN110675473B (en
Inventor
彭冬炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910875157.1A priority Critical patent/CN110675473B/en
Publication of CN110675473A publication Critical patent/CN110675473A/en
Application granted granted Critical
Publication of CN110675473B publication Critical patent/CN110675473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a medium for generating a GIF dynamic graph. According to the method and the device, after the target video data are obtained, the target video data can be further analyzed to obtain a plurality of image frame data, the image frame data are divided into at least one image based on a preset mode, and then corresponding GIF dynamic images are respectively generated according to the at least one image group. By applying the technical scheme of the application, all image frame data can be automatically analyzed from the video data, the image frame data are divided into a plurality of image groups in different types, and then a corresponding GIF dynamic graph is generated according to each image group. Therefore, the problem of long generation time caused by the need of artificially synthesizing the GIF dynamic graph in the related art can be avoided.

Description

Method, device, electronic equipment and medium for generating GIF dynamic graph
Technical Field
The present application relates to image processing technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for generating a GIF dynamic graph.
Background
Due to the rise of the communications era and society, smart devices have been continuously developed with the use of more and more users.
With the rapid development of the internet, people using smart devices to watch various videos become a normal state, such as short videos, GIF dynamic images, and the like. The GIF (Graphics Interchange Format) is a file Format capable of storing a plurality of pictures, and an animation of simple loop play can be formed by reading out pictures one by one from the plurality of pictures stored in the GIF file and displaying the pictures on a screen.
However, in the related art process of generating GIF kinetic graphs, there is often a problem that the generation efficiency is too low because only one GIF kinetic graph can be generated at a time.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a medium for generating a GIF dynamic graph.
According to an aspect of the embodiments of the present application, there is provided a method for generating a GIF kinetic graph, including:
acquiring target video data;
analyzing the target video data to obtain a plurality of image frame data;
dividing a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data;
and respectively generating corresponding GIF dynamic graphs based on the at least one image group.
According to another aspect of the embodiments of the present application, there is provided an apparatus for generating a GIF kinetic graph, including:
an acquisition module configured to acquire target video data;
an analysis module configured to analyze the target video data to obtain a plurality of image frame data;
the dividing module is configured to divide a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data;
and the generating module is used for respectively generating corresponding GIF dynamic graphs based on the at least one image group.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
a display for displaying with the memory to execute the executable instructions to perform any of the above-described operations of the method of generating a GIF kinetic map.
According to yet another aspect of embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions which, when executed, perform the operations of any one of the above-described methods for generating a GIF kinetic graph.
In the application, after the target video data is acquired, the target video data can be further analyzed to obtain a plurality of image frame data, the image frame data are divided into at least one image based on a preset mode, and then corresponding GIF dynamic images are respectively generated according to the at least one image group. By applying the technical scheme of the application, all image frame data can be automatically analyzed from the video data, the image frame data are divided into a plurality of image groups in different types, and then a corresponding GIF dynamic graph is generated according to each image group. Therefore, the problem of long generation time caused by the need of artificially synthesizing the GIF dynamic graph in the related art can be avoided.
The technical solution of the present application is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a method for generating a GIF kinetic graph according to the present application;
2 a-2 c are schematic diagrams of image frames in a target video;
FIG. 3 is a schematic structural diagram of the apparatus for generating a GIF dynamic graph according to the present application.
Fig. 4 is a schematic view of an electronic device according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
It should be noted that all the directional indications (such as up, down, left, right, front, and rear … …) in the embodiment of the present application are only used to explain the relative position relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indication is changed accordingly.
In addition, technical solutions between the various embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope of the present application.
It should be noted at the outset that descriptions in this application as relating to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit to the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
A method for performing generating a GIF kinetic graph according to an exemplary embodiment of the present application is described below in conjunction with fig. 1-2. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a method, a device, a target terminal and a medium for generating the GIF dynamic graph.
Fig. 1 schematically shows a flow chart of a method for generating a GIF dynamic graph according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101, acquiring target video data.
First, the target video data is not particularly limited in the present application, and may be, for example, long video data or short video data. It should be noted that the target video data at least needs to include two image frame data.
It should be further noted that, in the present application, a device for acquiring target video data is not specifically limited, and may be, for example, an intelligent device or a server. The smart device may be a PC (Personal Computer), a smart phone, a tablet PC, an e-book reader, an MP3(Moving Picture Experts group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable Computer, or a mobile terminal device with a display function, and the like.
S102, analyzing the target video data to obtain a plurality of image frame data.
After the target video data is obtained, the video data can be further analyzed to obtain a plurality of image frame data therein. The video data includes a plurality of image frames. The image frame is the minimum unit for forming the video, and the video file can be decoded by using decoding tools such as ffmpeg and the like to obtain a plurality of image frames.
It should be noted that the number and the order of the extracted image frames are not specifically limited in the present application. For example, the image frame of the first 5 frames in the video data may be extracted, the image frame of the last 5 frames in the video data may be extracted, and all the image frames in the video data may be extracted.
S103, dividing the image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data.
Further, after the plurality of image frames are extracted, the plurality of image frame data may be divided into at least one image group based on a preset policy. The preset mode is not specifically limited in the present application, and for example, the image frame data of each category may be grouped according to a plurality of image frame data, so as to generate a plurality of different image groups. The plurality of image groups may be generated by grouping the plurality of image frame data at the generation time of each image frame data. The image groups may be generated by grouping parameter information corresponding to each image frame data among a plurality of image frame data. The scope of protection of this application is not affected by the change of the preset mode.
In order to automatically generate a plurality of GIFs according to the video content, the video frames are divided into a plurality of groups according to the image content, for example, the front half of a short video is a person self-portrait, the middle is a pet, and the last part is a surrounding landscape. The video frames can be divided according to the contents, and a clustering algorithm can be used, so that three corresponding GIF dynamic graphs are automatically generated. The image frames can be divided by using a clustering algorithm, similar objects are grouped into the same cluster, so that the similarity of the data objects in the same cluster is as large as possible, and the difference of the data objects which are not in the same cluster is also as large as possible. After clustering, the data of the same class are gathered together as much as possible, and different data are separated as much as possible.
It should be noted that each image group in the present application is an image group for generating a GIF kinetic graph. Therefore, each image group should include at least two image frame data. It should be noted that the preset number is not specifically limited in this application, and may be, for example, 5, or 3.
S104, respectively generating corresponding GIF dynamic graphs based on the at least one image group.
In the application, a plurality of image groups can be obtained according to the grouping result in a preset mode, and it can be understood that different image groups have different content themes. And the video frame contents in the same image group are similar. Therefore, for each image group, the image frames in the image group can be arranged and displayed according to the original playing time sequence to generate a corresponding GIF dynamic graph, and finally, a plurality of GIF dynamic graphs can be automatically generated according to the plurality of image groups.
Optionally, when the GIF dynamic graph is generated based on each image group, the sequence of the data of each image frame is not specifically limited. For example, the target GIF dynamic map may be generated by sorting the image frames in time series, and sequentially sorting the image frames in time series from far to near. Alternatively, the target GIF movie may be generated from the plurality of frame images in the order of the frame images designated by the user.
In the application, after the target video data is acquired, the target video data can be further analyzed to obtain a plurality of image frame data, the image frame data are divided into at least one image based on a preset mode, and then corresponding GIF dynamic images are respectively generated according to the at least one image group. By applying the technical scheme of the application, all image frame data can be automatically analyzed from the video data, the image frame data are divided into a plurality of image groups in different types, and then a corresponding GIF dynamic graph is generated according to each image group. Therefore, the problem of long generation time caused by the need of artificially synthesizing the GIF dynamic graph in the related art can be avoided.
In one possible embodiment of the present application, in S103 (based on a preset manner, dividing the plurality of image frame data into at least one image group), the following may be implemented:
extracting characteristic information in the data of each image frame based on a convolutional neural network model, and determining characteristic data corresponding to each image frame data;
the plurality of image frame data are divided into at least one image group based on the category of the feature data corresponding to each image frame data.
Among them, Convolutional Neural Networks (CNN) are a kind of feed forward Neural Networks (fed forward Neural Networks) containing convolution calculation and having a deep structure, and are one of the representative algorithms of deep learning. The convolutional neural network has a representation learning (representation learning) capability, and can perform translation invariant classification on input information according to a hierarchical structure of the convolutional neural network. The CNN (convolutional neural network) has remarkable effects in the fields of image classification, target detection, semantic segmentation and the like due to the powerful feature characterization capability of the CNN on the image.
Further, the present application may use the feature information extracted from each image frame in the CNN neural network model. Each image frame image needs to be input into a preset convolutional neural network model, and the output of the last full connected layer (FC) of the convolutional neural network model is used as the feature data corresponding to the image frame image.
In addition, the present application does not specifically limit the manner of extracting the feature information in each image frame data, and for example, in addition to extracting the feature information by using the CNN neural network model, the feature information in each image frame data may be acquired by using other image detection techniques.
It should be noted that, before determining the feature data corresponding to each image frame data by using the convolutional neural network model, the present application needs to first obtain the convolutional neural network model:
obtaining a sample image, wherein the sample image includes at least one sample feature;
and training a preset neural network image classification model by using the sample image to obtain a convolutional neural network model meeting a preset condition.
Optionally, for the neural network image classification model used, in one embodiment, the neural network image classification model may be trained through the sample image. Specifically, a sample image may be obtained, and a preset neural network image classification model may be trained by using the sample image to obtain a neural network image classification model satisfying a preset condition.
In addition, in the present application, in the process of dividing the plurality of image frame data into the preset number of image groups based on the preset mode, the image groups can be obtained by any one of the following two modes:
the first mode is as follows:
the image processing method includes dividing a plurality of image frame data into a preset number of image groups based on a preset manner.
The second mode is as follows:
determining a characteristic parameter of a plurality of image frame data;
the plurality of image frame data are divided into at least one image group based on the characteristic parameters of the plurality of image frame data.
That is, the present application may divide a plurality of image frame data into a fixed number of image groups based on a preset number set in advance. Alternatively, the plurality of image frame data may be divided into at least one image group based on the characteristic parameter of each image frame data.
Further, in the above-mentioned implementation (dividing the plurality of image frame data into at least one image group based on the category of the feature data corresponding to each image frame data), the following three ways may be implemented:
the first mode is as follows:
and determining object information corresponding to each image frame data according to the characteristic data corresponding to each image frame data, wherein the object information is at least one of object information, animal information and landscape information.
Image frame data corresponding to the same object information are divided into the same image group to generate at least one image group.
In the present application, object information appearing in each image frame may be determined according to feature data corresponding to the image frame data. The object information may be at least one of character information, animal information, and landscape information.
For example, as shown in fig. 2 a-2 c, fig. 2 a-2 c are three image frames in a piece of video. As can be seen from fig. 2a, the content in the sub-image is a sub-street view. Therefore, the object information corresponding to the image frame can be determined to be landscape information according to the feature data corresponding to the image frame data. Further, as can be seen from fig. 2b, the content in the image is that a human being is drawing. Therefore, the object information corresponding to the image frame can be determined to be the object information according to the feature data corresponding to the image frame data. Similarly, as can be seen from fig. 2c, the content in the image is that one person looks through one cat, and therefore, the object information corresponding to the image frame can be determined to be the human information and the animal information according to the feature data corresponding to the image frame data.
It is understood that, by way of example, image frame data corresponding to the same object information may be divided into the same image group to generate at least one image group. Further, the image frame data belonging to the personal information may be divided into a first image group, the image frame data belonging to the landscape information may be divided into a second image group, and the image frame data belonging to the personal information and the animal information may be divided into a third image group.
In another embodiment of the present application, after determining the object information corresponding to each image frame data according to the feature data corresponding to each image frame data, the following steps may be further performed:
acquiring the generation time of a plurality of image frame data;
the plurality of image frame data are divided into at least one image group based on the generation time of the plurality of image frame data and the object information of the plurality of image frame data.
In the present application, after the object information corresponding to each image frame data is specified, the problem of display disorder that is likely to occur when generating a GIF dynamic graph is avoided. In the present application, each image frame belonging to each object information may be sorted in time series based on the generation time of each image frame. And generating at least one image group based on the sorted image frames. To ensure the quality of the subsequent generation of the GIF dynamic graph.
The second mode is as follows:
determining a pixel depth parameter corresponding to each image frame data according to the characteristic data corresponding to each image frame data, wherein the pixel depth parameter is used for representing color information in a preset area in each corresponding image frame data;
image frame data corresponding to the same pixel depth parameter range are divided into the same image group to generate at least one image group.
The pixel depth information of the image frame refers to the number of bits used to store each pixel, and is also used to measure the resolution of the image. The pixel depth determines the number of possible colors per pixel of the color image or determines the number of possible gray levels per pixel of the gray scale image. Further, for example, each pixel of a color image is represented by three components R, G, and B, and if each component is 8 bits, then a pixel shares a 24-bit representation, so to speak, the depth of the pixel is 24, and each pixel may be one of 24-th power colors of 2. That is, the more bits that represent a pixel, the more colors it can represent and the deeper it can be. In the present application, the color information in the image frame data in the preset region can be determined accordingly.
Optionally, the preset area is not specifically limited in this application, for example, the preset area may be a background area of the image, or may be an area of any size of the image. Taking the background area as an example, the present application may determine whether each image frame may belong to the same image group according to the color of the background area in each image. It will be appreciated that the closer the background colors of the respective image frames are, the more likely it is to be divided into the same image group.
Further, the present application may also determine the time when the image is captured (for example, whether the image is day or night) by the color of the background area in each image frame, and it may be understood that each image frame belonging to day in each image frame may be divided into the first image group. Each image frame belonging to the night is divided into a second image group.
The third mode is as follows:
calculating a similarity matching value corresponding to each image frame data according to the feature data corresponding to each image frame data;
and dividing the plurality of image frame data into at least one image group based on the size relationship between the similarity matching value corresponding to each image frame data and a preset threshold value.
Further, in the process of calculating the similarity matching value corresponding to each image frame data, we may first match each image frame data with each other one by one to determine the matching value of each image frame data with all other image frames. Further, the size of each matching value may be compared with a preset threshold, and then all image frame data with matching values larger than the preset threshold are divided into a first image group, and all image frame data with matching values not larger than the preset threshold are divided into a second image group.
It should be noted that the preset threshold is not specifically limited in this application, and may be, for example, 80 or 50.
In another possible embodiment of the present application, after S102 (based on a preset manner, dividing the plurality of image frame data into at least one image group), the following steps may be further implemented:
first, it should be noted that, since the GIF animation is a small data amount of the motion video, it is not suitable to set it as the excessively long data video. Further, the image group generation method and device can detect the number of frames in each image group after dividing a plurality of image frame data into at least one image group, so as to ensure the generation quality of the GIF dynamic image.
Alternatively, when it is determined that the number of frames in each GOP is not greater than the target value, the corresponding GIF kinetic can be generated using the GOP.
Further optionally, when it is determined that the number of frames in each image group is greater than the target value, in order to ensure the generation quality of the GIF dynamic graph, further filtering is performed on the image frames in each image group to ensure that the number of frame images does not exceed the target value. Therefore, the present application may further screen out the frame data in each image group according to a second preset threshold. Thereby obtaining the screened image group. And when the number of frames in the screened image group is determined not to be larger than a second preset threshold value, the image group can be used for generating a corresponding GIF dynamic graph.
It can be understood that when the number of frames in the filtered image group is still greater than the second preset threshold, the filtering of each frame data in the filtered image group needs to be continued with a better criterion. Until obtaining the image group with the frame number meeting the second preset threshold.
Similarly, the second preset threshold is not specifically limited in the present application, for example, the second preset threshold may be 70 percent, and the second preset threshold may also be 50 percent. In addition, the second predetermined threshold value should be a value greater than the predetermined threshold value.
In another embodiment of the present application, as shown in fig. 3, the present application further provides an apparatus for generating a GIF kinetic graph, which includes an obtaining module 201, an analyzing module 202, a dividing module 203, and a generating module 204, wherein,
an acquisition module 201 configured as an acquisition module configured to acquire target video data;
an analysis module 202 configured to analyze the target video data to obtain a plurality of image frame data;
the dividing module 203 is configured to divide the plurality of image frame data into at least one image group based on a preset manner, where each image group at least includes two image frame data;
a generating module 204 configured to generate corresponding GIF kinetic graphs based on the at least one image group, respectively.
In the application, after the target video data is acquired, the target video data can be further analyzed to obtain a plurality of image frame data, the image frame data are divided into at least one image based on a preset mode, and then corresponding GIF dynamic images are respectively generated according to the at least one image group. By applying the technical scheme of the application, all image frame data can be automatically analyzed from the video data, the image frame data are divided into a plurality of image groups in different types, and then a corresponding GIF dynamic graph is generated according to each image group. Therefore, the problem of long generation time caused by the need of artificially synthesizing the GIF dynamic graph in the related art can be avoided.
In another embodiment of the present application, the dividing module 203 further includes a detecting unit and a dividing unit, wherein:
the detection unit is arranged to detect feature information in each image frame data based on a convolutional neural network model and determine feature data corresponding to each image frame data;
a dividing unit configured to divide the plurality of image frame data into the at least one image group based on a category of feature data corresponding to each of the image frame data.
In another embodiment of the present application, the dividing module 203 further includes a determining unit and a generating unit, wherein:
the determining unit is configured to determine object information corresponding to each image frame data according to feature data corresponding to each image frame data, wherein the object information is at least one of animal information, animal information and landscape information;
a generating unit configured to divide image frame data corresponding to the same object information into the same image group to generate the at least one image group.
In another embodiment of the present application, the dividing module 203 further includes an obtaining unit, where:
an acquisition unit configured to acquire generation times of the plurality of image frame data;
a generating unit configured to divide the plurality of image frame data into the at least one image group based on generation times of the plurality of image frame data and object information of the plurality of image frame data.
In another embodiment of the present application, the dividing module 203 further includes:
the determining unit is configured to determine a pixel depth parameter corresponding to each image frame data according to the feature data corresponding to each image frame data, wherein the pixel depth parameter is used for representing color information located in a preset area in each corresponding image frame data;
a generating unit configured to divide the image frame data corresponding to the same pixel depth parameter range into the same image group to generate the at least one image group.
In another embodiment of the present application, the dividing module 203 further includes a calculating unit and a setting unit, wherein:
the calculating unit is arranged to calculate a similarity matching value corresponding to each image frame data according to the feature data corresponding to each image frame data;
the setting unit is set to divide the plurality of image frame data into the at least one image group based on the size relationship between the similarity matching value corresponding to each image frame data and a preset threshold value.
In another embodiment of the present application, the dividing module 203 further includes:
a dividing module 203 configured to divide the plurality of image frame data into a preset number of image groups based on the preset manner;
or the like, or, alternatively,
a dividing module 203 configured to determine a plurality of characteristic parameters of the image frame data;
a dividing module 203 configured to divide the plurality of image frame data into at least one image group based on the characteristic parameters of the plurality of image frame data.
In another embodiment of the present application, the method further includes an obtaining module 205, where:
an acquisition module 205 configured to acquire a sample image, wherein the sample image comprises at least one sample feature;
the obtaining module 205 is configured to train a preset neural network image classification model by using the sample image, so as to obtain the convolutional neural network model meeting a preset condition.
Fig. 4 is a block diagram illustrating a logical structure of an electronic device in accordance with an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, electronic device 300 may include one or more of the following components: a processor 301 and a memory 302.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 301 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 302 is configured to store at least one instruction for execution by the processor 301 to implement the interactive special effect calibration method provided by the method embodiments of the present application.
In some embodiments, the electronic device 300 may further include: a peripheral interface 303 and at least one peripheral. The processor 301, memory 302 and peripheral interface 303 may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface 303 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, touch display screen 305, camera 306, audio circuitry 307, positioning components 308, and power supply 309.
The peripheral interface 303 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and peripheral interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the peripheral interface 303 may be implemented on a separate chip or circuit board, which is not limited by the embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, providing the front panel of the electronic device 300; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device 300 or in a folded design; in still other embodiments, the display 305 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 300. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 306 is used to capture images or video. Optionally, camera assembly 306 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 306 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 307 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 301 for processing or inputting the electric signals to the radio frequency circuit 304 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the electronic device 300. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 301 or the radio frequency circuitry 304 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 307 may also include a headphone jack.
The positioning component 308 is used to locate the current geographic location of the electronic device 300 to implement navigation or LBS (location based Service). The positioning component 308 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
The power supply 309 is used to supply power to various components in the electronic device 300. The power source 309 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 309 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 300 also includes one or more sensors 310. The one or more sensors 310 include, but are not limited to: acceleration sensor 311, gyro sensor 312, pressure sensor 313, fingerprint sensor 314, optical sensor 315, and proximity sensor 316.
The acceleration sensor 311 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the electronic device 300. For example, the acceleration sensor 311 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 301 may control the touch display screen 305 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 311. The acceleration sensor 311 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 312 may detect a body direction and a rotation angle of the electronic device 300, and the gyro sensor 312 and the acceleration sensor 311 may cooperate to acquire a 3D motion of the user on the electronic device 300. The processor 301 may implement the following functions according to the data collected by the gyro sensor 312: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 313 may be disposed on a side bezel of the electronic device 300 and/or an underlying layer of the touch display screen 305. When the pressure sensor 313 is arranged on the side frame of the electronic device 300, the holding signal of the user to the electronic device 300 can be detected, and the processor 301 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 313. When the pressure sensor 313 is disposed at the lower layer of the touch display screen 305, the processor 301 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 305. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 314 is used for collecting a fingerprint of the user, and the processor 301 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 314, or the fingerprint sensor 314 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, processor 301 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 314 may be disposed on the front, back, or side of the electronic device 300. When a physical button or vendor Logo is provided on the electronic device 300, the fingerprint sensor 314 may be integrated with the physical button or vendor Logo.
The optical sensor 315 is used to collect the ambient light intensity. In one embodiment, the processor 301 may control the display brightness of the touch screen display 305 based on the ambient light intensity collected by the optical sensor 315. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 305 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 305 is turned down. In another embodiment, the processor 301 may also dynamically adjust the shooting parameters of the camera head assembly 306 according to the ambient light intensity collected by the optical sensor 315.
The proximity sensor 316, also referred to as a distance sensor, is typically disposed on the front panel of the electronic device 300. The proximity sensor 316 is used to capture the distance between the user and the front of the electronic device 300. In one embodiment, the processor 301 controls the touch display screen 305 to switch from the bright screen state to the dark screen state when the proximity sensor 316 detects that the distance between the user and the front surface of the electronic device 300 gradually decreases; when the proximity sensor 316 detects that the distance between the user and the front surface of the electronic device 300 is gradually increased, the processor 301 controls the touch display screen 305 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not intended to be limiting of electronic device 300 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 304, comprising instructions executable by the processor 320 of the electronic device 300 to perform the above-described method of generating a GIF kinetic map, the method comprising: acquiring target video data; analyzing the target video data to obtain a plurality of image frame data; dividing a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data; and respectively generating corresponding GIF dynamic graphs based on the at least one image group. Optionally, the instructions may also be executable by the processor 320 of the electronic device 300 to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by the processor 320 of the electronic device 300 to perform the above-described method of generating a GIF kinetic map, the method comprising: acquiring target video data; analyzing the target video data to obtain a plurality of image frame data; dividing a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data; and respectively generating corresponding GIF dynamic graphs based on the at least one image group. Optionally, the instructions may also be executable by the processor 320 of the electronic device 300 to perform other steps involved in the exemplary embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (11)

1. A method of generating a GIF kinetic graph, comprising:
acquiring target video data;
analyzing the target video data to obtain a plurality of image frame data;
dividing a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data;
and respectively generating corresponding GIF dynamic graphs based on the at least one image group.
2. The method of claim 1, wherein the dividing the plurality of image frame data into at least one image group based on a preset manner comprises:
extracting feature information in the image frame data based on a convolutional neural network model, and determining feature data corresponding to the image frame data;
and dividing the plurality of image frame data into the at least one image group based on the category of the feature data corresponding to each image frame data.
3. The method of claim 2, wherein the dividing the plurality of image frame data into the at least one image group based on the category of feature data corresponding to each of the image frame data comprises:
determining object information corresponding to each image frame data according to the feature data corresponding to each image frame data, wherein the object information at least comprises one of character information, animal information and landscape information;
dividing image frame data corresponding to the same object information into the same image group to generate the at least one image group.
4. The method of claim 3, wherein after determining the object information corresponding to each of the image frame data according to the feature data corresponding to each of the image frame data, the method further comprises:
acquiring the generation time of the plurality of image frame data;
dividing the plurality of image frame data into the at least one image group based on the generation time of the plurality of image frame data and the object information of the plurality of image frame data.
5. The method of claim 2 or 3, wherein the dividing the plurality of image frame data into the at least one image group based on the category of feature data corresponding to each of the image frame data comprises:
determining a pixel depth parameter corresponding to each image frame data according to the feature data corresponding to each image frame data, wherein the pixel depth parameter is used for representing color information located in a preset area in each corresponding image frame data;
and dividing the image frame data corresponding to the same pixel depth parameter range into the same image group to generate the at least one image group.
6. The method of claim 1, wherein the dividing the plurality of image frame data into at least one image group based on a preset manner comprises:
dividing a plurality of image frame data into a preset number of image groups based on the preset mode;
or the like, or, alternatively,
determining characteristic parameters of a plurality of image frame data;
dividing a plurality of image frame data into the at least one image group based on the characteristic parameters of the plurality of image frame data.
7. The method of claim 2, wherein said dividing the plurality of image frame data into the at least one image group based on the category of feature data corresponding to each of the image frame data comprises:
calculating a similarity matching value corresponding to each image frame data according to the feature data corresponding to each image frame data;
dividing the plurality of image frame data into the at least one image group based on the size relationship between the similarity matching value corresponding to each image frame data and a preset threshold.
8. The method of claim 2, wherein before the detecting the feature information in each of the image frame data based on the convolutional neural network model and determining the corresponding feature data of each of the image frame data, further comprising:
obtaining a sample image, wherein the sample image comprises at least one sample feature;
and training a preset neural network image classification model by using the sample image to obtain the convolutional neural network model meeting preset conditions.
9. An apparatus for generating a GIF kinetic graph, comprising:
an acquisition module configured to acquire target video data;
an analysis module configured to analyze the target video data to obtain a plurality of image frame data;
the dividing module is configured to divide a plurality of image frame data into at least one image group based on a preset mode, wherein each image group at least comprises two image frame data;
and the generating module is used for respectively generating corresponding GIF dynamic graphs based on the at least one image group.
10. An electronic device, comprising:
a memory for storing executable instructions; and the number of the first and second groups,
a processor for display with the memory to execute the executable instructions to perform the operations of the method of generating a GIF kinetic map of any of claims 1-8.
11. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of generating a GIF kinetic map of any of claims 1-8.
CN201910875157.1A 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for generating GIF dynamic diagram Active CN110675473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910875157.1A CN110675473B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for generating GIF dynamic diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910875157.1A CN110675473B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for generating GIF dynamic diagram

Publications (2)

Publication Number Publication Date
CN110675473A true CN110675473A (en) 2020-01-10
CN110675473B CN110675473B (en) 2023-07-14

Family

ID=69077112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910875157.1A Active CN110675473B (en) 2019-09-17 2019-09-17 Method, device, electronic equipment and medium for generating GIF dynamic diagram

Country Status (1)

Country Link
CN (1) CN110675473B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111711841A (en) * 2020-07-27 2020-09-25 广州酷狗计算机科技有限公司 Image frame playing method, device, terminal and storage medium
CN112419447A (en) * 2020-11-17 2021-02-26 北京达佳互联信息技术有限公司 Method and device for generating dynamic graph, electronic equipment and storage medium
CN113516740A (en) * 2020-04-10 2021-10-19 阿里巴巴集团控股有限公司 Method and device for adding static elements and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647625A (en) * 2018-05-04 2018-10-12 北京邮电大学 A kind of expression recognition method and device
WO2019019635A1 (en) * 2017-07-25 2019-01-31 平安科技(深圳)有限公司 Device and method for generating dynamic image, and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019019635A1 (en) * 2017-07-25 2019-01-31 平安科技(深圳)有限公司 Device and method for generating dynamic image, and computer readable storage medium
CN108647625A (en) * 2018-05-04 2018-10-12 北京邮电大学 A kind of expression recognition method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘真等: "动态网络可视化与可视分析综述", 《计算机辅助设计与图形学学报》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516740A (en) * 2020-04-10 2021-10-19 阿里巴巴集团控股有限公司 Method and device for adding static elements and electronic equipment
CN111711841A (en) * 2020-07-27 2020-09-25 广州酷狗计算机科技有限公司 Image frame playing method, device, terminal and storage medium
CN111711841B (en) * 2020-07-27 2022-09-09 广州酷狗计算机科技有限公司 Image frame playing method, device, terminal and storage medium
CN112419447A (en) * 2020-11-17 2021-02-26 北京达佳互联信息技术有限公司 Method and device for generating dynamic graph, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110675473B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN110502954B (en) Video analysis method and device
CN110572711B (en) Video cover generation method and device, computer equipment and storage medium
CN110650379B (en) Video abstract generation method and device, electronic equipment and storage medium
CN109360222B (en) Image segmentation method, device and storage medium
CN110933468A (en) Playing method, playing device, electronic equipment and medium
CN111541907A (en) Article display method, apparatus, device and storage medium
CN110839128B (en) Photographing behavior detection method and device and storage medium
CN109840584B (en) Image data classification method and device based on convolutional neural network model
US11386586B2 (en) Method and electronic device for adding virtual item
CN110675473B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN111432245B (en) Multimedia information playing control method, device, equipment and storage medium
CN110647881A (en) Method, device, equipment and storage medium for determining card type corresponding to image
CN111062248A (en) Image detection method, device, electronic equipment and medium
CN111754386A (en) Image area shielding method, device, equipment and storage medium
CN111027490A (en) Face attribute recognition method and device and storage medium
CN111586279B (en) Method, device and equipment for determining shooting state and storage medium
CN110853124B (en) Method, device, electronic equipment and medium for generating GIF dynamic diagram
CN110728167A (en) Text detection method and device and computer readable storage medium
CN112860046B (en) Method, device, electronic equipment and medium for selecting operation mode
CN111327819A (en) Method, device, electronic equipment and medium for selecting image
CN112135191A (en) Video editing method, device, terminal and storage medium
CN111931712A (en) Face recognition method and device, snapshot machine and system
CN113343709B (en) Method for training intention recognition model, method, device and equipment for intention recognition
CN113407774A (en) Cover determining method and device, computer equipment and storage medium
CN111797754A (en) Image detection method, device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant