WO2021203996A1 - 视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质 - Google Patents

视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质 Download PDF

Info

Publication number
WO2021203996A1
WO2021203996A1 PCT/CN2021/083405 CN2021083405W WO2021203996A1 WO 2021203996 A1 WO2021203996 A1 WO 2021203996A1 CN 2021083405 W CN2021083405 W CN 2021083405W WO 2021203996 A1 WO2021203996 A1 WO 2021203996A1
Authority
WO
WIPO (PCT)
Prior art keywords
background
shooting
video
image frame
interface
Prior art date
Application number
PCT/CN2021/083405
Other languages
English (en)
French (fr)
Inventor
郦橙
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to JP2022560242A priority Critical patent/JP2023519625A/ja
Priority to BR112022019945A priority patent/BR112022019945A2/pt
Priority to KR1020227037660A priority patent/KR20220159453A/ko
Priority to EP21785129.4A priority patent/EP4131935A4/en
Publication of WO2021203996A1 publication Critical patent/WO2021203996A1/zh
Priority to US17/882,499 priority patent/US11962932B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/036Insert-editing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/34Indicating arrangements 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/633Control of cameras or camera modules by using electronic viewfinders for displaying additional information relating to control or operation of the camera
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Definitions

  • the present disclosure relates to the technical field of video processing. Specifically, the present disclosure relates to a video processing method, device, electronic equipment, and non-transitory computer-readable storage medium.
  • the traditional green screen technology refers to the use of pure color (preferably green) cloth as the background of the actors during film and television shooting, so that the portrait can be deducted during post-production, placed on other backgrounds, and combined into a film.
  • professional editing software is not limited to film and television practitioners. Film and television editing enthusiasts can also use professional software such as Adobe Premiere to cut out characters with pens or straws and superimpose them on other backgrounds.
  • this type of green screen technology has two problems, which significantly increase the threshold for users to use when shooting videos in daily life:
  • the present disclosure provides a video processing method, device, electronic equipment, and non-transitory computer-readable storage medium, which can solve the problem of high barriers for users to use in daily video shooting.
  • the technical solution is as follows:
  • a video processing method includes:
  • the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background;
  • a video processing device in a second aspect, includes:
  • the display module is used to display the preset shooting interface in the current interface of the application when the preset application enters the shooting mode; the shooting interface has a preset initial background;
  • An acquisition module for acquiring the image frame of the target object and the initial background
  • the display module is further configured to combine the image frame as the foreground with the initial background, and display it in the shooting interface;
  • a receiving module for receiving a first shooting start instruction and a first shooting end instruction
  • a generating module configured to start generating video data based on the image frame and the initial background
  • the stop module is used to stop generating video data and obtain the first video data that has been generated.
  • an electronic device in a third aspect, includes:
  • the bus is used to connect the processor and the memory
  • the memory is used to store operation instructions
  • the processor is configured to call the operation instruction and execute the executable instruction to cause the processor to perform operations corresponding to the video processing method shown in the first aspect of the present disclosure.
  • a non-transitory computer-readable storage medium stores a computer program.
  • the program is executed by a processor, the video shown in the first aspect of the present disclosure Approach.
  • the preset shooting interface When the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background, and then the image frame of the target object and the initial background are acquired , Combining the image frame as the foreground with the initial background and displaying it in the shooting interface; when receiving a first start shooting instruction, start generating video data based on the image frame and the initial background, When the first shooting end instruction is received, the generation of video data is stopped, and the first video data that has been generated is obtained.
  • the target object can be combined with the background required by the user, which reduces a large number of operations by the user and improves the user experience.
  • the user can enter the shooting mode provided by the present application through a simple operation, and the interaction path is quick and convenient, and the user does not need to go through multiple interface or function switching, which further improves the user experience.
  • FIG. 1 is a schematic flowchart of a video processing method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a video processing method provided by another embodiment of the present disclosure.
  • Figure 3 is a schematic diagram of the default interface after loading the application program of the present disclosure
  • FIG. 4 is a schematic diagram of the default interface of the shooting interface of the disclosed application.
  • FIG. 5 is a schematic diagram of an interface where the shooting interface of the disclosed application program does not display a background preview window
  • Fig. 6 is a schematic diagram of an interface showing the local background of the disclosed application.
  • FIG. 7A is an image frame collected through a terminal by an application program of the present disclosure
  • FIG. 7B is the image frame of the target object extracted from the image frame by the application program of the present disclosure.
  • FIG. 8 is a schematic diagram of an interface showing the initial background and the image frame of the target object on the shooting interface of the application program of the present disclosure
  • FIG. 9 is a schematic diagram of the interface when the video data is generated by the application program of the present disclosure.
  • Figure 10 is a schematic diagram of an interface for editing a video background of the disclosed application.
  • 11 is a schematic diagram of an interface showing candidate backgrounds and image frames of the target object on the shooting interface of the application program of the present disclosure
  • FIG. 12 is a schematic diagram of the shooting interface after two pieces of video data have been generated by the disclosed application.
  • FIG. 13 is a schematic structural diagram of a video processing apparatus provided by another embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of an electronic device for video processing provided by another embodiment of the present disclosure.
  • the video processing method, device, electronic equipment, and non-transitory computer-readable storage medium provided in the present disclosure are intended to solve the above technical problems in the prior art.
  • a video processing method As shown in FIG. 1, the method includes:
  • Step S101 when the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background;
  • the application program may be preset with a shooting mode.
  • the application program may call an image acquisition device, audio acquisition device, etc. on the terminal to collect data such as images and audio.
  • the preset shooting interface can be set with an initial background, which can be a video background or an image background.
  • the initial background will be displayed in the shooting interface.
  • Step S102 acquiring the image frame and the initial background of the target object
  • the application when the application loads the shooting interface, it can obtain the initial background from the preset video background resource library and display it in the shooting interface, and at the same time, obtain the image frame of the target object, for example, the image frame of the character object.
  • Step S103 Combine the image frame as the foreground with the initial background, and display it in the shooting interface
  • the image frame of the target object can be used as the foreground and the initial background as the background, and the image frame and the initial background can be displayed in the shooting interface at the same time.
  • Step S104 when the first shooting start instruction is received, start generating video data based on the image frame and the initial background;
  • Step S105 When the first shooting end instruction is received, stop generating the video data, and obtain the first video data that has been generated.
  • the application can start to generate video data based on the image frame and the initial background, and then store the generated video data.
  • the application can start to generate video data. Stop generating video data, and get a piece of video data.
  • the preset shooting interface when the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background, and then the image frame and initial Background, the image frame is combined with the initial background as the foreground and displayed in the shooting interface; when the first shooting start instruction is received, video data is generated based on the image frame and the initial background, and when the first shooting end instruction is received , Stop generating video data and get the first video data that has been generated.
  • the user can automatically combine the target object with the background required by the user in the daily video shooting process, regardless of whether the user's background is a solid color or close to a solid color, which reduces a large number of manual operations by the user and improves the user experience .
  • the user can enter the shooting mode provided by the present application through a simple operation, and the interaction path is quick and convenient, and the user does not need to go through multiple interface or function switching, which further improves the user experience.
  • a video processing method As shown in FIG. 2, the method includes:
  • Step S201 When the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background;
  • the application program can be installed in the terminal, and the terminal can have the following characteristics:
  • the device has a central processing unit, a memory, an input component and an output component, that is to say, the device is often a microcomputer device with communication functions.
  • the device can also have a variety of input methods, such as keyboard, mouse, touch screen, microphone and camera, etc., and can adjust the input as needed.
  • the equipment often has a variety of output methods, such as receivers, display screens, etc., which can also be adjusted as needed;
  • the device In the software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, etc. At the same time, these operating systems are becoming more and more open, and personalized applications based on these open operating system platforms are emerging one after another, such as communication books, calendars, notepads, calculators, and various games, which greatly satisfy individuality. The needs of users;
  • the device has flexible access methods and high-bandwidth communication performance, and can automatically adjust the selected communication method according to the selected service and the environment in which it is located, so that it is convenient for users to use.
  • the device can support GSM (Global System for Mobile Communication), WCDMA (Wideband Code Division Multiple Access), CDMA 2000 (Code Division Multiple Access), TDSCDMA (Time Division) -Synchronous Code Division Multiple Access, Time Division Synchronous Code Division Multiple Access), Wi-Fi (Wireless-Fidelity, Wireless Fidelity), and WiMAX (Worldwide Interoperability for Microwave Access), etc., so as to adapt to multiple standard networks , Not only supports voice services, but also supports multiple wireless data services;
  • equipment pays more attention to humanization, individualization and multi-function.
  • equipment has moved from a "equipment-centric" model to a "human-centric” model, integrating embedded computing, control technology, artificial intelligence technology, and biometric authentication technology, which fully embodies the people-oriented tenet .
  • the equipment can be adjusted according to individual needs and become more personalized.
  • the device itself integrates a lot of software and hardware, and its functions are becoming more and more powerful.
  • the application program may be preset with a shooting mode.
  • the application program may call an image acquisition device, audio acquisition device, etc. on the terminal to collect data such as images and audio.
  • the application can enter the shooting mode by triggering a specified instruction.
  • a button 302 that can enter the shooting mode is set in the initial interface 301 of the application.
  • the instruction to enter the shooting mode is triggered, so that the application will enter the shooting mode, and then display the preset shooting interface.
  • the preset shooting interface can be set with an initial background, which can be a video background or an image background.
  • the initial background will be displayed in the shooting interface.
  • the preset shooting interface may include a shooting button 401, a button 402 to display/close the background preview window, a background preview window 403, a functional area 404, a shooting progress bar 405, and a button 406 to exit the shooting interface. , And an audio management button 407.
  • the preview window (as shown in Figure 4) has been displayed in the shooting interface, then when the user clicks the button 402, the background preview window will be closed, as shown in Figure 5; if there is no preview window in the shooting interface Display the preview window, then when the user clicks the button 402, the background preview window will be displayed in the shooting interface (as shown in FIG. 4).
  • the functional area can include multiple function buttons for assisting shooting; the background preview window is used to display candidate backgrounds that replace the initial background.
  • the candidate backgrounds include image backgrounds and video backgrounds.
  • the “+” in the background preview window can be a locally stored interface. When the user clicks on the "+”, the locally stored video background and image background can be displayed, as shown in Figure 6.
  • the "photograph mode” can be used to take photos
  • the "normal photography mode” can be used to take ordinary videos without background and special effects.
  • the shooting mode in this application can be performed by default, or the "photographing mode” or "normal shooting mode” can be entered by default, and then the user can switch to the shooting mode in this application. .
  • it can be set according to actual needs, and the embodiments of the present disclosure do not limit this.
  • Step S202 Obtain the image frame and the initial background of the target object
  • the application when the application loads the shooting interface, it can obtain the initial background from the preset video background resource library and display it in the shooting interface, and at the same time, obtain the image frame of the target object, for example, the image frame of the character object.
  • acquiring an image frame of a target object includes:
  • the target object in the image frame is detected, the target object is extracted from the image frame, and the image frame of the target object is obtained.
  • the application when the application loads the shooting interface, it will also call the image capture device in the terminal, and obtain the image frame through the image capture device, and then use the preset target object detection model to detect whether the image frame contains the target object , Such as a person object, if it contains a target object, the target object is extracted from the image frame.
  • the image frame acquired by the image acquisition device may be as shown in FIG. 7A, and it is detected that the image frame contains a person object, so the person object is extracted from the image frame to obtain the image frame of the person object as shown in FIG. 7B.
  • the background of the target object can be any background, and there is no need for a solid color background or a background close to a solid color.
  • the process of extracting the target object can be shown to the user or not, that is, the user can directly see the image frame of the target object, or the image frame can be displayed first, and then the target object can be extracted. It also displays the image frame of the target object, which can be set according to actual needs in practical applications, which is not limited in the embodiment of the present disclosure.
  • Step S203 Combine the image frame as the foreground with the initial background, and display it in the shooting interface
  • the image frame of the target object can be used as the foreground and the initial background as the background, and the image frame and the initial background can be displayed in the shooting interface at the same time, as shown in FIG. 8.
  • Step S204 when the first shooting start instruction is received, start generating video data based on the image frame and the initial background;
  • Step S205 when the first shooting end instruction is received, stop generating video data, and obtain the first video data that has been generated;
  • the application can start to generate video data based on the image frame and the initial background.
  • the interface when the video is generated can be shown in Figure 9, and then the generated video data is stored.
  • the application program can stop generating video data, thereby obtaining a piece of video data.
  • the user-triggered instruction to start shooting may be that the user clicks on the shooting button
  • the user-triggered instruction to end shooting may be that the user clicks the shooting button again; alternatively, the user may click and continue to press the shooting button to trigger the shooting start instruction and generate video Data, the user releases the shooting button to trigger an end shooting instruction.
  • the user triggering the shooting start instruction and the shooting end instruction through other control methods is also applicable to the embodiments of the present disclosure, for example, voice control, gesture control, etc., can be set according to actual needs in practical applications. The embodiment does not limit this.
  • Step S206 when a selection instruction for any candidate background is received, obtain a target candidate background based on any candidate background;
  • the application program can determine the target candidate background based on the candidate background.
  • any candidate background is a video background
  • obtaining a target candidate background based on any candidate background includes:
  • the edited video background is obtained as the target candidate background.
  • the preset video editing interface can be displayed in the application, and the video background can be displayed in the video editing interface, as shown in Figure 10, the video editing interface can be It includes a video frame selection box 1001, a duration of the selected video frame 1002, a mute button 1003, a rotation button 1004, a return button 1005, and a confirmation button 1006.
  • the user can select a video in the video background by dragging the video frame selection box.
  • the video background preview of this video is displayed in the video frame selection box.
  • the duration of the selected video frame is this segment.
  • the duration of the video and then the user clicks the confirm button to use this video as the target candidate background.
  • the user can also click on the mute button and spin button to make corresponding adjustments.
  • the selected candidate background is an image background
  • Step S207 using the target candidate background to replace the initial background in the shooting interface
  • Step S208 Combine the image frame as the foreground with the target candidate background, and display it in the shooting interface
  • the target candidate background can be used to replace the initial background in the shooting interface, and the target candidate background is used as the background, the image frame is used as the foreground, and the target candidate background and image frame are displayed in the shooting interface .
  • the shooting interface shown in FIG. 11 can be obtained.
  • Step S209 When a second shooting start instruction is received, start generating video data based on the image frame and the target candidate background;
  • Step S2010 when the second shooting end instruction is received, stop generating video data, and obtain the second video data that has been generated;
  • step S2011 when the shooting completion instruction is received, the shooting mode is exited, and the first video data and the second video data are spliced to obtain the final target video data.
  • step S204 the user will continue to shoot the video after replacing the background.
  • step S205 the principle of shooting the video.
  • the shooting progress bar can display the duration of the video that has been shot. If multiple videos are shot, a node 1201 can be set between each video in the progress for marking.
  • the shooting interface can also display Re-shoot button 1202 and complete shooting button 1203.
  • the user clicks the re-shooting button the user can re-shoot in the shooting interface as shown in Figure 8; when the user clicks the complete shooting button, the shooting mode can be exited, and at least one piece of video data that the user has captured is saved Perform splicing to obtain the final target video data.
  • the two pieces of video data in the embodiment of the present disclosure are only for illustrative purposes. In practical applications, the user can shoot multiple pieces of video data, not only two pieces of video data, and the embodiment of the present disclosure does not limit this. .
  • the preset shooting interface when the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background, and then the image frame and initial Background, the image frame is combined with the initial background as the foreground and displayed in the shooting interface; when the first shooting start instruction is received, video data is generated based on the image frame and the initial background, and when the first shooting end instruction is received , Stop generating video data and get the first video data that has been generated.
  • the target object can be automatically combined with the background required by the user, which reduces a large number of manual operations by the user and improves the user.
  • the user can enter the shooting mode provided by the present application through a simple operation, and the interaction path is quick and convenient, and the user does not need to go through multiple interface or function switching, which further improves the user experience.
  • a completed video contains multiple backgrounds, which improves The fun of the video does not require the user to manually synthesize each segment of the video, which reduces the manual operation of the user and further improves the user experience.
  • FIG. 13 is a schematic structural diagram of a video processing device provided by another embodiment of the present disclosure. As shown in FIG. 13, the device in this embodiment may include:
  • the display module 1301 is used to display the preset shooting interface in the current interface of the application when the preset application enters the shooting mode; the shooting interface has a preset initial background;
  • the obtaining module 1302 is used to obtain the image frame and the initial background of the target object
  • the display module 1301 is also used to combine the image frame as the foreground with the initial background, and display it in the shooting interface;
  • the receiving module 1303 is configured to receive a first shooting start instruction and a first shooting end instruction
  • the generating module 1304 is used to start generating video data based on the image frame and the initial background;
  • the stop module 1305 is used to stop generating video data and obtain the first video data that has been generated.
  • a preset background preview window is also displayed in the shooting interface, and the background preview window is used to display candidate backgrounds that replace the initial background, and the candidate backgrounds include image backgrounds and video backgrounds;
  • the receiving module 1303 is further configured to receive a selection instruction for any candidate background.
  • the display module 1301 is also used to combine the image frame as the foreground with the target candidate background, and display it in the shooting interface.
  • the device further includes:
  • the replacement module is used to replace the initial background in the shooting interface with the target candidate background.
  • the processing module specifically includes:
  • the display sub-module is used to display the preset video editing interface and display the video background in the video editing interface;
  • the editing sub-module is used to receive editing instructions for the video background, and edit the video background in response to the editing instructions to obtain a preview of the edited video background;
  • the determining sub-module is used to obtain the edited video background as the target candidate background when a confirmation instruction for the edited video background preview is received.
  • the receiving module is further configured to receive a second shooting start instruction
  • the generating module is also used to start generating video data based on the image frame and the target candidate background;
  • the receiving module is also used to receive a second shooting end instruction
  • the stop module is also used to stop generating video data and obtain the second video data that has been generated.
  • the acquisition module includes:
  • the acquisition sub-module is used to acquire image frames through a preset image acquisition device
  • the extraction sub-module is used to extract the target object from the image frame when the target object in the image frame is detected to obtain the image frame of the target object.
  • the receiving module is further configured to receive a shooting completion instruction
  • the device further includes:
  • the splicing module is used to exit the shooting mode, splicing the first video data and the second video data to obtain the final target video data.
  • the video processing apparatus of this embodiment can execute the video processing methods shown in the first embodiment and the second embodiment of the present disclosure, and the implementation principles are similar, and will not be repeated here.
  • the preset shooting interface when the preset application enters the shooting mode, the preset shooting interface is displayed in the current interface of the application; the shooting interface has a preset initial background, and then the image frame and initial Background, the image frame is combined with the initial background as the foreground and displayed in the shooting interface; when the first shooting start instruction is received, video data is generated based on the image frame and the initial background, and when the first shooting end instruction is received , Stop generating video data and get the first video data that has been generated.
  • the user can automatically combine the target object with the background required by the user in the daily video shooting process, regardless of whether the user's background is a solid color or close to a solid color, which reduces a large number of manual operations by the user and improves the user experience .
  • the user can enter the shooting mode provided by the present application through a simple operation, and the interaction path is quick and convenient, and the user does not need to go through multiple interface or function switching, which further improves the user experience.
  • a completed video contains multiple backgrounds, which improves The fun of the video does not require the user to manually synthesize each segment of the video, which reduces the manual operation of the user and further improves the user experience.
  • FIG. 14 shows a schematic structural diagram of an electronic device 1400 suitable for implementing embodiments of the present disclosure.
  • Electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (e.g. Mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 14 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device includes a memory and a processor.
  • the processor here may be referred to as the processing device 1401 below, and the memory may include a read-only memory (ROM) 1402, a random access memory (RAM) 1403, and a storage device 1408.
  • ROM read-only memory
  • RAM random access memory
  • At least one item of is as follows:
  • the electronic device 1400 may include a processing device (such as a central processing unit, a graphics processor, etc.) 1401, which may be stored in a read-only memory (ROM) 1402 according to A program or a program loaded from the storage device 1408 into a random access memory (RAM) 1403 performs various appropriate actions and processing.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for the operation of the electronic device 1400 are also stored.
  • the processing device 1401, ROM 1402, and RAM 1403 are connected to each other through a bus 1404.
  • An input/output (I/O) interface 1405 is also connected to the bus 1404.
  • the following devices can be connected to the I/O interface 1405: including input devices 1406 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 1407 such as a device; a storage device 1408 such as a magnetic tape, a hard disk, etc.; and a communication device 1409.
  • the communication device 1409 may allow the electronic device 1400 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 14 shows an electronic device 1400 having various devices, it should be understood that it is not required to implement or have all of the illustrated devices. It may be implemented alternatively or provided with more or fewer devices.
  • the process described above with reference to the flowchart can be implemented as a computer software program.
  • the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer-readable storage medium, and the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 1409, or installed from the storage device 1408, or installed from the ROM 1402.
  • the processing device 1401 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • non-transitory computer-readable storage medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above.
  • non-transitory computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a non-transitory computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable storage medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit for use by or in combination with the instruction execution system, apparatus, or device. program.
  • the program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the client and server can communicate with any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communication e.g., communication network
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), as well as any currently known or future research and development network of.
  • the above-mentioned non-transitory computer-readable storage medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the aforementioned non-transitory computer-readable storage medium carries one or more programs.
  • the electronic device When the aforementioned one or more programs are executed by the electronic device, the electronic device: When the preset application enters the shooting mode, the application The preset shooting interface is displayed in the current interface; the shooting interface has a preset initial background; the image frame and the initial background of the target object are acquired; the image frame is combined with the initial background as the foreground and displayed in the shooting interface; when receiving When the first shooting start instruction is reached, the video data is generated based on the image frame and the initial background; when the first shooting end instruction is received, the video data generation is stopped, and the first video data that has been generated is obtained.
  • the computer program code used to perform the operations of the present disclosure can be written in one or more programming languages or a combination thereof.
  • the above-mentioned programming languages include but are not limited to object-oriented programming languages such as Java, Smalltalk, C++, and Including conventional procedural programming languages-such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logic function.
  • Executable instructions can also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • modules or units involved in the embodiments described in the present disclosure can be implemented in software or hardware. Among them, the name of the module or unit does not constitute a limitation on the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logical device (CPLD) and so on.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Product
  • SOC System on Chip
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium, which may contain or store a program for use by the instruction execution system, apparatus, or device or in combination with the instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • the machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing.
  • machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read only memory
  • magnetic storage device or any suitable combination of the foregoing.
  • Example 1 provides a video processing method, including: when a preset application enters the shooting mode, displaying the preset in the current interface of the application The shooting interface; the shooting interface has a preset initial background; acquiring the image frame of the target object and the initial background; combining the image frame as the foreground with the initial background, and displaying in the shooting interface; When the first shooting start instruction is received, the video data is generated based on the image frame and the initial background; and when the first shooting end instruction is received, the video data generation is stopped to obtain the first video data that has been generated.
  • a preset background preview window is also displayed in the shooting interface, and the background preview window is used to display candidate backgrounds that replace the initial background, and the candidate backgrounds include image backgrounds and video backgrounds;
  • the processing method further includes: when a selection instruction for any candidate background is received, obtaining a target candidate background based on the any candidate background; replacing the initial background in the shooting interface with the target candidate background; The image frame is combined with the target candidate background as the foreground and displayed in the shooting interface.
  • the any candidate background is a video background
  • obtaining the target candidate background based on the any candidate background includes: displaying a preset video editing interface, and displaying in the video editing interface The video background; receiving an editing instruction for the video background, and editing the video background in response to the editing instruction to obtain a preview of the edited video background; and when the edited video background is received When the preview confirms the instruction, the edited video background is obtained as the target candidate background.
  • the processing method further includes: when a second shooting start instruction is received, starting to generate video data based on the image frame and the target candidate background; and when a second shooting end instruction is received, Stop generating video data, and obtain the second video data that has been generated.
  • acquiring an image frame of a target object includes: acquiring an image frame through a preset image acquisition device; and when the target object in the image frame is detected, extracting the image frame from the image frame The target object, the image frame of the target object is obtained.
  • the processing method further includes: when a shooting completion instruction is received, exiting the shooting mode, and splicing the first video data and the second video data to obtain the final target video data.
  • Example 2 provides the device of Example 1, including: a display module for displaying in the current interface of the application when the preset application enters the shooting mode The preset shooting interface; the shooting interface has a preset initial background; the acquisition module is used to acquire the image frame of the target object and the initial background; the display module is also used to use the image frame as the foreground and The initial background is combined and displayed in the shooting interface; a receiving module is used to receive a first start shooting instruction and a first end shooting instruction; a generating module is used to start based on the image frame and the initial background Generating video data; and a stop module for stopping generating video data to obtain the first video data that has been generated.
  • a preset background preview window is also displayed in the shooting interface, and the background preview window is used to display candidate backgrounds that replace the initial background, and the candidate backgrounds include image backgrounds and video backgrounds;
  • the device further includes: the receiving module, which is also used to receive a selection instruction for any candidate background; a processing module, which is used to obtain a target candidate background based on the any candidate background; a replacement module, which is used to adopt the target The candidate background replaces the initial background in the shooting interface; and the display module is further configured to combine the image frame as the foreground with the target candidate background and display it in the shooting interface.
  • the processing module specifically includes: a display sub-module for displaying a preset video editing interface and displaying the video background in the video editing interface; an editing sub-module for receiving The edit instruction of the video background, and edit the video background in response to the edit instruction to obtain the edited video background preview; the determining sub-module is used when receiving the edited video background preview When confirming the instruction, the edited video background is obtained as the target candidate background.
  • the receiving module is further configured to receive a second start shooting instruction; the generating module is further configured to start generating video data based on the image frame and the target candidate background; the receiving module , Is also used to receive a second end shooting instruction; the stop module is also used to stop generating video data, and obtain the second video data that has been generated.
  • the acquisition module includes: an acquisition sub-module for acquiring an image frame through a preset image acquisition device; and an extraction sub-module for acquiring a target object in the image frame from The target object is extracted from the image frame to obtain an image frame of the target object.
  • the device further includes: the receiving module, which is further configured to receive a shooting completion instruction; and a splicing module, which is configured to exit the shooting mode and perform the first video data with the second video data. Splicing to get the final target video data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Studio Devices (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本公开提供了一种视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质。该方法包括:当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;获取目标对象的图像帧和所述初始背景;将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于所述图像帧和所述初始背景开始生成视频数据;当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。

Description

视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质
相关申请的交叉引用
本申请要求2020年04月07日在中国知识产权局提交的中国专利申请No.2020102666239的优先权,通过引用将该中国专利申请公开的全部内容并入本文。
技术领域
本公开涉及视频的处理技术领域,具体而言,本公开涉及一种视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质。
背景技术
传统的绿幕技术,是指影视拍摄时使用纯色(最好是绿色)的布作为演员的背景,方便后期制作时将人像扣出,放置到其他背景上,合成成片。后来专业编辑软件不局限于影视从业者使用,影视剪辑爱好者也可以利用Adobe Premiere等专业软件将人物用钢笔或吸管等工具抠出,并叠加在其他背景上。但这种类型的绿幕技术都有两个问题,显著地提高了用户在日常中拍摄视频时的使用门槛:
第一,它要求人物身后有绿幕,或者背景与人物的色彩反差明显,对于身后色彩丰富混杂的场景无法轻易处理。
第二,它要求剪辑者有一定的软件知识,并在视频拍好后进行后期编辑,较为繁杂,难以掌握。
发明内容
提供本公开以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。本公开并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
本公开提供了一种视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质,可以解决用户在日常拍摄视频时使用门槛高的问题。所述技术方案如下:
第一方面,提供了一种视频的处理方法,该方法包括:
当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;
获取目标对象的图像帧和所述初始背景;
将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;
当接收到第一开始拍摄指令时,基于所述图像帧和所述初始背景开始生成视频数据;以及
当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。
第二方面,提供了一种视频的处理装置,该装置包括:
展示模块,用于当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;
获取模块,用于获取目标对象的图像帧和所述初始背景;
所述展示模块,还用于将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;
接收模块,用于接收第一开始拍摄指令和第一结束拍摄指令;
生成模块,用于基于所述图像帧和所述初始背景开始生成视频数据;以及
停止模块,用于停止生成视频数据,得到已生成的第一视频数据。
第三方面,提供了一种电子设备,该电子设备包括:
处理器、存储器和总线;
所述总线,用于连接所述处理器和所述存储器;
所述存储器,用于存储操作指令;
所述处理器,用于通过调用所述操作指令,可执行指令使处理器执行如本公开的第一方面所示的视频的处理方法对应的操作。
第四方面,提供了一种非暂时性计算机可读存储介质,该非暂时性计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现本公开第一方面所示的视频的处理方法。
本公开提供的技术方案带来的有益效果是:
当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景,然后获取目标对象的图像帧和所述初始背景,将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于所述图像帧和所述初始背景开始生成视频数据,当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。这样,用户在日常拍摄视频的过程中,不管用户的背景是否为纯色或接近纯色,都可实现目标对象与用户需求的背景相结合,减少了用户的大量操作,提升了用户体验。而且,用户通过简单的操作即可进入本申请提供的拍摄模式,交互路径快捷方便,不需要用户经过多次界面或者功能的切换,进一步提升了用户体验。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。
图1为本公开一个实施例提供的一种视频的处理方法的流程示意图;
图2为本公开另一实施例提供的一种视频的处理方法的流程示意图;
图3为本公开应用程序加载完成的默认界面示意图;
图4为本公开应用程序的拍摄界面的默认界面示意图;
图5为本公开应用程序的拍摄界面不展示背景预览窗口的界面示意图;
图6为本公开应用程序展示本地的背景的界面示意图;
图7A为本公开应用程序通过终端采集到的图像帧;
图7B为本公开应用程序从图像帧中提取到的目标对象的图像帧;
图8为本公开应用程序在拍摄界面展示初始背景和目标对象的图像帧的界面示意图;
图9为本公开应用程序生成视频数据时的界面示意图;
图10为本公开应用程序编辑视频背景的界面示意图;
图11为本公开应用程序在拍摄界面展示候选背景和目标对象的图像帧的界面示意图;
图12为本公开应用程序已生成两段视频数据后的拍摄界面示意图;
图13为本公开又一实施例提供的一种视频的处理装置的结构示意图;
图14为本公开又一实施例提供的一种视频的处理的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元一定为不同的装置、模块或单元,也并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅 用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。
本公开提供的视频的处理方法、装置、电子设备和非暂时性计算机可读存储介质,旨在解决现有技术的如上技术问题。
下面以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开的实施例进行描述。
在一个实施例中提供了一种视频的处理方法,如图1所示,该方法包括:
步骤S101,当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景;
具体而言,应用程序可以预设有拍摄模式,当应用程序处于拍摄模式时,应用程序可以调用终端上的图像采集设备、音频采集设备等来采集图像、音频等数据。其中,预设的拍摄界面可以设置有初始背景,初始背景可以是视频背景,也可以是图像背景,当应用程序展示拍摄界面时,就会在拍摄界面中展示初始背景。
步骤S102,获取目标对象的图像帧和初始背景;
通常来说,应用程序在加载拍摄界面的时候,可以从预设的视频背景资源库中获取初始背景并展示在拍摄界面中,同时,获取目标对象的图像帧,比如,人物对象的图像帧。
步骤S103,将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;
在获取到了目标对象的图像帧和初始背景之后,可以将目标对象的图像帧作为前景,将初始背景作为背景,在拍摄界面中同时展示图像帧和初始背景。
步骤S104,当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据;
步骤S105,当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。
具体而言,当用户触发了开始拍摄指令后,应用程序就可以基于图像帧和初始背景开始生成视频数据,然后将生成的视频数据进行存储,当用户触发了结束拍摄指令后,应用程序就可以停止生成视频数据,从而得到一段视频数据。
在本公开实施例中,当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景,然后获取目标对象的图像帧和初始背景,将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据,当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。这样,用户在日常拍摄视频的过程中,不管用户的背景是否为纯色或接近纯色,都可实现自动地将目标对象与用户需求的背景相结合,减少了用户的大量手动操作,提升了用户体验。而且,用户通过简单的操作即可进入本申请提供的拍摄模式,交互路径快捷方便,不需要用户经过多次界面或者功能的切换,进一步提升了用户体验。
在一个实施例中提供了一种视频的处理方法,如图2所示,该方法包括:
步骤S201,当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景;
具体而言,应用程序可以安装在终端中,终端可以具有如下特点:
(1)在硬件体系上,设备具备中央处理器、存储器、输入部件和输出部件,也就是说,设备往往是具备通信功能的微型计算机设备。另外,还可以具有多种输入方式,诸如键盘、鼠标、触摸屏、送话器和摄像头等,并可以根据需要进行调整输入。同时,设备往往具有多种输出方式,如受话器、显示屏等,也可以根据需要进行调整;
(2)在软件体系上,设备必须具备操作***,如Windows Mobile、Symbian、Palm、Android、iOS等。同时,这些操作***越来越开放,基 于这些开放的操作***平台开发的个性化应用程序层出不穷,如通信簿、日程表、记事本、计算器以及各类游戏等,极大程度地满足了个性化用户的需求;
(3)在通信能力上,设备具有灵活的接入方式和高带宽通信性能,并且能根据所选择的业务和所处的环境,自动调整所选的通信方式,从而方便用户使用。设备可以支持GSM(Global System for Mobile Communication,全球移动通信***)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、CDMA 2000(Code Division Multiple Access,码分多址)、TDSCDMA(Time Division-Synchronous Code Division Multiple Access,时分同步码分多址)、Wi-Fi(Wireless-Fidelity,无线保真)以及WiMAX(Worldwide Interoperability for Microwave Access,全球微波互联接入)等,从而适应多种制式网络,不仅支持语音业务,更支持多种无线数据业务;
(4)在功能使用上,设备更加注重人性化、个性化和多功能化。随着计算机技术的发展,设备从“以设备为中心”的模式进入“以人为中心”的模式,集成了嵌入式计算、控制技术、人工智能技术以及生物认证技术等,充分体现了以人为本的宗旨。由于软件技术的发展,设备可以根据个人需求调整设置,更加个性化。同时,设备本身集成了众多软件和硬件,功能也越来越强大。
进一步,该应用程序可以预设有拍摄模式,当应用程序处于拍摄模式时,应用程序可以调用终端上的图像采集设备、音频采集设备等来采集图像、音频等数据。
具体地,用户在终端中启动应用程序后,可以通过触发指定的指令使得应用程序进入拍摄模式,比如,如图3所示,在应用程序的初始界面301中设置一个可以进入拍摄模式的按钮302,当用户点击了这个按钮,即触发了进入拍摄模式的指令,这样应用程序就会进入拍摄模式,然后展示预设的拍摄界面了。其中,预设的拍摄界面可以设置有初始背景,初始背景可以是视频背景,也可以是图像背景,当应用程序展示拍摄界面时,就会在拍摄界面中展示初始背景。
如图4所示,在预设的拍摄界面中,可以包括拍摄按钮401、展示/关闭背景预览窗口的按钮402、背景预览窗口403、功能区404、拍摄进度条405、退出拍摄界面的按钮406、以及音频管理按钮407。在实际应用中,如果拍摄界面中已经展示了预览窗口(如图4所示),那么当用户点击了按钮402后,背景预览窗口就会被关闭,如图5所示;如果拍摄界面中没有展示预览窗口,那么当用户点击了按钮402后,就会在拍摄界面中展示背景预览窗口(如图4所示)。其中,功能区可以包括多个辅助拍摄的功能按钮;背景预览窗口用于展示替换初始背景的候选背景,候选背景包括图像背景和视频背景,在展示视频背景时,可以展示该视频背景的时长;背景预览窗口中的“+”可以是本地存储的接口,当用户点击“+”时,即可展示本地存储的视频背景和图像背景,如图6所示。
进一步,在实际应用中,在应用程序的初始界面中,点击按钮302可以进入到拍摄界面,还可以在拍摄界面中设置其它模式的标识,比如在拍摄界面的最下方设置“拍照模式”、“普通拍摄模式”等其它模式的标识(图中未示出),当用户点击了不同的标识时,即可进入对应的模式。在实际应用中可以根据实际需求进行设置,本公开实施例对此不作限制。
其中,“拍照模式”可以用于拍摄照片,“普通拍摄模式”可以用于拍摄无背景、无特效等的普通视频。
进一步,在应用程序的初始界面中,通过点击按钮302可以默认进行本申请中的拍摄模式,也可以默认进入“拍照模式”或“普通拍摄模式”,然后由用户切换至本申请中的拍摄模式。在实际应用中可以根据实际需求进行设置,本公开实施例对此也不作限制。
步骤S202,获取目标对象的图像帧和初始背景;
通常来说,应用程序在加载拍摄界面的时候,可以从预设的视频背景资源库中获取初始背景并展示在拍摄界面中,同时,获取目标对象的图像帧,比如,人物对象的图像帧。
根据本公开的实施例,获取目标对象的图像帧,包括:
通过预设的图像采集设备获取图像帧;以及
当检测到图像帧中目标对象时,从图像帧中提取出目标对象,得到目 标对象的图像帧。
具体而言,应用程序在加载拍摄界面的时候,也会调用终端中的图像采集设备,并通过图像采集设备来获取图像帧,然后通过预设的目标对象检测模型检测图像帧中是否包含目标对象,比如人物对象,如果包含目标对象,则从图像帧中提取出目标对象。比如,图像采集设备获取到的图像帧可以如图7A所示,检测到图像帧中包含人物对象,因此从图像帧中提取出人物对象,得到如图7B所示的人物对象的图像帧。其中,在提取目标对象时,目标对象的背景可以是任意背景,不需要纯色背景或接近纯色的背景。
需要说明的是,提取目标对象的过程可以展示给用户,也可以不展示给用户,也就是说,用户可以直接看到目标对象的图像帧,也可以先展示图像帧,然后再提取目标对象,并展示目标对象的图像帧,在实际应用中可以根据实际需求进行设置,本公开实施例对此不作限制。
进一步,提取目标对象除了可以采用上述方式之外,其它的提取方式也是适用于本公开实施例的,在实际应用中可以根据实际需求进行设置,本公开实施例对此也不作限制。
步骤S203,将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;
在获取到了目标对象的图像帧和初始背景之后,可以将目标对象的图像帧作为前景,将初始背景作为背景,在拍摄界面中同时展示图像帧和初始背景,如图8所示。
步骤S204,当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据;
步骤S205,当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据;
具体而言,当用户触发了开始拍摄指令后,应用程序就可以基于图像帧和初始背景开始生成视频数据,生成视频时的界面可以如图9所示,然后将生成的视频数据进行存储,当用户触发了结束拍摄指令后,应用程序就可以停止生成视频数据,从而得到一段视频数据。
进一步,用户触发开始拍摄指令可以是用户点击一下拍摄按钮,用户触发结束拍摄指令可以是用户再次点击一下拍摄按钮;或者,也可以是用户通过点击并持续按压拍摄按钮来触发开始拍摄指令并生成视频数据,用户松开拍摄按钮则触发结束拍摄指令。当然,用户通过其它的控制方式来触发开始拍摄指令和结束拍摄指令也是适用于本公开实施例的,比如,通过语音控制、手势控制等等,在实际应用中可以根据实际需求进行设置,本公开实施例对此不作限制。
步骤S206,当接收到针对任一候选背景的选择指令时,基于任一候选背景得到目标候选背景;
当用户点击了背景预览窗口中的任一候选背景时,应用程序可以基于该候选背景确定出目标候选背景。
根据本公开的实施例,任一候选背景为视频背景,基于任一候选背景得到目标候选背景,包括:
展示预设的视频编辑界面,并在视频编辑界面中展示视频背景;
接收针对视频背景的编辑指令,并响应于编辑指令对视频背景进行编辑,得到编辑后的视频背景预览;
当接收到针对编辑后的视频背景预览的确认指令时,得到编辑后的视频背景,作为目标候选背景。
具体而言,如果用户选择的候选背景是视频背景,那么可以在应用程序中展示预设的视频编辑界面,并在视频编辑界面中展示该视频背景,如图10所示,视频编辑界面中可以包括视频帧选择框1001、已选择的视频帧的时长1002、静音按钮1003、旋转按钮1004、返回按钮1005、以及确认按钮1006。
在编辑界面中,用户可以通过拖动视频帧选择框来选择出视频背景中的一段视频,视频帧选择框里展示的就是这一段视频的视频背景预览,已选择的视频帧的时长就是这一段视频的时长,然后用户点击确认按钮即可将这一段视频作为目标候选背景。而且,用户还可以点击静音按钮、旋转按钮来进行相应的调整。
如果选择的候选背景是图像背景,那么可以直接将该候选背景作为目 标候选背景,也可以先对图像背景进行编辑,比如裁剪、调色等等,然后将编辑完成的图像背景作为目标候选背景。
步骤S207,采用目标候选背景替换拍摄界面中的初始背景;
步骤S208,将图像帧作为前景与目标候选背景结合,并在拍摄界面中进行展示;
当用户点击了编辑界面中的确认按钮之后,即可在拍摄界面中采用目标候选背景替换初始背景,并将目标候选背景作为背景,图像帧作为前景,在拍摄界面中展示目标候选背景和图像帧。比如,对图8所示的拍摄界面进行背景替换,可以得到如图11所示的拍摄界面。
步骤S209,当接收到第二开始拍摄指令时,基于图像帧和目标候选背景开始生成视频数据;
步骤S2010,当接收到第二结束拍摄指令时,停止生成视频数据,得到已生成的第二视频数据;
步骤S2011,当接收到完成拍摄指令时,退出拍摄模式,并将第一视频数据与第二视频数据进行拼接,得到最终的目标视频数据。
通常来说,用户替换了背景之后会继续拍摄视频,拍摄视频的原理可参照步骤S204~步骤S205,在此就不赘述了。
进一步,如图12所示,拍摄进度条可以展示已拍摄的视频的时长,如果拍摄了多段视频,那么进度中各段视频之间可以设置结点1201进行标记,同时,拍摄界面中还可以展示重新拍摄按钮1202以及完成拍摄按钮1203。当用户点击了重新拍摄按钮时,即可在如图8所示的拍摄界面中重新进行拍摄;当用户点击了完成拍摄按钮时,即可退出拍摄模式,并将用户已拍摄的至少一段视频数据进行拼接,得到最终的目标视频数据。
需要说明的是,本公开实施例中的两段视频数据仅仅只是为了举例说明,在实际应用中,用户可以拍摄多段视频数据,并非只能拍摄两段视频数据,本公开实施例对此不作限制。
在本公开实施例中,当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景,然后获取目标对象的图像帧和初始背景,将图像帧作为前景与初始背景结合, 并在拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据,当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。这样,在用户在日常拍摄视频的过程中,不管用户的背景是否为纯色或接近纯色,都可实现自动地将目标对象与用户需求的背景相结合,减少了用户的大量手动操作,提升了用户体验。而且,用户通过简单的操作即可进入本申请提供的拍摄模式,交互路径快捷方便,不需要用户经过多次界面或者功能的切换,进一步提升了用户体验。
而且,不仅可以支持图像背景、视频背景,还支持分段拍摄,在拍摄完成时,可以将多段不同背景的视频自动合成一个完成视频,这样,一个完成视频中既包含了多个背景,提升了视频的趣味性,又不需要用户手动对各段视频进行合成,减少了用户的手动操作,进一步提升了用户体验。
图13为本公开又一实施例提供的一种视频的处理装置的结构示意图,如图13所示,本实施例的装置可以包括:
展示模块1301,用于当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景;
获取模块1302,用于获取目标对象的图像帧和初始背景;
展示模块1301还用于将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;
接收模块1303,用于接收第一开始拍摄指令和第一结束拍摄指令;
生成模块1304,用于基于图像帧和初始背景开始生成视频数据;
停止模块1305,用于停止生成视频数据,得到已生成的第一视频数据。
根据本公开的实施例,拍摄界面中还展示有预设的背景预览窗口,背景预览窗口用于展示替换初始背景的候选背景,候选背景包括图像背景和视频背景;
根据本公开的实施例,接收模块1303还用于接收针对任一候选背景的选择指令。
根据本公开的实施例,展示模块1301还用于将图像帧作为前景与目标候选背景结合,并在拍摄界面中进行展示。
根据本公开的实施例,该装置还包括:
处理模块,用于基于任一候选背景得到目标候选背景;以及
替换模块,用于采用目标候选背景替换拍摄界面中的初始背景。
根据本公开的实施例,处理模块具体包括:
展示子模块,用于展示预设的视频编辑界面,并在视频编辑界面中展示视频背景;
编辑子模块,用于接收针对视频背景的编辑指令,并响应于编辑指令对视频背景进行编辑,得到编辑后的视频背景预览;
确定子模块,用于当接收到针对编辑后的视频背景预览的确认指令时,得到编辑后的视频背景,作为目标候选背景。
根据本公开的实施例,接收模块,还用于接收第二开始拍摄指令;
生成模块,还用于基于图像帧和目标候选背景开始生成视频数据;
接收模块,还用于接收第二结束拍摄指令;
停止模块,还用于停止生成视频数据,得到已生成的第二视频数据。
根据本公开的实施例,获取模块包括:
采集子模块,用于通过预设的图像采集设备获取图像帧;
提取子模块,用于当检测到图像帧中目标对象时,从图像帧中提取出目标对象,得到目标对象的图像帧。
根据本公开的实施例,接收模块还用于接收完成拍摄指令;
根据本公开的实施例,该装置还包括:
拼接模块,用于退出拍摄模式,将第一视频数据与第二视频数据进行拼接,得到最终的目标视频数据。
本实施例的视频的处理装置可执行本公开第一个实施例、第二个实施例所示的视频的处理方法,其实现原理相类似,此处不再赘述。
在本公开实施例中,当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景,然后获取目标对象的图像帧和初始背景,将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据,当接收到第一结束拍摄指令时,停止生成视 频数据,得到已生成的第一视频数据。这样,用户在日常拍摄视频的过程中,不管用户的背景是否为纯色或接近纯色,都可实现自动地将目标对象与用户需求的背景相结合,减少了用户的大量手动操作,提升了用户体验。而且,用户通过简单的操作即可进入本申请提供的拍摄模式,交互路径快捷方便,不需要用户经过多次界面或者功能的切换,进一步提升了用户体验。
而且,不仅可以支持图像背景、视频背景,还支持分段拍摄,在拍摄完成时,可以将多段不同背景的视频自动合成一个完成视频,这样,一个完成视频中既包含了多个背景,提升了视频的趣味性,又不需要用户手动对各段视频进行合成,减少了用户的手动操作,进一步提升了用户体验。
下面参考图14,其示出了适于用来实现本公开实施例的电子设备1400的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图14示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
电子设备包括:存储器以及处理器,其中,这里的处理器可以称为下文的处理装置1401,存储器可以包括下文中的只读存储器(ROM)1402、随机访问存储器(RAM)1403以及存储装置1408中的至少一项,具体如下所示:如图14所示,电子设备1400可以包括处理装置(例如中央处理器、图形处理器等)1401,其可以根据存储在只读存储器(ROM)1402中的程序或者从存储装置1408加载到随机访问存储器(RAM)1403中的程序而执行各种适当的动作和处理。在RAM 1403中,还存储有电子设备1400操作所需的各种程序和数据。处理装置1401、ROM 1402以及RAM 1403通过总线1404彼此相连。输入/输出(I/O)接口1405也连接至总线1404。
通常,以下装置可以连接至I/O接口1405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1406;包 括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1407;包括例如磁带、硬盘等的存储装置1408;以及通信装置1409。通信装置1409可以允许电子设备1400与其他设备进行无线或有线通信以交换数据。虽然图14示出了具有各种装置的电子设备1400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂时性计算机可读存储介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1409从网络上被下载和安装,或者从存储装置1408被安装,或者从ROM 1402被安装。在该计算机程序被处理装置1401执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的非暂时性计算机可读存储介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。非暂时性计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,非暂时性计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读存储介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计算机可读存储介质上包含的程序代码可以用 任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述非暂时性计算机可读存储介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述非暂时性计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:当预设的应用程序进入拍摄模式时,在应用程序的当前界面中展示预设的拍摄界面;拍摄界面具有预设的初始背景;获取目标对象的图像帧和初始背景;将图像帧作为前景与初始背景结合,并在拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于图像帧和初始背景开始生成视频数据;当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程 图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块或单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上***(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行***、装置或设备使用或与指令执行***、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体***、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,【示例一】提供了一种视频的处理方法,包括:当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;获取目 标对象的图像帧和所述初始背景;将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;当接收到第一开始拍摄指令时,基于所述图像帧和所述初始背景开始生成视频数据;以及当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。
根据本公开的实施例,所述拍摄界面中还展示有预设的背景预览窗口,所述背景预览窗口用于展示替换所述初始背景的候选背景,所述候选背景包括图像背景和视频背景;所述处理方法还包括:当接收到针对任一候选背景的选择指令时,基于所述任一候选背景得到目标候选背景;采用所述目标候选背景替换所述拍摄界面中的初始背景;将所述图像帧作为前景与所述目标候选背景结合,并在所述拍摄界面中进行展示。
根据本公开的实施例,所述任一候选背景为视频背景,所述基于所述任一候选背景得到目标候选背景,包括:展示预设的视频编辑界面,并在所述视频编辑界面中展示所述视频背景;接收针对所述视频背景的编辑指令,并响应于所述编辑指令对所述视频背景进行编辑,得到编辑后的视频背景预览;以及当接收到针对所述编辑后的视频背景预览的确认指令时,得到编辑后的视频背景,作为目标候选背景。
根据本公开的实施例,该处理方法还包括:当接收到第二开始拍摄指令时,基于所述图像帧和所述目标候选背景开始生成视频数据;以及当接收到第二结束拍摄指令时,停止生成视频数据,得到已生成的第二视频数据。
根据本公开的实施例,获取目标对象的图像帧,包括:通过预设的图像采集设备获取图像帧;以及当检测到所述图像帧中目标对象时,从所述图像帧中提取出所述目标对象,得到目标对象的图像帧。
根据本公开的实施例,该处理方法还包括:当接收到完成拍摄指令时,退出所述拍摄模式,将所述第一视频数据与第二视频数据进行拼接,得到最终的目标视频数据。
根据本公开的一个或多个实施例,【示例二】提供了示例一的装置,包括:展示模块,用于当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景; 获取模块,用于获取目标对象的图像帧和所述初始背景;所述展示模块,还用于将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;接收模块,用于接收第一开始拍摄指令和第一结束拍摄指令;生成模块,用于基于所述图像帧和所述初始背景开始生成视频数据;以及停止模块,用于停止生成视频数据,得到已生成的第一视频数据。
根据本公开的实施例,所述拍摄界面中还展示有预设的背景预览窗口,所述背景预览窗口用于展示替换所述初始背景的候选背景,所述候选背景包括图像背景和视频背景;
所述装置还包括:所述接收模块,还用于接收针对任一候选背景的选择指令;处理模块,用于基于所述任一候选背景得到目标候选背景;替换模块,用于采用所述目标候选背景替换所述拍摄界面中的初始背景;以及所述展示模块,还用于将所述图像帧作为前景与所述目标候选背景结合,并在所述拍摄界面中进行展示。
根据本公开的实施例,所述处理模块具体包括:展示子模块,用于展示预设的视频编辑界面,并在所述视频编辑界面中展示所述视频背景;编辑子模块,用于接收针对所述视频背景的编辑指令,并响应于所述编辑指令对所述视频背景进行编辑,得到编辑后的视频背景预览;确定子模块,用于当接收到针对所述编辑后的视频背景预览的确认指令时,得到编辑后的视频背景,作为目标候选背景。
根据本公开的实施例,所述接收模块,还用于接收第二开始拍摄指令;所述生成模块,还用于基于所述图像帧和所述目标候选背景开始生成视频数据;所述接收模块,还用于接收第二结束拍摄指令;所述停止模块,还用于停止生成视频数据,得到已生成的第二视频数据。
根据本公开的实施例,所述获取模块包括:采集子模块,用于通过预设的图像采集设备获取图像帧;以及提取子模块,用于当检测到所述图像帧中目标对象时,从所述图像帧中提取出所述目标对象,得到目标对象的图像帧。
根据本公开的实施例,该装置还包括:所述接收模块,还用于接收完成拍摄指令;以及拼接模块,用于退出所述拍摄模式,将所述第一视频数 据与第二视频数据进行拼接,得到最终的目标视频数据。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (10)

  1. 一种视频的处理方法,包括:
    当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;
    获取目标对象的图像帧和所述初始背景;
    将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;
    当接收到第一开始拍摄指令时,基于所述图像帧和所述初始背景开始生成视频数据;以及
    当接收到第一结束拍摄指令时,停止生成视频数据,得到已生成的第一视频数据。
  2. 根据权利要求1所述的视频的处理方法,其中,所述拍摄界面中还展示有预设的背景预览窗口,所述背景预览窗口用于展示替换所述初始背景的候选背景,所述候选背景包括图像背景和视频背景;
    所述处理方法方法还包括:
    当接收到针对任一候选背景的选择指令时,基于所述任一候选背景得到目标候选背景;
    采用所述目标候选背景替换所述拍摄界面中的初始背景;以及
    将所述图像帧作为前景与所述目标候选背景结合,并在所述拍摄界面中进行展示。
  3. 根据权利要求2所述的视频的处理方法,其中,所述任一候选背景为视频背景,所述基于所述任一候选背景得到目标候选背景,包括:
    展示预设的视频编辑界面,并在所述视频编辑界面中展示所述视频背景;
    接收针对所述视频背景的编辑指令,并响应于所述编辑指令对所述视频背景进行编辑,得到编辑后的视频背景预览;以及
    当接收到针对所述编辑后的视频背景预览的确认指令时,得到编辑后的视频背景,作为目标候选背景。
  4. 根据权利要求2任一所述的视频的处理方法,所述处理方法还包括:
    当接收到第二开始拍摄指令时,基于所述图像帧和所述目标候选背景开始生成视频数据;以及
    当接收到第二结束拍摄指令时,停止生成视频数据,得到已生成的第二视频数据。
  5. 根据权利要求1所述的视频的处理方法,其中,获取目标对象的图像帧,包括:
    通过预设的图像采集设备获取图像帧;以及
    当检测到所述图像帧中目标对象时,从所述图像帧中提取出所述目标对象,得到目标对象的图像帧。
  6. 根据权利要求4所述的视频的处理方法,所述处理方法还包括:
    当接收到完成拍摄指令时,退出所述拍摄模式,将所述第一视频数据与所述第二视频数据进行拼接,得到最终的目标视频数据。
  7. 一种视频的处理装置,包括:
    展示模块,用于当预设的应用程序进入拍摄模式时,在所述应用程序的当前界面中展示预设的拍摄界面;所述拍摄界面具有预设的初始背景;
    获取模块,用于获取目标对象的图像帧和所述初始背景;
    所述展示模块,还用于将所述图像帧作为前景与所述初始背景结合,并在所述拍摄界面中进行展示;
    接收模块,用于接收第一开始拍摄指令和第一结束拍摄指令;
    生成模块,用于基于所述图像帧和所述初始背景开始生成视频数据;以及
    停止模块,用于停止生成视频数据,得到已生成的第一视频数据。
  8. 根据权利要求7所述的视频的处理装置,其中,所述拍摄界面中还展示有预设的背景预览窗口,所述背景预览窗口用于展示替换所述初始背景的候选背景,所述候选背景包括图像背景和视频背景;
    所述接收模块还用于接收针对任一候选背景的选择指令;
    所述处理装置还包括:
    处理模块,用于基于所述任一候选背景得到目标候选背景;
    替换模块,用于采用所述目标候选背景替换所述拍摄界面中的初始背景;
    其中,所述展示模块还用于将所述图像帧作为前景与所述目标候选背景结合,并在所述拍摄界面中进行展示。
  9. 一种电子设备,包括:
    处理器、存储器和总线;
    所述总线,用于连接所述处理器和所述存储器;
    所述存储器,用于存储操作指令;
    所述处理器,用于通过调用所述操作指令,执行上述权利要求1-6中任一项所述的视频的处理方法。
  10. 一种非暂时性计算机可读存储介质,所述非暂时性计算机可读存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机可以执行上述权利要求1-6中任一项所述的视频的处理方法。
PCT/CN2021/083405 2020-04-07 2021-03-26 视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质 WO2021203996A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2022560242A JP2023519625A (ja) 2020-04-07 2021-03-26 ビデオ処理方法、装置、電子機器及び非一時的なコンピュータ読み取り可能な記憶媒体
BR112022019945A BR112022019945A2 (pt) 2020-04-07 2021-03-26 Método e aparelho de processamento de vídeo, dispositivo eletrônico e meio de armazenamento não transitório legível por computador
KR1020227037660A KR20220159453A (ko) 2020-04-07 2021-03-26 동영상의 처리 방법, 장치, 전자 기기 및 비일시적 컴퓨터 판독 가능 저장 매체
EP21785129.4A EP4131935A4 (en) 2020-04-07 2021-03-26 VIDEO PROCESSING METHOD AND APPARATUS AND ELECTRONIC DEVICE AND NON-TRANSITORY COMPUTER-READABLE STORAGE MEDIUM
US17/882,499 US11962932B2 (en) 2020-04-07 2022-08-05 Video generation based on predetermined background

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010266623.9 2020-04-07
CN202010266623.9A CN111464761A (zh) 2020-04-07 2020-04-07 视频的处理方法、装置、电子设备及计算机可读存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/882,499 Continuation US11962932B2 (en) 2020-04-07 2022-08-05 Video generation based on predetermined background

Publications (1)

Publication Number Publication Date
WO2021203996A1 true WO2021203996A1 (zh) 2021-10-14

Family

ID=71681202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083405 WO2021203996A1 (zh) 2020-04-07 2021-03-26 视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质

Country Status (7)

Country Link
US (1) US11962932B2 (zh)
EP (1) EP4131935A4 (zh)
JP (1) JP2023519625A (zh)
KR (1) KR20220159453A (zh)
CN (1) CN111464761A (zh)
BR (1) BR112022019945A2 (zh)
WO (1) WO2021203996A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040129A (zh) * 2021-11-30 2022-02-11 北京字节跳动网络技术有限公司 视频生成方法、装置、设备及存储介质
CN114845171A (zh) * 2022-03-21 2022-08-02 维沃移动通信有限公司 视频编辑方法、装置及电子设备
CN116347224A (zh) * 2022-10-31 2023-06-27 荣耀终端有限公司 拍摄帧率控制方法、电子设备、芯片***及可读存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464761A (zh) * 2020-04-07 2020-07-28 北京字节跳动网络技术有限公司 视频的处理方法、装置、电子设备及计算机可读存储介质
CN112199016B (zh) * 2020-09-30 2023-02-21 北京字节跳动网络技术有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
CN112351203B (zh) * 2020-10-26 2022-04-08 北京达佳互联信息技术有限公司 视频拍摄方法、装置、电子设备及存储介质
CN113259698B (zh) * 2021-05-12 2022-11-15 北京字节跳动网络技术有限公司 更换画面中的背景的方法、设备、存储介质及程序产品
CN113286159B (zh) * 2021-05-14 2022-05-31 北京字跳网络技术有限公司 应用程序的页面显示方法、装置和设备
CN115379105B (zh) * 2021-05-20 2024-02-27 北京字跳网络技术有限公司 视频拍摄方法、装置、电子设备和存储介质
CN113422914B (zh) * 2021-06-24 2023-11-21 脸萌有限公司 一种视频生成方法、装置、设备及介质
CN113596574A (zh) * 2021-07-30 2021-11-02 维沃移动通信有限公司 视频处理方法、视频处理装置、电子设备和可读存储介质
CN114554112B (zh) * 2022-02-18 2023-11-28 北京达佳互联信息技术有限公司 视频录制方法、装置、终端及存储介质
CN114900621A (zh) * 2022-04-29 2022-08-12 北京字跳网络技术有限公司 特效视频确定方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254784A (zh) * 2016-09-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 一种视频处理的方法及装置
CN107483837A (zh) * 2017-09-29 2017-12-15 上海展扬通信技术有限公司 一种基于智能设备的照片的拍摄方法及拍摄装置
CN108024071A (zh) * 2017-11-24 2018-05-11 腾讯数码(天津)有限公司 视频内容生成方法、视频内容生成装置及存储介质
CN109089059A (zh) * 2018-10-19 2018-12-25 北京微播视界科技有限公司 视频生成的方法、装置、电子设备及计算机存储介质
CN110290425A (zh) * 2019-07-29 2019-09-27 腾讯科技(深圳)有限公司 一种视频处理方法、装置及存储介质
CN111464761A (zh) * 2020-04-07 2020-07-28 北京字节跳动网络技术有限公司 视频的处理方法、装置、电子设备及计算机可读存储介质

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050212945A1 (en) * 2002-07-29 2005-09-29 Seiko Epson Corporation Digital camera
KR100575924B1 (ko) 2003-12-27 2006-05-02 삼성전자주식회사 카메라를 구비하는 장치의 영상 촬영 방법
JP3936939B2 (ja) 2004-02-04 2007-06-27 株式会社日本ブレインウェア 画像撮影装置
JP2007013858A (ja) 2005-07-04 2007-01-18 Hitachi Software Eng Co Ltd 写真シール作成装置
US8106856B2 (en) * 2006-09-06 2012-01-31 Apple Inc. Portable electronic device for photo management
US8294824B2 (en) * 2007-04-02 2012-10-23 M. Soft Co., Ltd. Method and system for video compositing using color information in comparison processing
CN101783889A (zh) * 2010-02-05 2010-07-21 北京水晶石数字科技有限公司 一种实时抠像及视频监视和采集方法
KR101105034B1 (ko) * 2010-02-09 2012-01-16 주식회사 팬택 촬영 기능을 보유한 단말기
US20130120602A1 (en) * 2011-11-14 2013-05-16 Microsoft Corporation Taking Photos With Multiple Cameras
WO2013101211A1 (en) * 2011-12-30 2013-07-04 Intel Corporation User interfaces for electronic devices
US9137461B2 (en) * 2012-11-30 2015-09-15 Disney Enterprises, Inc. Real-time camera view through drawn region for image capture
JP5704205B2 (ja) 2013-09-24 2015-04-22 辰巳電子工業株式会社 画像処理装置、これを用いた写真撮影遊戯装置、画像処理方法、画像処理プログラム、及び写真印刷シート
CN106657791A (zh) * 2017-01-03 2017-05-10 广东欧珀移动通信有限公司 一种合成图像的生成方法及装置
CN110168630B (zh) * 2017-02-03 2021-12-28 杰创科***有限公司 增强视频现实
US11394898B2 (en) * 2017-09-08 2022-07-19 Apple Inc. Augmented reality self-portraits
CN107730433A (zh) * 2017-09-28 2018-02-23 努比亚技术有限公司 一种拍摄处理方法、终端及计算机可读存储介质
CN108124109A (zh) * 2017-11-22 2018-06-05 上海掌门科技有限公司 一种视频处理方法、设备及计算机可读存储介质
JP2020048025A (ja) * 2018-09-18 2020-03-26 富士フイルム株式会社 撮影装置、撮影装置の作動プログラム及び作動方法
CN110062176B (zh) * 2019-04-12 2020-10-30 北京字节跳动网络技术有限公司 生成视频的方法、装置、电子设备和计算机可读存储介质
CN114679538A (zh) * 2019-05-22 2022-06-28 华为技术有限公司 一种拍摄方法及终端
US11513669B2 (en) * 2020-02-28 2022-11-29 Micron Technology, Inc. User interface for modifying pictures
CN112511741A (zh) * 2020-11-25 2021-03-16 努比亚技术有限公司 一种图像处理方法、移动终端以及计算机存储介质
CN115379105B (zh) * 2021-05-20 2024-02-27 北京字跳网络技术有限公司 视频拍摄方法、装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254784A (zh) * 2016-09-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 一种视频处理的方法及装置
CN107483837A (zh) * 2017-09-29 2017-12-15 上海展扬通信技术有限公司 一种基于智能设备的照片的拍摄方法及拍摄装置
CN108024071A (zh) * 2017-11-24 2018-05-11 腾讯数码(天津)有限公司 视频内容生成方法、视频内容生成装置及存储介质
CN109089059A (zh) * 2018-10-19 2018-12-25 北京微播视界科技有限公司 视频生成的方法、装置、电子设备及计算机存储介质
CN110290425A (zh) * 2019-07-29 2019-09-27 腾讯科技(深圳)有限公司 一种视频处理方法、装置及存储介质
CN111464761A (zh) * 2020-04-07 2020-07-28 北京字节跳动网络技术有限公司 视频的处理方法、装置、电子设备及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4131935A4 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040129A (zh) * 2021-11-30 2022-02-11 北京字节跳动网络技术有限公司 视频生成方法、装置、设备及存储介质
CN114040129B (zh) * 2021-11-30 2023-12-05 北京字节跳动网络技术有限公司 视频生成方法、装置、设备及存储介质
CN114845171A (zh) * 2022-03-21 2022-08-02 维沃移动通信有限公司 视频编辑方法、装置及电子设备
CN116347224A (zh) * 2022-10-31 2023-06-27 荣耀终端有限公司 拍摄帧率控制方法、电子设备、芯片***及可读存储介质
CN116347224B (zh) * 2022-10-31 2023-11-21 荣耀终端有限公司 拍摄帧率控制方法、电子设备、芯片***及可读存储介质

Also Published As

Publication number Publication date
KR20220159453A (ko) 2022-12-02
JP2023519625A (ja) 2023-05-11
CN111464761A (zh) 2020-07-28
US11962932B2 (en) 2024-04-16
US20220377259A1 (en) 2022-11-24
EP4131935A4 (en) 2023-09-06
EP4131935A1 (en) 2023-02-08
BR112022019945A2 (pt) 2022-11-22

Similar Documents

Publication Publication Date Title
WO2021203996A1 (zh) 视频的处理方法、装置、电子设备及非暂时性计算机可读存储介质
US11887630B2 (en) Multimedia data processing method, multimedia data generation method, and related device
JP7138201B2 (ja) ビデオ撮影方法、装置、端末機器及び記憶媒体
CN112165632B (zh) 视频处理方法、装置及设备
WO2021196903A1 (zh) 视频处理方法、装置、可读介质及电子设备
WO2017142278A1 (en) Apparatus and method for providing dynamic panorama function
KR20220082926A (ko) 비디오 촬영 방법 및 전자 디바이스
CN113259740A (zh) 一种多媒体处理方法、装置、设备及介质
WO2022048504A1 (zh) 视频处理方法、终端设备及存储介质
CN113225483B (zh) 图像融合方法、装置、电子设备和存储介质
WO2019132306A1 (ko) 사진촬영에 음악을 링크하는 전자 장치 및 이의 제어 방법
CN114598815B (zh) 一种拍摄方法、装置、电子设备和存储介质
EP4343580A1 (en) Media file processing method and apparatus, device, readable storage medium, and product
WO2022057852A1 (zh) 一种多应用程序之间的交互方法
CN114979785B (zh) 视频处理方法、电子设备及存储介质
WO2022068631A1 (zh) 图片转视频的方法、装置、设备及存储介质
EP4236328A1 (en) Video sharing method and apparatus, electronic device, and storage medium
WO2021089002A1 (zh) 多媒体信息处理方法、装置、电子设备及介质
WO2023071569A1 (zh) 视频拍摄方法、设备、存储介质及程序产品
US20210377454A1 (en) Capturing method and device
CN112887623B (zh) 图像生成方法、装置及电子设备
JP2023544561A (ja) メッセージ表示方法及び電子デバイス
US12019669B2 (en) Method, apparatus, device, readable storage medium and product for media content processing
CN115515008B (zh) 一种视频处理方法、终端和视频处理***
WO2017071284A1 (zh) 拍照处理方法、装置和设备

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: 21785129

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022560242

Country of ref document: JP

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112022019945

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 20227037660

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021785129

Country of ref document: EP

Effective date: 20221025

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112022019945

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20220930