WO2022222835A1 - Video processing method, video processing apparatus and electronic device - Google Patents

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

Info

Publication number
WO2022222835A1
WO2022222835A1 PCT/CN2022/086751 CN2022086751W WO2022222835A1 WO 2022222835 A1 WO2022222835 A1 WO 2022222835A1 CN 2022086751 W CN2022086751 W CN 2022086751W WO 2022222835 A1 WO2022222835 A1 WO 2022222835A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
video frames
image
sub
images
Prior art date
Application number
PCT/CN2022/086751
Other languages
French (fr)
Chinese (zh)
Inventor
韩桂敏
Original Assignee
维沃移动通信(杭州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信(杭州)有限公司 filed Critical 维沃移动通信(杭州)有限公司
Publication of WO2022222835A1 publication Critical patent/WO2022222835A1/en

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

Definitions

  • the present application belongs to the technical field of electronic equipment, and specifically relates to a video processing method, a video processing apparatus and electronic equipment.
  • life can be recorded by shooting a video.
  • the video cannot be processed during the video shooting process.
  • editing processing such as segment division, interception or merging.
  • the video obtained after the editing process generally does not change the original video frame image. If the user wants to obtain a video different from the original video frame image, it cannot be achieved.
  • the purpose of the embodiments of the present application is to provide a video processing method, a video processing apparatus, and an electronic device, so as to solve the problem of poor video processing flexibility in the prior art.
  • an embodiment of the present application provides a video processing method, which includes:
  • M second images corresponding to M second video frames in the N video frames, wherein the M second images are images obtained by removing the third image from the M second video frames, and the M second images are obtained by removing the third image from the M second video frames.
  • the third image corresponds to the same object as the first image;
  • a first video is obtained.
  • an embodiment of the present application provides a video processing apparatus, including:
  • the first acquisition module is used to acquire N video frames
  • a receiving module configured to receive a first input for a first video frame in the N video frames
  • a second acquiring module configured to acquire the first image in the first video frame in response to the first input
  • a third acquiring module configured to acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are the M second video frames minus the third an image obtained from an image, the third image corresponds to the same object as the first image;
  • a first processing module configured to obtain M third video frames by merging the first image with the M second images respectively;
  • the second processing module is configured to obtain the first video according to the M third video frames.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame.
  • a new video frame that is different from the original video frame image can be obtained, and the user can also obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
  • FIG. 1 is a schematic flowchart of a video processing method provided by an embodiment of the present application.
  • FIGS. 2 to 5 are schematic diagrams of a freeze-frame shooting process provided by an embodiment of the present application.
  • 6 to 7 are schematic diagrams of performing background image restoration through image fusion technology provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a video frame provided by an embodiment of the present application.
  • 11 to 12 are schematic diagrams of adding graffiti material to a video frame provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • FIG. 1 shows a schematic flowchart of a video processing method provided by an embodiment of the present application.
  • the video processing method includes the following steps:
  • Step 101 Acquire N video frames
  • Step 102 receiving a first input for a first video frame in the N video frames
  • Step 103 Acquire a first image in the first video frame in response to the first input
  • Step 104 Acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are images obtained by removing the third image from the M second video frames , the third image corresponds to the same object as the first image;
  • Step 105 Merging the first image and the M second images respectively to obtain M third video frames
  • Step 106 Obtain a first video according to the M third video frames.
  • the video processing methods provided in the embodiments of the present application may be executed by a video processing apparatus.
  • the video processing apparatus may acquire N video frames during the video shooting process, or may acquire N video frames after the video shooting, which is not limited in this application.
  • the N video frames may be all or part of video frames of a certain video, or may be all or part of video frames of multiple videos.
  • the video processing apparatus receives a first input for the first video frame among the N video frames, where the first input can be understood as an input for selecting the first video frame, for example, in the process of playing the N video frames , and a click operation of the user is received at the moment of playing the first video frame, the click operation may be regarded as the first input for the first video frame.
  • the first video frame can be understood as the video frame that the user wants to freeze, and the moment when the user inputs the first input can be understood as the freeze moment.
  • the video processing apparatus may acquire the first image in the first video frame in response to the first input.
  • the first image may be understood as an image of the target object that the user wants to freeze in the first video frame, and the first image may be referred to as a freeze image.
  • the target object that the user wants to freeze can be either a moving object, such as people, animals, vehicles, etc., or a static object, such as buildings, objects, etc.
  • the target object the user wants to freeze can be either a foreground image or a background. image.
  • the first input may also be an input for the first image in the first video frame.
  • the video processing apparatus may extract the first image of the target object from the first video frame based on the semantic segmentation technology. Specifically, when the target object is a human being, the video processing apparatus may extract the human portrait from the first video frame based on the human portrait segmentation technology.
  • the term "portrait segmentation” refers to the separation of the portrait and the background in the picture, into different areas, and using different labels to distinguish them. It is suitable for application scenarios based on image content understanding, such as background replacement, rendering, blurring, etc.
  • the video processing apparatus may acquire M second images corresponding to the M second video frames in the N video frames, where the M second images are images obtained by removing the third image from the M second video frames, and the M second images are obtained by removing the third image from the M second video frames.
  • the three images correspond to the same object as the first image.
  • the M second video frames can be understood as video frames other than the first video frame among the N video frames, and can also be understood as the video frames located after the first video frame among the N video frames, and can also be understood as N video frames.
  • the video frame that is located before the first video frame in the video frame is not described in detail in this embodiment of the present application.
  • the first image is the image of person A in the first video frame
  • the third image is also the image of person A in the M second video frames
  • the M second images are the removed images in the M second video frames The image obtained after adding the image of Person A.
  • the video processing apparatus may segment the third image and the second image from the M second video frames based on the semantic segmentation technology, so as to obtain the M second images.
  • the video processing apparatus may combine the first image and the M second images respectively to obtain M third video frames.
  • the freeze-motion image is fused into other video frames, thereby obtaining a new video frame that is different from the original video frame image.
  • the position of the first image in the M third video frames may or may not correspond to the position of the third image in the M second video frames.
  • the video processing apparatus may obtain the first video according to the M third video frames.
  • the M third video frames may be combined to form the first video, or the M third video frames may be combined with other video frames to form the first video.
  • the video processing apparatus in addition to obtaining the first video, can also combine the first image and the second image to obtain the target photo.
  • the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame.
  • a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
  • the first video frame includes a first sub-video frame and a second sub-video frame;
  • the acquiring the first image in the first video frame includes:
  • the first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
  • the user can input the first input for multiple video frames as needed, or in other words, the user can input multiple first inputs, and the video processing device can freeze the target object once each time the user inputs the first input. , so as to obtain multiple images of the target object presented on the shooting interface.
  • the target object may be in a moving state, for example, the target object may change its position or posture.
  • the video processing device can obtain a clear and accurate image of the target object. A plurality of first images that change dynamically in sequence.
  • the video processing apparatus may also add a freeze mark to the first video frame, so that the user can clearly view the video frame freezed by the user by browsing the freeze mark.
  • the video processing apparatus may combine the multiple first images with the M second images to obtain M third video frames, so that the M third video frames can be presented clearly and smoothly.
  • the first video can present multiple clear and dynamic images of the target object, the first video has a streamer effect.
  • a portrait streamer video can be shot through the above process, and the portrait streamer video It can clearly retain each stop-motion portrait during the shooting process, expand the application scenarios of long-exposure photography, and improve the fun of shooting.
  • the video processing apparatus may photograph the target object in a long-exposure photographing mode, thereby acquiring N video frames.
  • the user can select the long-exposure shooting mode.
  • the user can click the "start shooting button" in the shooting preview interface.
  • the video processing device can shoot the target object. Take a shot, and acquire N video frames.
  • the user can freeze the target object by inputting a first input.
  • the first input can be the user clicking the "photograph button" in the shooting interface, or the user pressing the video processing
  • a certain physical button of the device may also be a user inputting a voice command, and so on.
  • the video processing apparatus may obtain the image (ie, the first image) of the target object presented on the shooting interface at the moment when the user inputs the first input.
  • the video processing apparatus may acquire the first image of the target object from the video frame captured when the first input is received.
  • the user can input a second input to end the shooting process.
  • a certain physical button it can also be a user input voice command, and so on.
  • 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 camera device 20 freezes the target object 22 , and the camera device 20 captures the target object at the moment of the click. The image presented in the capture interface.
  • the camera 20 freezes the target object 22 again, and the camera 20 obtains the image of the target object displayed on the shooting interface again at the click moment. So far, the camera 20 can obtain two images of the target object 22 being frozen.
  • the camera 20 can generate a video including two images of the target object 22 being frozen.
  • the target object in the process of photographing the target object, is freezed multiple times through multiple first inputs, and an image of the target object presented on the photographing interface is acquired for each first input, that is, Generate a video frame containing multiple images of the target object.
  • an image of the target object presented on the photographing interface is acquired for each first input, that is, Generate a video frame containing multiple images of the target object.
  • the video processing device in addition to obtaining the first video, can also combine the first sub-image, the second sub-image and the second image to obtain a target photo, which can present a clear and dynamic image of the target object Multiple images that change in sequence can be called streamer photos.
  • the method further includes:
  • the K fourth images in the K fourth video frames are removed, and the removed areas of the K fourth video frames are repaired to obtain K fifth video frames, wherein the fourth images and the first image corresponds to the same object;
  • the obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
  • the obtaining the first video according to the M third video frames includes:
  • a first video is obtained according to the K fifth video frames and the M third video frames.
  • the video processing apparatus may perform different processing on the first video frame, the K fourth video frames located before the first video frame, and the M second video frames located after the first video frame among the N video frames. processing to further expand the application scenarios of long exposure photography and enhance the fun of shooting.
  • the video processing device can analyze and process each video frame captured in real time during the shooting process, separate the target object and the background in each video frame, and mark them with different labels.
  • the image of the target object ie, the first image
  • the background image may be retained.
  • the image of the target object ie the third image
  • only the background image ie the second image
  • the first image and the second image are respectively combined to obtain the third video frame.
  • the image of the target object (that is, the fourth image) can be eliminated, and only the background image can be retained.
  • Image Fusion refers to the process of image processing and computer technology for the image data of the same target collected by multi-source channels, to maximize the extraction of favorable information in the respective channels, and finally to synthesize them into high-quality images. image.
  • FIGS. 6 to 7 show schematic diagrams of background image restoration through image fusion technology.
  • frame N is an unfrozen video frame
  • FIG. 7 extract the background image 25 of the corresponding area in frame N-2, cover the target object 22 in frame N, and fuse to generate a new video frame N in which the target object has been eliminated and only the background image 25 is retained.
  • frame N-2 the background image 25 of the corresponding area in frame N-2
  • the streamer video can not only clearly retain each frozen image of the target object during the shooting process, but also clearly retain the environment image where the target object is located, further expanding the long-exposure photography.
  • the application scene enhances the fun of shooting.
  • the method further includes:
  • the obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
  • the obtaining the first video according to the M third video frames includes:
  • a first video is obtained according to the S seventh video frames and the M third video frames.
  • the entire process of the dynamic change of the target object can be displayed.
  • the first video when the first video is played to the node at the first freeze moment (ie, the first sub-video frame), the image of the target object presented on the shooting interface at the freeze moment can be displayed.
  • the first video When the first video is played to the node at the second freeze moment (ie, the second sub-video frame), the image of the target object presented on the shooting interface at the first freeze moment and the second freeze moment can be displayed, and so on.
  • the first video shows the process of the dynamic change of the target object.
  • the first video When the first video is played to a node at a non-freeze moment, an image of the target object presented on the shooting interface when the node including the last freeze moment can be displayed. That is to say, once the target object displayed by the node at any freeze moment is displayed, it will always exist in the video segment after the freeze moment.
  • frame m+3 is the video frame at the first freeze moment
  • frame m+11 is the second freeze frame
  • the video frame of the moment showing the images of the target object 22 presented on the shooting interface at the first freeze moment and the second freeze moment.
  • frame m+4 to frame m+10 can all display the image presented by the target object 22 on the shooting interface at the first freeze moment.
  • the method before the obtaining of the first video, the method further includes:
  • the obtaining the first video according to the M third video frames includes:
  • a first video is obtained according to the M third video frames and the dynamic graffiti.
  • the motion trajectory of the target object when the target object is a person, the motion trajectory of the target object may be a hand motion trajectory.
  • the motion trajectory of the target object may also be the footprint of the target object, which is not limited in this embodiment of the present application.
  • a virtual graffiti material can be added to the first video based on the human gesture recognition technology, and the user can select a pre-provided special effect material to describe the hand movement trajectory of the target object when shooting.
  • the user can click the material selection button 26 before clicking the start shooting button 21 to select the special effect for recording the hand movement track.
  • the user can click the material selection button 26 to switch between different virtual materials at any time during the shooting process.
  • Human gesture recognition technology can recognize gestures by processing real video images based on computer vision, including gesture segmentation, trajectory tracking and classification and recognition.
  • Tracking hand motion trajectory can use image tracking algorithm, such as optical flow method, continuously adaptive MeanShift algorithm (Continuously Adaptive Mean-SHIFT, camshift), Kernel Correlation Filter algorithm (Kernel Correlation Filter, KCF), deep learning and other algorithms, or , the hand position detected in each video frame may also be used directly to track the hand motion trajectory, which is not limited in this embodiment of the present application.
  • the video processing device can analyze the hand movement trajectory of the target object in real time through an algorithm, and follow the hand movement trajectory to add the selected graffiti material. For example, if the "love shape" material is selected, the heart-shaped graffiti will be displayed at the dynamic track traced by the hand movement track.
  • Figures 11 to 12 respectively show video frames to which graffiti materials 27 are added. These graffiti materials can present effects such as light painting, fireworks, etc., and present the dynamic trajectory of the target object.
  • the target can be presented. The dynamic trajectory of the object enhances the fun of shooting.
  • FIG. 13 shows a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application.
  • the video processing apparatus 300 includes:
  • the first acquisition module 301 is used to acquire N video frames
  • a second acquiring module 303 configured to acquire the 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, wherein the M second images are the M second video frames except the first video frame. An image obtained from three images, 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 respectively to obtain M third video frames
  • the second processing module 306 is configured to obtain a first video according to the M third video frames.
  • the video processing apparatus 300 further includes:
  • a fourth acquisition module configured to acquire K fourth video frames before the first video frame in the N video frames
  • the third processing module is configured to remove the K fourth images in the K fourth video frames, and repair the removed areas of the K fourth video frames to obtain K fifth video frames, wherein , the fourth image corresponds to the same object as the first image;
  • the third obtaining module 304 is specifically used for:
  • the second processing module 306 is specifically used for:
  • a first video is obtained according to the K fifth video frames and the M third video frames.
  • the first video frame includes a first sub-video frame and a second sub-video frame;
  • the second obtaining module 303 is specifically used for:
  • the first processing module 305 is specifically used for:
  • the first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
  • the video processing apparatus 300 further includes:
  • a fifth acquisition module configured to acquire 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, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, the sixth image corresponds to the same object as the first sub-image;
  • a fourth processing module configured to combine the first sub-image with the S fifth images to obtain S seventh video frames
  • the third obtaining module 304 is specifically used for:
  • the third processing module is specifically used for:
  • a first video is obtained according to the S seventh video frames and the M third video frames.
  • the video processing apparatus 300 further includes:
  • a collection module used for collecting the motion trajectory of the target object in the N video frames
  • a generating module for generating dynamic graffiti for depicting the motion trajectory according to the motion trajectory
  • the third processing module is specifically used for:
  • a first video is obtained according to the M third video frames and the dynamic graffiti.
  • the video processing apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • the video processing apparatus in this embodiment of the present application may be an apparatus having an operating system.
  • the operating system may be an Android (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 apparatus provided in the embodiments of the present application can implement the various processes implemented by the method embodiments in FIG. 1 to FIG. 12 , and can achieve the same beneficial effects. To avoid repetition, details are not repeated here.
  • the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame.
  • a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
  • an embodiment of the present application further provides an electronic device 400, including a processor 401, a memory 402, a program or instruction stored in the memory 402 and executable on the processor 401, When the program or instruction is executed by the processor 401, each process of the above video processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 15 is a schematic diagram of a 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, etc. part.
  • the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 5010 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 15 does not constitute a limitation to the electronic device.
  • the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the processor 5010 is used for: acquiring N video frames;
  • the user input unit 507 is configured to: receive a first input for a first video frame in the N video frames;
  • the processor 5010 is further configured to: in response to the first input, obtain a first image in the first video frame; obtain M second images corresponding to M second video frames in the N video frames, Wherein, 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 images are combined to obtain M third video frames; according to the M third video frames, a first video is obtained.
  • the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame.
  • a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
  • processor 5010 is further configured to:
  • the K fourth images in the K fourth video frames are removed, and the removed areas of the K fourth video frames are repaired to obtain K fifth video frames, wherein the fourth images and the first image corresponds to the same object;
  • a first video is obtained according to the K fifth video frames and the M third video frames.
  • the first video frame includes a first sub-video frame and a second sub-video frame;
  • Processor 5010 is also used to:
  • the first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
  • processor 5010 is further configured to:
  • a first video is obtained according to the S seventh video frames and the M third video frames.
  • processor 5010 is further configured to:
  • a first video is obtained according to the M third video frames and the dynamic graffiti.
  • the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 506 may include a display panel 5061, which 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 .
  • the touch panel 5071 is also called a touch screen.
  • the 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, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again.
  • Memory 509 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 5010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 5010.
  • Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, and examples of the computer-readable storage medium include non-transitory machine-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory ( Random Access Memory, RAM), disk or CD, etc.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above video processing method embodiments.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the above video processing method embodiments.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Abstract

The present application belongs to the technical field of electronic devices. Disclosed are a video processing method, a video processing apparatus and an electronic device. The video processing method comprises: acquiring N video frames; receiving a first input for a first video frame in the N video frames; in response 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, wherein the M second images are images that are 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; respectively merging the first image with the M second images to obtain M third video frames; and according to the M third video frames, obtaining a first video.

Description

视频处理方法、视频处理装置和电子设备Video processing method, video processing device and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2021年04月21日在中国提交的中国专利申请号202110432361.3的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202110432361.3 filed in China on Apr. 21, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于电子设备技术领域,具体涉及一种视频处理方法、视频处理装置和电子设备。The present application belongs to the technical field of electronic equipment, and specifically relates to a video processing method, a video processing apparatus and electronic equipment.
背景技术Background technique
现有技术中,可通过拍摄视频来记录生活,目前,在视频拍摄过程中通常无法对视频进行处理,在视频拍摄之后,一般也仅能对其进行片段分割、截取或合并等剪辑处理。经过剪辑处理之后得到的视频一般并不会改变原有的视频帧图像,用户若想要获得与原有的视频帧图像不同的视频,则无法实现。In the prior art, life can be recorded by shooting a video. Currently, the video cannot be processed during the video shooting process. After the video is shot, it is generally only possible to perform editing processing such as segment division, interception or merging. The video obtained after the editing process generally does not change the original video frame image. If the user wants to obtain a video different from the original video frame image, it cannot be achieved.
可见,现有技术中存在视频处理灵活性较差的问题。It can be seen that there is a problem of poor video processing flexibility in the prior art.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种视频处理方法、视频处理装置和电子设备,以解决现有技术中存在的视频处理灵活性较差的问题。The purpose of the embodiments of the present application is to provide a video processing method, a video processing apparatus, and an electronic device, so as to solve the problem of poor video processing flexibility in the prior art.
第一方面,本申请实施例提供了一种视频处理方法,该方法包括:In a first aspect, an embodiment of the present application provides a video processing method, which includes:
获取N个视频帧;Get N video frames;
接收针对所述N个视频帧中第一视频帧的第一输入;receiving a first input for a first video frame of the N video frames;
响应于所述第一输入,获取所述第一视频帧中的第一图像;in response to the first input, acquiring a first image in the first video frame;
获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图 像,所述第三图像与所述第一图像对应相同的对象;Acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are images obtained by removing the third image from the M second video frames, and the M second images are obtained by removing the third image from the M second video frames. The third image corresponds to the same object as the first image;
将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;Merging the first image with the M second images respectively to obtain M third video frames;
根据所述M个第三视频帧,得到第一视频。According to the M third video frames, a first video is obtained.
第二方面,本申请实施例提供了一种视频处理装置,包括:In a second aspect, an embodiment of the present application provides a video processing apparatus, including:
第一获取模块,用于获取N个视频帧;The first acquisition module is used to acquire N video frames;
接收模块,用于接收针对所述N个视频帧中第一视频帧的第一输入;a receiving module, configured to receive a first input for a first video frame in the N video frames;
第二获取模块,用于响应于所述第一输入,获取所述第一视频帧中的第一图像;a second acquiring module, configured to acquire the first image in the first video frame in response to the first input;
第三获取模块,用于获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;A third acquiring module, configured to acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are the M second video frames minus the third an image obtained from an image, the third image corresponds to the same object as the first image;
第一处理模块,用于将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;a first processing module, configured to obtain M third video frames by merging the first image with the M second images respectively;
第二处理模块,用于根据所述M个第三视频帧,得到第一视频。The second processing module is configured to obtain the first video according to the M third video frames.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
本申请实施例中,在视频拍摄过程中或视频拍摄之后,通过对特定视频帧输入第一输入,即可使视频处理装置获取特定视频帧中的特定图像,并在去除了其他视频帧中与该特定图像相同对象的图像之后,将该特定图像与其他视频帧合并得到新的视频帧。通过上述处理,能够得到不同于原 有视频帧图像的新的视频帧,也就能够使用户获得与原有视频帧图像不同的视频,可见,这能够提高视频处理的灵活性。In the embodiment of the present application, during or after the video shooting, by inputting the first input to the specific video frame, the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame. Through the above processing, a new video frame that is different from the original video frame image can be obtained, and the user can also obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
附图说明Description of drawings
图1是本申请实施例提供的一种视频处理方法的流程示意图;1 is a schematic flowchart of a video processing method provided by an embodiment of the present application;
图2至图5是本申请实施例提供的定格拍摄过程的示意图;2 to 5 are schematic diagrams of a freeze-frame shooting process provided by an embodiment of the present application;
图6至图7是本申请实施例提供的通过图像融合技术进行背景图像修复的示意图;6 to 7 are schematic diagrams of performing background image restoration through image fusion technology provided by an embodiment of the present application;
图8是本申请实施例提供的一种视频帧示意图;8 is a schematic diagram of a video frame provided by an embodiment of the present application;
图9至图10是本申请实施例提供的选择特效素材的示意图;9 to 10 are schematic diagrams of selecting special effect materials provided by embodiments of the present application;
图11至图12是本申请实施例提供的在视频帧中添加涂鸦素材的示意图;11 to 12 are schematic diagrams of adding graffiti material to a video frame provided by an embodiment of the present application;
图13是本申请实施例提供的一种视频处理装置的结构示意图;13 is a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application;
图14是本申请实施例提供的一种电子设备的结构示意图;14 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图15是本申请实施例提供的一种电子设备的硬件结构示意图。FIG. 15 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的视频处理方法、视频处理装置和电子设备进行详细地说明。The video processing method, video processing apparatus, and electronic device provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
图1示出了本申请实施例提供的一种视频处理方法的流程示意图。FIG. 1 shows a schematic flowchart of a video processing method provided by an embodiment of the present application.
如图1所示,视频处理方法包括以下步骤:As shown in Figure 1, the video processing method includes the following steps:
步骤101:获取N个视频帧;Step 101: Acquire N video frames;
步骤102:接收针对所述N个视频帧中第一视频帧的第一输入;Step 102: receiving a first input for a first video frame in the N video frames;
步骤103:响应于所述第一输入,获取所述第一视频帧中的第一图像;Step 103: Acquire a first image in the first video frame in response to the first input;
步骤104:获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;Step 104: Acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are images obtained by removing the third image from the M second video frames , the third image corresponds to the same object as the first image;
步骤105:将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;Step 105: Merging the first image and the M second images respectively to obtain M third video frames;
步骤106:根据所述M个第三视频帧,得到第一视频。Step 106: Obtain a first video according to the M third video frames.
本申请实施例提供的视频处理方法可以由视频处理装置执行。The video processing methods provided in the embodiments of the present application may be executed by a video processing apparatus.
在步骤101中,视频处理装置可以在视频拍摄过程中获取N个视频帧,也可以在视频拍摄之后获取N个视频帧,本申请对此不作限定。N个视频帧可以是某个视频的全部或部分视频帧,也可以是多个视频的全部或部分视频帧。In step 101, the video processing apparatus may acquire N video frames during the video shooting process, or may acquire N video frames after the video shooting, which is not limited in this application. The N video frames may be all or part of video frames of a certain video, or may be all or part of video frames of multiple videos.
在步骤102中,视频处理装置接收针对N个视频帧中第一视频帧的第一输入,该第一输入可以理解为选择第一视频帧的输入,例如,在播放N个视频帧的过程中,在播放第一视频帧的时刻接收到用户的点击操作,则该点击操作可以视为针对第一视频帧的第一输入。第一视频帧可以理解为用户想要定格的视频帧,用户输入第一输入的时刻可以理解为定格时刻。In step 102, the video processing apparatus receives a first input for the first video frame among the N video frames, where the first input can be understood as an input for selecting the first video frame, for example, in the process of playing the N video frames , and a click operation of the user is received at the moment of playing the first video frame, the click operation may be regarded as the first input for the first video frame. The first video frame can be understood as the video frame that the user wants to freeze, and the moment when the user inputs the first input can be understood as the freeze moment.
在步骤103中,视频处理装置可以响应于第一输入,获取第一视频帧中的第一图像。第一图像可以理解为用户想要定格的目标对象在第一视频帧中的图像,可将第一图像称为定格图像。用户想要定格的目标对象既可以是运动对象,例如人物、动物、车辆等,也可以是静止对象,例如建筑、物品等,用户想要定格的目标对象既可以是前景图像,也可以是背景 图像。In step 103, the video processing apparatus may acquire the first image in the first video frame in response to the first input. The first image may be understood as an image of the target object that the user wants to freeze in the first video frame, and the first image may be referred to as a freeze image. The target object that the user wants to freeze can be either a moving object, such as people, animals, vehicles, etc., or a static object, such as buildings, objects, etc. The target object the user wants to freeze can be either a foreground image or a background. image.
为了确定第一视频帧中的第一图像,第一输入也可以是针对第一视频帧中的第一图像的输入。To determine the first image in the first video frame, the first input may also be an input for the first image in the first video frame.
视频处理装置可以基于语义分割技术,从第一视频帧中提取目标对象的第一图像。具体的,当目标对象为人时,视频处理装置可以基于人像分割技术,从第一视频帧中提取人像。术语“人像分割”是指将图片中的人像和背景进行分离,分成不同的区域,用不同的标签进行区分,适用于基于图像内容理解的应用场景,如背景替换、渲染、虚化等。The video processing apparatus may extract the first image of the target object from the first video frame based on the semantic segmentation technology. Specifically, when the target object is a human being, the video processing apparatus may extract the human portrait from the first video frame based on the human portrait segmentation technology. The term "portrait segmentation" refers to the separation of the portrait and the background in the picture, into different areas, and using different labels to distinguish them. It is suitable for application scenarios based on image content understanding, such as background replacement, rendering, blurring, etc.
在步骤104中,视频处理装置可以获取N个视频帧中M个第二视频帧对应的M个第二图像,M个第二图像为M个第二视频帧去除第三图像得到的图像,第三图像与第一图像对应相同的对象。In step 104, the video processing apparatus may acquire M second images corresponding to the M second video frames in the N video frames, where the M second images are images obtained by removing the third image from the M second video frames, and the M second images are obtained by removing the third image from the M second video frames. The three images correspond to the same object as the first image.
M个第二视频帧可以理解为N个视频帧中除第一视频帧之外的视频帧,也可以理解为N个视频帧中位于第一视频帧之后的视频帧,还可以理解为N个视频帧中位于第一视频帧之前的视频帧,本申请实施例对此不作赘述。The M second video frames can be understood as video frames other than the first video frame among the N video frames, and can also be understood as the video frames located after the first video frame among the N video frames, and can also be understood as N video frames. The video frame that is located before the first video frame in the video frame is not described in detail in this embodiment of the present application.
假设第一图像为第一视频帧中的人物A的图像,则第三图像也为M个第二视频帧中的人物A的图像,M个第二图像为M个第二视频帧中的去除了人物A的图像之后得到的图像。Assuming that the first image is the image of person A in the first video frame, the third image is also the image of person A in the M second video frames, and the M second images are the removed images in the M second video frames The image obtained after adding the image of Person A.
视频处理装置可以基于语义分割技术,从M个第二视频帧中将第三图像与第二图像进行分割,以得到M个第二图像。The video processing apparatus may segment the third image and the second image from the M second video frames based on the semantic segmentation technology, so as to obtain the M second images.
在步骤105中,视频处理装置可以将第一图像分别与M个第二图像合并得到M个第三视频帧。这样,实现了将定格图像融合到其他视频帧,从而得到了不同于原有视频帧图像的新视频帧。In step 105, the video processing apparatus may combine the first image and the M second images respectively to obtain M third video frames. In this way, the freeze-motion image is fused into other video frames, thereby obtaining a new video frame that is different from the original video frame image.
第一图像在M个第三视频帧的位置可以与第三图像在M个第二视频帧中的位置对应,也可以不对应。The position of the first image in the M third video frames may or may not correspond to the position of the third image in the M second video frames.
在步骤106中,视频处理装置可以根据M个第三视频帧,得到第一视频。例如,可以将M个第三视频帧组合形成第一视频,也可以将M个第三视频帧与其他视频帧组合形成第一视频。In step 106, the video processing apparatus may obtain the first video according to the M third video frames. For example, the M third video frames may be combined to form the first video, or the M third video frames may be combined with other video frames to form the first video.
该实施方式中,视频处理装置除了得到第一视频之外,还可以将第一 图像与第二图像合并得到目标照片。In this embodiment, in addition to obtaining the first video, the video processing apparatus can also combine the first image and the second image to obtain the target photo.
本申请实施例中,在视频拍摄过程中或视频拍摄之后,通过对特定视频帧输入第一输入,即可使视频处理装置获取特定视频帧中的特定图像,并在去除了其他视频帧中与该特定图像相同对象的图像之后,将该特定图像与其他视频帧合并得到新的视频帧。通过上述处理,能够得到不同于原有视频帧图像的新的视频帧,也就能够使用户获得与原有视频帧图像不同的视频,可见,这能够提高视频处理的灵活性。In the embodiment of the present application, during or after the video shooting, by inputting the first input to the specific video frame, the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame. Through the above processing, a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
可选的,所述第一视频帧包括第一子视频帧和第二子视频帧;Optionally, the first video frame includes a first sub-video frame and a second sub-video frame;
所述获取所述第一视频帧中的第一图像,包括:The acquiring the 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, wherein the third image, the first sub-image and the second sub-image correspond to the same object;
所述将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧,包括:The obtaining M third video frames by merging the first image and the M second images respectively, including:
将所述第一子图像和第二子图像分别与所述M个第二图像合并得到M个第三视频帧。The first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
该实施方式中,用户可以根据需要针多个视频帧输入第一输入,或者说,用户可以输入多个第一输入,用户每输入一次第一输入,视频处理装置便可以对目标对象进行一次定格,从而获取目标对象呈现于拍摄界面的多个图像。在用户输入多次第一输入的过程中,目标对象可以处于运动状态,例如目标对象可以变换位置,也可以变换姿势,这样,通过上述过程,视频处理装置即可获取到目标对象的清晰的且动态依次变化的多个第一图像。In this embodiment, the user can input the first input for multiple video frames as needed, or in other words, the user can input multiple first inputs, and the video processing device can freeze the target object once each time the user inputs the first input. , so as to obtain multiple images of the target object presented on the shooting interface. During the process that the user inputs the first input multiple times, the target object may be in a moving state, for example, the target object may change its position or posture. In this way, through the above process, the video processing device can obtain a clear and accurate image of the target object. A plurality of first images that change dynamically in sequence.
视频处理装置还可以对第一视频帧添加定格标记,这样,用户通过浏览定格标记即可清楚地查看用户所定格的视频帧。The video processing apparatus may also add a freeze mark to the first video frame, so that the user can clearly view the video frame freezed by the user by browsing the freeze mark.
在用户输入多次第一输入的情况下,视频处理装置可以将多个第一图像分别与M个第二图像合并得到M个第三视频帧,这样M个第三视频帧即可呈现清晰且动态依次变化的多个第一图像。从而,根据M个第三视频帧得到的第一视频即可呈现清晰且动态依次变化的多个第一图像。In the case where the user inputs the first input multiple times, the video processing apparatus may combine the multiple first images with the M second images to obtain M third video frames, so that the M third video frames can be presented clearly and smoothly. A plurality of first images that change dynamically in sequence. Therefore, the first video obtained according to the M third video frames can present a plurality of first images that are clear and dynamically sequentially changed.
由于第一视频能够呈现出目标对象的清晰的且动态依次变化的多个图像,因此,第一视频具有流光效果,当目标对象为人时,通过上述过程即可拍摄出人像流光视频,人像流光视频能够清晰地保留拍摄过程中的每个定格人像,拓展了长曝光摄影的应用场景,提升了拍摄的趣味性。Since the first video can present multiple clear and dynamic images of the target object, the first video has a streamer effect. When the target object is a person, a portrait streamer video can be shot through the above process, and the portrait streamer video It can clearly retain each stop-motion portrait during the shooting process, expand the application scenarios of long-exposure photography, and improve the fun of shooting.
作为示例,视频处理装置可以在长曝光拍摄模式下对目标对象进行拍摄,从而获取N个视频帧。例如,用户启动视频处理装置的摄像头之后,可选择长曝光拍摄模式,在长曝光拍摄模式下,用户可点击拍摄预览界面中的“开始拍摄按钮”,此时,视频处理装置即可对目标对象进行拍摄,并获取N个视频帧。As an example, the video processing apparatus may photograph the target object in a long-exposure photographing mode, thereby acquiring N video frames. For example, after starting the camera of the video processing device, the user can select the long-exposure shooting mode. In the long-exposure shooting mode, the user can click the "start shooting button" in the shooting preview interface. At this time, the video processing device can shoot the target object. Take a shot, and acquire N video frames.
在视频处理装置对目标对象进行拍摄的过程中,用户可以通过输入第一输入对目标对象进行定格,第一输入例如可以是用户点击拍摄界面中的“拍照按钮”,也可以是用户按压视频处理装置的某个物理按键,还可以是用户输入语音指令,等等。In the process of the video processing apparatus shooting the target object, the user can freeze the target object by inputting a first input. For example, the first input can be the user clicking the "photograph button" in the shooting interface, or the user pressing the video processing A certain physical button of the device may also be a user inputting a voice command, and so on.
当视频处理装置接收到第一输入,视频处理装置可以获取到在用户输入第一输入的时刻,目标对象呈现于拍摄界面的图像(即第一图像)。视频处理装置可以从接收到第一输入时拍摄的视频帧中获取目标对象的第一图像。When the video processing apparatus receives the first input, the video processing apparatus may obtain the image (ie, the first image) of the target object presented on the shooting interface at the moment when the user inputs the first input. The video processing apparatus may acquire the first image of the target object from the video frame captured when the first input is received.
当对目标对象的拍摄达到用户的预期后,用户即可输入第二输入来结束拍摄过程,第二输入例如可以是用户点击拍摄界面的“结束拍摄按钮”,也可以是用户按压视频处理装置的某个物理按键,还可以是用户输入语音指令,等等。When the shooting of the target object reaches the user's expectation, the user can input a second input to end the shooting process. A certain physical button, it can also be a user input voice command, and so on.
当视频处理装置接收到第二输入,视频处理装置可以得到第一视频,这样,第一视频即可呈现出目标对象的清晰的且动态依次变化的多个图像。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.
以下结合图2至图5对上述过程进行说明。The above process will be described below with reference to FIGS. 2 to 5 .
如图2所示,用户在长曝光拍摄模式下点击开始拍摄按钮21,摄像装置20开始对目标对象22进行拍摄。As shown in FIG. 2 , the user clicks the start shooting button 21 in the long-exposure shooting mode, and the camera 20 starts shooting the target object 22 .
如图3所示,在摄像装置20对目标对象22进行拍摄的过程中,用户点击拍照按钮23,点击的瞬间,摄像装置20对目标对象22进行定格,摄 像装置20获取在该点击瞬间目标对象呈现于拍摄界面的图像。As shown in FIG. 3 , when the camera device 20 is shooting the target object 22 , the user clicks the camera button 23 . At the moment of clicking, the camera device 20 freezes the target object 22 , and the camera device 20 captures the target object at the moment of the click. The image presented in the capture interface.
如图4所示,用户再次点击拍照按钮23,点击的瞬间,摄像装置20再次对目标对象22进行定格,摄像装置20再次获取在该点击瞬间目标对象呈现于拍摄界面的图像。至此,摄像装置20能够获取到目标对象22被定格的两个图像。As shown in FIG. 4 , the user clicks the camera button 23 again. At the moment of clicking, the camera 20 freezes the target object 22 again, and the camera 20 obtains the image of the target object displayed on the shooting interface again at the click moment. So far, the camera 20 can obtain two images of the target object 22 being frozen.
如图5所示,用户点击结束拍摄按钮24,摄像装置20即可生成包含目标对象22被定格的两个图像的视频。As shown in FIG. 5 , when the user clicks the end shooting button 24 , the camera 20 can generate a video including two images of the target object 22 being frozen.
该实施方式中,在对目标对象进行拍摄的过程中,通过多次第一输入来对目标对象进行多次定格,并在每次第一输入时获取目标对象呈现于拍摄界面的图像,即可生成包含目标对象的多个图像的视频帧。这样,通过清晰地定格处于动态的目标对象,即可得到目标对象动态且清晰的视频。In this embodiment, in the process of photographing the target object, the target object is freezed multiple times through multiple first inputs, and an image of the target object presented on the photographing interface is acquired for each first input, that is, Generate a video frame containing multiple images of the target object. In this way, by clearly freezing the moving target object, a dynamic and clear video of the target object can be obtained.
该实施方式中,视频处理装置除了得到第一视频之外,还可以将第一子图像、第二子图像与第二图像合并得到目标照片,该目标照片可呈现出目标对象的清晰的且动态依次变化的多个图像,可称为流光照片。In this embodiment, in addition to obtaining the first video, the video processing device can also combine the first sub-image, the second sub-image and the second image to obtain a target photo, which can present a clear and dynamic image of the target object Multiple images that change in sequence can be called streamer photos.
可选的,在所述接收针对所述N个视频帧中第一视频帧的第一输入之后,所述方法还包括:Optionally, after the receiving the first input for the first video frame in the N video frames, the method further includes:
获取所述N个视频帧中位于所述第一视频帧之前的K个第四视频帧;Obtaining K fourth video frames before the first video frame in the N video frames;
将所述K个第四视频帧中的K个第四图像去除,并对所述K个第四视频帧的去除区域进行修复,得到K个第五视频帧,其中,所述第四图像与所述第一图像对应相同的对象;The K fourth images in the K fourth video frames are removed, and the removed areas of the K fourth video frames are repaired to obtain K fifth video frames, wherein the fourth images and the first image corresponds to the same object;
所述获取所述N个视频帧中M个第二视频帧对应的M个第二图像,包括:The obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
获取所述N个视频帧中位于所述第一视频帧之后的M个第二视频帧;acquiring M second video frames after the first video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
根据所述K个第五视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the K fifth video frames and the M third video frames.
该实施方式中,视频处理装置可以对第一视频帧、N个视频帧中位于第一视频帧之前的K个第四视频帧以及位于第一视频帧之后的M个第二 视频帧进行不同的处理,以进一步拓展长曝光摄影的应用场景,提升拍摄的趣味性。In this embodiment, the video processing apparatus may perform different processing on the first video frame, the K fourth video frames located before the first video frame, and the M second video frames located after the first video frame among the N video frames. processing to further expand the application scenarios of long exposure photography and enhance the fun of shooting.
视频处理装置可在拍摄过程中实时分析处理拍摄的每个视频帧,将每个视频帧中的目标对象和背景分割开,分别打上不同的标签。The video processing device can analyze and process each video frame captured in real time during the shooting process, separate the target object and the background in each video frame, and mark them with different labels.
对于第一视频帧,可以保留目标对象的图像(即第一图像)和背景图像。For the first video frame, the image of the target object (ie, the first image) and the background image may be retained.
对于M个第二视频帧,可以消除目标对象的图像(即第三图像),只保留背景图像(即第二图像),并将第一图像分别与第二图像合并得到第三视频帧。For the M second video frames, the image of the target object (ie the third image) can be eliminated, only the background image (ie the second image) is retained, and the first image and the second image are respectively combined to obtain the third video frame.
对于K个第四视频帧,可以消除目标对象的图像(即第四图像),只保留背景图像,背景图像被目标对象的图像遮挡的部分可通过图像融合技术进行图像修复,得到K个第五视频帧。术语“图像融合(Image Fusion)”是指将多源信道所采集到的关于同一目标的图像数据经过图像处理和计算机技术等,最大限度的提取各自信道中的有利信息,最后综合成高质量的图像。For the K fourth video frames, the image of the target object (that is, the fourth image) can be eliminated, and only the background image can be retained. video frame. The term "Image Fusion" refers to the process of image processing and computer technology for the image data of the same target collected by multi-source channels, to maximize the extraction of favorable information in the respective channels, and finally to synthesize them into high-quality images. image.
作为示例,图6至图7示出了通过图像融合技术进行背景图像修复的示意图。如图6所示,假设帧N为未被定格的视频帧,向前找到对应于帧N中目标对象22所在区域的背景图像25未被遮挡的其他帧,如帧N-2。如图7所示,提取帧N-2中的对应区域的背景图像25,对帧N中的目标对象22进行覆盖,融合生成新的已消除目标对象的仅保留了背景图像25的视频帧N’。As an example, FIGS. 6 to 7 show schematic diagrams of background image restoration through image fusion technology. As shown in FIG. 6 , assuming that frame N is an unfrozen video frame, find other frames corresponding to the background image 25 of the area where the target object 22 in frame N is not occluded, such as frame N-2. As shown in FIG. 7 , extract the background image 25 of the corresponding area in frame N-2, cover the target object 22 in frame N, and fuse to generate a new video frame N in which the target object has been eliminated and only the background image 25 is retained. '.
该实施方式中,通过上述技术方案,使得流光视频不仅能够清晰地保留拍摄过程中目标对象的每个被定格图像,还能够清晰地保留目标对象所处的环境图像,进一步拓展了长曝光摄影的应用场景,提升了拍摄的趣味性。In this embodiment, through the above technical solution, the streamer video can not only clearly retain each frozen image of the target object during the shooting process, but also clearly retain the environment image where the target object is located, further expanding the long-exposure photography. The application scene enhances the fun of shooting.
可选的,在所述接收针对所述N个视频帧中第一视频帧的第一输入之后,所述方法还包括:Optionally, after the receiving the first input for the first video frame in the N video frames, the method further includes:
获取所述N个视频帧中位于所述第一子视频帧与所述第二子视频帧之间的S个第六视频帧;acquiring S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
获取所述S个第六视频帧对应的S个第五图像,其中,所述S个第五图像为所述S个第六视频帧去除第六图像得到的图像,所述第六图像与所述第一子图像对应相同的对象;Obtain S fifth images corresponding to the S sixth video frames, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, and the sixth image is the same as the sixth image. the first sub-image corresponds to the same object;
将所述第一子图像分别与所述S个第五图像合并得到S个第七视频帧;Merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
所述获取所述N个视频帧中M个第二视频帧对应的M个第二图像,包括:The obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
获取所述N个视频帧中位于所述第二子视频帧之后的M个第二视频帧;acquiring M second video frames after the second sub-video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
根据所述S个第七视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the S seventh video frames and the M third video frames.
通过该实施方式得到的流光视频(即第一视频)在播放的过程中,可以展示目标对象动态变化的整个过程。During the playing process of the streamer video (ie, the first video) obtained by this embodiment, the entire process of the dynamic change of the target object can be displayed.
具体的,当第一视频播放至第一次定格时刻的节点(即第一子视频帧)时,即可显示该定格时刻目标对象呈现于拍摄界面的图像。当第一视频播放至第二次定格时刻的节点(即第二子视频帧)时,即可显示在第一次定格时刻和第二次定格时刻时目标对象呈现于拍摄界面的图像,依次类推,第一视频展示了目标对象动态变化的过程。当第一视频播放至非定格时刻的节点时,可以显示包含上一被定格时刻的节点时目标对象呈现于拍摄界面的图像。也就是说,在任何一个被定格时刻的节点显示的目标对象一旦显示出来后,在该定格时刻之后的视频段中会一直存在。Specifically, when the first video is played to the node at the first freeze moment (ie, the first sub-video frame), the image of the target object presented on the shooting interface at the freeze moment can be displayed. When the first video is played to the node at the second freeze moment (ie, the second sub-video frame), the image of the target object presented on the shooting interface at the first freeze moment and the second freeze moment can be displayed, and so on. , the first video shows the process of the dynamic change of the target object. When the first video is played to a node at a non-freeze moment, an image of the target object presented on the shooting interface when the node including the last freeze moment can be displayed. That is to say, once the target object displayed by the node at any freeze moment is displayed, it will always exist in the video segment after the freeze moment.
如图8所示,假设帧m+3为第一个被定格时刻的视频帧,显示在第一个被定格时刻目标对象22呈现于拍摄界面的图像;帧m+11为第二个被定格时刻的视频帧,显示在第一个被定格时刻和第二个被定格时刻目标对象22呈现于拍摄界面的图像。则帧m+4至帧m+10(图8中以帧m+7作为示例)均可以显示在第一个被定格时刻目标对象22呈现于拍摄界面的图像。As shown in FIG. 8 , assuming that frame m+3 is the video frame at the first freeze moment, the image of the target object 22 presented on the shooting interface at the first freeze moment is displayed; frame m+11 is the second freeze frame The video frame of the moment, showing the images of the target object 22 presented on the shooting interface at the first freeze moment and the second freeze moment. Then, frame m+4 to frame m+10 (frame m+7 is taken as an example in FIG. 8 ) can all display the image presented by the target object 22 on the shooting interface at the first freeze moment.
可选的,在所述得到第一视频之前,所述方法还包括:Optionally, before the obtaining of the first video, the method further includes:
采集所述N个视频帧中目标对象的运动轨迹;collecting the motion trajectory of the target object in the N video frames;
根据所述运动轨迹,生成用于描绘所述运动轨迹的动态涂鸦;According to the motion track, generating a dynamic graffiti for depicting the motion track;
所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
根据所述M个第三视频帧和所述动态涂鸦,得到第一视频。A first video is obtained 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 trajectory of the target object may also be the footprint of the target object, which is not limited in this embodiment of the present application.
该实施方式中,可以基于人体手势识别技术,为第一视频增加虚拟的涂鸦素材,用户在拍摄时可以选择预先提供的特效素材来描绘目标对象的手部运动轨迹。如图9所示,用户可以在点击开始拍摄按钮21之前点击素材选择按钮26来选择记录手部运动轨迹的特效。如图10所示,用户可以在拍摄过程中点击素材选择按钮26随时切换不同的虚拟素材。In this embodiment, a virtual graffiti material can be added to the first video based on the human gesture recognition technology, and the user can select a pre-provided special effect material to describe the hand movement trajectory of the target object when shooting. As shown in FIG. 9 , the user can click the material selection button 26 before clicking the start shooting button 21 to select the special effect for recording the hand movement track. As shown in FIG. 10 , the user can click the material selection button 26 to switch between different virtual materials at any time during the shooting process.
人体手势识别技术可以基于计算机视觉,通过处理真实的视频图像来识别手势,包括手势分割、轨迹跟踪和分类识别三个过程。跟踪手部运动轨迹可以采用图像跟踪算法,例如光流法、连续自适应的MeanShift算法(Continuously Adaptive Mean-SHIFT,camshift)、核相关滤波算法(Kernel Correlation Filter,KCF)、深度学习等算法,或者,也可以直接利用每个视频帧中检测到的手部位置来跟踪手部运动轨迹,本申请实施例对此不作限定。Human gesture recognition technology can recognize gestures by processing real video images based on computer vision, including gesture segmentation, trajectory tracking and classification and recognition. Tracking hand motion trajectory can use image tracking algorithm, such as optical flow method, continuously adaptive MeanShift algorithm (Continuously Adaptive Mean-SHIFT, camshift), Kernel Correlation Filter algorithm (Kernel Correlation Filter, KCF), deep learning and other algorithms, or , the hand position detected in each video frame may also be used directly to track the hand motion trajectory, which is not limited in this embodiment of the present application.
在拍摄过程中,视频处理装置可通过算法实时解析目标对象的手部运动轨迹,并跟随手部运动轨迹添加所选的涂鸦素材。比如选择了“爱心形状”素材,则手部运动轨迹描摹出的动态轨迹处即显示爱心形状的涂鸦。图11至图12分别示出了添加有涂鸦素材27的视频帧,这些涂鸦素材可呈现出光绘、烟花等效果,呈现了目标对象的动感轨迹,在第一视频的播放过程中可以呈现出目标对象的动感轨迹,提升了拍摄的趣味性。During the shooting process, the video processing device can analyze the hand movement trajectory of the target object in real time through an algorithm, and follow the hand movement trajectory to add the selected graffiti material. For example, if the "love shape" material is selected, the heart-shaped graffiti will be displayed at the dynamic track traced by the hand movement track. Figures 11 to 12 respectively show video frames to which graffiti materials 27 are added. These graffiti materials can present effects such as light painting, fireworks, etc., and present the dynamic trajectory of the target object. During the playback of the first video, the target can be presented. The dynamic trajectory of the object enhances the fun of shooting.
图13示出了本申请实施例提供的一种视频处理装置的结构示意图。FIG. 13 shows a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application.
如图13所示,视频处理装置300包括:As shown in FIG. 13 , the video processing apparatus 300 includes:
第一获取模块301,用于获取N个视频帧;The first acquisition module 301 is used to acquire N video frames;
接收模块302,用于接收针对所述N个视频帧中第一视频帧的第一输 入;A receiving module 302, for receiving the first input for the first video frame in the N video frames;
第二获取模块303,用于响应于所述第一输入,获取所述第一视频帧中的第一图像;A second acquiring module 303, configured to acquire the first image in the first video frame in response to the first input;
第三获取模块304,用于获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;A third obtaining module 304, configured to obtain M second images corresponding to M second video frames in the N video frames, wherein the M second images are the M second video frames except the first video frame. An image obtained from three images, the third image corresponds to the same object as the first image;
第一处理模块305,用于将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;a first processing module 305, configured to combine the first image with the M second images respectively to obtain M third video frames;
第二处理模块306,用于根据所述M个第三视频帧,得到第一视频。The second processing module 306 is configured to obtain a first video according to the M third video frames.
可选的,视频处理装置300还包括:Optionally, the video processing apparatus 300 further includes:
第四获取模块,用于获取所述N个视频帧中位于所述第一视频帧之前的K个第四视频帧;a fourth acquisition module, configured to acquire K fourth video frames before the first video frame in the N video frames;
第三处理模块,用于将所述K个第四视频帧中的K个第四图像去除,并对所述K个第四视频帧的去除区域进行修复,得到K个第五视频帧,其中,所述第四图像与所述第一图像对应相同的对象;The third processing module is configured to remove the K fourth images in the K fourth video frames, and repair the removed areas of the K fourth video frames to obtain K fifth video frames, wherein , the fourth image corresponds to the same object as the first image;
第三获取模块304具体用于:The third obtaining module 304 is specifically used for:
获取所述N个视频帧中位于所述第一视频帧之后的M个第二视频帧;acquiring M second video frames after the first video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
第二处理模块306具体用于:The second processing module 306 is specifically used for:
根据所述K个第五视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained 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;
第二获取模块303具体用于:The second obtaining module 303 is specifically used for:
获取所述第一子视频帧中的第一子图像及所述第二子视频帧中的第二子图像,其中,所述第三图像、所述第一子图像及所述第二子图像对应相同的对象;acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame, wherein the third image, the first sub-image and the second sub-image correspond to the same object;
第一处理模块305具体用于:The first processing module 305 is specifically used for:
将所述第一子图像和第二子图像分别与所述M个第二图像合并得到M个第三视频帧。The first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
可选的,视频处理装置300还包括:Optionally, the video processing apparatus 300 further includes:
第五获取模块,用于获取所述N个视频帧中位于所述第一子视频帧与所述第二子视频帧之间的S个第六视频帧;a fifth acquisition module, configured to acquire S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
第六获取模块,用于获取所述S个第六视频帧对应的S个第五图像,其中,所述S个第五图像为所述S个第六视频帧去除第六图像得到的图像,所述第六图像与所述第一子图像对应相同的对象;a sixth obtaining module, configured to obtain S fifth images corresponding to the S sixth video frames, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, the sixth image corresponds to the same object as the first sub-image;
第四处理模块,用于将所述第一子图像分别与所述S个第五图像合并得到S个第七视频帧;a fourth processing module, configured to combine the first sub-image with the S fifth images to obtain S seventh video frames;
第三获取模块304具体用于:The third obtaining module 304 is specifically used for:
获取所述N个视频帧中位于所述第二子视频帧之后的M个第二视频帧;acquiring M second video frames after the second sub-video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
所述第三处理模块具体用于:The third processing module is specifically used for:
根据所述S个第七视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the S seventh video frames and the M third video frames.
可选的,视频处理装置300还包括:Optionally, the video processing apparatus 300 further includes:
采集模块,用于采集所述N个视频帧中目标对象的运动轨迹;a collection module, used for collecting the motion trajectory of the target object in the N video frames;
生成模块,用于根据所述运动轨迹,生成用于描绘所述运动轨迹的动态涂鸦;a generating module for generating dynamic graffiti for depicting the motion trajectory according to the motion trajectory;
所述第三处理模块具体用于:The third processing module is specifically used for:
根据所述M个第三视频帧和所述动态涂鸦,得到第一视频。A first video is obtained according to the M third video frames and the dynamic graffiti.
本申请实施例中的视频处理装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The video processing apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的视频处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The video processing apparatus in this embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的视频处理装置能够实现图1至图12的方法实施例实现的各个过程,并能够达到相同的有益效果,为避免重复,这里不再赘述。The video processing apparatus provided in the embodiments of the present application can implement the various processes implemented by the method embodiments in FIG. 1 to FIG. 12 , and can achieve the same beneficial effects. To avoid repetition, details are not repeated here.
本申请实施例中,在视频拍摄过程中或视频拍摄之后,通过对特定视频帧输入第一输入,即可使视频处理装置获取特定视频帧中的特定图像,并在去除了其他视频帧中与该特定图像相同对象的图像之后,将该特定图像与其他视频帧合并得到新的视频帧。通过上述处理,能够得到不同于原有视频帧图像的新的视频帧,也就能够使用户获得与原有视频帧图像不同的视频,可见,这能够提高视频处理的灵活性。In the embodiment of the present application, during or after the video shooting, by inputting the first input to the specific video frame, the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame. Through the above processing, a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
可选的,如图14所示,本申请实施例还提供一种电子设备400,包括处理器401,存储器402,存储在存储器402上并可在所述处理器401上运行的程序或指令,该程序或指令被处理器401执行时实现上述视频处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 14 , an embodiment of the present application further provides an electronic device 400, including a processor 401, a memory 402, a program or instruction stored in the memory 402 and executable on the processor 401, When the program or instruction is executed by the processor 401, each process of the above video processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图15为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 15 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、以及处理器5010等部件。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, etc. part.
本领域技术人员可以理解,电子设备500还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器5010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图15中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 5010 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 15 does not constitute a limitation to the electronic device. The electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
其中,处理器5010用于:获取N个视频帧;The processor 5010 is used for: acquiring N video frames;
用户输入单元507用于:接收针对所述N个视频帧中第一视频帧的第一输入;The user input unit 507 is configured to: receive a first input for a first video frame in the N video frames;
处理器5010还用于:响应于所述第一输入,获取所述第一视频帧中的第一图像;获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;根据所述M个第三视频帧,得到第一视频。The processor 5010 is further configured to: in response to the first input, obtain a first image in the first video frame; obtain M second images corresponding to M second video frames in the N video frames, Wherein, 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 images are combined to obtain M third video frames; according to the M third video frames, a first video is obtained.
本申请实施例中,在视频拍摄过程中或视频拍摄之后,通过对特定视频帧输入第一输入,即可使视频处理装置获取特定视频帧中的特定图像,并在去除了其他视频帧中与该特定图像相同对象的图像之后,将该特定图像与其他视频帧合并得到新的视频帧。通过上述处理,能够得到不同于原有视频帧图像的新的视频帧,也就能够使用户获得与原有视频帧图像不同的视频,可见,这能够提高视频处理的灵活性。In the embodiment of the present application, during or after the video shooting, by inputting the first input to the specific video frame, the video processing apparatus can obtain the specific image in the specific video frame, and remove the other video frames with the same image. After the specific image is an image of the same object, the specific image is merged with other video frames to obtain a new video frame. Through the above processing, a new video frame that is different from the original video frame image can be obtained, which enables the user to obtain a video different from the original video frame image. It can be seen that this can improve the flexibility of video processing.
可选的,处理器5010还用于:Optionally, the processor 5010 is further configured to:
获取所述N个视频帧中位于所述第一视频帧之前的K个第四视频帧;Obtaining K fourth video frames before the first video frame in the N video frames;
将所述K个第四视频帧中的K个第四图像去除,并对所述K个第四视频帧的去除区域进行修复,得到K个第五视频帧,其中,所述第四图像与所述第一图像对应相同的对象;The K fourth images in the K fourth video frames are removed, and the removed areas of the K fourth video frames are repaired to obtain K fifth video frames, wherein the fourth images and the first image corresponds to the same object;
获取所述N个视频帧中位于所述第一视频帧之后的M个第二视频帧;acquiring M second video frames after the first video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
根据所述K个第五视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained 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;
处理器5010还用于: Processor 5010 is also used to:
获取所述第一子视频帧中的第一子图像及所述第二子视频帧中的第二子图像,其中,所述第三图像、所述第一子图像及所述第二子图像对应相同的对象;acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame, wherein the third image, the first sub-image and the second sub-image correspond to the same object;
将所述第一子图像和第二子图像分别与所述M个第二图像合并得到M个第三视频帧。The first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
可选的,处理器5010还用于:Optionally, the processor 5010 is further configured to:
获取所述N个视频帧中位于所述第一子视频帧与所述第二子视频帧之间的S个第六视频帧;acquiring S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
获取所述S个第六视频帧对应的S个第五图像,其中,所述S个第五图像为所述S个第六视频帧去除第六图像得到的图像,所述第六图像与所述第一子图像对应相同的对象;Obtain S fifth images corresponding to the S sixth video frames, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, and the sixth image is the same as the sixth image. the first sub-image corresponds to the same object;
将所述第一子图像分别与所述S个第五图像合并得到S个第七视频帧;Merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
获取所述N个视频帧中位于所述第二子视频帧之后的M个第二视频帧;acquiring M second video frames after the second sub-video frame in the N video frames;
获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
根据所述S个第七视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the S seventh video frames and the M third video frames.
可选的,处理器5010还用于:Optionally, the processor 5010 is further configured to:
采集所述N个视频帧中目标对象的运动轨迹;collecting the motion trajectory of the target object in the N video frames;
根据所述运动轨迹,生成用于描绘所述运动轨迹的动态涂鸦;According to the motion track, generating a dynamic graffiti for depicting the motion track;
根据所述M个第三视频帧和所述动态涂鸦,得到第一视频。A first video is obtained according to the M third video frames and the dynamic graffiti.
应理解的是,本申请实施例中,输入单元504可以包括图形处理器(Graphics Processing Unit,GPU)5041和麦克风5042,图形处理器5041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元506可包括显示面板5061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板5061。用户输入单元507包括触控面板5071以及其他输入设备5072。触控面板5071,也称为触摸屏。触控面板5071可包括触摸检测装置和触摸控制器两个部分。其他输入设备5072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器509可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器5010可集成应用处理器和调制解调处理器, 其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器5010中。It should be understood that, in this embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042. Such as camera) to obtain still pictures or video image data for processing. The display unit 506 may include a display panel 5061, which 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 . The touch panel 5071 is also called a touch screen. The 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, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again. Memory 509 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 5010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 5010.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述视频处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above video processing method embodiment can be achieved, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,计算机可读存储介质的示例包括非暂态机器可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, and examples of the computer-readable storage medium include non-transitory machine-readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory ( Random Access Memory, RAM), disk or CD, etc.
本申请实施例还提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述视频处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above video processing method embodiments. Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes 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 the reverse order depending on the functions involved. To perform functions, for example, 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 some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上 述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (15)

  1. 一种视频处理方法,包括:A video processing method, comprising:
    获取N个视频帧;Get N video frames;
    接收针对所述N个视频帧中第一视频帧的第一输入;receiving a first input for a first video frame of the N video frames;
    响应于所述第一输入,获取所述第一视频帧中的第一图像;in response to the first input, acquiring a first image in the first video frame;
    获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;Acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are images obtained by removing the third image from the M second video frames, and the M second images are obtained by removing the third image from the M second video frames. The third image corresponds to the same object as the first image;
    将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;Merging the first image with the M second images respectively to obtain M third video frames;
    根据所述M个第三视频帧,得到第一视频。According to the M third video frames, a first video is obtained.
  2. 根据权利要求1所述的方法,其中,在所述接收针对所述N个视频帧中第一视频帧的第一输入之后,所述方法还包括:The method of claim 1, wherein after the receiving the first input for the first video frame of the N video frames, the method further comprises:
    获取所述N个视频帧中位于所述第一视频帧之前的K个第四视频帧;Obtaining K fourth video frames before the first video frame in the N video frames;
    将所述K个第四视频帧中的K个第四图像去除,并对所述K个第四视频帧的去除区域进行修复,得到K个第五视频帧,其中,所述第四图像与所述第一图像对应相同的对象;The K fourth images in the K fourth video frames are removed, and the removed areas of the K fourth video frames are repaired to obtain K fifth video frames, wherein the fourth images and the first image corresponds to the same object;
    所述获取所述N个视频帧中M个第二视频帧对应的M个第二图像,包括:The obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
    获取所述N个视频帧中位于所述第一视频帧之后的M个第二视频帧;acquiring M second video frames after the first video frame in the N video frames;
    获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
    所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
    根据所述K个第五视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the K fifth video frames and the M third video frames.
  3. 根据权利要求1所述的方法,其中,所述第一视频帧包括第一子视频帧和第二子视频帧;The method of claim 1, wherein the first video frame comprises a first sub-video frame and a second sub-video frame;
    所述获取所述第一视频帧中的第一图像,包括:The acquiring the 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, wherein the third image, the first sub-image and the second sub-image correspond to the same object;
    所述将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧,包括:The obtaining M third video frames by merging the first image and the M second images respectively, including:
    将所述第一子图像和第二子图像分别与所述M个第二图像合并得到M个第三视频帧。The first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
  4. 根据权利要求3所述的方法,其中,在所述接收针对所述N个视频帧中第一视频帧的第一输入之后,所述方法还包括:3. The method of claim 3, wherein after the receiving the first input for the first video frame of the N video frames, the method further comprises:
    获取所述N个视频帧中位于所述第一子视频帧与所述第二子视频帧之间的S个第六视频帧;acquiring S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
    获取所述S个第六视频帧对应的S个第五图像,其中,所述S个第五图像为所述S个第六视频帧去除第六图像得到的图像,所述第六图像与所述第一子图像对应相同的对象;Obtain S fifth images corresponding to the S sixth video frames, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, and the sixth image is the same as the sixth image. the first sub-image corresponds to the same object;
    将所述第一子图像分别与所述S个第五图像合并得到S个第七视频帧;Merging the first sub-image with the S fifth images respectively to obtain S seventh video frames;
    所述获取所述N个视频帧中M个第二视频帧对应的M个第二图像,包括:The obtaining of the M second images corresponding to the M second video frames in the N video frames includes:
    获取所述N个视频帧中位于所述第二子视频帧之后的M个第二视频帧;acquiring M second video frames after the second sub-video frame in the N video frames;
    获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
    所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
    根据所述S个第七视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the S seventh video frames and the M third video frames.
  5. 根据权利要求1所述的方法,其中,在所述得到第一视频之前,所述方法还包括:The method according to claim 1, wherein, before said obtaining the first video, the method further comprises:
    采集所述N个视频帧中目标对象的运动轨迹;collecting the motion trajectory of the target object in the N video frames;
    根据所述运动轨迹,生成用于描绘所述运动轨迹的动态涂鸦;According to the motion track, generating a dynamic graffiti for depicting the motion track;
    所述根据所述M个第三视频帧,得到第一视频,包括:The obtaining the first video according to the M third video frames includes:
    根据所述M个第三视频帧和所述动态涂鸦,得到第一视频。A first video is obtained according to the M third video frames and the dynamic graffiti.
  6. 一种视频处理装置,包括:A video processing device, comprising:
    第一获取模块,用于获取N个视频帧;The first acquisition module is used to acquire N video frames;
    接收模块,用于接收针对所述N个视频帧中第一视频帧的第一输入;a receiving module, configured to receive a first input for a first video frame in the N video frames;
    第二获取模块,用于响应于所述第一输入,获取所述第一视频帧中的第一图像;a second acquisition module, configured to acquire the first image in the first video frame in response to the first input;
    第三获取模块,用于获取所述N个视频帧中M个第二视频帧对应的M个第二图像,其中,所述M个第二图像为所述M个第二视频帧去除第三图像得到的图像,所述第三图像与所述第一图像对应相同的对象;A third acquiring module, configured to acquire M second images corresponding to M second video frames in the N video frames, wherein the M second images are the M second video frames minus the third an image obtained from an image, the third image corresponds to the same object as the first image;
    第一处理模块,用于将所述第一图像分别与所述M个第二图像合并得到M个第三视频帧;a first processing module, configured to obtain M third video frames by merging the first image with the M second images respectively;
    第二处理模块,用于根据所述M个第三视频帧,得到第一视频。The second processing module is configured to obtain the first video according to the M third video frames.
  7. 根据权利要求6所述的装置,所述装置还包括:The apparatus of claim 6, further comprising:
    第四获取模块,用于获取所述N个视频帧中位于所述第一视频帧之前的K个第四视频帧;a fourth acquisition module, configured to acquire K fourth video frames before the first video frame in the N video frames;
    第三处理模块,用于将所述K个第四视频帧中的K个第四图像去除,并对所述K个第四视频帧的去除区域进行修复,得到K个第五视频帧,其中,所述第四图像与所述第一图像对应相同的对象;The third processing module is configured to remove the K fourth images in the K fourth video frames, and repair the removed areas of the K fourth video frames to obtain K fifth video frames, wherein , the fourth image corresponds to the same object as the first image;
    所述第三获取模块具体用于:The third acquisition module is specifically used for:
    获取所述N个视频帧中位于所述第一视频帧之后的M个第二视频帧;acquiring M second video frames after the first video frame in the N video frames;
    获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
    所述第二处理模块具体用于:The second processing module is specifically used for:
    根据所述K个第五视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the K fifth video frames and the M third video frames.
  8. 根据权利要求6所述的装置,其中,所述第一视频帧包括第一子视频帧和第二子视频帧;The apparatus of claim 6, wherein the first video frame comprises a first sub-video frame and a second sub-video frame;
    所述第二获取模块具体用于:The second acquisition module is specifically used for:
    获取所述第一子视频帧中的第一子图像及所述第二子视频帧中的第二子图像,其中,所述第三图像、所述第一子图像及所述第二子图像对应相同的对象;acquiring a first sub-image in the first sub-video frame and a second sub-image in the second sub-video frame, wherein the third image, the first sub-image and the second sub-image correspond to the same object;
    所述第一处理模块具体用于:The first processing module is specifically used for:
    将所述第一子图像和第二子图像分别与所述M个第二图像合并得到M个第三视频帧。The first sub-image and the second sub-image are respectively combined with the M second images to obtain M third video frames.
  9. 根据权利要求8所述的装置,所述装置还包括:The apparatus of claim 8, further comprising:
    第五获取模块,用于获取所述N个视频帧中位于所述第一子视频帧与所述第二子视频帧之间的S个第六视频帧;a fifth acquisition module, configured to acquire S sixth video frames located between the first sub-video frame and the second sub-video frame in the N video frames;
    第六获取模块,用于获取所述S个第六视频帧对应的S个第五图像,其中,所述S个第五图像为所述S个第六视频帧去除第六图像得到的图像,所述第六图像与所述第一子图像对应相同的对象;a sixth obtaining module, configured to obtain S fifth images corresponding to the S sixth video frames, wherein the S fifth images are images obtained by removing the sixth image from the S sixth video frames, the sixth image corresponds to the same object as the first sub-image;
    第四处理模块,用于将所述第一子图像分别与所述S个第五图像合并得到S个第七视频帧;a fourth processing module, configured to combine the first sub-image with the S fifth images to obtain S seventh video frames;
    所述第三获取模块具体用于:The third acquisition module is specifically used for:
    获取所述N个视频帧中位于所述第二子视频帧之后的M个第二视频帧;acquiring M second video frames after the second sub-video frame in the N video frames;
    获取所述M个第二视频帧对应的M个第二图像;acquiring M second images corresponding to the M second video frames;
    所述第三处理模块具体用于:The third processing module is specifically used for:
    根据所述S个第七视频帧和所述M个第三视频帧,得到第一视频。A first video is obtained according to the S seventh video frames and the M third video frames.
  10. 根据权利要求6所述的装置,所述装置还包括:The apparatus of claim 6, further comprising:
    采集模块,用于采集所述N个视频帧中目标对象的运动轨迹;a collection module, used for collecting the motion trajectory of the target object in the N video frames;
    生成模块,用于根据所述运动轨迹,生成用于描绘所述运动轨迹的动态涂鸦;a generating module for generating dynamic graffiti for depicting the motion trajectory according to the motion trajectory;
    所述第三处理模块具体用于:The third processing module is specifically used for:
    根据所述M个第三视频帧和所述动态涂鸦,得到第一视频。A first video is obtained according to the M third video frames and the dynamic graffiti.
  11. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至5中任一项所述的视频处理方法的步骤。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 being executed by the processor to achieve as claimed in claims 1 to 5 The steps of any one of the video processing methods.
  12. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至5中任一项所述的视频处理方法的步骤。A readable storage medium on which programs or instructions are stored, and when the programs or instructions are executed by a processor, implement the steps of the video processing method according to any one of claims 1 to 5.
  13. 一种电子设备,被配置为用于执行如权利要求1至5任一项所述的视频处理方法的步骤。An electronic device configured to perform the steps of the video processing method as claimed in any one of claims 1 to 5.
  14. 一种计算机程序产品,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至5任一项所述的视频处理方法的步骤。A computer program product executed by at least one processor to implement the steps of the video processing method according to any one of claims 1 to 5.
  15. 一种芯片,包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至5任一项所述的视频处理方法的步骤。A chip, comprising 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 to implement the steps of the video processing method according to any one of claims 1 to 5 .
PCT/CN2022/086751 2021-04-21 2022-04-14 Video processing method, video processing apparatus and electronic device WO2022222835A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2022222835A1 true WO2022222835A1 (en) 2022-10-27

Family

ID=77027721

Family Applications (1)

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

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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164234A (en) * 2010-02-09 2011-08-24 株式会社泛泰 Apparatus having photograph function
CN106375670A (en) * 2016-09-30 2017-02-01 努比亚技术有限公司 Image processing method and terminal
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
CN110225241A (en) * 2019-04-29 2019-09-10 努比亚技术有限公司 A kind of video capture control method, terminal and computer readable storage medium
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
CN113207038A (en) * 2021-04-21 2021-08-03 维沃移动通信(杭州)有限公司 Video processing method, video processing device and electronic equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
CN110266973B (en) * 2019-07-19 2020-08-25 腾讯科技(深圳)有限公司 Video processing method, video processing device, computer-readable storage medium and computer equipment
CN111698553B (en) * 2020-05-29 2022-09-27 维沃移动通信有限公司 Video processing method and device, electronic equipment and 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102164234A (en) * 2010-02-09 2011-08-24 株式会社泛泰 Apparatus having photograph function
CN106375670A (en) * 2016-09-30 2017-02-01 努比亚技术有限公司 Image processing method and terminal
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
CN110225241A (en) * 2019-04-29 2019-09-10 努比亚技术有限公司 A kind of video capture control method, terminal and computer readable storage medium
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
CN113207038A (en) * 2021-04-21 2021-08-03 维沃移动通信(杭州)有限公司 Video processing method, video processing device and electronic equipment

Also Published As

Publication number Publication date
CN113207038B (en) 2023-04-28
CN113207038A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
EP2750372B1 (en) Photographing device for producing composite image and method using the same
WO2022222835A1 (en) Video processing method, video processing apparatus and electronic device
US9137461B2 (en) Real-time camera view through drawn region for image capture
CN112714253B (en) Video recording method and device, electronic equipment and readable storage medium
WO2022078241A1 (en) Photographing method and apparatus, and electronic device
CN111669495B (en) Photographing method, photographing device and electronic equipment
WO2023134583A1 (en) Video recording method and apparatus, and electronic device
CN117152660A (en) Image display method and device
CN112136309B (en) System and method for performing rewind operations with a mobile image capture device
WO2023151527A1 (en) Image photographing method and apparatus
CN114125297B (en) Video shooting method, device, electronic equipment and storage medium
WO2022161261A1 (en) Image display method and apparatus, and electronic device
CN112367467B (en) Display control method, display control device, electronic apparatus, and medium
CN115801977A (en) Multi-mode system for segmenting video, multi-mode system for segmenting multimedia and multi-mode method for segmenting multimedia
CN112887623B (en) Image generation method and device and electronic equipment
CN112887611A (en) Image processing method, device, equipment and storage medium
CN112672059B (en) Shooting method and shooting device
CN114500852B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN116847187A (en) Shooting method, shooting device, electronic equipment and storage medium
CN113873160B (en) Image processing method, device, electronic equipment and computer storage medium
CN117294932A (en) Shooting method, shooting device and electronic equipment
CN117278842A (en) Shooting control method, shooting control device, electronic equipment and readable storage medium
CN116156076A (en) Video recording method, device, electronic equipment and storage medium
CN114143455A (en) Shooting method and device and electronic equipment
CN115242976A (en) Shooting method, shooting device and electronic equipment

Legal Events

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

Ref document number: 22790943

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22790943

Country of ref document: EP

Kind code of ref document: A1