CN113207038B - Video processing method, video processing device and electronic equipment - Google Patents

Video processing method, video processing device and electronic equipment Download PDF

Info

Publication number
CN113207038B
CN113207038B CN202110432361.3A CN202110432361A CN113207038B CN 113207038 B CN113207038 B CN 113207038B CN 202110432361 A CN202110432361 A CN 202110432361A CN 113207038 B CN113207038 B CN 113207038B
Authority
CN
China
Prior art keywords
video
video frames
image
sub
obtaining
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
CN202110432361.3A
Other languages
Chinese (zh)
Other versions
CN113207038A (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 CN202110432361.3A priority Critical patent/CN113207038B/en
Publication of CN113207038A publication Critical patent/CN113207038A/en
Priority to PCT/CN2022/086751 priority patent/WO2022222835A1/en
Application granted granted Critical
Publication of CN113207038B publication Critical patent/CN113207038B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip

Abstract

The application discloses a video processing method, a video processing device and electronic equipment, and belongs to the technical field of electronic equipment. The method comprises the following steps: acquiring N video frames; receiving a first input for a first video frame of the N video frames; responsive to the first input, acquiring a first image in the first video frame; acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image; combining the first image with the M second images to obtain M third video frames; and obtaining the first video according to the M third video frames.

Description

Video processing method, video processing device and electronic equipment
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a video processing method, a video processing device and electronic equipment.
Background
In the prior art, life can be recorded by shooting video, at present, the video cannot be processed in the video shooting process, and after the video shooting, the video can be cut into clips, intercepted or combined and the like. The video obtained after clipping generally does not change the original video frame image, and if a user wants to obtain a video different from the original video frame image, the video cannot be realized.
It can be seen that the prior art has the problem of poor flexibility of video processing.
Disclosure of Invention
An object of an embodiment of the present application is to provide a video processing method, a video processing device, and an electronic device, so as to solve a problem in the prior art that video processing flexibility is poor.
In a first aspect, an embodiment of the present application provides a video processing method, including:
acquiring N video frames;
receiving a first input for a first video frame of the N video frames;
responsive to the first input, acquiring a first image in the first video frame;
acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
combining the first image with the M second images to obtain M third video frames;
and obtaining the first video according to the M third video frames.
In a second aspect, an embodiment of the present application provides a video processing apparatus, including:
the first acquisition module is used for acquiring N video frames;
a receiving module for receiving a first input for a first video frame of the N video frames;
A second acquisition module for acquiring a first image in the first video frame in response to the first input;
the third acquisition module is used for acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
the first processing module is used for merging the first image with the M second images respectively to obtain M third video frames;
and the second processing module is used for obtaining the first video according to the M third video frames.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In the embodiment of the application, during or after video shooting, the video processing device may acquire a specific image in the specific video frame by inputting a first input to the specific video frame, and after removing an image of the same object as the specific image in other video frames, combine the specific image with other video frames to obtain a new video frame. By the processing, a new video frame different from the original video frame image can be obtained, and a user can obtain a video different from the original video frame image, so that the flexibility of video processing can be improved.
Drawings
Fig. 1 is a schematic flow chart of a video processing method according to an embodiment of the present application;
fig. 2 to 5 are schematic diagrams of a freeze shooting process provided in an embodiment of the present application;
fig. 6 to 7 are schematic diagrams of background image restoration by an image fusion technique according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a video frame provided in an embodiment of the present application;
fig. 9 to 10 are schematic diagrams of selecting special effects materials according to the embodiments of the present application;
fig. 11 to 12 are schematic diagrams of adding graffiti materials in video frames according to embodiments of the present application;
fig. 13 is a schematic structural diagram of a video processing apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 15 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The video processing method and the video processing device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings by specific embodiments and application scenarios thereof.
Fig. 1 shows a flowchart of a video processing method according to an embodiment of the present application.
As shown in fig. 1, the video processing method includes the steps of:
step 101: acquiring N video frames;
step 102: receiving a first input for a first video frame of the N video frames;
step 103: responsive to the first input, acquiring a first image in the first video frame;
step 104: acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
step 105: combining the first image with the M second images to obtain M third video frames;
step 106: and obtaining the first video according to the M third video frames.
The video processing method provided by the embodiment of the application can be executed by a video processing device.
In step 101, the video processing apparatus may acquire N video frames during video capturing, or may acquire N video frames after video capturing, which is not limited in this application. The N video frames may be all or part of a video or all or part of a plurality of videos.
In step 102, the video processing apparatus receives a first input for a first video frame of the N video frames, where the first input may be understood as an input for selecting the first video frame, e.g., a click operation of a user is received at a time point when the first video frame is played during playing of the N video frames, and the click operation may be regarded as the first input for the first video frame. The first video frame may be understood as a video frame that the user wants to freeze, and the moment at which the user inputs the first input may be understood as the freeze moment.
In step 103, the video processing device may obtain a first image in a first video frame in response to a first input. The first image may be understood as an image of a target object in a first video frame that the user wants to freeze, and may be referred to as a freeze image. The target object that the user wants to freeze may be a moving object, such as a person, an animal, a vehicle, etc., or a stationary object, such as a building, an article, etc., and the target object that the user wants to freeze may be a foreground image or a background image.
The first input may also be an input for a first image in the first video frame in order to determine the first image in the first video frame.
The video processing device may extract a first image of the target object from the first video frame based on a semantic segmentation technique. Specifically, when the target object is a person, the video processing apparatus may extract a person image from the first video frame based on a person image segmentation technique. The term "portrait segmentation" refers to separating a portrait in a picture from a background, dividing the portrait into different areas, and distinguishing the portrait from the background by using different labels, and is suitable for application scenes based on image content understanding, such as background replacement, rendering, blurring and the like.
In step 104, the video processing apparatus may acquire M second images corresponding to M second video frames in the N video frames, where the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image.
The M second video frames may be understood as video frames other than the first video frame in the N video frames, may be understood as video frames located after the first video frame in the N video frames, and may be understood as video frames located before the first video frame in the N video frames, which is not described herein in detail.
Assuming that the first image is an image of person a in the first video frame, the third image is also an image of person a in M second video frames, and the M second images are images obtained after removing the image of person a in the M second video frames.
The video processing apparatus may divide the third image and the second image from M second video frames based on a semantic division technique to obtain M second images.
In step 105, the video processing apparatus may combine the first image with the M second images to obtain M third video frames. Thus, the freeze image is fused to other video frames, and a new video frame different from the original video frame image is obtained.
The positions of the first image in the M third video frames may or may not correspond to the positions of the third image in the M second video frames.
In step 106, the video processing apparatus may obtain the first video according to M third video frames. For example, M third video frames may be combined to form the first video, or M third video frames may be combined with other video frames to form the first video.
In this embodiment, the video processing apparatus may combine the first image and the second image to obtain the target photograph in addition to obtaining the first video.
In the embodiment of the application, during or after video shooting, the video processing device may acquire a specific image in the specific video frame by inputting a first input to the specific video frame, and after removing an image of the same object as the specific image in other video frames, combine the specific image with other video frames to obtain a new video frame. By the processing, a new video frame different from the original video frame image can be obtained, and a user can obtain a video different from the original video frame image, so that the flexibility of video processing can be improved.
Optionally, the first video frame includes a first sub video frame and a second sub video frame;
the acquiring a first image in the first video frame includes:
acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame; the third image, the first sub-image and the second sub-image correspond to the same object;
the merging the first image with the M second images to obtain M third video frames includes:
and merging the first sub-image and the second sub-image with the M second images respectively to obtain M third video frames.
In this embodiment, the user may input the first input for a plurality of video frames as needed, or the user may input a plurality of first inputs, and the video processing apparatus may freeze the target object once every time the user inputs the first input, so as to obtain a plurality of images of the target object presented on the photographing interface. In the process of inputting multiple first inputs by a user, the target object can be in a motion state, for example, the target object can change positions and can also change postures, so that through the process, the video processing device can acquire multiple clear and dynamically and sequentially changed first images of the target object.
The video processing device may further add a stop-motion mark to the first video frame, so that the user can clearly view the video frame stop-motion by browsing the stop-motion mark.
Under the condition that a user inputs multiple first inputs, the video processing device can respectively combine the multiple first images with M second images to obtain M third video frames, so that the M third video frames can present the multiple first images which are clear and dynamically and sequentially changed. Therefore, the first video obtained according to the M third video frames can present a plurality of clear and dynamically and sequentially changed first images.
Because the first video can present a plurality of clear and dynamic images of the target object, the first video has a streamer effect, when the target object is a person, the image streamer video can be shot through the process, each fixed frame image in the shooting process can be clearly reserved, the application scene of long exposure shooting is expanded, and the shooting interestingness is improved.
As an example, the video processing apparatus may photograph the target object in the long-exposure photographing mode, thereby acquiring N video frames. For example, after the user starts the camera of the video processing device, the user may select a long exposure shooting mode, in which the user may click a "start shooting button" in the shooting preview interface, at this time, the video processing device may shoot the target object and acquire N video frames.
In the process of shooting the target object by the video processing device, the user can freeze the target object by inputting a first input, for example, the user clicks a shooting button in a shooting interface, or the user presses a certain physical key of the video processing device, or the user inputs a voice command, and the like.
When the video processing apparatus receives the first input, the video processing apparatus may acquire an image (i.e., a first image) of the target object presented on the photographing interface at the time when the first input is input by the user. The video processing device may acquire a first image of the target object from a video frame taken when the first input is received.
When the shooting of the target object reaches the expectation of the user, the user can input a second input to end the shooting process, where the second input may be, for example, the user clicking a "end shooting button" of the shooting interface, or the user pressing a physical button of the video processing device, or the user inputting a voice command, or the like.
When the video processing device receives the second input, the video processing device can obtain the first video, so that the first video can present a plurality of clear and dynamic images of the target object.
The above-described process is explained below with reference to fig. 2 to 5.
As shown in fig. 2, the user clicks the start shooting button 21 in the long-exposure shooting mode, and the imaging apparatus 20 starts shooting the target object 22.
As shown in fig. 3, in the process of photographing the target object 22 by the image pickup device 20, the user clicks the photographing button 23, and at the moment of clicking, the image pickup device 20 freeze the target object 22, and the image pickup device 20 acquires an image of the target object presented on the photographing interface at the moment of clicking.
As shown in fig. 4, the user clicks the photographing button 23 again, and at the moment of clicking, the image capturing apparatus 20 again frames the target object 22, and the image capturing apparatus 20 again acquires an image of the target object presented on the photographing interface at the moment of clicking. To this end, the image pickup device 20 can acquire two images of the target object 22 that are freeze-fixed.
As shown in fig. 5, the user clicks the end shooting button 24, and the image pickup device 20 can generate a video including two images of the target object 22 that are frozen.
In this embodiment, in the process of photographing the target object, the target object is subject to freeze a plurality of times by a plurality of first inputs, and an image of the target object presented on the photographing interface is acquired each time the first inputs, so that a video frame including a plurality of images of the target object can be generated. Thus, the dynamic and clear video of the target object can be obtained by clearly freezing the dynamic target object.
In this embodiment, the video processing apparatus may obtain, in addition to the first video, a target photo by combining the first sub-image, the second sub-image, and the second image, where the target photo may represent a plurality of images of the target object that are clear and dynamically and sequentially changed, and may be referred to as a streamer photo.
Optionally, after the receiving the first input for the first video frame of the N video frames, the method further comprises:
acquiring K fourth video frames positioned before the first video frame in the N video frames;
removing K fourth images in the K fourth video frames, and repairing the removed areas of the K fourth video frames to obtain K fifth video frames; the fourth image corresponds to the same object as the first image;
the obtaining M second images corresponding to M second video frames in the N video frames includes:
acquiring M second video frames positioned behind the first video frame in the N video frames;
obtaining M second images corresponding to the M second video frames;
the obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the K fifth video frames and the M third video frames.
In this embodiment, the video processing device may perform different processing on the first video frame, the K fourth video frames located before the first video frame in the N video frames, and the M second video frames located after the first video frame, so as to further expand an application scenario of long-exposure photography, and promote the interest of photography.
The video processing device can analyze and process each shot video frame in real time in the shooting process, divide the target object and the background in each video frame, and respectively mark different labels.
For the first video frame, the image of the target object (i.e., the first image) and the background image may be preserved.
For M second video frames, the image of the target object (i.e., the third image) may be eliminated, only the background image (i.e., the second image) is retained, and the first image and the second image are respectively combined to obtain the third video frame.
For K fourth video frames, the image of the target object (namely the fourth image) can be eliminated, only the background image is reserved, and the part of the background image blocked by the image of the target object can be subjected to image restoration through an image fusion technology to obtain K fifth video frames. The term "Image Fusion" refers to that Image data about the same object acquired by a multi-source channel is subjected to Image processing, computer technology, and the like, so that beneficial information in each channel is extracted to the maximum extent, and finally, the beneficial information is synthesized into a high-quality Image.
As an example, fig. 6 to 7 show schematic diagrams of background image restoration by an image fusion technique. As shown in fig. 6, assuming that frame N is an unscreened video frame, other frames, such as frame N-2, are found forward that do not block the background image 25 corresponding to the region of the target object 22 in frame N. As shown in fig. 7, the background image 25 of the corresponding region in frame N-2 is extracted, the target object 22 in frame N is overlaid, and the fusion generates a new video frame N' with only the background image 25 remaining of the eliminated target object.
In the embodiment, through the technical scheme, the streaming video can clearly reserve not only each fixed-frame image of the target object in the shooting process, but also the environment image of the target object, so that the application scene of long-exposure shooting is further expanded, and the shooting interestingness is improved.
Optionally, after the receiving the first input for the first video frame of the N video frames, the method further comprises:
acquiring S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
s fifth images corresponding to the S sixth video frames are obtained; the S fifth images are images obtained by removing a sixth image from the S sixth video frames, and the sixth image corresponds to the same object as the first sub-image;
Merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
the obtaining M second images corresponding to M second video frames in the N video frames includes:
acquiring M second video frames positioned behind the second sub-video frames in the N video frames;
obtaining M second images corresponding to the M second video frames;
the obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the S seventh video frames and the M third video frames.
The streamer video (i.e. the first video) obtained by the embodiment can show the whole process of dynamic change of the target object in the playing process.
Specifically, when the first video is played to the node at the first freeze point (i.e., the first sub-video frame), an image of the target object at the freeze point, which is presented on the shooting interface, may be displayed. When the first video is played to the node (namely the second sub-video frame) at the second time of freeze-frame, the image of the target object presented on the shooting interface at the first time of freeze-frame and the second time of freeze-frame can be displayed, and the process of dynamic change of the target object is displayed by the first video. When the first video is played to the node at the non-stop-motion moment, an image of the target object presented on the shooting interface when the node at the last stop-motion moment is included can be displayed. That is, once any object displayed by a node at a freeze point is displayed, it will always exist in the video segment after the freeze point.
As shown in fig. 8, assuming that the frame m+3 is a video frame at the first freeze point, an image of the target object 22 presented on the shooting interface at the first freeze point is displayed; frame m+11 is a video frame at the second freeze point, and displays images of the target object 22 presented to the capture interface at the first freeze point and the second freeze point. Then frames m+4 through m+10 (frame m+7 is taken as an example in fig. 8) may each display an image of the target object 22 presented to the capture interface at the first frozen moment.
Optionally, before the obtaining the first video, the method further includes:
collecting the motion trail of a target object in the N video frames;
generating dynamic graffiti for drawing the motion trail according to the motion trail;
the obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the M third video frames and the dynamic graffiti.
In this embodiment, when the target object is a person, the motion trajectory of the target object may be a hand motion trajectory. In addition, the motion track of the target object may also be the footprint of the target object, which is not limited in the embodiment of the present application.
In this embodiment, virtual graffiti materials may be added to the first video based on a human gesture recognition technology, and a user may select pre-provided special effect materials to depict a hand motion track of the target object during shooting. As shown in fig. 9, the user can click the material selection button 26 to select a special effect of recording a hand motion trajectory before clicking the start shooting button 21. As shown in fig. 10, the user can click the material selection button 26 to switch different virtual materials at any time during shooting.
Human gesture recognition techniques can be based on computer vision by processing real video images to recognize gestures, including three processes of gesture segmentation, trajectory tracking, and classification recognition. The tracking of the hand motion trajectory may be performed by an image tracking algorithm, such as an optical flow method, a camshift, a KCF, a deep learning algorithm, or may be performed by directly using the hand position detected in each video frame.
In the shooting process, the video processing device can analyze the hand motion track of the target object in real time through an algorithm and add the selected graffiti materials along with the hand motion track. For example, if the material of the love shape is selected, the scrawling of the love shape is displayed at the dynamic track traced by the hand motion track. Fig. 11 to 12 respectively show video frames added with the graffiti materials 27, which can show effects such as photo drawing, fireworks, and the like, show dynamic tracks of a target object, and can show dynamic tracks of the target object in the playing process of the first video, so that shooting interestingness is improved.
Fig. 13 shows a schematic structural diagram of a video processing apparatus according to an embodiment of the present application.
As shown in fig. 13, the video processing apparatus 300 includes:
a first acquiring module 301, configured to acquire N video frames;
a receiving module 302, configured to receive a first input for a first video frame of the N video frames;
a second obtaining module 303, configured to obtain a first image in the first video frame in response to the first input;
a third obtaining module 304, configured to obtain M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
a first processing module 305, configured to combine the first image with the M second images to obtain M third video frames;
the second processing module 306 is configured to obtain the first video according to the M third video frames.
Optionally, the video processing apparatus 300 further includes:
a fourth obtaining module, configured to obtain K fourth video frames located before the first video frame in the N video frames;
the third processing module is used for removing K fourth images in the K fourth video frames, repairing the removed areas of the K fourth video frames and obtaining K fifth video frames; the fourth image corresponds to the same object as the first image;
The third obtaining module 304 is specifically configured to:
acquiring M second video frames positioned behind the first video frame in the N video frames;
obtaining M second images corresponding to the M second video frames;
the second processing module 306 is specifically configured to:
and obtaining a first video according to the K fifth video frames and the M third video frames.
Optionally, the first video frame includes a first sub video frame and a second sub video frame;
the second obtaining module 303 is specifically configured to:
acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame; the third image, the first sub-image and the second sub-image correspond to the same object;
the first processing module 305 is specifically configured to:
and merging the first sub-image and the second sub-image with the M second images respectively to obtain M third video frames.
Optionally, the video processing apparatus 300 further includes:
a fifth obtaining module, configured to obtain S sixth video frames located between the first sub video frame and the second sub video frame in the N video frames;
a sixth obtaining module, configured to obtain S fifth images corresponding to the S sixth video frames; the S fifth images are images obtained by removing a sixth image from the S sixth video frames, and the sixth image corresponds to the same object as the first sub-image;
The fourth processing module is used for merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
the third obtaining module 304 is specifically configured to:
acquiring M second video frames positioned behind the second sub-video frames in the N video frames;
obtaining M second images corresponding to the M second video frames;
the third processing module is specifically configured to:
and obtaining a first video according to the S seventh video frames and the M third video frames.
Optionally, the video processing apparatus 300 further includes:
the acquisition module is used for acquiring the motion trail of the target object in the N video frames;
the generation module is used for generating dynamic graffiti for drawing the motion trail according to the motion trail;
the third processing module is specifically configured to:
and obtaining a first video according to the M third video frames and the dynamic graffiti.
The video processing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The video processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The video processing device provided in the embodiment of the present application can implement each process implemented by the embodiments of the methods of fig. 1 to 12, and can achieve the same beneficial effects, so that repetition is avoided, and no further description is given here.
In the embodiment of the application, during or after video shooting, the video processing device may acquire a specific image in the specific video frame by inputting a first input to the specific video frame, and after removing an image of the same object as the specific image in other video frames, combine the specific image with other video frames to obtain a new video frame. By the processing, a new video frame different from the original video frame image can be obtained, and a user can obtain a video different from the original video frame image, so that the flexibility of video processing can be improved.
Optionally, as shown in fig. 14, the embodiment of the present application further provides an electronic device 400, including a processor 401, a memory 402, and a program or an instruction stored in the memory 402 and capable of running on the processor 401, where the program or the instruction is executed by the processor 401 to implement each process of the embodiment of the video processing method, and the process can achieve the same technical effect, so that repetition is avoided, and no further description is given here.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 15 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 5010.
Those skilled in the art will appreciate that the electronic device 500 may further include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 5010 via a power management system to perform functions of managing charging, discharging, and power consumption by the power management system. The electronic device structure shown in fig. 15 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown in the drawings, or may combine some components, or may be arranged in different components, which will not be described in detail herein.
Wherein the processor 5010 is configured to:
acquiring N video frames;
the user input unit 507 is for:
receiving a first input for a first video frame of the N video frames;
The processor 5010, further configured to:
responsive to the first input, acquiring a first image in the first video frame;
acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
combining the first image with the M second images to obtain M third video frames;
and obtaining the first video according to the M third video frames.
In the embodiment of the application, during or after video shooting, the video processing device may acquire a specific image in the specific video frame by inputting a first input to the specific video frame, and after removing an image of the same object as the specific image in other video frames, combine the specific image with other video frames to obtain a new video frame. By the processing, a new video frame different from the original video frame image can be obtained, and a user can obtain a video different from the original video frame image, so that the flexibility of video processing can be improved.
Optionally, the processor 5010 is further configured to:
Acquiring K fourth video frames positioned before the first video frame in the N video frames;
removing K fourth images in the K fourth video frames, and repairing the removed areas of the K fourth video frames to obtain K fifth video frames; the fourth image corresponds to the same object as the first image;
acquiring M second video frames positioned behind the first video frame in the N video frames;
obtaining M second images corresponding to the M second video frames;
and obtaining a first video according to the K fifth video frames and the M third video frames.
Optionally, the first video frame includes a first sub video frame and a second sub video frame;
the processor 5010, further configured to:
acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame; the third image, the first sub-image and the second sub-image correspond to the same object;
and merging the first sub-image and the second sub-image with the M second images respectively to obtain M third video frames.
Optionally, S sixth video frames located between the first sub video frame and the second sub video frame in the N video frames are acquired;
S fifth images corresponding to the S sixth video frames are obtained; the S fifth images are images obtained by removing a sixth image from the S sixth video frames, and the sixth image corresponds to the same object as the first sub-image;
merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
acquiring M second video frames positioned behind the second sub-video frames in the N video frames;
obtaining M second images corresponding to the M second video frames;
and obtaining a first video according to the S seventh video frames and the M third video frames.
Optionally, the processor 5010 is further configured to:
collecting the motion trail of a target object in the N video frames;
generating dynamic graffiti for drawing the motion trail according to the motion trail;
and obtaining a first video according to the M third video frames and the dynamic graffiti.
It should be appreciated that in embodiments of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, with the graphics processor 5041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen. Touch panel 5071 may include two parts, a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein. The memory 509 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 5010 may integrate an application processor that primarily handles operating systems, user interfaces, applications, and the like, with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 5010.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction realizes each process of the embodiment of the video processing method, and the same technical effect can be achieved, so that repetition is avoided, and no redundant description is provided herein.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium such as a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction, so as to implement each process of the embodiment of the video processing method, and achieve the same technical effect, so that repetition is avoided, and no redundant description is provided here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
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 defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (10)

1. A video processing method, comprising:
acquiring N video frames;
receiving a first input for a first video frame of the N video frames;
responsive to the first input, acquiring a first image in the first video frame;
acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
combining the first image with the M second images to obtain M third video frames;
obtaining a first video according to the M third video frames;
after the receiving a first input for a first video frame of the N video frames, the method further comprises:
acquiring K fourth video frames positioned before the first video frame in the N video frames;
removing K fourth images in the K fourth video frames, and repairing the removed areas of the K fourth video frames to obtain K fifth video frames; the fourth image corresponds to the same object as the first image;
the obtaining M second images corresponding to M second video frames in the N video frames includes:
Acquiring M second video frames positioned behind the first video frame in the N video frames;
obtaining M second images corresponding to the M second video frames;
the obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the K fifth video frames and the M third video frames.
2. The method of claim 1, wherein the first video frame comprises a first sub-video frame and a second sub-video frame;
the acquiring a first image in the first video frame includes:
acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame; the third image, the first sub-image and the second sub-image correspond to the same object;
the merging the first image with the M second images to obtain M third video frames includes:
and merging the first sub-image and the second sub-image with the M second images respectively to obtain M third video frames.
3. The method of claim 2, wherein after the receiving a first input for a first video frame of the N video frames, the method further comprises:
Acquiring S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
s fifth images corresponding to the S sixth video frames are obtained; the S fifth images are images obtained by removing a sixth image from the S sixth video frames, and the sixth image corresponds to the same object as the first sub-image;
merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
the obtaining M second images corresponding to M second video frames in the N video frames includes:
acquiring M second video frames positioned behind the second sub-video frames in the N video frames;
obtaining M second images corresponding to the M second video frames;
the obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the S seventh video frames and the M third video frames.
4. The method of claim 1, wherein prior to the obtaining the first video, the method further comprises:
collecting the motion trail of a target object in the N video frames;
generating dynamic graffiti for drawing the motion trail according to the motion trail;
The obtaining the first video according to the M third video frames includes:
and obtaining a first video according to the M third video frames and the dynamic graffiti.
5. A video processing apparatus, comprising:
the first acquisition module is used for acquiring N video frames;
a receiving module for receiving a first input for a first video frame of the N video frames;
a second acquisition module for acquiring a first image in the first video frame in response to the first input;
the third acquisition module is used for acquiring M second images corresponding to M second video frames in the N video frames; the M second images are images obtained by removing a third image from the M second video frames, and the third image corresponds to the same object as the first image;
the first processing module is used for merging the first image with the M second images respectively to obtain M third video frames;
the second processing module is used for obtaining a first video according to the M third video frames;
further comprises:
a fourth obtaining module, configured to obtain K fourth video frames located before the first video frame in the N video frames;
The third processing module is used for removing K fourth images in the K fourth video frames, repairing the removed areas of the K fourth video frames and obtaining K fifth video frames; the fourth image corresponds to the same object as the first image;
the third obtaining module is specifically configured to:
acquiring M second video frames positioned behind the first video frame in the N video frames;
obtaining M second images corresponding to the M second video frames;
the second processing module is specifically configured to:
and obtaining a first video according to the K fifth video frames and the M third video frames.
6. The apparatus of claim 5, wherein the first video frame comprises a first sub-video frame and a second sub-video frame;
the second obtaining module is specifically configured to:
acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame; the third image, the first sub-image and the second sub-image correspond to the same object;
the first processing module is specifically configured to:
and merging the first sub-image and the second sub-image with the M second images respectively to obtain M third video frames.
7. The apparatus as recited in claim 6, further comprising:
a fifth obtaining module, configured to obtain S sixth video frames located between the first sub video frame and the second sub video frame in the N video frames;
a sixth obtaining module, configured to obtain S fifth images corresponding to the S sixth video frames; the S fifth images are images obtained by removing a sixth image from the S sixth video frames, and the sixth image corresponds to the same object as the first sub-image;
the fourth processing module is used for merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
the third obtaining module is specifically configured to:
acquiring M second video frames positioned behind the second sub-video frames in the N video frames;
obtaining M second images corresponding to the M second video frames;
the third processing module is specifically configured to:
and obtaining a first video according to the S seventh video frames and the M third video frames.
8. The apparatus as recited in claim 5, further comprising:
the acquisition module is used for acquiring the motion trail of the target object in the N video frames;
The generation module is used for generating dynamic graffiti for drawing the motion trail according to the motion trail;
the third processing module is specifically configured to:
and obtaining a first video according to the M third video frames and the dynamic graffiti.
9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the video processing method of any one of claims 1 to 4.
10. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the video processing method according to any of claims 1 to 4.
CN202110432361.3A 2021-04-21 2021-04-21 Video processing method, video processing device and electronic equipment Active CN113207038B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110432361.3A CN113207038B (en) 2021-04-21 2021-04-21 Video processing method, video processing device and electronic equipment
PCT/CN2022/086751 WO2022222835A1 (en) 2021-04-21 2022-04-14 Video processing method, video processing apparatus and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110432361.3A CN113207038B (en) 2021-04-21 2021-04-21 Video processing method, video processing device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113207038A CN113207038A (en) 2021-08-03
CN113207038B true CN113207038B (en) 2023-04-28

Family

ID=77027721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110432361.3A Active CN113207038B (en) 2021-04-21 2021-04-21 Video processing method, video processing device and electronic equipment

Country Status (2)

Country Link
CN (1) CN113207038B (en)
WO (1) WO2022222835A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113207038B (en) * 2021-04-21 2023-04-28 维沃移动通信(杭州)有限公司 Video processing method, video processing device and electronic equipment
CN113810624A (en) * 2021-09-18 2021-12-17 维沃移动通信有限公司 Video generation method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698553A (en) * 2020-05-29 2020-09-22 维沃移动通信有限公司 Video processing method and device, electronic equipment and readable storage medium

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101105034B1 (en) * 2010-02-09 2012-01-16 주식회사 팬택 Apparatus Having Photograph Function
CN103905716B (en) * 2012-12-27 2017-08-18 三星电子(中国)研发中心 The camera installation and method for picture of finding a view dynamically are handled when shooting photo
CN105141974B (en) * 2015-07-29 2018-11-09 百度在线网络技术(北京)有限公司 A kind of video clipping method and device
CN106375670A (en) * 2016-09-30 2017-02-01 努比亚技术有限公司 Image processing method and terminal
CN106385591B (en) * 2016-10-17 2020-05-15 腾讯科技(上海)有限公司 Video processing method and video processing device
CN107105310B (en) * 2017-05-05 2020-07-10 广州盈可视电子科技有限公司 Human image replacing method and device in video live broadcast and recording and broadcasting system
US20190026567A1 (en) * 2017-07-21 2019-01-24 Satori Worldwide, Llc System and method for counting objects on multiple roads using a pan, tilt, and zoom camera
CN108537867B (en) * 2018-04-12 2020-01-10 北京微播视界科技有限公司 Video rendering method and device according to user limb movement
CN109348277B (en) * 2018-11-29 2020-02-07 北京字节跳动网络技术有限公司 Motion pixel video special effect adding method and device, terminal equipment and storage medium
CN110047124A (en) * 2019-04-23 2019-07-23 北京字节跳动网络技术有限公司 Method, apparatus, electronic equipment and the computer readable storage medium of render video
CN110225241A (en) * 2019-04-29 2019-09-10 努比亚技术有限公司 A kind of video capture control method, terminal and computer readable storage medium
CN110266973B (en) * 2019-07-19 2020-08-25 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer-readable storage medium and computer equipment
CN111601033A (en) * 2020-04-27 2020-08-28 北京小米松果电子有限公司 Video processing method, device and storage medium
CN111614902A (en) * 2020-05-27 2020-09-01 努比亚技术有限公司 Video shooting method and device and computer readable storage medium
CN112492209B (en) * 2020-11-30 2022-04-29 维沃移动通信有限公司 Shooting method, shooting device and electronic equipment
CN112565868B (en) * 2020-12-04 2022-12-06 维沃移动通信有限公司 Video playing method and device and electronic equipment
CN113207038B (en) * 2021-04-21 2023-04-28 维沃移动通信(杭州)有限公司 Video processing method, video processing device and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698553A (en) * 2020-05-29 2020-09-22 维沃移动通信有限公司 Video processing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN113207038A (en) 2021-08-03
WO2022222835A1 (en) 2022-10-27

Similar Documents

Publication Publication Date Title
CN113207038B (en) Video processing method, video processing device and electronic equipment
CN112637500B (en) Image processing method and device
CN113014801B (en) Video recording method, video recording device, electronic equipment and medium
CN112333382B (en) Shooting method and device and electronic equipment
CN111722775A (en) Image processing method, device, equipment and readable storage medium
CN111669495B (en) Photographing method, photographing device and electronic equipment
WO2022247766A1 (en) Image processing method and apparatus, and electronic device
CN113794831B (en) Video shooting method, device, electronic equipment and medium
CN114125297B (en) Video shooting method, device, electronic equipment and storage medium
CN112367467B (en) Display control method, display control device, electronic apparatus, and medium
CN113014799B (en) Image display method and device and electronic equipment
CN112887515B (en) Video generation method and device
CN112887623B (en) Image generation method and device and electronic equipment
CN114025100A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN114025237A (en) Video generation method and device and electronic equipment
CN112887611A (en) Image processing method, device, equipment and storage medium
CN113810624A (en) Video generation method and device and electronic equipment
CN114520875B (en) Video processing method and device and electronic equipment
CN114222069B (en) Shooting method, shooting device and electronic equipment
CN114390205B (en) Shooting method and device and electronic equipment
CN112672059B (en) Shooting method and shooting device
CN114157810B (en) Shooting method, shooting device, electronic equipment and medium
CN114500852B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN114827477B (en) Method, device, electronic equipment and medium for time-lapse photography
CN117395462A (en) Method and device for generating media content, electronic equipment and readable storage medium

Legal Events

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