WO2021238943A1 - Gif图片生成方法、装置及电子设备 - Google Patents

Gif图片生成方法、装置及电子设备 Download PDF

Info

Publication number
WO2021238943A1
WO2021238943A1 PCT/CN2021/095887 CN2021095887W WO2021238943A1 WO 2021238943 A1 WO2021238943 A1 WO 2021238943A1 CN 2021095887 W CN2021095887 W CN 2021095887W WO 2021238943 A1 WO2021238943 A1 WO 2021238943A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
video
image
target video
frame
Prior art date
Application number
PCT/CN2021/095887
Other languages
English (en)
French (fr)
Inventor
付玉迪
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2021238943A1 publication Critical patent/WO2021238943A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Definitions

  • This application belongs to the field of communication technology, and specifically relates to a method, device and electronic device for generating a GIF picture.
  • GIF pictures are very interesting, making GIF pictures widely used in chat tools such as instant messaging applications.
  • GIF pictures are very interesting, making GIF pictures widely used in chat tools such as instant messaging applications.
  • the amount of data of current GIF pictures is usually relatively large, which causes the sharing of GIF pictures to take a long time or even fail.
  • the purpose of the embodiments of the present application is to provide a method, device and electronic device for generating GIF pictures, which can solve the problem of long time-consuming or even failure of sharing GIF pictures.
  • an embodiment of the present application provides a method for generating a GIF picture, the method includes: receiving a first input from a user, the first input is used to select a target object in a target video frame of the target video; and in response to the first input , Extract the image content of the target object in each of the M first video frames in the target video to obtain M target video images; generate the target GIF picture based on the M target video images; where, The target objects in the different first video frames satisfy at least one of the following: the target objects in the different first video frames all include the target video objects, and the target objects in the different first video frames are all objects in the object selection box; M is Positive integer; M first video frames include target video frames.
  • an embodiment of the present application provides a GIF image generation device, the device includes: a receiving module, configured to receive a first input from a user, and the first input is configured to select a target object in a target video frame of the target video;
  • the editing module is configured to extract the image content of the target object in each of the M first video frames in the target video in response to the first input received by the receiving module to obtain M target video images;
  • the generating module is used to generate a target GIF picture based on the M target video images obtained by the editing module; wherein the target objects in different first video frames satisfy at least one of the following: the target objects in different first video frames all contain the target For video objects, the target objects in different first video frames are all objects in the object selection frame; M is a positive integer; M first video frames include the target video frames.
  • an embodiment of the present application provides an electronic device that includes a processor, a memory, and a program or instruction stored on the memory and capable of running on the processor.
  • the program or instruction is executed by the processor, the implementation is as follows: The steps of the GIF image generating method in the first aspect.
  • an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the GIF image generation method as in the first aspect are implemented.
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used to run a program or an instruction to implement the chip as in the first aspect The GIF picture generation method.
  • the first input of the user selecting the target object in the target video frame of the target video can be used to extract the target object in each of the M first video frames in the target video.
  • M target video images are obtained; and based on the M target video images, target GIF pictures are generated; wherein, the target objects in different first video frames meet at least one of the following: target objects in different first video frames All include target video objects, and the target objects in the different first video frames are all objects in the object selection box; M is a positive integer; M first video frames include the target video frames.
  • each target video image is part of the content extracted from a first video frame according to the target video object or the object selection frame, rather than the entire content of the first video frame, for example, the user in the first video frame Part of the content required, so that the data volume of the target GIF image obtained from the target video conversion is small, which is conducive to the successful sharing of the GIF image.
  • FIG. 1 is a schematic flowchart of a picture generation method provided by an embodiment of this application.
  • FIG. 2 is one of the schematic diagrams of operations in the process of a picture generation method provided by an embodiment of this application;
  • FIG. 3 is the second schematic diagram of the operation of the process of a picture generation method provided by an embodiment of this application;
  • FIG. 4 is the third operation schematic diagram of the process of a picture generation method provided by an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a possible picture generating apparatus provided by an embodiment of this application.
  • FIG. 6 is one of the schematic diagrams of the hardware structure of an electronic device provided by an embodiment of the application.
  • FIG. 7 is the second schematic diagram of the hardware structure of an electronic device provided by an embodiment of the application.
  • first and second in the specification and claims of this application are used to distinguish similar objects, but not to describe a specific sequence or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the "first", “second”, etc. are distinguished
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or multiple.
  • character "/" in the specification and claims generally indicates that the associated objects before and after are in an "or” relationship.
  • the method for generating GIF pictures may be applied to a scene where a GIF picture is generated, for example, a scene where a GIF picture is generated through a video.
  • the GIF picture generation method, device and electronic device can extract each of the M first video frames in the target video through the first input of the target object in the target video frame of the target video selected by the user. Image content of the target object in the first video frames to obtain M target video images; and based on the M target video images, the target GIF picture is generated; wherein the target objects in different first video frames satisfy at least one of the following: The target objects in the different first video frames all include the target video objects, and the target objects in the different first video frames are all objects in the object selection frame; M is a positive integer; and the M first video frames include the target video frames.
  • each target video image is part of the content extracted from a first video frame according to the target video object or the object selection frame, rather than the entire content of the first video frame, for example, the user in the first video frame Part of the content required, so that the data volume of the target GIF image obtained from the target video conversion is small, which is conducive to the successful sharing of the GIF image.
  • the GIF picture generating method provided in the embodiment of the present application will be described in detail.
  • the logical sequence of the GIF picture generation method provided by the embodiment of the present application is shown in the method flowchart, in some cases, the steps shown or described may be performed in a different order than here.
  • the GIF picture generation method shown in FIG. 1 may include step 101 to step 103:
  • Step 101 The GIF picture generating device receives a user's first input, and the first input is used to select a target object in a target video frame of the target video.
  • the terminal provided in the embodiment of the present application may include a display screen, and the display screen may support a user's touch input or fingerprint input.
  • the aforementioned first input may be a touch screen input or a fingerprint input.
  • the above-mentioned touch screen input may be the user's touch input such as pressing input, long-press input, sliding input, click input, hovering input (the user's input near the touch screen) and other touch inputs on the terminal's touch screen;
  • the above-mentioned fingerprint input may be the user Fingerprint input such as swiping fingerprints, long-press fingerprints, single-click fingerprints, and double-click fingerprints on the fingerprint reader of the terminal.
  • the target objects in the different first video frames satisfy at least one of the following: the target objects in the different first video frames all include the target video objects, and the target objects in the different first video frames are all objects in the object selection box. That is to say, the target object is selected from each first video frame through the target video object or the object selection frame.
  • Step 102 In response to the first input, the GIF picture generating device extracts the image content of the target object in each of the M first video frames in the target video to obtain M target video images.
  • the M first video frames include the target video frame, and M is a positive integer.
  • application scenarios 1 to 3 are used to respectively describe the GIF image generation method in the embodiments of the present application.
  • target objects in different first video frames satisfy: the target objects in different first video frames all include the target video object (denoted as condition 1).
  • the target video object may be an object such as a person, an animal, or a still life in the video frame.
  • the target video object may be a foreground object such as a person or an animal in a video frame (that is, the foreground), or a background object such as a tree or a building in the video frame (that is, the background).
  • the target objects in different first video frames satisfy: the target objects in different first video frames are all objects in the object selection frame (denoted as condition 2).
  • the target objects in different first video frames satisfy: the target objects in different first video frames all include the target video objects, and the target objects in different first video frames are all objects in the object selection box (note As condition 3).
  • the M first video frames are part or all of the video frames in the target video.
  • the foregoing M first video frames may be video frames in the target video manually selected by the user, or video frames in the target video automatically selected by the electronic device.
  • the process of the GIF picture generating device intercepting the image content of a target object in a first video frame specifically includes: identifying the target object from the first video frame, and performing a matting operation on the image content of the target object, In this way, all the pixels of the image content of the target object are obtained.
  • the video content of the target object of one first video frame in the M first video frames may be irregularly shaped image content, or one or more video objects in the first video frame (such as Foreground such as people or animals).
  • the generated target GIF picture is more interesting.
  • Step 103 The GIF picture generating device generates a target GIF picture based on the M target video images.
  • the frame rate of the target GIF picture (denoted as the target frame rate) is the frame rate of the target video or the preset frame rate.
  • the aforementioned preset frame rate may be manually selected by the user or defaulted by the electronic device, which is not specifically limited in the embodiment of the present application, and may be set according to actual needs of the user.
  • the electronic device can arrange the corresponding target video images in sequence according to the frame order of the M first video frames, so as to synthesize the M target video images obtained by intercepting into a target GIF picture according to the target frame rate.
  • the display sizes of different target video images in the foregoing M target video images are the same or different, which may be determined according to the actual needs of the user, which is not described in detail in the embodiment of the present application.
  • the target GIF picture can be a dynamic emoticon pack or sticker.
  • the GIF image generation method can extract each first video frame of M first video frames in the target video by the user selecting the first input of the target object in the target video frame of the target video The image content of the target object in, obtain M target video images; and based on the M target video images, generate the target GIF picture; wherein the target objects in different first video frames meet at least one of the following: different first video frames The target objects in all include target video objects, and the target objects in different first video frames are all objects in the object selection box; M is a positive integer; M first video frames include target video frames.
  • each target video image is part of the content extracted from a first video frame according to the target video object or the object selection frame, rather than the entire content of the first video frame, for example, the user in the first video frame Part of the content required, so that the data volume of the target GIF picture obtained from the target video conversion is small, which is conducive to the successful sharing of the GIF picture, and makes the GIF picture more interesting.
  • the electronic device may provide a human-computer interaction interface for converting a video into a GIF picture (such as converting a target video into a target GIF picture), so as to support the user to control the electronic device to generate the target video through the human-computer interaction interface Target GIF image.
  • a human-computer interaction interface for converting a video into a GIF picture (such as converting a target video into a target GIF picture), so as to support the user to control the electronic device to generate the target video through the human-computer interaction interface Target GIF image.
  • the electronic device may provide a control (denoted as making a GIF sticker) for triggering the conversion of a video into a GIF picture, which is used to trigger the electronic device to execute the process of producing a GIF picture from the video.
  • the electronic device may provide a method for acquiring the first content in each first video frame in the target video according to any application scenario in the above application scenario 1 to application scenario 3.
  • the electronic device can display one or more functional controls, and each functional control is used to obtain each of the first application scenarios in the target video by using any of the above application scenarios 1 to 3 The first content in a video frame.
  • the video playback interface may also include a "make GIF sticker” control 32.
  • the "make GIF sticker” 32 is used to trigger the electronic device to generate the target video 31 as a target GIF picture.
  • the electronic device can display the "main GIF sticker” function control 33 and the "area GIF” Sticker” function control 34.
  • the "main GIF sticker” function control 33 and the “area GIF sticker” function control 34 are respectively used to trigger the electronic device to obtain the target object of each first video frame in the target video 31 according to the above application scenario 1 and application scenario 2. Image content, and then get the target GIF picture.
  • the electronic device can first identify the target object and determine the image content of the target object, and then perform the extraction operation on the image content of the target object to obtain each The target video image in the first video frame.
  • the target object in each of the M first video frames includes the target video object.
  • step 104 and step 105 may be included before step 101.
  • step 101 may pass through step 101a.
  • step 106 may also be included before step 102:
  • Step 104 The GIF picture generating device receives a second input from the user.
  • Step 105 In response to the second input, the GIF picture generating device displays at least one video object identifier, and each video object identifier indicates a video object in the target video frame.
  • the target video may include multiple video objects, such as multiple people, animals, or still life.
  • each first video frame may also include one or more video frames.
  • some video objects are always in the target video, that is, all video frames in the target video include the image content of these video objects; while other video objects are in part of the target video, that is, part of the target video
  • the video frame includes the image content of these video objects.
  • the target object may include one or more video objects in the target video, and the image content of the target object is in part or all of the video frames in the target video.
  • the electronic device may provide an identification control.
  • the identification control can trigger the electronic device to recognize and mark one or more video objects in the first video frame. For example, a label of each of the one or more video objects is generated, and then the user selects the target object from the one or more video objects.
  • the second input may be a click input to the aforementioned identification control.
  • Step 101a The GIF picture generating apparatus receives a user's first input of a target video object identifier in at least one video object identifier.
  • the first input may be a click input.
  • Step 106 The GIF picture generating device determines the video object indicated by the target video object identifier as the target video object, where the target object includes the target video object.
  • the electronic device can display the target video on the screen The first video frame 41 (that is, a first video frame in the target video) and the identification control 42. Subsequently, after the user inputs (such as the second input) to the recognition control 42, as shown in (b) in FIG. 3, the electronic device can display the "cat” label 43 and the "ball” label below the first video frame 41 44.
  • the "cat” tag 43 is used to mark the cat in the first video frame 41
  • the "ball” tag 44 is used to mark the video object in the first video frame.
  • the M first video frames of the target video 31 include two video objects "cat” and "ball". Subsequently, after the user inputs (such as the first input) to the "cat" tag 43 shown in (b) of FIG. 3, the electronic device can determine that the video object of the cat in the target video 31 is the target video object. Furthermore, the electronic device can determine all the first video frames in the target video that contain the image content of the target object of the cat.
  • the electronic device can also display video editing controls such as "crop”, "text” and “music” for editing the target video.
  • the user can intuitively and conveniently select the target video object that meets the requirements through at least one video object identifier, so that each target video image meets the user's requirements, and the target GIF image meets the user's requirements. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the target object in each first video frame is the object in the object selection frame; the video frame displayed on the screen (ie, the display screen) (such as the target video frame) ) Also includes an object selection frame.
  • step 107 is further included before step 102, and corresponding step 102 can be implemented through step 102b:
  • Step 107 The GIF picture generating device determines the object selected by the object selection frame as the target object.
  • the object selection box is used to box select image content from a video frame, such as box select the image content of a target object in a first video frame.
  • the object selected by the object selection frame may be an object in the object selection frame in a video frame.
  • the shape of the aforementioned object selection frame can be any shape, such as rectangular, circular, triangular or irregular, and can be determined according to the actual needs of the user, and there is no specific limitation here.
  • the display size of the aforementioned object selection and frame may be a preset size or a size manually selected by the user, which may be determined according to the actual needs of the user, and there is no specific limitation here.
  • the display positions and display sizes of the object frames in different first video frames are the same or different.
  • the electronic device usually takes the area where the foreground (ie, the main body such as the video object) is located in the first video frame as the display position of the object selection frame in the first video frame.
  • the foreground in a video frame is usually placed at the center of the video frame, the default object marquee can be set at the center of a video frame.
  • a picture (such as an image of a video frame) includes a foreground and a background, the foreground is the image to be highlighted in the picture, and the background is the image content of the picture excluding the foreground.
  • the foreground of a person picture is the person image in the person picture, or the face image in the person picture.
  • the foreground of a scene picture is the scene image in the scene picture.
  • the embodiment of the present application may determine the foreground in the video frame according to the pixel value of each pixel of the image of the video frame. For example, the pixel value of the foreground in a video frame satisfies a certain numerical range, such as greater than a preset threshold.
  • the embodiment of the present application may determine the foreground in a video frame according to the contrast of the image of the video frame. For example, the difference between the contrast of the foreground in a video frame and the contrast of other image content in the video frame satisfies a certain numerical range.
  • Step 102b The GIF picture generating device extracts the image content selected by the object selection box in each of the M first video frames to obtain M target video images.
  • the GIF picture generating device may first determine the object selection frame in the first video frame, and then perform the image content in the object selection frame (that is, the image content of the target object) Extraction operation, thereby obtaining the target video image in each first video frame.
  • the electronic device may display on the first video frame 31 Rectangular marquee 51.
  • the user can trigger the electronic device to determine the display size and display position of the selection frame 51 through the selection frame 51, and then retrieve the target video image in each first video frame.
  • the user can intuitively and conveniently select the target object that meets the needs through the object selection box, so that each target video image meets the user's needs, and the target GIF image meets the user's needs. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • step 102b step 108 and step 109 are further included:
  • Step 108 The GIF picture generating device receives the third input of the user to the object selection frame.
  • the third input may be the input of dragging the object selection frame.
  • Step 109 In response to the third input, the GIF image generating device adjusts the display position and display size of the object selection frame.
  • the user can trigger the electronic device to adjust the display size and display position of the marquee 51 through the marquee 51.
  • the center of the default object selection frame of the electronic device is the center of a picture of a first video frame.
  • the electronic device determines the default object marquee as the display size and display area of the object marquee on the current first video frame. If the user manually selects the object selection frame from the first video frame, the electronic device determines the object selection frame manually selected by the user as the object selection frame of the first video frame.
  • the target object selected through the object selection frame meets the user needs, and further realizes that each target video image meets the user needs and the target GIF picture Meet user needs. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • step 102b may further include step 110:
  • Step 110 Based on the display position and display size of the object selection frame on the target video frame, the GIF picture generating device controls the object selection frame to move with the target video object in the K second video frames, so that each second video frame The objects selected by the object selection box are the same.
  • the K second video frames are video frames other than the target video frame among the M first video frames, and K is a positive integer less than M.
  • the user can trigger the electronic device to recognize and select the target object through the recognition control, and the electronic device can provide an object selection box to select the target where the image content of the target object in each first video frame is located.
  • the electronic device uses the image content of the target object in the object selection frame as the target video image in the first video frame.
  • the target video image in the first video frame obtained by the electronic device can be not only the image of the target object, but also the image in the target area, it is beneficial to intercept the image in each first video frame.
  • the first content is image content that meets the needs of the user, and helps to provide the interest of the generated target GIF image.
  • step 111 is further included before step 102:
  • Step 111 The GIF picture generating device acquires N third video frames in the target video frame whose image quality parameters are within a preset value range.
  • the M first video frames are video frames in the N third video frames, and N is a positive integer greater than or equal to M.
  • the M first video frames are: video frames in the target video whose image quality parameters are within a preset value range.
  • the video frame with the image quality parameter in the target video within the preset value range is the video frame with better quality in the target video; conversely, the video frame with the image quality parameter outside the preset value range in the target video , Is the poor quality video frame in the target video.
  • the image quality parameter is the sharpness of the image of the video frame.
  • the video frame whose image quality parameter is within the preset value range is a video frame with better definition; conversely, the video frame whose image quality parameter is outside the preset value range is a video frame with lower definition, that is, it is blurry.
  • Video frames are the video frame with better quality in the target video; conversely, the video frame with the image quality parameter outside the preset value range in the target video.
  • "obtain N third video frames in the target video frame whose image quality parameters are within the preset value range” can eliminate blurry, unclear pictures (video Frame), selected video frames with high scores from the composition and aesthetic scores are displayed in the video, and the thumbnails (described in detail in the following embodiments) display all the selected video frames.
  • the electronic device may first obtain the video frames in the target video with the image quality parameter in the preset value range through the intelligent algorithm, so that the N third video frames are the images in the target video The video frame whose quality parameter is in the preset value range.
  • the electronic device can first obtain the video frames in the target video with the image quality parameter in the preset value range through the intelligent algorithm, and then identify the video frames that contain the image content of the target object. Video frames, as M first video frames.
  • the electronic device can obtain the video frames in the target video with the image quality parameter in the preset value range through an intelligent algorithm, and use these video frames as the M first video frames.
  • the poor quality video frames in the target video can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • the quality of the picture can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • step 103 includes step 103a and step 103b:
  • Step 103a The GIF picture generating device sets the transparency of the target area in each target video image to a preset transparency to obtain M first images.
  • the above-mentioned preset transparency value is 100%, that is, all is transparent.
  • setting the transparency of the target area to the preset transparency may be setting the pixels in the target area as transparent pixels.
  • the frame of each target video image can be transparent or opaque, and can be set according to the actual needs of the user.
  • Step 103b The GIF picture generating device synthesizes the M first images to generate a target GIF picture.
  • the target area in each target video image is an image area excluding the area where the target object is located.
  • the transparency of the target area in each target video image as the image area other than the area where the target object is located as a preset transparency, the interest of each target video image can be improved, thereby increasing the interest of the target GIF image sex.
  • step 103 may be implemented through step 103c to step 103e:
  • Step 103c The GIF picture generating device determines the first image size based on the image size of each target video image.
  • the image size of each target video image is less than or equal to the first image size.
  • Step 103b The GIF picture generating device adds preset pixels around each target video image to obtain M second images, where the image size of each second image is the first image size.
  • the aforementioned preset pixels may be pixels with preset parameters such as preset colors and preset transparency.
  • the preset pixel may be a pixel with a white color and a transparency value of 100%, which is not specifically limited in the embodiment of the present application, and may be determined according to the actual needs of the user.
  • Step 103e The GIF picture generating device generates M second images as target GIF pictures.
  • the target GIF picture may be synthesized based on the center of each image, that is, the center points of each image are coincident.
  • the target GIF picture can be synthesized with a specific point (default or user-selected, such as the point where the upper left corner is located) of each target video image, that is, the point where the upper left corner of each target video image is overlapped.
  • the target video images in multiple video frames (ie, M first video frames) in the target video can be synthesized into the target GIF picture according to the same first display size, the resulting target GIF picture is generated The display effect is better.
  • step 103c may be implemented through step 103c-1:
  • Step 103c-1 The GIF picture generating device determines the first width or the second width as the image width of the first image size, and sets the first height or the second height as the image height of the first image size.
  • the first width is: the image width of the target object with the largest image width among all M target video images
  • the first height is: the image height of the target object with the largest image height among the M target video images
  • the second width is the first A width plus a first preset value
  • a second height is the first height plus a second preset value.
  • the first preset value and the second preset value are the same or different, for example, the first preset value is equal to the second preset value (for example, the value is 5).
  • the image width of the first image size is the second width
  • the image height of the first image size is the second height.
  • the image width for the first image size is the first width
  • the image height of the first image size is the second height
  • the image width of the first image size is the second width
  • the image height of the first image size is The two scenes of the first height indicate that the GIF picture generating device adds a part of the frame to the target GIF picture.
  • the size of the image content of the target object may be increased by 5 pixels outward each according to the maximum length and width of the image content.
  • the purpose of adding 5 pixels is to prevent the target object from being displayed on the edge of the picture, and the display effect is not good.
  • obtaining the target GIF picture according to the first image size can prevent the main body (such as the target object or the target video object contained in the target object) in the target GIF picture from being displayed on the edge of the target GIF picture, thereby improving the display effect of the target GIF picture .
  • the electronic device may also display the video frame of the target video or the thumbnail of the video frame, so that the user can use the thumbnail Conveniently view each first video frame in the target video.
  • step 112 to step 114 may be further included before step 101:
  • Step 112 The GIF picture generating device displays the video frame indicated by the first thumbnail on the first area of the screen, and displays P thumbnails at the first frame rate on the second area of the screen.
  • the first frame rate is less than the frame rate of the target video.
  • Each thumbnail is used to indicate a video frame in the target video, and the first thumbnail is one of the P thumbnails.
  • P is a positive integer less than or equal to M.
  • the above P thumbnails are thumbnails of some video frames in the target video.
  • the thumbnails shown in FIG. 3 or FIG. 4 are the aforementioned P thumbnails.
  • thumbnail 35 is the first thumbnail
  • the video frame indicated by the thumbnail 35 is the first video frame 31 shown in FIG. 3.
  • the electronic device in FIG. 4 displays the first video frame 31, it can also display multiple thumbnails, such as thumbnails 52.
  • the thumbnail 52 is the first thumbnail
  • the video frame indicated by the thumbnail 52 is the first video frame 31 shown in FIG. 4.
  • the GIF picture generating device may provide a control for selecting the first frame rate to support the user to manually set the first frame rate.
  • the GIF picture generating device may provide an interface for adjusting FPS (ie frame rate), and the interface includes controls such as "5", “10", “15”, “20”, and “24". To trigger the electronic device to set the first frame rate to the value indicated by the corresponding control.
  • the interface can also include a prompt message "FPS: FPS refers to the number of pictures extracted in 1s. The higher the FPS value, the smoother the screen, and the larger the GIF generated, which may not be shared. .”. And for the "10” mark “recommended value", it is used to prompt the user to set the first frame rate to 10 frames per second so that the generated target GIF image can be shared normally.
  • Step 113 The GIF picture generating device receives the third input of the user on the second thumbnail.
  • the aforementioned third input may be used to trigger the electronic device to update the thumbnails of the P thumbnails.
  • Step 114 In response to the third input, the GIF image generating device updates and displays the content on the first area as the target video frame indicated by the second thumbnail, and updates and displays the content on the second area to display at the first frame rate. Q thumbnails.
  • P thumbnails are different from Q thumbnails
  • the second thumbnail is one of the Q thumbnails
  • P is a positive integer less than or equal to M.
  • the above-mentioned first input is a sliding input on P thumbnails
  • it is used to trigger the electronic device to update P thumbnails, such as updating P thumbnails according to the sliding direction of the first input.
  • the foregoing first input is a long-press input for a thumbnail of the P thumbnails, it is used to trigger the electronic device to expand and display all video frames in the target video.
  • the above-mentioned thumbnail also supports the user to choose whether to delete certain video frames in the target video. For example, a user's swipe-up input on a thumbnail of a video frame, or a long-press and swipe-up input, is used to trigger the electronic device to delete the video frame. In this way, the user can quickly delete certain video frames in the target video through these thumbnails, for example, the user does not need to generate the video frame of the target GIF picture or the video frame with lower definition.
  • deleting the video frame in the target video in the embodiment of the present application refers to deleting the video frame other than the video frame used to generate the target GIF picture, rather than deleting the original video frame in the target video file. That is, the foregoing M first video frames are video frames in the target video for which the user has not performed a deletion operation.
  • the M first video frames in the target video do not include the video frames manually deleted by the user.
  • step 115 to step 117 are further included:
  • Step 115 The GIF picture generating device saves the target GIF picture and the identifier corresponding to the target GIF picture in the target storage area.
  • the identifier corresponding to the target GIF picture is used to indicate the target video object contained in the target GIF picture.
  • the identifier corresponding to the target GIF picture is the identifier information of the target video object contained therein. For example, when the target video object is "dog", the identifier is the word dog.
  • the electronic device may provide a save control, such as displaying the save control on the screen, to trigger the electronic device to save the target GIF picture.
  • a save control such as displaying the save control on the screen
  • the aforementioned target storage area may be a local area of the electronic device for storing media files such as pictures, such as a storage area corresponding to a local photo album application.
  • the aforementioned target storage area may be an area used to store media files such as pictures in a server that interacts with the GIF picture generating device.
  • Step 116 The GIF image generating device obtains the target information input by the user in the content input area of the target application.
  • Step 117 The GIF picture generating device displays the target GIF picture when the target information is the same as the information indicated by the identifier of the target GIF picture.
  • GIF pictures in scenes such as video editing and picture editing, GIF pictures (or gif stickers, such as target GIF pictures) can be used as resources and added to the video or picture to identify and edit the content of the picture or video.
  • To recommend materials intelligently For example, if there is a pet element in the edited video content and the music theme, the user is recommended to use a GIF picture containing the pet as a video object when editing.
  • the above-mentioned target application is an application for video editing and picture editing
  • the content input area is a search box of the target application
  • the target information is identification information (such as a name) of the pet.
  • the target GIF picture made can be sent as an emoticon package.
  • the target GIF picture can also be sent according to the content of the subject of the cutout (that is, the target video object in the target GIF picture). For example, when making a target GIF picture that contains a target video object, the selected subject (ie, the target video object) is "dog". The user enters the text "dog" on the chat interface of the instant messaging tool, and the main body of the dog GIF emoticons (ie GIF pictures) are displayed and sent out.
  • the main gif emoticon ie, GIF picture
  • the editing content such as the edited text.
  • the target application is an input method application.
  • the user inputs the text content of the main body by voice during the video call, and sends the corresponding main body gif emoticon package to the other party. For example, if the user says "dog", he can send a gif emoticon package with a dog as the subject to the other party, and the other party's chat interface will pop up and display the gif emoticon package, which increases the interest of the video chat. At this time, the local user's chat interface can also display gif emoticons.
  • the target information entered by the user in the content input area of the target application can be obtained by comparing the target information and the target GIF picture.
  • the target GIF picture can be triggered quickly and conveniently. In this way, it is beneficial to improve the interest and convenience of the target GIF picture.
  • the execution subject of the GIF picture generating method provided in the embodiment of the present application may be the GIF picture generating device, or the control module for executing the GIF picture generating method in the GIF picture generating device.
  • the GIF image generating apparatus executed by the GIF image generating method is taken as an example to illustrate the GIF image generating apparatus provided in the embodiment of the present application.
  • FIG. 5 it is a schematic structural diagram of a GIF picture generating apparatus provided by an embodiment of this application.
  • the GIF picture generating device 50 the receiving module 501, is used to receive the user's first input, the first input is used to select the target object in the target video frame of the target video; the editing module 502 is used to respond to receiving The module 501 receives the first input, extracts the image content of the target object in each of the M first video frames in the target video, and obtains M target video images; the generating module 503 is used to generate M target video images based on The M target video images obtained by the editing module 502 generate a target GIF picture; wherein the target objects in different first video frames satisfy at least one of the following: the target objects in different first video frames all include the target video objects, and the different first video frames The target objects in a video frame are all objects in the object selection frame; M is a positive integer; M first video frames include the target video frames.
  • the GIF picture generating device can extract each first video frame of the M first video frames in the target video by the user selecting the first input of the target object in the target video frame of the target video The image content of the target object in, obtain M target video images; and based on the M target video images, generate the target GIF picture; wherein the target objects in different first video frames meet at least one of the following: different first video frames The target objects in all include target video objects, and the target objects in different first video frames are all objects in the object selection box; M is a positive integer; M first video frames include target video frames.
  • each target video image is part of the content extracted from a first video frame according to the target video object or the object selection frame, rather than the entire content of the first video frame, for example, the user in the first video frame Part of the content required, so that the data volume of the target GIF image obtained from the target video conversion is small, which is conducive to the successful sharing of the GIF image.
  • the target object in each first video frame includes the target video object;
  • the receiving module 501 is further configured to receive the user's second input before receiving the user's first input;
  • the device 50 further includes: a first display Module, in response to the second input received by the receiving module 501, display at least one video object identifier, each video object identifier indicates a video object in the target video frame;
  • the receiving module 501 specifically for receiving at least one video The first input of the target video object identifier in the object identifier;
  • the editing module 502 is also used to extract the image content of the target object in each of the M first video frames in the target video to obtain M Before each target video image, the video object indicated by the target video object identifier is determined as the target video object, where the target object includes the target video object.
  • the user can intuitively and conveniently select the target video object that meets the requirements through at least one video object identifier, so that each target video image meets the user's requirements, and the target GIF image meets the user's requirements. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the target object in each first video frame is an object in an object selection box;
  • the video frame displayed on the screen also includes an object selection box;
  • the editing module 502 is also used to extract M in the target video
  • the image content of the target object in each of the first video frames in each of the first video frames, and before M target video images are obtained, the object selected by the object selection box is determined as the target object;
  • the editing module 502 is specifically used for Extract the image content selected by the object selection box in each of the M first video frames to obtain M target video images.
  • the receiving module 501 is configured to receive the user's third input to the object selection box before the editing module 502 determines the object selected by the object selection box as the target object; the device 50 further includes: an adjustment module for responding Based on the third input received by the receiving module 501, the display position and display size of the object selection frame are adjusted.
  • the target object selected through the object selection frame meets the user needs, and further realizes that each target video image meets the user needs and the target GIF picture Meet user needs. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the GIF picture generating device 50 further includes: a control module for the editing module 502 to extract the image content selected by the object selection box in each of the M first video frames to obtain M objects Before the video image, based on the display position and display size of the object marquee on the target video frame, the object marquee is controlled to move with the target video object in the K second video frames, so that the object marquee in each second video frame
  • the objects selected by the frame are the same; among them, the K second video frames are video frames other than the target video frame among the M first video frames, and K is a positive integer less than M.
  • the target video image in the first video frame obtained by the electronic device can be not only the image of the target object, but also the image in the target area, it is beneficial to intercept the image in each first video frame.
  • the first content is image content that meets the needs of the user, and helps to provide the interest of the generated target GIF image.
  • the GIF picture generating device 50 further includes: an acquisition module for extracting the image content of the target object in each of the M first video frames in the target video to obtain M target videos Before the image, obtain N third video frames in the target video frame whose image quality parameters are within the preset value range; among them, the M first video frames are the video frames of the N third video frames, and N is greater than or equal to Positive integer of M.
  • the poor quality video frames in the target video can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • the quality of the picture can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • the generating module 503 is specifically configured to set the transparency of the target area in each target video image to a preset transparency to obtain M first images; synthesize the M first images to generate the target GIF picture;
  • the target area in each target video image is an image area excluding the area where the target object is located.
  • the transparency of the target area in each target video image as the image area other than the area where the target object is located as a preset transparency, the interest of each target video image can be improved, thereby increasing the interest of the target GIF image sex.
  • the generating module 503 is specifically configured to determine the first image size based on the image size of each target video image; add preset pixels around each target video image to obtain M second images, where each The image size of each second image is the first image size; M second images are generated as target GIF pictures; wherein, the image size of each target video image is less than or equal to the first image size.
  • the target video images in multiple video frames (ie, M first video frames) in the target video can be synthesized into the target GIF picture according to the same first display size, the resulting target GIF picture is generated The display effect is better.
  • the generating module 503 is specifically configured to determine the first width or the second width as the image width of the first image size, and set the first height or the second height as the image height of the first image size; wherein, The first width is: the image width of the target object with the largest image width among all M target video images; the first height is: the image height of the target object with the largest image height among the M target video images; the second width is the first width Plus the first preset value, the second height is the first height plus the second preset value.
  • obtaining the target GIF picture according to the first image size can prevent the main body (such as the target object or the target video object contained in the target object) in the target GIF picture from being displayed on the edge of the target GIF picture, thereby improving the display effect of the target GIF picture .
  • the GIF picture generating device 50 further includes: a second display module, configured to display the video frame indicated by the first thumbnail on the first area of the screen before the receiving module 501 receives the first input from the user, and display it on the screen P thumbnails are displayed on the second area of the P thumbnails at the first frame rate; the receiving module 501 is also used to receive a third input from the user to the second thumbnail of the P thumbnails; the second display module is also used to respond In the third input received by the receiving module 501, the content on the first area is updated and displayed as the target video frame indicated by the second thumbnail, and the content on the second area is updated and displayed as Q pieces displayed at the first frame rate.
  • a second display module configured to display the video frame indicated by the first thumbnail on the first area of the screen before the receiving module 501 receives the first input from the user, and display it on the screen P thumbnails are displayed on the second area of the P thumbnails at the first frame rate
  • the receiving module 501 is also used to receive a third input from the user to the second thumbnail
  • Thumbnails are different from Q thumbnails
  • the first frame rate is less than the frame rate of the target video
  • each thumbnail is used to indicate a video frame in the target video
  • the first thumbnail is P thumbnails
  • the second thumbnail is one of Q thumbnails.
  • P and Q are positive integers less than or equal to M.
  • the GIF picture generating device 50 further includes: a saving module for generating the module 503 based on the M target video images, after generating the target GIF picture, save the target GIF picture and the identifier corresponding to the target GIF picture in the target storage area ,
  • the identifier corresponding to the target GIF picture is used to indicate the target video object contained in the target GIF picture;
  • the user input module is used to obtain the target information entered by the user in the content input area of the target application;
  • the third display module also uses When the target information obtained by the user input module is the same as the information indicated by the identifier of the target GIF picture saved by the saving module, the target GIF picture is displayed.
  • the target information entered by the user in the content input area of the target application can be obtained by comparing the target information and the target GIF picture.
  • the target GIF picture can be triggered quickly and conveniently. In this way, it is beneficial to improve the interest and convenience of the target GIF picture.
  • the GIF picture generating device in the embodiment of the present application may be a device, or a component, integrated circuit, or chip in a terminal.
  • the device can be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc.
  • Non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PC), televisions (television, TV), teller machines or self-service machines, etc., this application The embodiments are not specifically limited.
  • the GIF picture generating device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
  • the GIF picture generating device provided in the embodiment of the present application can implement the various processes implemented by the method embodiment in FIG.
  • an embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction that is stored in the memory 602 and can run on the processor 601,
  • a processor 601 a memory 602
  • a program or instruction that is stored in the memory 602 and can run on the processor 601
  • the program or instruction is executed by the processor 601
  • each process of the above-mentioned GIF picture generation method embodiment is realized, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.
  • the electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, a processor 1010, etc. part.
  • the electronic device 100 may also include a power source (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power management. Consumption management and other functions.
  • the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than those shown in the figure, or some components may be combined, or different component arrangements, which will not be repeated here. .
  • the user input unit 1007 is used to receive the first input of the user, and the first input is used to select the target object in the target video frame of the target video;
  • the processor 1010 is used to respond to the first input received by the user input unit 1007 , Extract the image content of the target object in each of the M first video frames in the target video to obtain M target video images; based on the M target video images obtained by the processor 1010, generate the target GIF picture; where the target objects in different first video frames meet at least one of the following: the target objects in different first video frames all include the target video object, and the target objects in different first video frames are all in the object selection box
  • M is a positive integer; M first video frames include the target video frame.
  • the electronic device can extract the first input of the target object in the target video frame of the target video by the user, and extract the first input of each of the M first video frames in the target video.
  • the image content of the target object obtains M target video images; and based on the M target video images, the target GIF picture is generated; wherein, the target objects in different first video frames satisfy at least one of the following:
  • the target objects all include target video objects, and the target objects in the different first video frames are all objects in the object selection box;
  • M is a positive integer;
  • M first video frames include the target video frames.
  • each target video image is part of the content extracted from a first video frame according to the target video object or the object selection frame, rather than the entire content of the first video frame, for example, the user in the first video frame Part of the content required, so that the data volume of the target GIF image obtained from the target video conversion is small, which is conducive to the successful sharing of the GIF image.
  • the target object in each first video frame includes the target video object;
  • the user input unit 1007 is also used to receive the user's second input before receiving the user's first input;
  • the display unit 1006 is used to respond In the second input received by the user input unit 1007, at least one video object identifier is displayed, and each video object identifier indicates a video object in the target video frame;
  • the user input unit 1007 is specifically configured to receive the user’s identification of at least one video object
  • the processor 1010 is also used to extract the image content of the target object in each of the M first video frames in the target video to obtain M target videos Before the image, the video object indicated by the target video object identifier is determined as the target video object, where the target object includes the target video object.
  • the user can intuitively and conveniently select the target video object that meets the requirements through at least one video object identifier, so that each target video image meets the user's requirements, and the target GIF image meets the user's requirements. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the target object in each first video frame is an object in an object selection frame;
  • the video frame displayed on the screen also includes an object selection frame;
  • the processor 1010 is also used to extract M in the target video
  • the image content of the target object in each first video frame in each of the first video frames, and before M target video images are obtained, the object selected by the object selection box is determined as the target object;
  • the processor 1010 is specifically configured to Extract the image content selected by the object selection box in each of the M first video frames to obtain M target video images.
  • the user can intuitively and conveniently select the target object that meets the needs through the object selection box, so that each target video image meets the user's needs, and the target GIF image meets the user's needs. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the user input unit 1007 is configured to receive a third input from the user to the object selection frame before the processor 1010 determines the object selected by the object selection frame as the target object; the processor 1010 is configured to respond to user input The third input received by the unit 1007 adjusts the display position and display size of the object selection frame.
  • the target object selected through the object selection frame meets the user needs, and further realizes that each target video image meets the user needs and the target GIF picture Meet user needs. Therefore, it is beneficial to improve the interest of the target GIF picture.
  • the processor 1010 is configured to extract the image content selected by the object marquee in each first video frame in the M first video frames, and before obtaining M target video images, based on the object marquee in the target The display position and display size on the video frame, the control object marquee moves with the target video object in K second video frames, so that the object selected by the object marquee in each second video frame is the same; where K The second video frames are video frames other than the target video frame among the M first video frames, and K is a positive integer less than M.
  • the target video image in the first video frame obtained by the electronic device can be not only the image of the target object, but also the image in the target area, it is beneficial to intercept the image in each first video frame.
  • the first content is image content that meets the needs of the user, and helps to provide the interest of the generated target GIF image.
  • the processor 1010 is configured to extract the image content of the target object in each of the M first video frames in the target video, and before obtaining the M target video images, obtain the target video frame
  • the middle image quality parameter is N third video frames within a preset value range; wherein, the M first video frames are video frames in the N third video frames, and N is a positive integer greater than or equal to M.
  • the poor quality video frames in the target video can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • the quality of the picture can be eliminated, so that the M first video frames in the target video are better quality video frames, which is beneficial to improve the target GIF obtained from the M first video frames.
  • the processor 1010 is specifically configured to set the transparency of the target area in each target video image to a preset transparency to obtain M first images; synthesize the M first images to generate the target GIF picture;
  • the target area in each target video image is an image area excluding the area where the target object is located.
  • the transparency of the target area in each target video image as the image area other than the area where the target object is located as a preset transparency, the interest of each target video image can be improved, thereby increasing the interest of the target GIF image sex.
  • the processor 1010 is specifically configured to determine the first image size based on the image size of each target video image; add preset pixels around each target video image to obtain M second images, where each The image size of each second image is the first image size; M second images are generated as target GIF pictures; wherein, the image size of each target video image is less than or equal to the first image size.
  • the target video images in multiple video frames (ie, M first video frames) in the target video can be synthesized into the target GIF picture according to the same first display size, the resulting target GIF picture is generated The display effect is better.
  • the processor 1010 is specifically configured to determine the first width or the second width as the image width of the first image size, and set the first height or the second height as the image height of the first image size; wherein,
  • the first width is: the image width of the target object with the largest image width among all M target video images;
  • the first height is: the image height of the target object with the largest image height among the M target video images;
  • the second width is the first width Plus the first preset value, the second height is the first height plus the second preset value.
  • obtaining the target GIF picture according to the first image size can prevent the main body (such as the target object or the target video object contained in the target object) in the target GIF picture from being displayed on the edge of the target GIF picture, thereby improving the display effect of the target GIF picture .
  • the display unit 1006 is configured to display the video frame indicated by the first thumbnail on the first area of the screen before the user input unit 1007 receives the user's first input, and display the video frame indicated by the first thumbnail on the second area of the screen.
  • P thumbnails are displayed at the frame rate;
  • the user input unit 1007 is also used to receive a third input from the user to the second thumbnail of the P thumbnails;
  • the second display module is also used to respond to the input received by the user input unit 1007
  • the third input is to update and display the content on the first area as the target video frame indicated by the second thumbnail, and update and display the content on the second area as Q thumbnails displayed at the first frame rate; where P Thumbnails are different from Q thumbnails.
  • the first frame rate is less than the frame rate of the target video.
  • Each thumbnail is used to indicate a video frame in the target video.
  • the first thumbnail is one of the P thumbnails.
  • the second thumbnail is one of the Q thumbnails, and both P and Q are positive integers less than or equal to M.
  • the memory 1009 is configured to store the target GIF picture and the identifier corresponding to the target GIF picture in the target storage area after the processor 1010 generates the target GIF picture based on the M target video images, and the identifier corresponding to the target GIF picture is used
  • the user input unit 1007 is used to obtain the target information entered by the user in the content input area of the target application
  • the display unit 1006 is also used to obtain the information obtained in the user input unit 1007 If the target information is the same as the information indicated by the identifier of the target GIF picture stored in the memory 1009, the target GIF picture is displayed.
  • the target information entered by the user in the content input area of the target application can be obtained by comparing the target information and the target GIF picture.
  • the target GIF picture can be triggered quickly and conveniently. In this way, it is beneficial to improve the interest and convenience of the target GIF picture.
  • each module in the foregoing GIF picture generating apparatus 50 may be implemented by each unit in the electronic device 1000.
  • the editing module 502, the generating module 503, and the control module in the GIF picture generating device 50 may be implemented by the above-mentioned processor 1010.
  • the first display module and the second display in the GIF picture generating device 50 are implemented by the aforementioned display unit 1006, and the receiving module 501 and the user input module in the GIF picture generating device 50 are implemented by the aforementioned user input unit 1007.
  • the saving module in the GIF picture generating device 50 is implemented by the above-mentioned memory 1009.
  • the input unit 1004 may include a graphics processing unit (GPU) 1041 and a microphone 10042.
  • the graphics processor 10041 is paired by the image capture device ( For example, the image data of the still picture or video obtained by the camera) is processed.
  • the display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1007 includes a touch panel 10071 and other input devices 10072.
  • the touch panel 10071 is also called a touch screen.
  • the touch panel 1071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
  • the memory 1009 may be used to store software programs and various data, including but not limited to application programs and operating systems.
  • the processor 1010 may integrate an application processor and a modem processor.
  • the application processor mainly processes an operating system, a user interface, and an application program
  • the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 1010.
  • the embodiment of the present application also provides a readable storage medium with a program or instruction stored on the readable storage medium.
  • the program or instruction is executed by a processor, each process of the foregoing GIF image generation method embodiment is realized, and can achieve The same technical effect, in order to avoid repetition, will not be repeated here.
  • the processor is the processor in the electronic device described in the foregoing embodiment.
  • the readable storage medium includes a computer readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks, or optical disks.
  • An embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the foregoing GIF image generation method embodiment
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is used to run a program or an instruction to implement the foregoing GIF image generation method embodiment
  • chips mentioned in the embodiments of the present application may also be referred to as system-level chips, system-on-chips, system-on-chips, or system-on-chips.
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种GIF图片生成方法、装置及电子设备。该方法包括:接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象;响应于第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。

Description

GIF图片生成方法、装置及电子设备
相关申请的交叉引用
本申请主张在2020年05月29日在中国提交的中国专利申请号No.202010478312.9的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于通信技术领域,具体涉及一种GIF图片生成方法、装置及电子设备。
背景技术
图形交换格式(Graphics Interchange Format,GIF)图片(或称为gif图片,如GIF图片表情包)的趣味性强,使得GIF图片在即时通讯应用程序等聊天工具中得到了广泛使用。然而,当前的GIF图片的数据量通常较大,导致GIF图片的分享耗时较长甚至失败。
发明内容
本申请实施例的目的是提供一种GIF图片生成方法、装置及电子设备,能够解决GIF图片的分享耗时较长甚至失败问题。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种GIF图片生成方法,该方法包括:接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象;响应于第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。
第二方面,本申请实施例提供了一种GIF图片生成装置,该装置包括:接收模块,用于接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象;编辑模块,用于响应于接收模块接收的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;生成模块,用于基于编辑模块得到的M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的GIF图片生成方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,可读存储介质上存储程序或 指令,程序或指令被处理器执行时实现如第一方面的GIF图片生成方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的GIF图片生成方法。
在本申请实施例中,可以通过用户选取目标视频的目标视频帧中的目标对象的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;并基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。具体的,由于每个目标视频图像为根据目标视频对象或对象选取框从一个第一视频帧中抠取的部分内容,而不是该第一视频帧的全部内容,例如该第一视频帧中用户需求的部分内容,从而使得由目标视频转换得到的目标GIF图片的数据量较小,有利于GIF图片的成功分享。
附图说明
图1为本申请实施例提供的一种图片生成方法的流程示意图;
图2为本申请实施例提供的一种图片生成方法过程的操作示意图之一;
图3为本申请实施例提供的一种图片生成方法过程的操作示意图之二;
图4为本申请实施例提供的一种图片生成方法过程的操作示意图之三;
图5为本申请实施例提供的一种可能的图片生成装置的结构示意图;
图6为本申请实施例提供的一种电子设备的硬件结构示意图之一;
图7为本申请实施例提供的一种电子设备的硬件结构示意图之二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例提供的GIF图片生成方法,可以应用于生成GIF图片的场景,例如通过视频生成GIF图片的场景中。
本申请实施例提供的GIF图片生成方法、装置及电子设备,可以通过用户选取目标视频的目标视频帧中的目标对象的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;并基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视 频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。具体的,由于每个目标视频图像为根据目标视频对象或对象选取框从一个第一视频帧中抠取的部分内容,而不是该第一视频帧的全部内容,例如该第一视频帧中用户需求的部分内容,从而使得由目标视频转换得到的目标GIF图片的数据量较小,有利于GIF图片的成功分享。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的GIF图片生成方法进行详细地说明。
示例性的,参照图1所示的GIF图片生成方法的流程图对本申请实施例提供的GIF图片生成方法进行详细描述。其中,虽然在方法流程图中示出了本申请实施例提供的GIF图片生成方法的逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。例如,图1中示出的GIF图片生成方法可以包括步骤101至步骤103:
步骤101、GIF图片生成装置接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象。
示例性,本申请实施例提供的终端中可以包括显示屏,该显示屏可以支持用户的触控输入或指纹输入等。具体的,上述第一输入可以为触屏输入或者指纹输入。上述触屏输入可以为用户对终端的触控屏的按压输入、长按输入、滑动输入、点击输入、悬浮输入(用户在触控屏附近的输入)等触控输入;上述指纹输入可以为用户对终端的指纹识别器的滑动指纹、长按指纹、单击指纹和双击指纹等指纹输入。
其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象。也就是说,通过目标视频对象或对象选取框实现从各个第一视频帧中选取目标对象。
步骤102、GIF图片生成装置响应于第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像。
其中,M个第一视频帧包括目标视频帧,M为正整数。
需要说明的是,以下实施例中通过应用场景1至应用场景3分别描述本申请实施例中的GIF图片生成方法。
具体的,应用场景1中,不同第一视频帧中的目标对象满足:不同第一视频帧中的目标对象均包含目标视频对象(记为条件1)。
可选地,目标视频对象可以为视频帧中的人物、动物或静物等对象。例如,目标视频对象可以为视频帧中的人物或动物等前景对象(即前景),或者视频帧中的树木或建筑物等背景对象(即背景)。
应用场景2中,不同第一视频帧中的目标对象满足:不同第一视频帧中的目标对象均为对象选取框中的对象(记为条件2)。
应用场景2中,不同第一视频帧中的目标对象满足:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象(记为条件3)。
可选地,M个第一视频帧为目标视频中的部分或全部视频帧。
可选地,上述M个第一视频帧可以为用户手动选择的目标视频中的视频帧,或者电子设备自动选择的目标视频中的视频帧。
具体的,GIF图片生成装置截取一个第一视频帧中的目标对象的图像内容的过程具体 包括:从该第一视频帧中识别出该目标对象,对该目标对象的图像内容执行抠图操作,从而得到该目标对象的图像内容的所有像素点。
示例性的,上述M个第一视频帧中的一个第一视频帧的目标对象的视频内容,可以为不规则形状的图像内容,或者该第一视频帧中的一个或多个视频对象(如人物或动物等前景)。如此,使得生成的目标GIF图片的趣味性较强。
步骤103、GIF图片生成装置基于M个目标视频图像,生成目标GIF图片。
其中,目标GIF图片的帧率(记为目标帧率)为目标视频的帧率或预设帧率。
可选地,上述预设帧率可以为用户手动选择或电子设备默认的,本申请实施例对此不作具体限定,可以根据用户实际需求设定。
可以理解的是,电子设备可以依据M个第一视频帧的帧顺序,依次排列相应的目标视频图像,以将截取得到的M个目标视频图像按照目标帧率合成为目标GIF图片。
可选地,上述M个目标视频图像中的不同目标视频图像的显示尺寸的大小相同或不同,可以根据用户的实际需求确定,本申请实施例对此不作具体描述。
可以理解的是,目标GIF图片可以为动态的表情包或者贴纸。
本申请实施例提供的GIF图片生成方法,可以通过用户选取目标视频的目标视频帧中的目标对象的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;并基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。具体的,由于每个目标视频图像为根据目标视频对象或对象选取框从一个第一视频帧中抠取的部分内容,而不是该第一视频帧的全部内容,例如该第一视频帧中用户需求的部分内容,从而使得由目标视频转换得到的目标GIF图片的数据量较小,有利于GIF图片的成功分享,使得GIF图片的趣味性较高。
可选地,电子设备可以提供用于将视频转换为GIF图片(如将目标视频转换为目标GIF图片)的人机交互界面,以支持用户通过该人机交互界面控制电子设备将目标视频生成为目标GIF图片。
可选地,本申请实施例中,电子设备可以提供一个用于触发将视频转换为GIF图片的控件(记为制作GIF贴纸),用于触发电子设备执行将视频生产GIF图片的流程。其中,用户对制作GIF贴纸控件的输入之后,电子设备可以提供用于按照上述应用场景1~应用场景3中的任意应用场景获取目标视频中每个第一视频帧中的第一内容。例如,用户对制作GIF贴纸控件进行输入之后,电子设备可以显示一个或多个功能控件,每个功能控件用于采用上述应用场景1~应用场景3中的任意应用场景获取目标视频中每个第一视频帧中的第一内容。
示例性,如图2中的(a)所示,在电子设备在视频播放界面上显示目标视频31的内容的情况下,该视频播放界面中还可以包括“制作GIF贴纸”控件32,该“制作GIF贴纸”32用于触发电子设备将目标视频31生成为目标GIF图片。在用户对图3中的(a)示出的“制作GIF贴纸”32进行输入之后,如图2中的(b)所示,电子设备可以显示“主体GIF贴纸”功能控件33和“区域GIF贴纸”功能控件34。其中,“主体GIF贴纸”功能控件33和“区域GIF贴纸”功能控件34分别用于触发电子设备按照上述应用场景1和应用场 景2获取目标视频31中的每个第一视频帧的目标对象的图像内容,进而得到目标GIF图片。具体的,在应用场景1中,针对每个第一视频帧,电子设备可以先识别出目标对象并确定目标对象的图像内容,进而将对目标对象的图像内容进行抠取操作,从而得到每个第一视频帧中的目标视频图像。
类似的,对用于触发电子设备按照上述应用场景3获取第一视频帧中的第一内容的控件,可以参照上述的图2中的(b)示出的“主体GIF贴纸”功能控件33和“区域GIF贴纸”功能控件34,本申请实施例对此不再详细描述。
在一种可能的实现方式中,本申请实施例中的应用场景1和应用场景2中,M个第一视频帧中每个第一视频帧中的目标对象均包括目标视频对象。
可选地,在应用场景1中,本申请实施例中,上述步骤101之前还可以包括步骤104和步骤105。相应的,上述步骤101可以通过步骤101a。并且,上述步骤102之前还可以包括步骤106:
步骤104、GIF图片生成装置接收用户的第二输入。
其中,对第二输入的输入方式的描述可以参照上述实施例中对第一输入的输入方式的相关描述,此处不再赘述。
步骤105、GIF图片生成装置响应于第二输入,显示至少一个视频对象标识,每个视频对象标识指示目标视频帧中的一个视频对象。
可以理解的是,目标视频中可以包括多个视频对象,如多个人物、动物或静物。此时,每个第一视频帧中也可以包括一个或多个视频帧。其中,一些视频对象一直处于目标视频的画面中,即目标视频中的所有视频帧中均包括这些视频对象的图像内容;而另一些视频对象处于目标视频的部分画面中,即目标视频中的部分视频帧包括这些视频对象的图像内容。
例如,在应用场景1中,目标对象可以包括目标视频中的一个或多个视频对象,并且目标对象的图像内容处于目标视频中的部分或全部视频帧中。
示例性的,电子设备可以提供一个识别控件,在电子设备显示一个第一视频帧的情况下,通过该识别控件可以触发电子设备识别并标记出该第一视频帧中的一个或多个视频对象,如生成该一个或多个视频对象中每个视频对象的标签,进而由用户从该一个或多个视频对象中选择出目标对象。例如,第二输入可以为对上述识别控件的点击输入。
步骤101a、GIF图片生成装置接收用户对至少一个视频对象标识中的目标视频对象标识的第一输入。
此时,第一输入可以为点击输入。
步骤106、GIF图片生成装置将目标视频对象标识指示的视频对象确定为目标视频对象,其中,目标对象包含目标视频对象。
参照图2,在用户对图2中的(b)示出的“主体GIF贴纸”功能控件33进行输入之后,如图3中的(a)所示,电子设备可以在屏幕上显示目标视频中的第一视频帧41(即目标视频中的一个第一视频帧)和识别控件42。随后,用户对识别控件42进行输入(如第二输入)之后,如图3中的(b)所示,电子设备可以在第一视频帧41的下方显示“猫”标签43和“球”标签44。其中,“猫”标签43用于标记第一视频帧41中的猫这一拍摄对象,“球”标签44用于标记第一视频帧中的球这一视频对象。此时,目标视频31的M 个第一视频帧中包括“猫”和“球”这两个视频对象。随后,在用户对图3中的(b)示出的“猫”标签43进行输入(如第一输入)之后,电子设备可以确定目标视频31中的猫这一视频对象为目标视频对象。进而,电子设备可以确定出目标视频中的所有包含猫的目标对象的图像内容的第一视频帧。
另外,如图3中的(a)所示,电子设备还可以显示“裁剪”、“文字”和“音乐”等视频编辑控件,用于编辑目标视频。
如此,使得用户可以通过至少一个视频对象标识,直观便捷地选择符合需求的目标视频对象,进而使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
在一种可能的实现方式中,在应用场景2中,每个第一视频帧中的目标对象均为对象选取框中的对象;屏幕(即显示屏)上显示的视频帧(如目标视频帧)上还包括对象选取框。
可选地,在应用场景2中,上述步骤102之前还包括步骤107,相应的步骤102可以通过步骤102b实现:
步骤107、GIF图片生成装置将对象选取框所框选的对象确定为目标对象。
需要说明的是,本申请实施例中,对象选取框用于从视频帧中框选图像内容,如框选一个第一视频帧中的目标对象的图像内容。具体的,对象选取框所框选的对象可以为一个视频帧中在对象选取框内的对象。
可选地,上述对象选取框的形状可以为任意形状,如矩、圆形、三角形或不规则形状的,可以根据用户的实际需求确定,这里不做具体限定。
可选地,上述对象选取与框的显示尺寸可以为预设尺寸或者用户手动选择的尺寸,可以根据用户的实际需求确定,这里不做具体限定。
可选地,不同第一视频帧中的对象框的显示位置和显示尺寸相同或不同。
可以理解的是,电子设备通常将第一视频帧中的前景(即视频对象等主体)所在的区域作为该第一视频帧中的对象选取框的显示位置。其中,由于一个视频帧中的前景通常被放置于该视频帧中的中心,因此可以将默认的对象选取框设置于一个视频帧的中心。
需要说明的是,一张图片(如一个视频帧的图像)包括前景和背景,前景为该图片中待突出显示的图像,背景为该图片中除前景之外的图像内容。
例如,一张人物图片的前景为该人物图片中的人物图像,或者该人物图片中的人脸图像。再如,一张景物图片的前景为该景物图片中的景物图像。
可选地,本申请实施例可以根据一个视频帧的图像的各个像素点的像素值,确定出该视频帧中的前景。如一个视频帧中的前景的像素值满足一定数值范围,如大于预设阈值。
可选地,本申请实施例可以根据一个视频帧的图像的对比度,确定出该视频帧中的前景。如一个视频帧中的前景的对比度与该视频帧中其他图像内容的对比度的差值满足一定数值范围。
步骤102b、GIF图片生成装置抠取M个第一视频帧中每个第一视频帧中对象选取框所框选的图像内容,得到M个目标视频图像。
具体的,步骤102b中GIF图片生成装置针对每个第一视频帧,可以先确定该第一视频帧中的对象选取框,再对对象选取框中的图像内容(即目标对象的图像内容)进行抠取 操作,从而得到每个第一视频帧中的目标视频图像。
示例性的,参照图2,在用户对图2中的(b)示出的“区域GIF贴纸”功能控件34进行输入之后,如图4所示,电子设备可以在第一视频帧31上显示矩形的选取框51。其中,用户可以通过选取框51触发电子设备确定选取框51的显示尺寸和显示位置,进而抠取得到每个第一视频帧中的目标视频图像。
如此,使得用户可以通过对象选取框,直观便捷地框选符合需求的目标对象,进而使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选的,在上述步骤102b之前还包括步骤108和步骤109:
步骤108、GIF图片生成装置接收用户对对象选取框的第三输入。
其中,对第二输入的输入方式的描述可以参照上述实施例中对第一输入的输入方式的相关描述,此处不再赘述。例如,第三输入可以为拖动对象选取框的输入。
步骤109、GIF图片生成装置响应于第三输入,调整对象选取框的显示位置和显示尺寸。
示例性的,参照图4,用户可以通过选取框51触发电子设备调整选取框51的显示尺寸和显示位置。
可选地,电子设备默认的对象选取框的中心为一个第一视频帧的画面的中心。其中,若用户未手动选择第一视频帧中的对象选取框的显示位置和显示尺寸,则电子设备确定默认的对象选取框为当前第一视频帧上的对象选取框的显示尺寸和显示区域。若用户手动从第一视频帧上选择对象选取框,则电子设备将用户手动选择的对象选取框确定为该第一视频帧的对象选取框。
如此,由于用户可以通过第三输入调整对象选取框的显示位置和显示尺寸,因此使得通过对象选取框选取的目标对象符合用户需求,进一步实现使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,本申请实施例的应用场景3中,结合应用场景2,上述步骤102b之前还可以包括步骤110:
步骤110、GIF图片生成装置基于对象选取框在目标视频帧上的显示位置和显示尺寸,控制对象选取框在K个第二视频帧中跟随目标视频对象移动,以使得每个第二视频帧中对象选取框所框选的对象相同。
其中,K个第二视频帧为M个第一视频帧中除目标视频帧之外的视频帧,K为小于M的正整数。
类似的,对应用场景3中电子设备获取每个第一视频帧中的第一内容的具体方式,可以参照上述对应用场景1和应用场景2的相关描述,这里不再详细描述。例如,在应用场景3中,用户可以通过识别控件触发电子设备识别并选择出目标对象,并且电子设备可以提供对象选择框,框选出每个第一视频帧中目标对象的图像内容所在的目标对象。进而,电子设备将对象选取框中的目标对象的图像内容作为该第一视频帧中的目标视频图像。
需要说明的是,由于电子设备获取的第一视频帧中的目标视频图像不仅可以为目标对象的图像,还可以为目标区域中的图像,因此有利于截取得到的每个第一视频帧中的第一内容为符合用户需求的图像内容,并有利于提供生成得到的目标GIF图片的趣味性。
可选地,本申请实施例中,上述步骤102之前还包括步骤111:
步骤111、GIF图片生成装置获取目标视频帧中图像质量参数处于预设数值范围内的N个第三视频帧。
其中,M个第一视频帧为N个第三视频帧中的视频帧,N为大于或等于M的正整数。
可选地,M个第一视频帧为:目标视频中图像质量参数处于预设数值范围的视频帧。
可以理解的是,目标视频中图像质量参数处于预设数值范围内的视频帧,为目标视频中质量较好的视频帧;反之,目标视频中图像质量参数处于预设数值范围之外的视频帧,为目标视频中质量较差的视频帧。例如,图像质量参数为视频帧的图像的清晰度。图像质量参数处于预设数值范围内的视频帧,为清晰度较好的视频帧;反之,图像质量参数处于预设数值范围之外的视频帧,为清晰度较低的视频帧,即较为模糊的视频帧。
示例性的,“获取目标视频帧中图像质量参数处于预设数值范围内的N个第三视频帧”可以按照图片的优选算法,排除掉模糊、主体(即视频对象)不清晰的图片(视频帧),从构图、美学打分来挑选出来分数高的视频帧显示在视频中,同时缩略图(在下述实施例中详细说明)显示所有优选出来的视频帧。
可选地,结合上述应用场景1~应用场景3,电子设备可以先通过智能算法获取得到目标视频中图像质量参数处于预设数值范围的视频帧,使得N个第三视频帧为目标视频中图像质量参数处于预设数值范围的视频帧。
可以理解的是,在上述应用场景1中,电子设备可以先通过智能算法获取得到目标视频中图像质量参数处于预设数值范围的视频帧,再识别出这些视频帧中包含目标对象的图像内容的视频帧,作为M个第一视频帧。在上述应用场景2中,电子设备可以通过智能算法获取得到目标视频中图像质量参数处于预设数值范围的视频帧,并将这些视频帧作为M个第一视频帧。
需要说明的是,可以剔除目标视频中质量较差的视频帧,使得目标视频中M个第一视频帧为质量较好的视频帧,从而有利于提高由M个第一视频帧得到的目标GIF图片的质量。
可选的,本申请实施例中,在上述步骤103包括步骤103a和步骤103b:
步骤103a、GIF图片生成装置将每个目标视频图像中的目标区域的透明度设置为预设透明度,得到M个第一图像。
示例性的,上述预设透明度的数值为100%,即全部透明。此时,将目标区域的透明度设置为预设透明度可以为将目标区域中的像素点设置为透明像素。
可选地,每个目标视频图像的边框可以为透明或不透明的,可以根据用户的实际需求设定。
步骤103b、GIF图片生成装置将M个第一图像进行合成,生成目标GIF图片。
其中,每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域。
其中,通过对每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域的透明度设置为预设透明度,可以提高每个目标视频图像的趣味性,进而提高目标GIF图片的趣味性。
可选地,本申请实施例中,上述步骤103可以通过步骤103c至步骤103e实现:
步骤103c、GIF图片生成装置基于每个目标视频图像的图像尺寸,确定第一图像尺寸。
其中,每个目标视频图像的图像尺寸小于或等于第一图像尺寸。
步骤103b、GIF图片生成装置在每个目标视频图像的周围添加预设像素,得到M个第二图像,其中,每个第二图像的图像尺寸为第一图像尺寸。
可选地,上述预设像素可以为预设颜色、预设透明度等预设参数的像素。例如,预设像素可以为白色且透明度的数值为100%的像素,本申请实施例对此不作具体限定,可以根据用户的实际需求确定。
步骤103e、GIF图片生成装置将M个第二图像,生成为目标GIF图片。
可选地,对于图像尺寸不同的目标视频图像(如第二图像),可以以每个图像的中心为基准合成目标GIF图片,即使得每个图像的中心点重合。
可选地,可以以每个目标视频图像的特定点(默认或用户选择的,如左上角所在的点)合成目标GIF图片,即使得每个目标视频图像的左上角所在的点重合。
需要说明的是,由于可以在按照同样的第一显示尺寸将目标视频中多个视频帧(即M个第一视频帧)中的目标视频图像合成为目标GIF图片,使得生成得到的目标GIF图片的显示效果较好。
可选的,本申请实施例中,上述步骤103c可以通过步骤103c-1实现:
步骤103c-1、GIF图片生成装置将第一宽度或第二宽度确定为第一图像尺寸的图像宽度,并将第一高度或第二高度设置为第一图像尺寸的图像高度。
其中,第一宽度为:所有M个目标视频图像中图像宽度最大的目标对象的图像宽度;第一高度为:M个目标视频图像中图像高度最大的目标对象的图像高度;第二宽度为第一宽度加上第一预设数值,第二高度为第一高度加上第二预设数值。
可选地,第一预设数值与第二预设数值相同或不同,如第一预设数值等于第二预设数值(如取值为5)。
在示例1中,第一图像尺寸的图像宽度为第二宽度,且第一图像尺寸的图像高度为第二高度。此时,说明GIF图片生成装置对目标显示尺寸的边缘增加了第一预设数量的像素对目标显示尺寸的边缘增加了第二预设数量的像素。也就是相当于对目标GIF图片添加了一个完整的边框。
另外,针对第一图像尺寸的图像宽度为第一宽度,且第一图像尺寸的图像高度为第二高度;以及第一图像尺寸的图像宽度为第二宽度,且第一图像尺寸的图像高度为第一高度这两种场景,说明GIF图片生成装置对目标GIF图片添加了部分的边框。
例如,目标对象的图像内容在不同第一视频帧中的不同位置、不同尺寸时,可以按照目标对象的图像内容最大长和宽各向外增加5个像素的尺寸来显示。增加5个像素是为了避免目标对象显示在图片边缘,显示效果不好。
从而,按照第一图像尺寸得到目标GIF图片,可以避免目标GIF图片中的主体(如目标对象,或目标对象包含的目标视频对象)显示在目标GIF图片的边缘,提高了目标GIF图片的显示效果。
可选地,本申请实施例中,电子设备在屏幕上目标视频中的一个第一视频帧的情况下,还可以显示目标视频的视频帧或视频帧的缩略图,以使得用户可以通过缩略图便捷的查看目标视频中的各个第一视频帧。示例性的,在上述步骤101之前还可以包括步骤112至步骤114:
步骤112、GIF图片生成装置在屏幕的第一区域上显示第一缩略图指示的视频帧,并在屏幕的第二区域上按照第一帧率显示P个缩略图。
其中,第一帧率小于目标视频的帧率。每个缩略图用于指示目标视频中的一个视频帧,第一缩略图为P个缩略图中一个缩略图。P为小于或等于M的正整数。
可以理解的,上述P个缩略图为目标视频中的部分视频帧的缩略图。例如,图3或图4中示出的缩略图为上述P个缩略图。
示例性的,参照图3,图3中电子设备显示第一视频帧31的同时,还可以显示多个缩略图,如缩略图35。此时,缩略图35为第一缩略图,缩略图35指示的视频帧为图3中示出的第一视频帧31。
参照图4,图4中电子设备显示第一视频帧31的同时,还可以显示多个缩略图,如缩略图52。此时,缩略图52为第一缩略图,缩略图52指示的视频帧为图4中示出的第一视频帧31。
可选地,GIF图片生成装置可以提供选择第一帧率的控件,用于支持用户手动设置第一帧率。
示例性的,GIF图片生成装置可以提供用于调整FPS(即帧率)的界面,该界面中包括“5”、“10”、“15”、“20”和“24”等控件,分别用于触发电子设备将第一帧率设置为对应控件表示的数值。另外,该界面中还可以包括提示信息“FPS:FPS指的是1s中提取的图片的张数。FPS值越高,画面越流畅,生成的GIF也会越大,可能会出现无法分享的情况。”。以及针对“10”标记“建议值”这一标识,用于提示用户可以将第一帧率设置为每秒10帧以使得生成的目标GIF图片可以正常分享。
步骤113、GIF图片生成装置接收用户对第二缩略图的第三输入。
可选地,上述第三输入可以用于触发电子设备更新P个缩略图的缩略图。
步骤114、GIF图片生成装置响应于第三输入,将第一区域上的内容更新显示为第二缩略图指示的目标视频帧,并将第二区域上的内容更新显示为按照第一帧率显示的Q个缩略图。
其中,P个缩略图与Q个缩略图不同,第二缩略图为Q个缩略图中的一个缩略图,P为小于或等于M的正整数。
示例性的,若上述第一输入为对P个缩略图上的滑动输入,则用于触发电子设备更新P个缩略图,如依据第一输入的滑动方向更新P个缩略图。
示例性的,若上述第一输入为对P个缩略图中的缩略图的长按输入,则用于触发电子设备展开显示目标视频中的所有视频帧。
进一步,本申请实施例中,上述缩略图还支持用户选择是否删除目标视频中的某些视频帧。例如,用户对一个视频帧的缩略图的上划输入,或者长按并上划的输入,用于触发电子设备删除该视频帧。如此,用户可以通过这些缩略图快捷的触发删除目标视频中的某些视频帧,如用户不需要生成目标GIF图片的视频帧或清晰度较低的视频帧。
可以理解的是,本申请实施例中删除目标视频中的视频帧,指的是删除用于生成目标GIF图片的视频帧之外的视频帧,而不是指删除目标视频文件中的原始视频帧。即上述M个第一视频帧为目标视频中用户未执行过删除操作的视频帧。
可以理解的是,目标视频中的M个第一视频帧中不包括用户手动删除的视频帧。
需要说明的是,通过显示目标视频中的视频帧的缩略图,可以方便用户查看目标视频中的各个视频帧,进而方便用户触发从各个视频帧中选择目标对象。
可选地,本申请实施例中,上述步骤103之后还包括步骤115至步骤117:
步骤115、GIF图片生成装置将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中。
其中,目标GIF图片对应的标识用于指示目标GIF图片中包含的目标视频对象。例如,目标GIF图片对应的标识为其中包含的目标视频对象的标识信息,如在目标视频对象为“狗”时,该标识为狗这一文字。
示例性的,电子设备可以提供保存控件,如在屏幕上显示保存控件,以触发电子设备保存目标GIF图片。
可选的,上述目标存储区域可以为电子设备本地中用于存储图片等媒体文件的区域,如本地相册应用对应的存储区域。或者,上述目标存储区域可以为与GIF图片生成装置交互的服务器中用于存储图片等媒体文件的区域。
步骤116、GIF图片生成装置获取用户在目标应用程序中的内容输入区域中输入的目标信息。
步骤117、GIF图片生成装置在目标信息与目标GIF图片的标识指示的信息相同的情况下,显示目标GIF图片。
示例性的,实现方式1中,在视频编辑、图片编辑等场景中可以将GIF图片(或称gif贴纸,如目标GIF图片)作为资源,添加到视频或图片上,识别编辑图片或视频的内容,进行智能推荐素材。例如,在编辑的视频画面内容中、音乐主题中有宠物的元素,那么用户在编辑时,推荐用户使用包含宠物这一视频对象的GIF图片。例如,上述目标应用程序为视频编辑、图片编辑的应用程序,内容输入区域为该目标应用程序的搜索框,目标信息为该宠物的标识信息(如名称)。
示例性的,实现方式2中,用户在即时通讯聊天工具(即目标应用程序)中,发送表情包时,可以将制作的目标GIF图片当作表情包来发送。同时也可以按照抠图的主体(即目标GIF图片中的目标视频对象)内容来发送目标GIF图片。例如,在制作包含目标视频对象的目标GIF图片时,选择的主体(即目标视频对象)是“狗”,用户在即时通讯聊天工具的聊天界面,输入文字“狗”,就可以将狗的主体gif表情(即GIF图片)显示并发送出去。
示例性的,实现方式3中,用户在输入法中输入“狗”时,也可以将狗的主体gif表情(即GIF图片)显示在编辑内容(如编辑的文字)上。此时,目标应用程序为输入法应用。
示例性的,实现方式4中,用户在视频通话过程中,通过语音输入主体的文字内容,发送对应的主体gif表情包发送给对方。例如,用户说“狗”,则可以将主体为狗的gif表情包发送给对方,对方的聊天界面就会弹出并显示gif表情包,增加视频聊天的趣味性。此时,本机用户的聊天界面也可以显示gif表情包。
如此,在将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中的情况下,可以通过获取用户在目标应用程序中的内容输入区域中输入的目标信息,在目标信息与目标GIF图片的标识指示的信息相同的情况下,快速、便捷的触发显示目标GIF图片。如此, 有利于提高目标GIF图片的趣味性和便捷性。
需要说明的是,本申请实施例提供的GIF图片生成方法,执行主体可以为GIF图片生成装置,或者该GIF图片生成装置中的用于执行GIF图片生成方法的控制模块。本申请实施例中以GIF图片生成装置执行GIF图片生成方法为例,说明本申请实施例提供的GIF图片生成装置。
如图5所示,为本申请实施例提供的一种GIF图片生成装置的结构示意图。如图5所示GIF图片生成装置50,接收模块501,用于接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象;编辑模块502,用于响应于接收模块501接收的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;生成模块503,用于基于编辑模块502得到的M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。
本申请实施例提供的GIF图片生成装置,可以通过用户选取目标视频的目标视频帧中的目标对象的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;并基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。具体的,由于每个目标视频图像为根据目标视频对象或对象选取框从一个第一视频帧中抠取的部分内容,而不是该第一视频帧的全部内容,例如该第一视频帧中用户需求的部分内容,从而使得由目标视频转换得到的目标GIF图片的数据量较小,有利于GIF图片的成功分享。
可选地,每个第一视频帧中的目标对象均包括目标视频对象;接收模块501,还用于接收用户的第一输入之前,接收用户的第二输入;装置50还包括:第一显示模块,用于响应于接收模块501接收的第二输入,显示至少一个视频对象标识,每个视频对象标识指示目标视频帧中的一个视频对象;接收模块501,具体用于接收用户对至少一个视频对象标识中的目标视频对象标识的第一输入;编辑模块502,还用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,将目标视频对象标识指示的视频对象确定为目标视频对象,其中,目标对象包含目标视频对象。
如此,使得用户可以通过至少一个视频对象标识,直观便捷地选择符合需求的目标视频对象,进而使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,每个第一视频帧中的目标对象均为对象选取框中的对象;屏幕上显示的视频帧上还包括对象选取框;编辑模块502,还用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,将对象选取框所框选的对象确定为目标对象;编辑模块502,具体用于抠取M个第一视频帧中每个第一视频帧中对象选取框所框选的图像内容,得到M个目标视频图像。
如此,使得用户可以通过对象选取框,直观便捷地框选符合需求的目标对象,进而使 得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,接收模块501,用于编辑模块502将对象选取框所框选的对象确定为目标对象之前,接收用户对对象选取框的第三输入;装置50还包括:调整模块,用于响应于接收模块501接收的第三输入,调整对象选取框的显示位置和显示尺寸。
如此,由于用户可以通过第三输入调整对象选取框的显示位置和显示尺寸,因此使得通过对象选取框选取的目标对象符合用户需求,进一步实现使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,GIF图片生成装置50还包括:控制模块,用于编辑模块502抠取M个第一视频帧中每个第一视频帧中对象选取框所框选的图像内容,得到M个目标视频图像之前,基于对象选取框在目标视频帧上的显示位置和显示尺寸,控制对象选取框在K个第二视频帧中跟随目标视频对象移动,以使得每个第二视频帧中对象选取框所框选的对象相同;其中,K个第二视频帧为M个第一视频帧中除目标视频帧之外的视频帧,K为小于M的正整数。
需要说明的是,由于电子设备获取的第一视频帧中的目标视频图像不仅可以为目标对象的图像,还可以为目标区域中的图像,因此有利于截取得到的每个第一视频帧中的第一内容为符合用户需求的图像内容,并有利于提供生成得到的目标GIF图片的趣味性。
可选地,GIF图片生成装置50还包括:获取模块,用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,获取目标视频帧中图像质量参数处于预设数值范围内的N个第三视频帧;其中,M个第一视频帧为N个第三视频帧中的视频帧,N为大于或等于M的正整数。
需要说明的是,可以剔除目标视频中质量较差的视频帧,使得目标视频中M个第一视频帧为质量较好的视频帧,从而有利于提高由M个第一视频帧得到的目标GIF图片的质量。
可选地,生成模块503,具体用于将每个目标视频图像中的目标区域的透明度设置为预设透明度,得到M个第一图像;将M个第一图像进行合成,生成目标GIF图片;其中,每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域。
其中,通过对每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域的透明度设置为预设透明度,可以提高每个目标视频图像的趣味性,进而提高目标GIF图片的趣味性。
可选地,生成模块503,具体用于基于每个目标视频图像的图像尺寸,确定第一图像尺寸;在每个目标视频图像的周围添加预设像素,得到M个第二图像,其中,每个第二图像的图像尺寸为第一图像尺寸;将M个第二图像,生成为目标GIF图片;其中,每个目标视频图像的图像尺寸小于或等于第一图像尺寸。
需要说明的是,由于可以在按照同样的第一显示尺寸将目标视频中多个视频帧(即M个第一视频帧)中的目标视频图像合成为目标GIF图片,使得生成得到的目标GIF图片的显示效果较好。
可选地,生成模块503,具体用于将第一宽度或第二宽度确定为第一图像尺寸的图像宽度,并将第一高度或第二高度设置为第一图像尺寸的图像高度;其中,第一宽度为:所 有M个目标视频图像中图像宽度最大的目标对象的图像宽度;第一高度为:M个目标视频图像中图像高度最大的目标对象的图像高度;第二宽度为第一宽度加上第一预设数值,第二高度为第一高度加上第二预设数值。
从而,按照第一图像尺寸得到目标GIF图片,可以避免目标GIF图片中的主体(如目标对象,或目标对象包含的目标视频对象)显示在目标GIF图片的边缘,提高了目标GIF图片的显示效果。
可选地,GIF图片生成装置50还包括:第二显示模块,用于接收模块501接收用户的第一输入之前,在屏幕的第一区域上显示第一缩略图指示的视频帧,并在屏幕的第二区域上按照第一帧率显示P个缩略图;接收模块501,还用于接收用户对P个缩略图中的第二缩略图的第三输入;第二显示模块,还用于响应于接收模块501接收的第三输入,将第一区域上的内容更新显示为第二缩略图指示的目标视频帧,并将第二区域上的内容更新显示为按照第一帧率显示的Q个缩略图;其中,P个缩略图与Q个缩略图不同,第一帧率小于目标视频的帧率,每个缩略图用于指示目标视频中的一个视频帧,第一缩略图为P个缩略图中一个缩略图,第二缩略图为Q个缩略图中的一个缩略图,P和Q均为小于或等于M的正整数。
需要说明的是,通过显示目标视频中的视频帧的缩略图,可以方便用户查看目标视频中的各个视频帧,进而方便用户触发从各个视频帧中选择目标对象。
可选地,GIF图片生成装置50还包括:保存模块,用于生成模块503基于M个目标视频图像,生成目标GIF图片之后,将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中,目标GIF图片对应的标识用于指示目标GIF图片中包含的目标视频对象;用户输入模块,用于获取用户在目标应用程序中的内容输入区域中输入的目标信息;第三显示模块,还用于在用户输入模块得到的目标信息与保存模块保存的目标GIF图片的标识指示的信息相同的情况下,显示目标GIF图片。
如此,在将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中的情况下,可以通过获取用户在目标应用程序中的内容输入区域中输入的目标信息,在目标信息与目标GIF图片的标识指示的信息相同的情况下,快速、便捷的触发显示目标GIF图片。如此,有利于提高目标GIF图片的趣味性和便捷性。
本申请实施例中的GIF图片生成装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的GIF图片生成装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的GIF图片生成装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。
可选的,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储在存储器602上并可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述GIF图片生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图7为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。
本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,用户输入单元1007,用于接收用户的第一输入,第一输入用于选取目标视频的目标视频帧中的目标对象;处理器1010,用于响应于用户输入单元1007接收的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;基于处理器1010得到的M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。
本申请实施例提供的电子设备,可以通过用户选取目标视频的目标视频帧中的目标对象的第一输入,抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;并基于M个目标视频图像,生成目标GIF图片;其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;M个第一视频帧包括目标视频帧。具体的,由于每个目标视频图像为根据目标视频对象或对象选取框从一个第一视频帧中抠取的部分内容,而不是该第一视频帧的全部内容,例如该第一视频帧中用户需求的部分内容,从而使得由目标视频转换得到的目标GIF图片的数据量较小,有利于GIF图片的成功分享。
可选地,每个第一视频帧中的目标对象均包括目标视频对象;用户输入单元1007,还用于接收用户的第一输入之前,接收用户的第二输入;显示单元1006,用于响应于用户输入单元1007接收的第二输入,显示至少一个视频对象标识,每个视频对象标识指示目标视频帧中的一个视频对象;用户输入单元1007,具体用于接收用户对至少一个视频对象标识中的目标视频对象标识的第一输入;处理器1010,还用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,将目标视频对象标识指示的视频对象确定为目标视频对象,其中,目标对象包含目标视频对 象。
如此,使得用户可以通过至少一个视频对象标识,直观便捷地选择符合需求的目标视频对象,进而使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,每个第一视频帧中的目标对象均为对象选取框中的对象;屏幕上显示的视频帧上还包括对象选取框;处理器1010,还用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,将对象选取框所框选的对象确定为目标对象;处理器1010,具体用于抠取M个第一视频帧中每个第一视频帧中对象选取框所框选的图像内容,得到M个目标视频图像。
如此,使得用户可以通过对象选取框,直观便捷地框选符合需求的目标对象,进而使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,用户输入单元1007,用于处理器1010将对象选取框所框选的对象确定为目标对象之前,接收用户对对象选取框的第三输入;处理器1010,用于响应于用户输入单元1007接收的第三输入,调整对象选取框的显示位置和显示尺寸。
如此,由于用户可以通过第三输入调整对象选取框的显示位置和显示尺寸,因此使得通过对象选取框选取的目标对象符合用户需求,进一步实现使得每个目标视频图像符合用户需求,以及目标GIF图片符合用户需求。从而,有利于提高目标GIF图片的趣味性。
可选地,处理器1010,用于抠取M个第一视频帧中每个第一视频帧中对象选取框所框选的图像内容,得到M个目标视频图像之前,基于对象选取框在目标视频帧上的显示位置和显示尺寸,控制对象选取框在K个第二视频帧中跟随目标视频对象移动,以使得每个第二视频帧中对象选取框所框选的对象相同;其中,K个第二视频帧为M个第一视频帧中除目标视频帧之外的视频帧,K为小于M的正整数。
需要说明的是,由于电子设备获取的第一视频帧中的目标视频图像不仅可以为目标对象的图像,还可以为目标区域中的图像,因此有利于截取得到的每个第一视频帧中的第一内容为符合用户需求的图像内容,并有利于提供生成得到的目标GIF图片的趣味性。
可选地,处理器1010,用于抠取目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,获取目标视频帧中图像质量参数处于预设数值范围内的N个第三视频帧;其中,M个第一视频帧为N个第三视频帧中的视频帧,N为大于或等于M的正整数。
需要说明的是,可以剔除目标视频中质量较差的视频帧,使得目标视频中M个第一视频帧为质量较好的视频帧,从而有利于提高由M个第一视频帧得到的目标GIF图片的质量。
可选地,处理器1010,具体用于将每个目标视频图像中的目标区域的透明度设置为预设透明度,得到M个第一图像;将M个第一图像进行合成,生成目标GIF图片;其中,每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域。
其中,通过对每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域的透明度设置为预设透明度,可以提高每个目标视频图像的趣味性,进而提高目标GIF图片的趣味性。
可选地,处理器1010,具体用于基于每个目标视频图像的图像尺寸,确定第一图像尺寸;在每个目标视频图像的周围添加预设像素,得到M个第二图像,其中,每个第二图像的图像尺寸为第一图像尺寸;将M个第二图像,生成为目标GIF图片;其中,每个目标视频图像的图像尺寸小于或等于第一图像尺寸。
需要说明的是,由于可以在按照同样的第一显示尺寸将目标视频中多个视频帧(即M个第一视频帧)中的目标视频图像合成为目标GIF图片,使得生成得到的目标GIF图片的显示效果较好。
可选地,处理器1010,具体用于将第一宽度或第二宽度确定为第一图像尺寸的图像宽度,并将第一高度或第二高度设置为第一图像尺寸的图像高度;其中,第一宽度为:所有M个目标视频图像中图像宽度最大的目标对象的图像宽度;第一高度为:M个目标视频图像中图像高度最大的目标对象的图像高度;第二宽度为第一宽度加上第一预设数值,第二高度为第一高度加上第二预设数值。
从而,按照第一图像尺寸得到目标GIF图片,可以避免目标GIF图片中的主体(如目标对象,或目标对象包含的目标视频对象)显示在目标GIF图片的边缘,提高了目标GIF图片的显示效果。
可选地,显示单元1006,用于用户输入单元1007接收用户的第一输入之前,在屏幕的第一区域上显示第一缩略图指示的视频帧,并在屏幕的第二区域上按照第一帧率显示P个缩略图;用户输入单元1007,还用于接收用户对P个缩略图中的第二缩略图的第三输入;第二显示模块,还用于响应于用户输入单元1007接收的第三输入,将第一区域上的内容更新显示为第二缩略图指示的目标视频帧,并将第二区域上的内容更新显示为按照第一帧率显示的Q个缩略图;其中,P个缩略图与Q个缩略图不同,第一帧率小于目标视频的帧率,每个缩略图用于指示目标视频中的一个视频帧,第一缩略图为P个缩略图中一个缩略图,第二缩略图为Q个缩略图中的一个缩略图,P和Q均为小于或等于M的正整数。
需要说明的是,通过显示目标视频中的视频帧的缩略图,可以方便用户查看目标视频中的各个视频帧,进而方便用户触发从各个视频帧中选择目标对象。
可选地,存储器1009,用于处理器1010基于M个目标视频图像,生成目标GIF图片之后,将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中,目标GIF图片对应的标识用于指示目标GIF图片中包含的目标视频对象;用户输入单元1007,用于获取用户在目标应用程序中的内容输入区域中输入的目标信息;显示单元1006,还用于在用户输入单元1007得到的目标信息与存储器1009保存的目标GIF图片的标识指示的信息相同的情况下,显示目标GIF图片。
如此,在将目标GIF图片和目标GIF图片对应的标识保存至目标存储区域中的情况下,可以通过获取用户在目标应用程序中的内容输入区域中输入的目标信息,在目标信息与目标GIF图片的标识指示的信息相同的情况下,快速、便捷的触发显示目标GIF图片。如此,有利于提高目标GIF图片的趣味性和便捷性。
可选地,上述GIF图片生成装置50中的各个模块可以通过电子设备1000中的各个单元实现。例如,GIF图片生成装置50中的编辑模块502,生成模块503、控制模块可以通过上述处理器1010实现。GIF图片生成装置50中的第一显示模块和第二显示由上述显示单元1006实现,GIF图片生成装置50中的接收模块501和用户输入模块由上述用户输入 单元1007实现。GIF图片生成装置50中的保存模块由上述存储器1009实现。
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述GIF图片生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述GIF图片生成方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施 方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (22)

  1. 一种GIF图片生成方法,所述方法包括:
    接收用户的第一输入,所述第一输入用于选取目标视频的目标视频帧中的目标对象;
    响应于所述第一输入,抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;
    基于所述M个目标视频图像,生成目标GIF图片;
    其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;所述M个第一视频帧包括所述目标视频帧。
  2. 根据权利要求1所述的方法,其中,每个所述第一视频帧中的目标对象均包括所述目标视频对象;
    所述接收用户的第一输入之前,所述方法还包括:
    接收用户的第二输入;
    响应于所述第二输入,显示至少一个视频对象标识,每个视频对象标识指示所述目标视频帧中的一个视频对象;
    所述接收用户的第一输入,包括:
    接收用户对所述至少一个视频对象标识中的目标视频对象标识的所述第一输入;
    所述抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,所述方法还包括:
    将所述目标视频对象标识指示的视频对象确定为所述目标视频对象,其中,所述目标对象包含所述目标视频对象。
  3. 根据权利要求1所述的方法,其中,每个所述第一视频帧中的目标对象均为所述对象选取框中的对象;屏幕上显示的视频帧上还包括所述对象选取框;
    所述抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,所述方法还包括:
    将所述对象选取框所框选的对象确定为所述目标对象;
    所述抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像,包括:
    抠取所述M个第一视频帧中每个第一视频帧中所述对象选取框所框选的图像内容,得到所述M个目标视频图像。
  4. 根据权利要求3所述的方法,其中,所述将所述对象选取框所框选的对象确定为所述目标对象之前,所述方法还包括:
    接收用户对所述对象选取框的第三输入;
    响应于所述第三输入,调整所述对象选取框的显示位置和显示尺寸。
  5. 根据权利要求3所述的方法,其中,
    所述抠取所述M个第一视频帧中每个第一视频帧中所述对象选取框所框选的图像内容,得到所述M个目标视频图像之前,所述方法还包括:
    基于所述对象选取框在所述目标视频帧上的显示位置和显示尺寸,控制所述对象 选取框在所述K个第二视频帧中跟随所述目标视频对象移动,以使得每个第二视频帧中所述对象选取框所框选的对象相同;
    其中,所述K个第二视频帧为所述M个第一视频帧中除所述目标视频帧之外的视频帧,K为小于M的正整数。
  6. 根据权利要求1所述的方法,其中,所述抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像之前,所述方法还包括:
    获取所述目标视频帧中图像质量参数处于预设数值范围内的N个第三视频帧;
    其中,所述M个第一视频帧为所述N个第三视频帧中的视频帧,N为大于或等于M的正整数。
  7. 根据权利要求1所述的方法,其中,所述基于所述M个目标视频图像,生成目标GIF图片,包括:
    将每个目标视频图像中的目标区域的透明度设置为预设透明度,得到M个第一图像;
    将所述M个第一图像进行合成,生成所述目标GIF图片;
    其中,所述每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域。
  8. 根据权利要求1所述的方法,其中,所述基于所述M个目标视频图像,生成目标GIF图片,包括:
    基于每个目标视频图像的图像尺寸,确定第一图像尺寸;
    在所述每个目标视频图像的周围添加预设像素,得到M个第二图像,其中,每个第二图像的图像尺寸为所述第一图像尺寸;
    将所述M个第二图像,生成为所述目标GIF图片;
    其中,所述每个目标视频图像的图像尺寸小于或等于所述第一图像尺寸。
  9. 根据权利要求8所述的方法,其中,所述基于每个目标视频图像的图像尺寸,确定第一图像尺寸,包括:
    将第一宽度或第二宽度确定为所述第一图像尺寸的图像宽度,并将第一高度或第二高度设置为所述第一图像尺寸的图像高度;
    其中,所述第一宽度为:所有M个目标视频图像中图像宽度最大的目标对象的图像宽度;所述第一高度为:所述M个目标视频图像中图像高度最大的目标对象的图像高度;
    所述第二宽度为所述第一宽度加上第一预设数值,所述第二高度为所述第一高度加上第二预设数值。
  10. 根据权利要求1所述的方法,其中,所述接收用户的第一输入之前,所述方法还包括:
    在屏幕的第一区域上显示第一缩略图指示的视频帧,并在所述屏幕的第二区域上按照第一帧率显示P个缩略图;
    接收用户对所述P个缩略图中的第二缩略图的第三输入;
    响应于所述第三输入,将所述第一区域上的内容更新显示为所述第二缩略图指示 的所述目标视频帧,并将所述第二区域上的内容更新显示为按照所述第一帧率显示的Q个缩略图;
    其中,所述P个缩略图与所述Q个缩略图不同,所述第一帧率小于所述目标视频的帧率,每个缩略图用于指示所述目标视频中的一个视频帧,所述第一缩略图为所述P个缩略图中一个缩略图,所述第二缩略图为所述Q个缩略图中的一个缩略图,P和Q均为小于或等于M的正整数。
  11. 根据权利要求1至10中任一项所述的方法,其中,所述基于所述M个目标视频图像,生成目标GIF图片之后,所述方法还包括:
    将所述目标GIF图片和所述目标GIF图片对应的标识保存至目标存储区域中,所述目标GIF图片对应的标识用于指示所述目标GIF图片中包含的所述目标视频对象;
    获取用户在目标应用程序中的内容输入区域中输入的目标信息;
    在所述目标信息与所述目标GIF图片的标识指示的信息相同的情况下,显示所述目标GIF图片。
  12. 一种GIF图片生成装置,所述装置包括:
    接收模块,用于接收用户的第一输入,所述第一输入用于选取目标视频的目标视频帧中的目标对象;
    编辑模块,用于响应于所述接收模块接收的所述第一输入,抠取所述目标视频中的M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到M个目标视频图像;
    生成模块,用于基于所述编辑模块得到的所述M个目标视频图像,生成目标GIF图片;
    其中,不同第一视频帧中的目标对象满足以下至少一项:不同第一视频帧中的目标对象均包含目标视频对象,不同第一视频帧中的目标对象均为对象选取框中的对象;M为正整数;所述M个第一视频帧包括所述目标视频帧。
  13. 根据权利要求12所述的装置,其中,每个所述第一视频帧中的目标对象均包括所述目标视频对象;
    所述接收模块,还用于接收用户的所述第一输入之前,接收用户的第二输入;
    所述装置还包括:
    第一显示模块,用于响应于所述接收模块接收的所述第二输入,显示至少一个视频对象标识,每个视频对象标识指示所述目标视频帧中的一个视频对象;
    所述接收模块,具体用于接收用户对所述至少一个视频对象标识中的目标视频对象标识的所述第一输入;
    所述编辑模块,还用于抠取所述目标视频中的所述M个第一视频帧中的每个第一视频帧中的目标对象的图像内容,得到所述M个目标视频图像之前,将所述目标视频对象标识指示的视频对象确定为所述目标视频对象,其中,所述目标对象包含所述目标视频对象。
  14. 根据权利要求12所述的装置,其中,每个所述第一视频帧中的目标对象均为所述对象选取框中的对象;屏幕上显示的视频帧上还包括所述对象选取框;
    所述编辑模块,还用于抠取所述目标视频中的所述M个第一视频帧中的每个第一 视频帧中的目标对象的图像内容,得到所述M个目标视频图像之前,将所述对象选取框所框选的对象确定为所述目标对象;
    所述编辑模块,具体用于抠取所述M个第一视频帧中每个第一视频帧中所述对象选取框所框选的图像内容,得到所述M个目标视频图像。
  15. 根据权利要求14所述的装置,其中,
    所述装置还包括:
    控制模块,用于所述编辑模块抠取所述M个第一视频帧中每个第一视频帧中所述对象选取框所框选的图像内容,得到所述M个目标视频图像之前,基于所述对象选取框在所述目标视频帧上的显示位置和显示尺寸,控制所述对象选取框在所述K个第二视频帧中跟随所述目标视频对象移动,以使得每个第二视频帧中所述对象选取框所框选的对象相同;
    其中,所述K个第二视频帧为所述M个第一视频帧中除所述目标视频帧之外的视频帧,K为小于M的正整数。
  16. 根据权利要求12所述的装置,其中,
    所述生成模块,具体用于将每个目标视频图像中的目标区域的透明度设置为预设透明度,得到M个第一图像;将所述M个第一图像进行合成,生成所述目标GIF图片;
    其中,所述每个目标视频图像中的目标区域为除目标对象所在区域之外的图像区域。
  17. 根据权利要求12所述的装置,其中,
    所述生成模块,具体用于基于每个目标视频图像的图像尺寸,确定第一图像尺寸;
    在所述每个目标视频图像的周围添加预设像素,得到M个第二图像,其中,每个第二图像的图像尺寸为所述第一图像尺寸;
    将所述M个第二图像,生成为所述目标GIF图片;
    其中,所述每个目标视频图像的图像尺寸小于或等于所述第一图像尺寸。
  18. 根据权利要求17所述的装置,其中,
    所述生成模块,具体用于将第一宽度或第二宽度确定为所述第一图像尺寸的图像宽度,并将第一高度或第二高度设置为所述第一图像尺寸的图像高度;
    其中,所述第一宽度为:所有M个目标视频图像中图像宽度最大的目标对象的图像宽度;所述第一高度为:所述M个目标视频图像中图像高度最大的目标对象的图像高度;
    所述第二宽度为所述第一宽度加上第一预设数值,所述第二高度为所述第一高度加上第二预设数值。
  19. 根据权利要求12至18中任一项所述的装置,其中,
    所述装置还包括:
    保存模块,用于所述生成模块基于所述M个目标视频图像,生成所述目标GIF图片之后,将所述目标GIF图片和所述目标GIF图片对应的标识保存至目标存储区域中,所述目标GIF图片对应的标识用于指示所述目标GIF图片中包含的所述目标视频对象;
    用户输入模块,用于获取用户在目标应用程序中的内容输入区域中输入的目标信息;
    第三显示模块,还用于在所述用户输入模块得到的所述目标信息与所述保存模块保存的所述目标GIF图片的标识指示的信息相同的情况下,显示所述目标GIF图片。
  20. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-11中的任一项所述的GIF图片生成方法的步骤。
  21. 一种GIF图片生成装置,包括所述装置被配置成用于执行如权利要求1至11中任一项所述的GIF图片生成方法。
  22. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至11中任一项所述的GIF图片生成方法。
PCT/CN2021/095887 2020-05-29 2021-05-25 Gif图片生成方法、装置及电子设备 WO2021238943A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010478312.9A CN111612873B (zh) 2020-05-29 2020-05-29 Gif图片生成方法、装置及电子设备
CN202010478312.9 2020-05-29

Publications (1)

Publication Number Publication Date
WO2021238943A1 true WO2021238943A1 (zh) 2021-12-02

Family

ID=72202163

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095887 WO2021238943A1 (zh) 2020-05-29 2021-05-25 Gif图片生成方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN111612873B (zh)
WO (1) WO2021238943A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114173203A (zh) * 2022-01-05 2022-03-11 统信软件技术有限公司 一种视频播放中截取图像的方法、装置与计算设备
CN114253451A (zh) * 2021-12-21 2022-03-29 咪咕音乐有限公司 截图方法、装置、电子设备及存储介质
CN114302009A (zh) * 2021-12-06 2022-04-08 维沃移动通信有限公司 视频处理方法、装置、电子设备及介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111612873B (zh) * 2020-05-29 2023-07-14 维沃移动通信有限公司 Gif图片生成方法、装置及电子设备
CN112995533A (zh) * 2021-02-04 2021-06-18 上海哔哩哔哩科技有限公司 视频制作方法及装置
CN113099288A (zh) * 2021-03-31 2021-07-09 上海哔哩哔哩科技有限公司 视频制作方法及装置
CN113099287A (zh) * 2021-03-31 2021-07-09 上海哔哩哔哩科技有限公司 视频制作方法及装置
CN113209629B (zh) * 2021-05-14 2024-02-09 苏州仙峰网络科技股份有限公司 一种序列帧转gif的方法及装置
CN113627534A (zh) * 2021-08-11 2021-11-09 百度在线网络技术(北京)有限公司 识别动态图像的类型的方法、装置及电子设备
CN114928761B (zh) * 2022-05-07 2024-04-12 维沃移动通信有限公司 视频分享方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038705A (zh) * 2014-05-30 2014-09-10 无锡天脉聚源传媒科技有限公司 视频制作方法和装置
CN110347869A (zh) * 2019-06-05 2019-10-18 北京达佳互联信息技术有限公司 一种视频生成方法、装置、电子设备及存储介质
CN111612873A (zh) * 2020-05-29 2020-09-01 维沃移动通信有限公司 Gif图片生成方法、装置及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101893151B1 (ko) * 2011-08-21 2018-08-30 엘지전자 주식회사 영상 표시 장치, 단말 장치 및 그 동작 방법
CN109874051A (zh) * 2019-02-21 2019-06-11 百度在线网络技术(北京)有限公司 视频内容处理方法、装置及设备
CN110324663A (zh) * 2019-07-01 2019-10-11 北京奇艺世纪科技有限公司 一种动态图像的生成方法、装置、电子设备和存储介质
CN111145308A (zh) * 2019-12-06 2020-05-12 北京达佳互联信息技术有限公司 一种贴纸获取方法和装置
CN111093026B (zh) * 2019-12-30 2022-05-06 维沃移动通信(杭州)有限公司 视频处理方法、电子设备及计算机可读存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038705A (zh) * 2014-05-30 2014-09-10 无锡天脉聚源传媒科技有限公司 视频制作方法和装置
CN110347869A (zh) * 2019-06-05 2019-10-18 北京达佳互联信息技术有限公司 一种视频生成方法、装置、电子设备及存储介质
CN111612873A (zh) * 2020-05-29 2020-09-01 维沃移动通信有限公司 Gif图片生成方法、装置及电子设备

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114302009A (zh) * 2021-12-06 2022-04-08 维沃移动通信有限公司 视频处理方法、装置、电子设备及介质
CN114253451A (zh) * 2021-12-21 2022-03-29 咪咕音乐有限公司 截图方法、装置、电子设备及存储介质
CN114173203A (zh) * 2022-01-05 2022-03-11 统信软件技术有限公司 一种视频播放中截取图像的方法、装置与计算设备

Also Published As

Publication number Publication date
CN111612873B (zh) 2023-07-14
CN111612873A (zh) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2021238943A1 (zh) Gif图片生成方法、装置及电子设备
CN112954210B (zh) 拍照方法、装置、电子设备及介质
US20190258371A1 (en) Picture Processing Method and Apparatus, Electronic Device, and Graphical User Interface
US20220174237A1 (en) Video special effect generation method and terminal
CN112486385A (zh) 文件分享方法、装置、电子设备和可读存储介质
WO2021259185A1 (zh) 图像处理方法、装置、设备及可读存储介质
US20230345113A1 (en) Display control method and apparatus, electronic device, and medium
CN112672061B (zh) 视频拍摄方法、装置、电子设备及介质
CN112911147B (zh) 显示控制方法、显示控制装置及电子设备
US20230367464A1 (en) Multi-Application Interaction Method
CN112532882B (zh) 图像显示方法和装置
WO2023030306A1 (zh) 视频编辑方法、装置及电子设备
CN112954046A (zh) 信息发送方法、信息发送装置和电子设备
WO2022068721A1 (zh) 截屏方法、装置及电子设备
CN113763512A (zh) 截屏图像的处理方法、装置和电子设备
US20230368338A1 (en) Image display method and apparatus, and electronic device
CN113099033A (zh) 信息发送方法、信息发送装置和电子设备
CN112330728A (zh) 图像处理方法、装置、电子设备以及可读存储介质
WO2022228373A1 (zh) 图片管理方法、装置、电子设备和可读存储介质
WO2022228433A1 (zh) 信息处理方法、装置以及电子设备
WO2023226694A1 (zh) 录像方法、装置及存储介质
CN112492206B (zh) 图像处理方法、装置及电子设备
US20210377454A1 (en) Capturing method and device
CN116501225A (zh) 图像截取方法、装置及电子设备
US20230289919A1 (en) Video stream refinement for dynamic scenes

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21814349

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21814349

Country of ref document: EP

Kind code of ref document: A1