CN111093026B - Video processing method, electronic device and computer-readable storage medium - Google Patents

Video processing method, electronic device and computer-readable storage medium Download PDF

Info

Publication number
CN111093026B
CN111093026B CN201911400755.XA CN201911400755A CN111093026B CN 111093026 B CN111093026 B CN 111093026B CN 201911400755 A CN201911400755 A CN 201911400755A CN 111093026 B CN111093026 B CN 111093026B
Authority
CN
China
Prior art keywords
target
video
target object
interface
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911400755.XA
Other languages
Chinese (zh)
Other versions
CN111093026A (en
Inventor
杨其豪
李明津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN201911400755.XA priority Critical patent/CN111093026B/en
Publication of CN111093026A publication Critical patent/CN111093026A/en
Priority to PCT/CN2020/139897 priority patent/WO2021136134A1/en
Application granted granted Critical
Publication of CN111093026B publication Critical patent/CN111093026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Abstract

The invention provides a video processing method, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a first input of a user to a target object in a first interface; in response to the first input, locking display of a target region of the target object in a second interface; outputting a target file based on at least one target object image and N candidate images of the target object; in the method, when N is 1, one target image is output based on the target object image and N candidate images; and when N is larger than 1, outputting the target video based on the target object image and the N candidate images, wherein the target object is positioned in the target image or the target video. Therefore, the method easily achieves the purpose of shooting a plurality of moving target objects in one picture or one video, has simple operation, directly outputs the target file according to the input of the user, and does not need to have professional image repairing technology.

Description

Video processing method, electronic device and computer-readable storage medium
Technical Field
The present invention relates to the field of video processing, and in particular, to a video processing method, an electronic device, and a computer-readable storage medium.
Background
In the existing mobile phone photographing mode, when a plurality of moving objects are photographed, if the plurality of moving objects need to be photographed in one picture or one video, and each object is located at an ideal position in a picture, there are two implementation methods. One method is to actively make a plurality of moving objects appear in a shot picture or a video picture at the same time, and the method has high implementation difficulty and is not good for controlling the specific positions of the moving objects in the shot picture; another method is to combine multiple objects in a photo or in a video according to the required positions by subsequent cropping, which requires professional cropping techniques.
Disclosure of Invention
The invention provides a video processing method, electronic equipment and a computer readable storage medium, which can solve the problems that the conventional method for shooting a plurality of moving objects in a picture or a video has high difficulty and needs to have a professional image repairing technology.
In a first aspect, an embodiment of the present invention provides a video processing method, which is applied to an electronic device, and the method includes:
receiving a first input of a user to a target object in a first interface;
in response to the first input, locking display of a target region of the target object in a second interface;
outputting a target file based on at least one target object image and N candidate images of the target object;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer.
Optionally, the first interface includes a playing interface of a first video, and the first video includes only a target object;
the receiving a first input of a user to a target object in a first interface comprises:
receiving a first input of a user to a target video frame of the first video, the target video frame comprising at least one video frame.
Optionally, before the receiving the first input of the user to the target object in the first interface, the method further includes:
receiving a second input of the user to a target object in the M objects in the second video;
in response to the second input, playing a first video, the first video including only the target object;
the receiving a first input of a user to a target video frame of the first video comprises:
receiving a first input of a user to a target video frame of the first video in the process of playing the first video;
wherein M is a positive integer.
Optionally, before the receiving a second input of the user to a target object of the M objects in the second video, the method further includes:
playing the second video;
identifying M objects in the second video, and displaying P identifiers on a playing interface of the second video, wherein each identifier is used for marking one object in the M objects;
the receiving a second input of the user to a target object of the M objects in the second video includes:
receiving a second input of a user to a target identifier in the P identifiers, wherein the target identifier indicates a target object;
wherein P is more than or equal to M.
Optionally, the first interface comprises: a video playing interface or a shooting preview interface;
the second interface includes: and a video playing interface or a shooting preview interface.
Optionally, the locking the display of the target area of the target object in the second interface includes:
matting a target object image of a first area where the target object is located in the first interface, and displaying the scratched target object image in a target area in a second interface;
wherein the target region is a region of the second interface at the same location as the first region;
under the condition that the first interface is a playing interface of a first video, the target object image is an image of a first area which is extracted from a target video frame of the first video, and the first area is a display area of the target object in the target video frame;
and under the condition that the first interface is a shooting preview interface, the target object image is an image of a first area which is extracted from a frame of preview image displayed in the shooting preview interface, and the first area is a display area of the target object in the shooting preview interface.
Optionally, N is 1; outputting a target file based on at least one target object image and N candidate images of the target object, comprising:
under the condition that the second interface is a playing interface of a third video, synthesizing at least one target object image of the target object with a first image, and outputting the target image, wherein the first image is a video frame of the third video, and the N candidate images comprise the first image;
and under the condition that the second interface is a shooting preview interface, synthesizing at least one target object image of the target object with a second image, and outputting the target image, wherein the second image is a shot image, and the N candidate images comprise the second image.
Alternatively, N is greater than 1; outputting a target file based on at least one target object image and N candidate images of the target object, comprising:
synthesizing the ith target object image in the N target object images of the target object with the ith alternative image in the N alternative images to obtain N synthesized images;
carrying out video coding on the N combined images and outputting a target video;
under the condition that the second interface is a playing interface of a third video, the N candidate images are N video frames in the third video; under the condition that the second interface is a shooting preview interface, the N alternative images are N video frames in the recorded video; i is a positive integer, and i is not more than N.
Optionally, the number of the target objects is greater than 1; the receiving a first input of a user to a target video frame of the first video comprises:
receiving a first input of a user to a first area in the first interface;
before the locking the display of the target object in the target area in the second interface, the method further comprises:
acquiring a target object associated with the first area;
updating the video frame displayed by the first interface to be a target video frame, wherein the target video frame is determined based on the first input.
Optionally, the number of the target objects is greater than 1; the locking the display of the target area of the target object in the second interface comprises:
in the process of playing the jth video, locking the display of j-1 target objects in j-1 target areas in the playing interface of the jth video;
wherein j is an integer greater than 1, and j is less than or equal to the total number of target objects.
Optionally, before the receiving the first input of the user to the target object in the first interface, the method further includes:
receiving a third input of the user;
in response to the third input, recording a first video.
Optionally, during recording the first video, the method further includes:
receiving a fourth input of the user to at least one object in the recorded picture of the first video;
in response to the fourth input, focusing an area in which the at least one object is located.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes:
the first input receiving module is used for receiving first input of a user on a target object in the first interface;
a locking module for locking display of a target region of the target object in a second interface in response to the first input;
the output module is used for outputting a target file based on at least one target object image and N candidate images of the target object;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer.
Optionally, the first interface includes a playing interface of a first video, and the first input receiving module includes:
a first input receiving submodule for receiving a first input of a user to a target video frame of the first video, the target video frame comprising at least one video frame.
Optionally, before the first input receiving sub-module receives a first input of a user to a target video frame of the first video, the electronic device further includes:
the second input receiving module is used for receiving second input of a user to a target object in the M objects in the second video;
a first video playing module, configured to play a first video in response to the second input, where the first video only includes the target object;
the first input receiving submodule comprising:
the first input receiving unit is used for receiving a first input of a user to a target video frame of the first video in the process of playing the first video;
wherein M is a positive integer.
Optionally, before the second input receiving module receives a second input of the user to the target object of the M objects in the second video, the electronic device further includes:
the second video playing module is used for playing a second video;
the identification module is used for identifying M objects in the second video and displaying P identifiers on a playing interface of the second video, wherein each identifier is used for marking one object in the M objects;
the second input receiving module comprises:
a second input receiving submodule, configured to receive a second input of a user to a target identifier in the P identifiers, where the target identifier indicates a target object;
wherein P is more than or equal to M.
Optionally, the locking module includes:
the matting submodule is used for matting the target object image of a first area where the target object is located in the first interface, and the matting target object image is displayed in a target area in a second interface;
wherein the target region is a region of the second interface at the same location as the first region;
under the condition that the first interface is a playing interface of a first video, the target object image is an image of a first area which is extracted from a target video frame of the first video, and the first area is a display area of the target object in the target video frame;
and under the condition that the first interface is a shooting preview interface, the target object image is an image of a first area which is scratched from a frame of preview image displayed in the shooting preview interface, and the first area is a display area of the target object in the shooting preview interface.
Alternatively, N is 1; the output module includes:
a first output sub-module, configured to, when the second interface is a playing interface of a third video, combine at least one target object image of the target object with a first image, and output a target image, where the first image is a video frame of the third video, and the N candidate images include the first image;
and the second output sub-module is configured to, when the second interface is a shooting preview interface, synthesize at least one target object image of the target object with a second image, and output the target image, where the second image is a shot image, and the N candidate images include the second image.
Alternatively, N is greater than 1; the output module includes:
the synthesis submodule is used for synthesizing the ith target object image in the N target object images of the target object with the ith candidate image in the N candidate images to obtain N synthesized images;
and the third output sub-module is used for carrying out video coding on the N combined images and outputting a target video.
Under the condition that the second interface is a playing interface of a third video, the N candidate images are N video frames in the third video; under the condition that the second interface is a shooting preview interface, the N alternative images are N video frames in the recorded video; i is a positive integer, and i is not more than N.
Optionally, the number of the target objects is greater than 1; the first input receiving submodule comprising:
the receiving unit is used for receiving a first input of a user to a first area in the first interface;
before the locking module locks the display of the target area of the target object in the second interface, the electronic device further includes:
the target object acquisition module is used for acquiring a target object associated with the first area;
and the updating module is used for updating the video frame displayed by the first interface into a target video frame, and the target video frame is determined based on the first input.
Optionally, the number of the target objects is greater than 1; the locking module includes:
the locking submodule is used for locking the display of j-1 target objects in j-1 target areas in the playing interface of the j video in the process of playing the j video;
wherein j is an integer greater than 1, and j is less than or equal to the total number of target objects.
Optionally, before the first input receiving module receives a first input of a target object in a first interface from a user, the electronic device further includes:
the third input receiving module is used for receiving a third input of the user;
a first video recording module for recording a first video in response to the third input.
Optionally, in the process of recording the first video, the electronic device further includes:
the fourth input receiving module is used for receiving fourth input of a user to at least one object in the recording picture of the first video;
and the focusing module is used for responding to the fourth input and focusing the area where the at least one object is located.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the video processing method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the video processing method according to the first aspect.
In summary, in the embodiment of the present invention, a first input of a user to a target object in a first interface is received; in response to the first input, locking display of a target region of the target object in a second interface; outputting a target file based on at least one target object image and N candidate images of the target object; the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer. In the method, when N is 1, one target image is output based on the target object image and N candidate images; and when N is larger than 1, outputting the target video based on the target object image and the N candidate images, wherein the target object is positioned in the target image or the target video. Therefore, the method easily achieves the purpose of shooting a plurality of moving target objects in one picture or one video, has simple operation, directly outputs the target file according to the input of the user, and does not need to have professional image repairing technology.
Drawings
Fig. 1 shows one of the flow charts of the video processing method provided in the embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating the locking of a target object to a target area in a second interface provided in an embodiment of the present invention;
FIG. 3 is a second flowchart of a video processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating playing a first video including only a target object according to an embodiment of the present invention;
FIG. 5 illustrates a schematic diagram of selecting multiple target objects at once, as provided in an embodiment of the invention;
FIG. 6 is a diagram illustrating an embodiment of the invention in which a first input to a target video frame is received from a user;
FIG. 7 is a diagram illustrating an eighth I/O destination according to an embodiment of the present invention;
fig. 8 shows a third flowchart of a video processing method provided in an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating a first target object displayed in a second video according to an embodiment of the present invention;
fig. 10 is a schematic diagram illustrating capturing of a new video provided in an embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating the deletion of a target object from a second interface according to an embodiment of the present invention;
FIG. 12 is a schematic diagram illustrating a undo operation provided in an embodiment of the present invention;
FIG. 13 is a fourth flowchart of a video processing method provided in an embodiment of the present invention;
fig. 14 is a block diagram showing the configuration of an electronic apparatus provided in the embodiment of the present invention;
fig. 15 is a schematic diagram of a hardware structure of an electronic device in which embodiments of the present invention are implemented.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, there is shown one of the flow charts of the video processing method provided in the embodiment of the present invention. The method is applied to an electronic device, and the electronic device described in the embodiment of the present invention may include electronic devices such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The video processing method specifically comprises the following steps:
step 101, receiving a first input of a user to a target object in a first interface.
In the embodiment of the invention, in the first interface, the target objects are included, and the target objects can be one or more. The target object may be in a moving state or a stationary state, and the user makes a first input to the target object while considering the position of the target object in the first interface as an ideal position. The first input may be a click operation, a touch operation, or the like on the target object.
For example, if the first interface is a video playing interface, the target object is an animal running, and during the running of the animal, if the user considers that the current position of the animal in the first interface is an ideal position, the first input is performed on the animal. In the case where the target object is a plurality of running animals, the user may make a first input for each animal, respectively.
And 102, responding to the first input, and locking the display of the target area of the target object in the second interface.
In the embodiment of the invention, the display position of the second interface and the display position of the first interface on the electronic equipment are different. If the electronic equipment is a double-sided screen comprising a first screen and a second screen, a first interface can be displayed on the first screen, and a second interface is displayed on the second screen; if the electronic device is a single screen, the first interface and the second interface can be respectively displayed in different areas of the screen.
And in response to the first input, locking the display of the target area of the target object in the second interface, namely, scratching the target object out of the first interface, and locking the target object in the target area in the second interface according to the first area of the first interface where the target object is located in the first input, so that the target object is statically displayed in the target area in the second interface. The coordinate position of the target area in the second interface is the same as the coordinate position of the first area in the first interface. For example, if the first interface and the second interface are the same in size, the coordinate position of the target object in the first interface is L1(X, Y), the coordinate position of the target object in the second interface is also L1(X, Y); if the size of the second interface is the first oneThe size of the interface is 2 times, the coordinate position of the target object in the second interface is L2(2X,2Y)。
For example, a user may make a first input to the animal regarding the animal's current location in the first interface as the desired location, at which point, in response to the first input, the electronic device records the animal's coordinate location in the first interface and locks the animal in the second interface at the coordinate location. Thus, the user can cause the animal to be displayed stationary in the second interface, maintaining the position of the animal at the desired position.
Referring to fig. 2, a schematic diagram of locking a target object in a target area in a second interface provided in an embodiment of the present invention is shown. On the left side of fig. 2, the user makes a first input with respect to the target object shown at S1, and in response to the first input, the electronic device peels the target object out of the first interface and locks the target object in the same position in the second interface according to the position of the target object in the first interface (see the right side of fig. 2).
103, outputting a target file based on at least one target object image and N candidate images of the target object; the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer.
In the embodiment of the present invention, if N is 1, a target image may be obtained based on a target object image and a candidate image, where the target image includes a target object and content in the candidate image. For example, the target object image and the candidate image may be synthesized to obtain the target image. If the number of the target object images is multiple and N is greater than 1, a target video can be obtained based on the target object images and the N candidate images, and the target video comprises the target object images and the contents of the N candidate images. For example, the target video may be obtained by synthesizing the ith target image of the target object images and the ith candidate image of the N candidate images one by one, where the ith target image is any one of the target object images or the N candidate images, to obtain N synthesized images, and then performing video encoding on the synthesized images.
Optionally, the target object image comprises an image of the target object scratched from a target video frame of a first video displayed by the first interface, or an image of the target object scratched from a frame preview image displayed in a shooting preview interface displayed by the first interface; the N candidate images comprise at least one video frame of a third video displayed on the second interface, or the obtained images are shot.
In the embodiment of the invention, the first interface comprises a playing interface and a shooting preview interface of the first video. Under the condition that the first interface is a playing interface of the first video, selecting one frame or a plurality of frames from the first video to obtain a target video frame, and extracting an image only comprising the target object from the target video frame to obtain a target object image; and under the condition that the first interface is a shooting preview interface, selecting a frame of preview image, and matting the image of the target object from the frame of preview image to obtain the image of the target object. Specifically, the scratched target object image does not include the original background image in the first interface. For example, the animal in the example of step 102 is scratched off the first interface to obtain an image of the target object that includes only the animal.
Similarly, the second interface includes a play interface and a capture preview interface for the third video. And in the case that the second interface is a playing interface of the third video, the N candidate images are at least one video frame selected from the third video. And if the second interface is a shooting preview interface, the N candidate images are images shot based on the shooting preview interface.
Specifically, taking the target object as an animal as an example, if N is 1, and if there are a plurality of example animals and there are a plurality of obtained target object images that are the same, combining the plurality of target object images and the candidate image to obtain a target image including the plurality of animals and the content in the candidate image; in the case where N > 1, if there are a plurality of example animals and there are a plurality of target object images that are the same, a plurality of target object images and a plurality of candidate images are combined one by one to obtain a plurality of target images including the contents of the animals and the candidate images. And further carrying out video coding on the plurality of target images to obtain a target video containing the plurality of animals and the content in the alternative image. Thus, a plurality of animals are taken in a photograph or a video. In summary, in the video display method provided in the embodiment of the present invention, a first input of a user to a target object in a first interface is received; in response to the first input, locking display of a target region of the target object in a second interface; outputting a target file based on at least one target object image and N candidate images of the target object; the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer. In the method, when N is 1, one target image is output based on the target object image and N candidate images; and when N is larger than 1, outputting the target video based on the target object image and the N candidate images, wherein the target object is positioned in the target image or the target video. Therefore, the method easily achieves the purpose of shooting a plurality of moving target objects in one picture or one video, has simple operation, directly outputs the target file according to the input of the user, and does not need to have professional image repairing technology.
Referring to fig. 3, a second flowchart of a video processing method provided in the embodiment of the present invention is shown, where the method is applied to an electronic device. In the case that the number of the target objects is at least one, the video processing method may specifically include the following steps.
Step 201, playing the second video.
In the embodiment of the present invention, the second video may be a piece of video temporarily captured by a user using a camera of the electronic device, or may be a piece of video stored in the electronic device. The second video may include a plurality of moving objects, for example, the second video may include a group of running animals such as cats and dogs, or may include a plurality of running and playing children. Based on the second video, which is to be a photograph or a video of all moving animals or children and each of them is located at a desired position in the picture, the second video may be played first.
Step 202, identifying M objects in the second video, and displaying P identifiers on a playing interface of the second video, where each identifier is used to mark one object in the M objects; wherein M, P is a positive integer, and P is less than or equal to M.
M objects are identified from the second video. For example, all moving objects and still objects in the second video are identified. After the objects are identified, P objects in the M objects, which are all moving objects and correspondingly display P identifiers, may be marked in the second video in a manner of circle selection, hook selection, frame selection, and the like. The user can also remove the identification of the object which does not need to be processed according to the requirement. For example, the user may remove the identity of an object by long-pressing the object on the screen with a finger, and presenting an option to remove the identity of the object.
Step 203, receiving a second input of the user to a target object in the M objects in the second video.
After marking the objects in the second video, the user can select the target object to be processed and perform a second input on the target object. The second input may be an input to the target object, or an identification of the target object, or a click, a touch, or the like to the target area where the target object is located, and the second input may also be a second operation.
Optionally, the receiving a second input of the target object from the M objects in the second video by the user includes: and receiving second input of a user to a target identifier in the P identifiers, wherein the target identifier indicates a target object.
In the embodiment of the invention, when the user wants to select the target object, the user can directly select the target identifier corresponding to the target object. I.e. a second input is made to the target identification. It is more convenient to perform the second input operation on the target identifier.
Step 204, responding to the second input, playing a first video, wherein the first video only comprises the target object.
After the user performs the second input on the target object, the playing interface of the second video plays the first video with other objects removed and only including the object. For each object, a second input may be performed, and the first video including only the object may be viewed separately.
Referring to fig. 4, a schematic diagram of playing a first video including only a target object in the embodiment of the present invention is shown. On the left side of fig. 4, in the second video being played on the interface of the electronic device, a plurality of identified objects, such as cats, dogs, people, etc., are marked and displayed by way of selection. The user' S finger points at the circle and selects the target object shown at S1. Thereafter, referring to the right side of fig. 4, a first video including only S1 is played on the electronic device interface, and each scene of the movement process of the target object in the second video is displayed. Wherein P1 and P2 show stationary objects in the video segment.
Optionally, the second input is a sliding operation, a sliding track corresponding to the sliding operation includes at least two target objects, and the playing a first video in response to the second input, where the first video includes only the target objects, includes:
in response to a sliding operation for the at least two target objects, playing a first video, the first video including only the at least two target objects.
In the embodiment of the invention, in order to accelerate the processing speed, a plurality of target objects can be selected at one time for processing. At this time, the second input is a sliding operation, that is, the user draws a track on the screen, where the track corresponds to at least two target objects, and then, in response to the second input for the at least two objects, the first video including the at least two objects is played.
Referring to fig. 5, a schematic diagram of selecting a plurality of target objects at one time in the embodiment of the present invention is shown. On the left side of FIG. 5, the user' S finger makes a trace over the three target objects shown in S1, S2, S3, and then selects the three target objects at the same time. Thereafter, as shown in the right side of fig. 5, a video clip simultaneously including the three target objects is played. Also, the play progress bars of the video clip a1 including only S1, the video clip a2 including only S2, and the video clip A3 including only S3 are simultaneously displayed below the screen, and when the user clicks an arbitrary play progress bar, the video clip including only a certain single target object can be played.
Step 205, receiving a first input of a user to a target video frame of the first video, where the target video frame includes at least one video frame.
In the embodiment of the present invention, the first interface includes a playing interface of the first video, and if it is determined that the coordinate position of the target object in the target video frame of the first video is the ideal position according to the motion trajectory of the target object, the user performs the first input for the target video frame to lock the position of the target object. Wherein the target video frame comprises at least one video frame, and the user can make a first input for the at least one video frame to lock multiple positions of the target object.
Optionally, the receiving a first input of a user to a target video frame of the first video includes:
receiving a first input of a user to a target video frame of the first video in the process of playing the first video.
In the embodiment of the invention, the user can select the target video frame and perform the first input in the process of watching the first video.
Optionally, the first input is a touch operation of drawing a hook for a finger of the target object in a target video frame. For example, if the user performs a hook touch operation on a target object in the target video frame, the position of the target object is determined.
Referring to fig. 6, a schematic diagram of receiving a first input of a target video frame from a user in the embodiment of the present invention is shown.
On the left side of fig. 6, when the user draws a hook on the top of S1 with respect to the target video frame while viewing the first video of the target object shown in S1, it is determined that S1 is located at the target position in the target video frame. Thereafter, as shown on the right side of fig. 6, in the circle of the object shown in S1 in the first video, the tick of the selected position has been displayed.
For other target objects in the second video, the operations of playing the first video and performing the first input on the target video frames may be sequentially performed.
Optionally, the first interface comprises: a video playing interface or a shooting preview interface; the second interface includes: and a video playing interface or a shooting preview interface.
In the embodiment of the invention, if the first interface and the second interface are both video playing interfaces, the application scene of the scheme is to execute the operation of the scheme in the process of playing the recorded video; if the first interface and the second interface are both shooting preview interfaces, the user directly executes the operation of the scheme on the shooting preview interfaces during the video recording process.
Under the condition that the first interface and the second interface are both shooting preview interfaces, a user can adjust a shooting picture of the camera according to the real-time motion position of the target object and perform first input so as to lock the display of the target object in a target area in the second interface, so that the flexibility is higher, and the obtained materials are more ideal; under the condition that the first interface and the second interface are both video playing interfaces, a user operates in the process of playing videos, confusion caused by operations such as shooting videos and carrying out first input under the first condition can be avoided, and the operation is easier and easier.
Step 206, in response to the first input, a target object image of a first area where the target object is located in the first interface is scratched, and the scratched target object image is displayed in a target area in a second interface.
In the embodiment of the invention, after receiving the first input, the electronic device records the position of the target object in the first interface as the first area, extracts the target object image of the target object in the first area from the first interface, and displays the extracted target object image in the target area in the second interface.
The target object image is an image including only the target object and not including the background in the first interface. Wherein the target areaIs the same location in the second interface as the first region. The same position means that the coordinate position of the target area in the second interface is the same as the coordinate position of the first area in the first interface. For example, if the first interface and the second interface are the same in size, the coordinate position of the target object in the first interface is L1(X, Y), the coordinate position of the target object in the second interface is also L1(X, Y); if the size of the second interface is 2 times of the size of the first interface, the coordinate position of the target object in the second interface is L2(2X,2Y)。
Specifically, when the first interface is a playing interface of a first video, the target object image is an image of a first region extracted from a target video frame of the first video, and the first region is a display region of the target object in the target video frame. And under the condition that the first interface is a shooting preview interface, the target object image is an image of a first area which is extracted from a frame of preview image displayed in the shooting preview interface, and the first area is a display area of the target object in the shooting preview interface.
In the embodiment of the invention, the first interface comprises a playing interface and a shooting preview interface of the first video. And selecting one or more frames from the first video to obtain the target video frame under the condition that the first interface is the playing interface of the first video. The display area of the target object in the target video frame is a first area, and the image of the first area is extracted from the target video frame to obtain the image of the target object. For example, the user makes a first input on the playing interface of the first video, so that the video frame on which the first video is playing is selected as the target video frame when the first input is made, and thus the object included in the target video frame is determined as the target object. The electronic equipment removes the first area where the target object is located from the first interface to obtain a target object image.
In the case where the first interface is a photographing preview interface, one frame of preview image is selected. The display area of the target object in the shooting preview interface is a first area, and the image of the first area is extracted from the frame preview image to obtain a target object image. For example, the user makes a first input on the photographing preview interface, thereby selecting a video frame being recorded at the time of making the first input as a target video frame, and thereby an object included in the target video frame is determined as a target object. The electronic equipment removes the first area where the target object is located from the first interface to obtain a target object image.
It should be noted that the first area only includes an area where the target object is located, and does not include a background area around the target object.
After step 206, in the case where N is 1, step 207 or step 208 is performed; in the case that N is greater than 1, steps 209-210 are performed.
Step 207, N is 1; and under the condition that the second interface is a playing interface of a third video, synthesizing at least one target object image of the target object with a first image, and outputting the target image, wherein the first image is a video frame of the third video, and the N candidate images comprise the first image.
In the embodiment of the present invention, the second interface is a video playing interface, the third video is played, in a case that N is 1, one video frame is taken from the third video as the first image, and the electronic device synthesizes at least one target object image and the first image, and outputs the target image. Thus, at least one target object is included in the target image.
Optionally, before outputting the target file based on at least one target object image of the target object and the N candidate images, the method further includes:
receiving an eighth input of the user;
outputting a target file based on at least one target object image and N candidate images of the target object, comprising:
and responding to the eighth input, and outputting a target file based on at least one target object image of the target object and the N candidate images.
In the embodiment of the present invention, after the user determines at least one target object image based on the first input, if the user considers that the position of the target object is locked completely, an eighth input may be performed on the electronic device, so that the electronic device outputs the target file.
Specifically, the eighth input may be an input in which two fingers of the user are pulled down below the screen.
Referring to fig. 7, a schematic diagram of an eighth input/output target file according to an embodiment of the present invention is shown. On the left side of fig. 7, the user makes an eighth input, that is, two fingers of the user make a pull-down motion below the screen, and the electronic device receives the output instruction, and synthesizes one candidate image generated based on the second interface with the target object image, so as to obtain the target image shown on the right side of fig. 7. It can be seen that the embodiment of the present invention enables each target object on the target image to be at a selected position, and enables the target image to include all the target objects.
Step 208, N is 1; and under the condition that the second interface is a shooting preview interface, synthesizing at least one target object image of the target object with a second image, and outputting the target image, wherein the second image is a shot image, and the N candidate images comprise the second image.
In the embodiment of the present invention, the second interface is a shooting preview interface, in a case that N is 1, one second image is shot in the second interface, and the electronic device synthesizes at least one target object image and the second image, and outputs the target image. Thus, at least one target object is included in the target image.
Step 209, N is greater than 1; and respectively synthesizing the ith target object image in the N target object images of the target object with the ith candidate image in the N candidate images to obtain N synthesized images.
In the embodiment of the present invention, the ith target object image is any one of the N target object images. N target object images are determined through multiple times of first input of a user, and the ith target object image is taken from the N target object images and synthesized with the ith candidate image in the N candidate images. And (5) taking the value of i from 1 to N, and circularly performing the operation, so that N composite images can be obtained.
Under the condition that the second interface is a playing interface of a third video, the N candidate images are N video frames in the third video; under the condition that the second interface is a shooting preview interface, the N alternative images are N video frames in the recorded video; i is a positive integer, and i is not more than N.
For example, if N is 30, there are 30 target object images and 30 candidate images. Randomly selecting a target object image from 30 target object images as a first target object image, randomly selecting a target object image from 30 alternative images as a first alternative image, and synthesizing the first target object image and the first alternative image to obtain a first synthesized image; and randomly selecting a second target object image from the rest target object images, selecting a second alternative image from the rest alternative images, and synthesizing the second target object image and the second alternative image to obtain a second synthesized image. And by analogy, the rest target object images and the rest alternative images are synthesized one by one to obtain 30 synthesized images.
And step 210, performing video coding on the N combined images, and outputting a target video.
And after the N combined images are obtained, respectively coding the N images according to the appearance sequence of the N images. For example, the first composite image is coded as 1, the second composite image is coded as 2, and the N composite images are arranged according to the coding sequence until the Nth image is coded as N, so that the target video can be obtained.
In summary, the video display method provided in the embodiment of the present invention, besides having the beneficial effects of the video display method in fig. 1, also identifies M objects in the second video, and displays P identifiers on the playing interface of the second video, which is convenient for a user to perform a second input on the P identifiers to select a target object; moreover, the target object image of the first area where the target object is located in the first interface is also extracted, the extracted target object image is displayed in the target area in the second interface, and the position of the target object in the target file can be selected by a user because the target area is the area at the same position as the first area, so that the controllability of the user on the position of the target object is increased; further, the first interface includes: the video playing interface or the shooting preview interface, the second interface includes: and a video playing interface or a shooting preview interface, so that the user can execute the operation of the scheme after the second video recording is finished and also can execute the operation of the scheme in the shooting preview interface. Under the condition that the first interface and the second interface are both shooting preview interfaces, a user can adjust a shooting picture of the camera according to the real-time motion position of the target object and perform first input so as to lock the display of the target object in a target area in the second interface, so that the flexibility is higher, and the obtained materials are more ideal; under the condition that the first interface and the second interface are both video playing interfaces, a user operates in the process of playing videos, confusion caused by operations such as shooting videos and carrying out first input under the first condition can be avoided, and the operation is easier and easier.
Referring to fig. 8, a third flowchart of a video processing method provided in the embodiment of the present invention is shown, and the method is applied to an electronic device. In a case that the first interface includes a playing interface of the first video and the number of the target objects is greater than 1, the video processing method may specifically include the following steps.
Step 301, receiving a first input of a user to a first area in the first interface.
In the embodiment of the present invention, the first interface is a playing interface of the first video, and in the process of playing the first video, an adjustment operation of a user on a playing progress can be received in the first area of the first interface. If the number of the target objects is greater than 1, the first interface may include a plurality of first areas, and each first area corresponds to one target object. The first area can display a playing progress bar of the first video corresponding to each target object, the first input is pulling operation aiming at the playing progress bar, and the user can adjust the playing progress through the first input. The first area may not display the playing progress bar, and the user may still adjust the playing progress by making the first input in the first area. For example, the user may perform a forward or backward dial operation on the screen where the first area is located, so as to adjust the playing progress of the first video.
Step 302, in response to the first input, acquiring a target object associated with the first area.
After the first area receives the first input, the electronic equipment determines which target object is associated with the first input according to the position of the first area.
Step 303, updating the video frame displayed on the first interface to a target video frame, where the target video frame is determined based on the first input.
The electronic equipment determines a target video frame corresponding to the first input, and updates the video frame displayed on the first interface to the target video frame, so that a user can adjust the playing progress of the first video. Different target video frames are displayed according to different playing progresses, and positions of moving objects in different target video frames can be different. Thus, different positions of the target object can be viewed through the first input, so that the target position of the target object can be quickly selected.
Referring to fig. 4, a first area shown in a4 displays a play progress bar, and a user may make a first input to pull the play progress bar to view a different target video frame.
Referring to fig. 5, a region a1 shows a playing progress bar for a first animal, a region a2 shows a playing progress bar for a second animal, and a region A3 shows a playing progress bar for a third animal. The user can make a first input for the areas shown in a1, a2 and A3 respectively to view the target video frames corresponding to different animals respectively.
Step 304, in the process of playing the jth video, locking the display of j-1 target objects in j-1 target areas in the playing interface of the jth video; wherein j is an integer greater than 1, and j is less than or equal to the total number of target objects.
In the embodiment of the present invention, if the first input is performed with respect to the first target object in the first video, the first video including the first target object is played. The first object can be extracted in a matte manner and locked in a second video comprising a second object according to its first object position in the first interface. Thus, during the playing of the second video, the user can select the appropriate position of the second target object based on the first target position of the first target object. For example, the user may select the second target position of the second target object to the left or right of the first target position as needed, so as to avoid that the second target object and the first target object overlap on the output target file when the second target position is selected at the first target position without reference.
Similarly, during playing the third video, the first target object and the second target object may be displayed in the third video including the third target object according to the selected positions, so as to facilitate the user to select the target position of the third target object.
By analogy, in the process of playing the jth video, the display of j-1 target objects in the j-1 target area in the playing interface of the jth video is locked, so that the user can conveniently select the target position of the jth target object. Wherein j is an integer greater than 1, and j is less than or equal to the total number of target objects. If the total number of target objects is N, j may take any one of integers from 1 to N.
Referring to fig. 9, a schematic diagram of displaying a first target object in a second video in the embodiment of the present invention is shown. On the left side of FIG. 9, the first target object shown at S1 on the screen has been displayed as a check, indicating that the first target object shown at S1 has been located. Thereafter, if the user makes a first input to the second target object shown in S3, in response to the first input, a second video including only the second target object S3 is played on the screen as shown in the right side of fig. 9, and the first target object shown in S1 is displayed in the second video in a first target position-locked manner on the play interface. Thus, the user can select the position of S3 with the position of S1 as a reference.
By locking the display of j-1 target objects in the j-1 target area in the playing interface of the j video in the process of playing the j video, reference can be provided for a user to select the target position of the j target object, so that the selected positions of different target objects are prevented from being overlapped, and the user is facilitated to arrange different target objects at more proper positions.
Optionally, if a fifth input is received, shooting a new video, and taking the new video as a new second video, so as to enter a step of receiving a first input of the user on the target object in the first interface.
In the embodiment of the invention, if the user does not select the most appropriate position for the target object in the second video, the material can be supplemented in a mode of additionally recording the video. Specifically, if the user performs a fifth input on the first interface, the electronic device starts recording a new video in response to the fifth input. After the recording is finished, the newly recorded video is used as a new second video for the user to select the target object from, and the appropriate position of the target object is selected from the video clip.
Optionally, the fifth input is a sliding input that is clicked below the screen and pulled out by two fingers.
The fifth input is an instruction to take a new video. And if the action of pulling the two fingers outwards by the user is kept unchanged, the electronic equipment continuously records the video, and the recording is stopped until the two fingers of the user are retracted.
Referring to fig. 10, a schematic diagram of capturing a new video in an embodiment of the present invention is shown. On the left side of fig. 10, if the user feels that the current material is insufficient, the user clicks below the screen and pulls both fingers outward, and the electronic device starts to additionally record a new video. When the user thinks that the recorded content is enough, the two fingers are retracted, and the electronic equipment stops recording the video. At this time, the newly recorded video is used as a new video to be processed for the user to select.
By adopting a mode of additionally recording a new video, the method can enrich the materials of the video to be processed, so that more objects and positions of the objects can be selected by a user, and the user can conveniently make a satisfactory photo.
Optionally, if a sixth input for a target object locked on the second interface is received, the target object is deleted from the second interface in response to the sixth input.
In the embodiment of the present invention, when the user is not satisfied with the selected position of a certain target object or the user considers that the target object is not required to be embodied in the target image or the target video, the sixth input may be performed on the target object on the second interface. The sixth input may be a touch input to a finger of the object to delete the target object from the second interface, so that the user may reselect the position of the target object from the second video, or, without reselecting, the output target image or target video does not have the target object.
Referring to fig. 11, a schematic diagram of deleting a target object from a second interface in the embodiment of the present invention is shown. On the left side of fig. 11, the user performs a sixth input, i.e., performs a finger-forking touch operation, on the target object shown in S1, and thereafter, in the photographing interface shown on the right side of fig. 11, the target object shown in S1 is deleted from the second interface.
Optionally, if a seventh input for the first interface or the second interface is received, the last operation is cancelled in response to the seventh input.
In the embodiment of the present invention, if the user considers that the operation executed last time is not appropriate, a seventh input may be executed on the first interface or the second interface, where the seventh input may be an input that draws a circle on the interface, and the operation executed last time may be cancelled.
Referring to fig. 12, a schematic diagram of a revocation operation in an embodiment of the present invention is shown. On the left side of fig. 12, the user performs a fifth input on the second interface, i.e., performs a circle-drawing operation, and thereafter, as shown on the right side of fig. 12, S1 returns to the second interface again. Namely, the deletion operation in fig. 11 is cancelled, and the second interface is restored to the state before the deletion operation.
The operation process of the user is simpler and more convenient by providing the operation functions of deletion and revocation.
Step 305, outputting a target file based on at least one target object image of the target object and the N candidate images.
In the embodiment of the present invention, step 305 may refer to step 103, which is not described herein again.
In summary, the video display method provided in the embodiment of the present invention has the beneficial effects of the video display method in fig. 1, and also receives a first input of a user to a first area in the first interface; acquiring a target object associated with the first area; updating the video frame displayed by the first interface to be a target video frame, wherein the target video frame is determined based on the first input. The first input is carried out in the first area, and the target video frame of the target object associated with the first area can be displayed on the screen, so that a user can select the ideal position of the target object according to the target video frame without watching the complete video of the target object, and the efficiency of selecting the position is improved; in addition, in the process of playing the jth video, the display of j-1 target objects in j-1 target areas in the playing interface of the jth video is locked, so that reference can be provided for the user to select the target position of the jth target object, the selected positions of different target objects are prevented from being overlapped, and the user can conveniently arrange different target objects at more proper positions.
Referring to fig. 13, there is shown a fourth flowchart of a video processing method provided in the embodiment of the present invention, the method being applied to an electronic device. The video processing method may specifically include the following steps.
Step 401, a third input of the user is received.
In the embodiment of the present invention, the electronic device receives a third input from the user, where the third input is an operation of starting video recording by the user. For example, the third input is an operation of the user touching a video recording button on the screen.
Step 402, in response to the third input, recording a first video.
The electronic device starts recording the first video in response to a third input by the user.
Step 403, receiving a fourth input of the user to the at least one object in the recording picture of the first video.
In the photographing preview screen of the first video, at least one object, which may be an object, an animal, and a human, is displayed. The fourth input is a click, touch or slide input of the user for the at least one object, and the fourth input may also be a fourth operation.
Step 404, responding to the fourth input, and focusing the area where the at least one object is located.
In response to the fourth input, the electronic device generates a marker around at least one object for which the fourth input is directed, and the areas in which the objects are located are respectively focused by the electronic device using a multi-point focusing technique. The multi-point focusing technology is that a camera is directed at a shot scene, and a focusing point in the camera focuses on a plurality of objects in the shot scene, so that the objects are relatively clear in a picture. Therefore, focusing the area where the at least one object is located can make the image of the at least one object clearer, and a user can conveniently view the motion tracks of the objects.
In step 405, a first input of a target object in a first interface by a user is received.
In the embodiment of the present invention, step 405 may refer to step 101, which is not described herein again.
Step 406, in response to the first input, locking display of the target area of the target object in the second interface.
In the embodiment of the present invention, step 406 may refer to step 102, which is not described herein again.
Step 407, outputting a target file based on at least one target object image of the target object and the N candidate images.
In the embodiment of the present invention, step 407 may refer to step 103, which is not described herein again.
In summary, the embodiment of the present invention has the beneficial effects of the video display method in fig. 1, and also receives a fourth input of the user to at least one object in the recorded picture of the first video; in response to the fourth input, focusing an area in which the at least one object is located. This makes the image of the objects more clear, so that the user can conveniently watch the motion trail of the objects.
Referring to fig. 14, which is a block diagram of an electronic device according to an embodiment of the present invention, the electronic device 500 may specifically include:
a first input receiving module 501, configured to receive a first input of a target object in a first interface from a user;
a locking module 502 for locking display of a target region of the target object in a second interface in response to the first input;
an output module 503, configured to output a target file based on at least one target object image of the target object and the N candidate images;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer.
The electronic device provided by the embodiment of the present invention can implement each process implemented in the method embodiment of fig. 1, and is not described here again to avoid repetition.
In this way, the electronic device provided by the embodiment of the present invention receives a first input of a user to a target object in a first interface; in response to the first input, locking display of a target region of the target object in a second interface; outputting a target file based on at least one target object image and N candidate images of the target object; the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer. In the method, when N is 1, one target image is output based on the target object image and N candidate images; and when N is larger than 1, outputting the target video based on the target object image and the N candidate images, wherein the target object is positioned in the target image or the target video. Therefore, the method easily achieves the purpose of shooting a plurality of moving target objects in one picture or one video, has simple operation, directly outputs the target file according to the input of the user, and does not need to have professional image repairing technology.
To sum up, in the case that the first interface is a shooting preview interface, the basic processing flow of the video processing method in the embodiment of the present invention is as follows:
and the electronic equipment receives a third input of the user and records the first video. The recording interface of the first video is a first interface, namely the first interface is a shooting preview interface, and a plurality of moving animals such as cats and dogs are displayed in the shooting preview interface. And the user carries out fourth input on at least one animal in the recorded picture of the first video, and in response to the fourth input, the electronic equipment focuses the area where the at least one animal is located, so that the animal is displayed more clearly. When the user considers that an animal, such as a cat, is currently in the first interface as the ideal position, a first input is made to the cat. In response to the first input, the electronic device locks the display of the target area in the second interface for the cat, namely: and scratching an image of a first area where the cat is located in the first interface, and displaying the image in a target area of the second interface. And the user continues to observe the motion trail of each animal in the shooting preview interface, continues to perform the first input when finding that the position of a certain animal reaches an ideal position, and locks N animals in the shooting preview interface in each target area in the second interface if performing the first input for N times, so as to obtain N candidate images. Finally, the user executes a first input to the target object, the target object can be at least one animal, the electronic device scratches an image of a first area where the target object is located in the first interface to obtain a target object image, and the target object image is locked in the second interface. At this time, the user considers that the type and number of the animals and the positions where the animals are located in the second interface have reached expectations, the user makes an eighth input to the electronic device, and in response to the eighth input, the electronic device outputs the target file based on the target object image and the N candidate images. And in the case that N is 1, synthesizing the target object image and the N candidate images to obtain a target image containing the target object and the content in the candidate images. And under the condition that N is larger than 1, combining the target object image and the N candidate images one by one to obtain a plurality of target images containing the target object and the contents in the candidate images. And further carrying out video coding on the plurality of target images to obtain the target video containing the plurality of target objects and the content in the alternative image. Thus, in the case where the first interface is a capture preview interface, a plurality of animals are captured in a photograph or a video.
In a case that the first interface is a video playing interface, a basic processing flow of the video processing method in the embodiment of the present invention is as follows, for example:
the user plays the recorded second video in the first interface, and the electronic device automatically identifies M objects in the second video, wherein the M objects can be moving animals such as cats and dogs. The user makes a second input to any of the M objects, such as a cat. In response to the second input, the electronic device plays a first video including only the cat in the first interface. And if the user considers that the current position of the cat is the ideal position, performing first input on the first video. In response to the first input, the electronic device scratches out an image of the cat in the first interface and displays the cat in the target area in the second interface. And the user continues to carry out second input on other animals, the electronic equipment plays the first video only comprising the other animals in the first interface, and the user carries out the first input at a proper time, so that the electronic equipment locks the other animals in the corresponding target areas in the second interface. After the above N times, N animals in the shooting preview interface are locked in each target area in the second interface, and N candidate images are obtained. Finally, the user performs a second input on the first interface to a target object, which may be at least one animal, and in response to the second input, the electronic device plays the first video including only the target object. Then, the user executes first input on the first video aiming at the target object, the electronic equipment digs the image of the first area of the target object in the first interface to obtain a target object image, and the target object image is locked in the second interface. At this time, the user considers that the type and the number of the animals and the position where the animals are located locked in the second interface have reached the expectation, the user makes an eighth input to the electronic device, and in response to the eighth input, the electronic device outputs the target file based on the target object image and the N candidate images. And in the case that N is 1, synthesizing the target object image and the N candidate images to obtain a target image containing the target object and the animal in the candidate images. And under the condition that N is larger than 1, combining the target object image and the N candidate images one by one to obtain a plurality of target images containing the target object and the contents in the candidate images. And further carrying out video coding on the plurality of target images to obtain the target video containing the plurality of target objects and the content in the alternative image. Thus, in the case where the first interface is a video playback interface, a plurality of animals are taken in one photograph or one video.
Fig. 15 is a schematic hardware structure diagram of an electronic device implementing various embodiments of the present invention.
The electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, sound output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 15 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The user input unit 407 is configured to receive a first input of a target object in a first interface from a user;
the display unit 406 is configured to lock display of a target area of the target object in a second interface in response to the first input;
the processor 410 is configured to output a target file based on at least one target object image of the target object and the N candidate images;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer.
In the embodiment of the invention, a first input of a user to a target object in a first interface is received; in response to the first input, locking display of a target region of the target object in a second interface; outputting a target file based on at least one target object image and N candidate images of the target object; in the method, when N is 1, one target image is output based on the target object image and N candidate images; and when N is larger than 1, outputting the target video based on the target object image and the N candidate images, wherein the target object is positioned in the target image or the target video. Therefore, the method easily achieves the purpose of shooting a plurality of moving target objects in one picture or one video, has simple operation, directly outputs the target file according to the input of the user, and does not need to have professional image repairing technology.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 402, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The sound output unit 403 may convert sound data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into a sound signal and output as sound. Also, the sound output unit 403 may also provide sound output related to a specific function performed by the electronic apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The sound output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive a sound or video signal. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into sound data. The processed voice data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The electronic device 400 also includes at least one sensor 405, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 or backlight when the electronic apparatus 400 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 15, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the electronic device, and this is not limited herein.
The interface unit 408 is an interface for connecting an external device to the electronic apparatus 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, a sound input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as voice data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the electronic device. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The electronic device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 400 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when the computer program is executed by the processor 410, the processes of the display method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
Based on the hardware structure of the electronic device, the embodiments of the present invention will be described in detail below.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the display method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element identified by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. A video processing method applied to an electronic device is characterized by comprising the following steps:
receiving a first input of a user to a target object in a first interface;
the first interface comprises a playing interface of a first video, and the first video only comprises a target object;
the receiving a first input of a user to a target object in a first interface comprises:
receiving a first input of a user to a target video frame of the first video, the target video frame comprising at least one video frame;
in response to the first input, locking display of a target region of the target object in a second interface;
outputting a target file based on at least one target object image and N candidate images of the target object;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer;
the number of the target objects is more than 1; the locking the display of the target area of the target object in the second interface comprises:
in the process of playing the jth video, locking the display of j-1 target objects in j-1 target areas in the playing interface of the jth video; that is, in the process of playing the jth video, the jth target object is selected to be on the left side or the right side of the jth-1 target object;
j is an integer larger than 1, and j is smaller than or equal to the total number of the target objects;
the second interface includes: a playing interface of a third video;
the locking the display of the target area of the target object in the second interface comprises:
matting a target object image of a first area where the target object is located in the first interface, and displaying the scratched target object image in a target area in a second interface;
wherein the target region is a region of the second interface at the same location as the first region;
under the condition that the first interface is a playing interface of a first video, the target object image is an image of a first area which is extracted from a target video frame of the first video, and the first area is a display area of the target object in the target video frame;
the first area comprises an area where the target object is located and does not comprise a background area around the target object.
2. The method of claim 1, wherein prior to receiving the first input from the user to the target object in the first interface, further comprising:
receiving a second input of the user to a target object in the M objects in the second video;
in response to the second input, playing a first video, the first video including only the target object;
the receiving a first input of a user to a target video frame of the first video comprises:
receiving a first input of a user to a target video frame of the first video in the process of playing the first video;
wherein M is a positive integer.
3. The method of claim 2, wherein prior to receiving the user's second input of the target object of the M objects in the second video, further comprising:
playing the second video;
identifying M objects in the second video, and displaying P identifiers on a playing interface of the second video, wherein each identifier is used for marking one object in the M objects;
the receiving a second input of the user to a target object of the M objects in the second video includes:
receiving a second input of a user to a target identifier in the P identifiers, wherein the target identifier indicates a target object;
wherein P is more than or equal to M.
4. The method of claim 1, wherein N is 1; outputting a target file based on at least one target object image and N candidate images of the target object, comprising:
and under the condition that the second interface is a playing interface of a third video, synthesizing at least one target object image of the target object with a first image, and outputting the target image, wherein the first image is a video frame of the third video, and the N candidate images comprise the first image.
5. The method of claim 1, wherein N is greater than 1; outputting a target file based on at least one target object image and N candidate images of the target object, comprising:
synthesizing the ith target object image in the N target object images of the target object with the ith alternative image in the N alternative images to obtain N synthesized images;
carrying out video coding on the N combined images and outputting a target video;
and under the condition that the second interface is a playing interface of a third video, the N candidate images are N video frames in the third video.
6. The method of claim 1, wherein the number of target objects is greater than 1; the receiving a first input of a user to a target video frame of the first video comprises:
receiving a first input of a user to a first area in the first interface;
before the locking the display of the target object in the target area in the second interface, the method further comprises:
acquiring a target object associated with the first area;
updating the video frame displayed by the first interface to be a target video frame, wherein the target video frame is determined based on the first input.
7. The method of claim 1, wherein prior to receiving the first input from the user to the target object in the first interface, further comprising:
receiving a third input of the user;
in response to the third input, recording a first video.
8. The method of claim 7, wherein during recording of the first video, the method further comprises:
receiving a fourth input of the user to at least one object in the recorded picture of the first video;
in response to the fourth input, focusing an area in which the at least one object is located.
9. An electronic device, characterized in that the electronic device comprises:
the first input receiving module is used for receiving first input of a user on a target object in the first interface;
the first interface comprises a playing interface of a first video, and the first video only comprises a target object;
the first input receiving module is further configured to:
receiving a first input of a user to a target video frame of the first video, the target video frame comprising at least one video frame;
a locking module for locking display of a target region of the target object in a second interface in response to the first input;
the output module is used for outputting a target file based on at least one target object image and N candidate images of the target object;
the target file comprises a target image or a target video, the target file comprises the target object image and the N candidate images, and N is a positive integer;
the number of the target objects is more than 1; the locking the display of the target area of the target object in the second interface comprises:
in the process of playing the jth video, locking the display of j-1 target objects in j-1 target areas in the playing interface of the jth video; that is, in the process of playing the jth video, the jth target object is selected to be on the left side or the right side of the jth-1 target object;
j is an integer larger than 1, and j is smaller than or equal to the total number of the target objects;
the second interface includes: a playing interface of a third video;
the locking module is further configured to:
matting a target object image of a first area where the target object is located in the first interface, and displaying the scratched target object image in a target area in a second interface;
wherein the target region is a region of the second interface at the same location as the first region;
under the condition that the first interface is a playing interface of a first video, the target object image is an image of a first area which is extracted from a target video frame of the first video, and the first area is a display area of the target object in the target video frame;
the first area comprises an area where the target object is located and does not comprise a background area around the target object.
10. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the video processing method according to any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the video processing method according to any one of claims 1 to 8.
CN201911400755.XA 2019-12-30 2019-12-30 Video processing method, electronic device and computer-readable storage medium Active CN111093026B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911400755.XA CN111093026B (en) 2019-12-30 2019-12-30 Video processing method, electronic device and computer-readable storage medium
PCT/CN2020/139897 WO2021136134A1 (en) 2019-12-30 2020-12-28 Video processing method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911400755.XA CN111093026B (en) 2019-12-30 2019-12-30 Video processing method, electronic device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111093026A CN111093026A (en) 2020-05-01
CN111093026B true CN111093026B (en) 2022-05-06

Family

ID=70398201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911400755.XA Active CN111093026B (en) 2019-12-30 2019-12-30 Video processing method, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111093026B (en)
WO (1) WO2021136134A1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111093026B (en) * 2019-12-30 2022-05-06 维沃移动通信(杭州)有限公司 Video processing method, electronic device and computer-readable storage medium
CN111612873B (en) * 2020-05-29 2023-07-14 维沃移动通信有限公司 GIF picture generation method and device and electronic equipment
CN112037227B (en) * 2020-09-09 2024-02-20 脸萌有限公司 Video shooting method, device, equipment and storage medium
CN112135046B (en) * 2020-09-23 2022-06-28 维沃移动通信有限公司 Video shooting method, video shooting device and electronic equipment
CN112929699B (en) * 2021-01-27 2023-06-23 广州虎牙科技有限公司 Video processing method, device, electronic equipment and readable storage medium
CN113873162A (en) * 2021-10-14 2021-12-31 维沃移动通信有限公司 Shooting method, shooting device, electronic equipment and readable storage medium
CN114143398B (en) * 2021-11-17 2023-08-25 西安维沃软件技术有限公司 Video playing method and device
CN116112781B (en) * 2022-05-25 2023-12-01 荣耀终端有限公司 Video recording method, device and storage medium
CN116132790B (en) * 2022-05-25 2023-12-05 荣耀终端有限公司 Video recording method and related device
CN116095465B (en) * 2022-05-25 2023-10-20 荣耀终端有限公司 Video recording method, device and storage medium
CN116112780B (en) * 2022-05-25 2023-12-01 荣耀终端有限公司 Video recording method and related device
CN116055867B (en) * 2022-05-30 2023-11-24 荣耀终端有限公司 Shooting method and electronic equipment
CN116055861B (en) * 2022-05-30 2023-10-20 荣耀终端有限公司 Video editing method and electronic equipment
CN117177066A (en) * 2022-05-30 2023-12-05 荣耀终端有限公司 Shooting method and related equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10021363B2 (en) * 2015-10-16 2018-07-10 Novatek Microelectronics Corp. Method and apparatus for processing source image to generate target image
KR20180017638A (en) * 2016-08-10 2018-02-21 엘지전자 주식회사 Mobile terminal and method for controlling the same
CN106412431A (en) * 2016-09-30 2017-02-15 珠海市魅族科技有限公司 Image display method and device
CN108055483A (en) * 2017-11-30 2018-05-18 努比亚技术有限公司 A kind of picture synthesis method, mobile terminal and computer readable storage medium
CN108712603B (en) * 2018-04-27 2021-02-09 维沃移动通信有限公司 Image processing method and mobile terminal
CN109922256B (en) * 2019-01-28 2020-09-15 维沃移动通信有限公司 Shooting method and terminal equipment
CN111093026B (en) * 2019-12-30 2022-05-06 维沃移动通信(杭州)有限公司 Video processing method, electronic device and computer-readable storage medium

Also Published As

Publication number Publication date
WO2021136134A1 (en) 2021-07-08
CN111093026A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN111093026B (en) Video processing method, electronic device and computer-readable storage medium
CN108668083B (en) Photographing method and terminal
WO2019137429A1 (en) Picture processing method and mobile terminal
CN111355889B (en) Shooting method, shooting device, electronic equipment and storage medium
CN108089788B (en) Thumbnail display control method and mobile terminal
CN107566730B (en) A kind of panoramic picture image pickup method and mobile terminal
CN107786827B (en) Video shooting method, video playing method and device and mobile terminal
CN110913141B (en) Video display method, electronic device and medium
CN110933306A (en) Method for sharing shooting parameters and electronic equipment
CN111050070B (en) Video shooting method and device, electronic equipment and medium
CN109862266B (en) Image sharing method and terminal
CN109102555B (en) Image editing method and terminal
CN108924412B (en) Shooting method and terminal equipment
CN111177420B (en) Multimedia file display method, electronic equipment and medium
CN111597370B (en) Shooting method and electronic equipment
CN110062171B (en) Shooting method and terminal
CN110557565A (en) Video processing method and mobile terminal
CN109618218B (en) Video processing method and mobile terminal
CN111669503A (en) Photographing method and device, electronic equipment and medium
CN109684277B (en) Image display method and terminal
CN108182031A (en) A kind of photographic method, terminal and computer readable storage medium
CN108984143B (en) Display control method and terminal equipment
CN110650367A (en) Video processing method, electronic device, and medium
CN111770374B (en) Video playing method and device
CN110825897A (en) Image screening method and device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant