WO2022170837A1 - Video processing method and apparatus - Google Patents

Video processing method and apparatus Download PDF

Info

Publication number
WO2022170837A1
WO2022170837A1 PCT/CN2021/136393 CN2021136393W WO2022170837A1 WO 2022170837 A1 WO2022170837 A1 WO 2022170837A1 CN 2021136393 W CN2021136393 W CN 2021136393W WO 2022170837 A1 WO2022170837 A1 WO 2022170837A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
character
electronic device
action
target
Prior art date
Application number
PCT/CN2021/136393
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 WO2022170837A1 publication Critical patent/WO2022170837A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • 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 or rendering scenes according to encoded video stream scene graphs
    • 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
    • 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Definitions

  • the present application relates to the field of electronic equipment, and more particularly, to a method and apparatus for processing video.
  • Multiple users located in the same venue can take a photo with one or more camera devices (electronic devices with cameras) to obtain a co-shot video containing the appearances of the multiple users.
  • a single user can co-shoot with the video material to obtain a co-production video including the user and the video material.
  • the coordinated actions of multiple users or characters are often difficult to coordinate, which may result in mediocre or suboptimal coordination. This may also require the user to perform additional post-processing on the co-shot video.
  • the present application provides a method and apparatus for processing video, with the purpose of improving the action matching degree of multiple users and reducing the post-processing amount of video by users.
  • a method for processing video including:
  • the first electronic device acquires a first video, where the first video is a video of a first character
  • the first electronic device obtains a second action file corresponding to a second video, the second video is a video of a second character, and the second action file corresponds to an action of the second character;
  • the first electronic device generates a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video
  • the actions of the first character in the video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. Action corresponds.
  • the solution provided by the present application can extract information on the actions of the first character in the video, and modify the actions of the first character according to the actions of the second character, so that the actions of the first character can be closer to the actions of the second character. This helps to reduce the post-processing workload of the user for the video, and further helps to improve the user experience of shooting, producing, and processing the video.
  • the method before the first electronic device acquires the first video, the method further includes:
  • the first electronic device establishes a video call connection between the first electronic device and a second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the second electronic device the character's electronic equipment;
  • the first electronic device obtains the first video, including:
  • the first electronic device acquires the first video during a video call
  • the method also includes:
  • the first electronic device acquires the second video from the second electronic device through the video call connection.
  • the first character and the second character can interact with the video through a video call to make a new video.
  • This is beneficial to increase the applicable scenarios of video calls, and video calls can also have the function of making videos.
  • the video data obtained during the video call can also be used to create a new video, which improves the interaction efficiency between devices.
  • the video call also facilitates the details of the interaction between the first character and the second character, which is beneficial to improve the accuracy of the actions made by the first character, and further helps to further reduce the post-processing workload of the user for the video.
  • the second video may be the same video as the first video.
  • the first video may be a video of the first person and the second person.
  • the first video and the second video correspond to the same time period during the video call
  • the target video further includes the second character's A second character image, where actions of the second character in the target video correspond to actions of the second character in the second video.
  • the target video includes the second character, which can realize the co-production of the first character and the second character, which is beneficial to increase the flexibility of the video.
  • the method further includes:
  • the first electronic device acquires a third video, and the third video is a video of a third character
  • the first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
  • the first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
  • the first electronic device generates the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the target video Also includes a third character image of the third character, the action of the third character in the target video is different from the action of the third character in the third video, and the third character in the target video is different.
  • the action of the character corresponds to the action of the second character in the second video.
  • the third character and the first character can act against the same second character. Without any video processing, it is difficult to coordinate the movements of the third character with the movements of the first character. In order to make the movements sufficiently coordinated, the first character and the second character need to be rehearsed many times in advance, which increases the difficulty of co-producing the video.
  • the solution provided by this application can extract the action files of multiple characters, and adjust the actions of multiple characters in a unified manner based on sample actions, which is beneficial to increase the coordination of actions of multiple characters and reduce the post-processing workload of users for videos. .
  • the target video further includes a second character image of the second character, and the actions of the second character in the target video are similar to the second character image of the second character.
  • the action of the second character in the video corresponds.
  • the target video includes the second character, which can realize the co-production of the first character and the second character, which is beneficial to increase the flexibility of the video.
  • the first person image and the second person image belong to the same frame image in the target video.
  • the actions of the two characters can be relatively similar, so it is beneficial to improve the coordination of the actions of the first character and the second character in terms of time sequence.
  • the swing speed of the first character and the second character can be faster. similar.
  • the second video is a video of the second character and the fourth character, and the method further includes:
  • the first electronic device acquires a third video, and the third video is a video of a third character
  • the first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
  • the first electronic device acquires a fourth action file, where the fourth action file corresponds to the action of the fourth character in the second video;
  • the first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
  • the first electronic device generates the said first video, the third video, the first action file, the second action file, the third action file, and the fourth action file
  • a target video the target video further includes a third character image of the third character
  • the action of the third character in the target video is different from the action of the third character in the third video
  • the The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
  • the third character and the first character can perform actions according to the two characters in the same video, which is beneficial to improve the action cooperation between the third character and the first character. Without any video processing, the correlation between the actions of the third character and the actions of the first character may be relatively weak, and it may be relatively difficult for the first character and the third character to jointly complete an action. If the solution provided by the present application is not used, the first character and the second character need to be rehearsed many times in advance, which increases the difficulty of co-producing a video.
  • the solution provided by this application can extract the action files of multiple characters, and adjust the actions of the multiple characters based on the sample actions of the two characters, which is beneficial to increase the cooperation of the actions of the multiple characters, and is beneficial to reduce the user's attention to the video. Post-processing workload.
  • the target video further includes a second character image of the second character and a fourth character image of the fourth character.
  • the action of the second character corresponds to the action of the second character in the second video
  • the action of the fourth character in the target video corresponds to the action of the fourth character in the second video.
  • the target video includes the second character and the fourth character, and the first character, the second character, the third character, and the fourth character can be co-produced, which is beneficial to increase the flexibility of the video.
  • the first person image, the second person image, the third person image, and the fourth person image belong to the target video. the same frame of image.
  • the actions of the first character, the second character, the third character, and the fourth character can be relatively similar, so it is beneficial to improve the actions of the first character, the second character, the third character, and the fourth character in time sequence.
  • Coordination, for example, the swing speeds of the movements of the first character, the second character, the third character, and the fourth character can be more similar.
  • the method before the first electronic device acquires the first video, the method further includes:
  • the first electronic device establishes a video call connection between the first electronic device and the second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the third character's electronic device Electronic equipment;
  • the first electronic device obtains the first video, including:
  • the first electronic device acquires the first video during a video call
  • the first electronic device acquires the third video, including:
  • the first electronic device acquires a third video from the second electronic device through the video call connection.
  • the first character and the third character can interact with the video through a video call to make a new video. This is beneficial to increase the applicable scenarios of video calls, and video calls can also have the function of making videos.
  • the video data obtained during the video call can also be used to create a new video, which improves the interaction efficiency between devices.
  • the video call also facilitates the details of the interaction between the first character and the third character, which helps to improve the accuracy of the actions of the first character and the third character, and further helps to further reduce the post-processing workload of the user for the video.
  • the first video and the third video correspond to the same time period during the video call.
  • the first character can perform actions synchronously with the third character, which is beneficial to improve the coordination in timing between the actions of the first character and the actions of the third character.
  • establishing, by the first electronic device, a video call connection between the first electronic device and the second electronic device includes:
  • the first electronic device establishes a video call connection between the first electronic device and the second electronic device through a photographing application or a video calling application.
  • the shooting application can call user controls from other applications than the shooting application, so that it can initiate a co-shooting request to other users.
  • multiple applications (including a shooting application) of the electronic device can be made to run cooperatively, so as to realize the co-shot of multiple users.
  • Video calling apps can run in tandem with other apps to achieve co-production of multiple users. Therefore, in addition to the function of video calling, the video calling application may also have the function of generating video.
  • the second video is a video stored locally or in the cloud.
  • the first electronic device may modify the action of the first character in the first video according to the existing video.
  • the existing video can also be reused, which is beneficial to improve the flexibility of video processing.
  • the first electronic device obtains a second action file corresponding to the second video, including:
  • the first electronic device acquires the second action file from the second electronic device.
  • the first electronic device may not obtain the second video, but only obtain the information related to the action in the second video, which is beneficial to reduce the amount of information transmission between the first electronic device and the second electronic device, thereby improving the video processing.
  • Efficiency and communication efficiency are beneficial to reduce the amount of information transmission between the first electronic device and the second electronic device, thereby improving the video processing.
  • the action of the first character in the target video corresponds to the action of the second character in the second video, including:
  • the action file corresponding to the first character image is the first target action file
  • the matching degree between the first action file and the second action file is the first matching degree
  • the matching degree between the second action files is a second matching degree
  • the second matching degree is greater than the first matching degree
  • the method provided by the present application is beneficial to improve the similarity of the actions of two characters on the basis of the original video, and is beneficial to make the processed video have relatively high action coordination.
  • the first electronic device obtains a first action file corresponding to the first video, including:
  • the first electronic device determines the first action sub-file according to at least two of the following: a first head pixel, a first neck pixel, a first torso pixel, a first upper left forelimb pixel, a first Left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point, first right lower forelimb pixel point, first right lower hindlimb pixel point, A left-hand pixel, a first right-hand pixel.
  • the solution of the present application can divide each area of a person's body, so as to extract the relevant information of each part of the body and obtain the action information of the person.
  • the first action subfile includes at least one of the following limb angles:
  • the solution of the present application can aim at the difference of some parts of the two characters to confirm the similarities and differences in the actions of the two characters.
  • the first action file corresponds to a first limb angle
  • the second action file corresponds to a second limb angle
  • the target action file corresponds to a third limb angle
  • the difference between the first limb angle and the second limb angle is smaller than a preset angle
  • the third limb angle is between the first limb angle and the second limb angle.
  • the solution of the present application can adjust the movement of a character by adjusting the angle of a certain limb, so that the movements of multiple characters can be more coordinated.
  • the first video includes a first subframe and a second subframe
  • the second video includes a third subframe and a fourth subframe
  • the The target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other
  • the sixth subframes correspond to each other
  • the time difference between the first subframe and the second subframe is the first time difference
  • the time difference between the third subframe and the fourth subframe is the first time difference.
  • Two time differences the time difference between the fifth subframe and the sixth subframe is a third time difference
  • the third time difference is between the first time difference and the second time difference.
  • the solution of the present application can adjust the time difference between multiple actions, which is beneficial to make the actions of multiple characters more similar within a period of time.
  • the target video includes a first image area and a second image area
  • the first image area includes pixels corresponding to the first character
  • the second image area includes pixels corresponding to the second person.
  • the target video includes the actions of the two characters, which is helpful for the user to observe the corrected actions of the first character more intuitively, and the relatively high action coordination between the first character and the second character.
  • the first image area includes pixels corresponding to any of the following: a first background image, a second background image, a target gallery image, the first A background image includes pixels corresponding to the scene where the first character is located, the second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is stored in the first electronic image on the device.
  • the second image area includes pixels corresponding to any one of the following: a first background image, a second background image, a target gallery image, the first A background image includes pixels corresponding to the scene where the first character is located, the second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is stored in the first electronic image on the device.
  • the target video can flexibly use any one of the first video, the second video or the gallery image as the background of the target video. If the first image area and the second image area use the same background, the first image area and the second image area can be regarded as being in the same background or the same scene, which is beneficial to increase the relationship between the first image area and the second image area. correlation and integration.
  • the first character image and the second character image can be assigned to different areas on the user interface, which can be more suitable for scenes that need to distinguish the character images relatively clearly. mixed scene.
  • the co-shot video further includes a background image area, and the background image area is the background of the first image area and the second image area, and the The background image area includes pixels corresponding to any one of the following: a first background image, a second background image, and a target gallery image, the first background image includes pixels corresponding to the scene where the first character is located, and the The second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is an image stored on the first electronic device.
  • the background image area can flexibly use any one of the first video, the second video or the gallery image as the background of the target video.
  • the first image area and the second image area can be regarded as being in the same background or the same scene, which is beneficial to increase the correlation and fusion between the first image area and the second image area. This can be more suitable for scenes that do not require significant area user images, such as group co-shot scenes.
  • an electronic device comprising: a processor, a memory and a transceiver, the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory;
  • the processor is configured to obtain a first video, where the first video is a video of a first character
  • the processor is further configured to acquire a first action file corresponding to the first video, where the first action file corresponds to the action of the first character;
  • the processor is further configured to acquire a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to an action of the second character;
  • the processor is further configured to generate a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video is The actions of the first character in the target video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video.
  • the actions of the characters correspond.
  • the processor before the processor acquires the first video, the processor is further configured to:
  • the processor is specifically configured to acquire the first video during a video call
  • the processor is further configured to acquire the second video from the second electronic device through the video call connection.
  • the first video and the second video correspond to the same time period during the video call
  • the target video further includes the second character's A second character image, where actions of the second character in the target video correspond to actions of the second character in the second video.
  • the processor is further configured to:
  • the third video is a video of a third character
  • the processor is specifically configured to generate the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the The target video further includes a third character image of the third character, the actions of the third character in the target video are different from those of the third character in the third video, and the actions of the third character in the target video are different from those of the third character in the target video.
  • the actions of the third character correspond to the actions of the second character in the second video.
  • the target video further includes a second character image of the second character, and the action of the second character in the target video is the same as the second character image.
  • the action of the second character in the video corresponds.
  • the first person image and the second person image belong to the same frame of images in the target video.
  • the second video is a video of the second character and the fourth character
  • the processor is further configured to:
  • the third video is a video of a third character
  • the fourth action file corresponds to the action of the fourth character in the second video
  • the processor is specifically configured to, according to the first video, the third video, the first action file, the second action file, the third action file, and the fourth action file, generate the target video, the target video further includes a third character image of the third character, and the movement of the third character in the target video is different from the movement of the third character in the third video, The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
  • the target video further includes a second character image of the second character and a fourth character image of the fourth character.
  • the action of the second character corresponds to the action of the second character in the second video
  • the action of the fourth character in the target video corresponds to the action of the fourth character in the second video.
  • the first person image, the second person image, the third person image, and the fourth person image belong to the target video. the same frame of image.
  • the processor before the processor acquires the first video, the processor is further configured to:
  • the processor is specifically configured to acquire the first video during a video call
  • the processor is specifically configured to acquire a third video from the second electronic device through the video call connection.
  • the first video and the third video correspond to the same time period during the video call.
  • the processor is specifically configured to establish a video call connection between the electronic device and the second electronic device through a photographing application or a video calling application.
  • the second video is a video stored locally or in the cloud.
  • the processor is specifically configured to acquire the second action file from the second electronic device.
  • the action of the first character in the target video corresponds to the action of the second character in the second video, including:
  • the action file corresponding to the first character image is the first target action file
  • the matching degree between the first action file and the second action file is the first matching degree
  • the matching degree between the second action files is a second matching degree
  • the second matching degree is greater than the first matching degree
  • the processor is specifically configured to determine the first action sub-file according to at least two of the following: a first header pixel, a first neck Pixel point, first torso pixel point, first left upper forelimb pixel point, first left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point , the first pixel point of the lower right forelimb, the first pixel point of the lower right hind limb, the first pixel point of the left hand, and the first pixel point of the right hand.
  • the first action subfile includes at least one of the following limb angles:
  • the first action file corresponds to a first limb angle
  • the second action file corresponds to a second limb angle
  • the target action file corresponds to a third limb angle
  • the difference between the first limb angle and the second limb angle is smaller than a preset angle
  • the third limb angle is between the first limb angle and the second limb angle.
  • the first video includes a first subframe and a second subframe
  • the second video includes a third subframe and a fourth subframe
  • the The target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other
  • the sixth subframes correspond to each other
  • the time difference between the first subframe and the second subframe is the first time difference
  • the time difference between the third subframe and the fourth subframe is the first time difference.
  • Two time differences the time difference between the fifth subframe and the sixth subframe is a third time difference
  • the third time difference is between the first time difference and the second time difference.
  • a computer storage medium including computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to perform the above-mentioned any one of the possible implementations of the first aspect. method.
  • a computer program product which, when the computer program product runs on a computer, causes the computer to execute the method described in any one of the possible implementations of the first aspect above.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a software structural block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an extraction action file provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a video processing method provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
  • FIG. 16 is a schematic flowchart of a method for processing video provided by an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication capabilities (eg, a smart watch) Wait.
  • portable electronic devices include, but are not limited to, carry-on Or portable electronic devices with other operating systems.
  • the above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) or the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , the mobile communication module 150, the wireless communication module 160, the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, the button 190, the camera 193, the display screen 194, and the subscriber identification module (SIM) card Interface 195, etc.
  • SIM subscriber identification module
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors.
  • the electronic device 101 may also include one or more processors 110 .
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 may be a cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 101 in processing data or executing instructions.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transmit data between the electronic device 101 and peripheral devices.
  • the USB interface 130 can also be used to connect an earphone, and play audio through the earphone.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130.
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • electronic device 100 may include one or more display screens 194 .
  • the display screen 194 of the electronic device 100 may be a flexible screen.
  • the flexible screen has attracted much attention due to its unique characteristics and great potential.
  • flexible screens have the characteristics of strong flexibility and bendability, which can provide users with new interactive methods based on the bendable characteristics, and can meet more needs of users for electronic devices.
  • the foldable display screen on the electronic device can be switched between a small screen in a folded state and a large screen in an unfolded state at any time. Therefore, users are using the split-screen function more and more frequently on electronic devices equipped with foldable displays.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or more cameras 193 .
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store one or more computer programs including instructions.
  • the processor 110 may execute the above-mentioned instructions stored in the internal memory 121, thereby causing the electronic device 101 to execute the method for off-screen display, various applications and data processing provided in some embodiments of the present application.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the stored program area may store the operating system; the stored program area may also store one or more applications (such as gallery, contacts, etc.) and the like.
  • the storage data area may store data (such as photos, contacts, etc.) created during the use of the electronic device 101 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 110 may cause the electronic device 101 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 .
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as gallery, camera, Changlian, map, and navigation.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library media library
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the solutions provided by the embodiments of the present application can be applied to co-production scenarios, for example, scenarios in which a user is in a co-production with a material, and a user is in a co-production with a user.
  • the user and the user co-production scene may also include a remote multi-user co-production scene.
  • the remote multi-user co-production scenario may refer to the inability or difficulty of at least two users to complete co-production at the same time with the same camera device.
  • User A can take a selfie through an electronic device A with a camera function to obtain a selfie video A; user B can take a selfie through an electronic device B with a camera.
  • By synthesizing video A and video B a co-production video of user A and user B can be obtained.
  • the selfie video A and the selfie video B can be obtained by asynchronous shooting.
  • the visual coordination of user A's and user B's synchronized actions may be poor.
  • the distance between user A and electronic device A may be quite different from the distance between user B and electronic device B, so the outline size of user A in selfie video A and the outline size of user B in selfie video B are quite different.
  • user A and user B perform similar actions, but user A's action is relatively fast and the action is relatively large, while the action of user B is relatively slow and small. Therefore, the matching degree of video A and video B may be relatively poor; correspondingly, the coordination of co-produced videos may be relatively poor.
  • the user needs to perform post-processing with a large workload on the co-shot video.
  • User A can make a video call with user B through the electronic device A with the camera function, and obtain a co-shot video that includes both user A and user B by recording the screen.
  • the clarity of the co-shot video obtained through screen recording is usually relatively poor.
  • the maximum resolution of the co-shot video usually depends on the display resolution of the electronic device A.
  • multiple rehearsals may be required for multiple users to perform actions with high similarity. Therefore, the coordination of co-production videos may be relatively poor.
  • the user In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
  • User A and User B may be located in the same scene. User A and User B can perform similar actions, and take a selfie through the electronic device A with a camera function to obtain a co-shot video.
  • user A's actions may be relatively poorly coordinated with user B's actions.
  • user A and user B perform similar actions, but the action of user A is relatively fast and the action is relatively large, while the action of user B is relatively slow and the action is relatively small. Therefore, the coordination of co-production videos may be relatively poor.
  • the user In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
  • the user A can observe the video material.
  • the video footage contains a series of actions of Person C.
  • the user A imitates the action of the character C in the video material, and records the action made by the user A through the electronic device A with the camera function, so as to obtain the video A.
  • a co-shot video can be obtained.
  • Embodiments of the present application provide a new method for video processing, which aims to reduce the post-processing workload of the user for the video, thereby helping to improve the user experience of shooting, producing, and processing the video.
  • FIG. 3 is a schematic diagram of a user interface 300 provided by an embodiment of the present application.
  • the user interface 300 may be displayed on the first electronic device.
  • the user interface 300 may be an interface of a camera application, or an interface of other applications having a photographing function. That is to say, a camera application or other applications having a photographing function may be carried on the first electronic device.
  • the first electronic device may display the user interface 300 in response to operations made by the first user on the applications.
  • the first user may open the camera application by clicking on the icon of the camera application, and then the first electronic device may display the user interface 300 .
  • the camera application can call the camera 193 shown in FIG. 1 to capture the scene around the first electronic device.
  • the camera application may call the front camera of the first electronic device to take a selfie image of the first user, and display the selfie image on the user interface 300 .
  • the user interface 300 may include a plurality of function controls 310 (the function controls 310 may be presented on the user interface 300 in the form of tabs), and the plurality of function controls 310 may respectively correspond to a plurality of camera functions of the camera application.
  • the multiple camera functions may include, for example, a portrait function, a photographing function, a video recording function, a video co-shooting function, a professional function, etc.
  • the multiple function controls 310 may include a portrait function control, a photographing function control, a video recording function control, Video co-shooting function controls, professional function controls.
  • the first electronic device can switch the current camera function to a function for completing video co-shooting, such as the "video co-shooting" function shown in FIG. It should be understood that, in other possible examples, the camera application may include other camera functions for completing video co-shooting. The embodiments of the present application are described below by taking the video co-shooting function as an example.
  • the user interface 300 may include, for example, at least one of the following controls: a user co-shooting control 320 , a material co-shooting control 330 , and a gallery co-shooting control 340 .
  • the first electronic device may synthesize the captured video with other files, thereby completing the co-shooting.
  • the user co-shooting control 320 can be used to select or invite the second user to make a video call, so as to complete the synchronization and co-shooting of the first user and the second user.
  • the first electronic device may display a plurality of user controls corresponding to a plurality of users on the user interface 300, and the plurality of users may Including the second user.
  • the first electronic device may initiate a video call to the second electronic device, wherein the second electronic device may be the electronic device used by the second user .
  • the second user may receive the video call invitation from the first user through the second electronic device.
  • the second electronic device may display an interface for the video call invitation, and the interface may include controls for answering the video call.
  • a video call connection can be established between the first electronic device and the second electronic device.
  • the first electronic device can obtain the first video by shooting, and the second electronic device can obtain the second video by shooting.
  • the first electronic device may acquire the second video through the video call connection.
  • the second electronic device may be connected through a video call to obtain the first video.
  • the electronic device can obtain one or more processed videos according to the first video and the second video by using the video processing method provided in the embodiment of the present application.
  • the material co-shot control 330 may be used to select a material from the cloud, so as to complete the co-production between the first user and the material.
  • the material may refer to files that can reflect actions, such as videos and action templates stored in the cloud.
  • the cloud may refer to a cloud server, a cloud storage device, and the like.
  • the material may be a second video containing a target person (eg, a second user).
  • the target person may be, for example, a person known or familiar to the first user, such as a friend, family member, celebrity, etc., or a stranger, or a cartoon image with character characteristics.
  • a material can be understood as a kind of action template. Footage can contain multiple frames of action images of the target person.
  • the first electronic device may acquire the material from the cloud server in response to the user's operation on the material in-time control.
  • the first user may shoot the first video through the first electronic device.
  • the first electronic device may capture a first video including the first user.
  • the first electronic device can obtain one or more processed videos by using the video processing method provided in the embodiment of the present application according to the first video and material.
  • the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person.
  • the first person sub-video may include an image of the first user and not include a background image in the first video.
  • the first electronic device may synthesize the first character sub-video, material and background multimedia data into a first target video, wherein the material may not include a background image corresponding to the target character, and the background multimedia data may serve as the first character sub-video, the material's background image. background.
  • the background multimedia data may, for example, come from other files than the first video and material.
  • the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person.
  • the first electronic device may synthesize the first character sub-video and material into a first target video, wherein the material may include a background image corresponding to the target character, so that the background image in the material may serve as the background of the first character sub-video.
  • the first electronic device may synthesize the first video and material into the first target video.
  • the material may not include a background image corresponding to the target person.
  • the background image in the first video can serve as the background for the footage.
  • user a can take a selfie of a video through electronic device a.
  • the electronic device a can crop the video A according to the outline of the user a in the video A to obtain the user sub-video and the background sub-video.
  • the user sub-video may include the image of user a and not include the background image; the background sub-video may include the background image and not include the image of user a.
  • the subframe A may include a plurality of pixel points A, and the plurality of pixel points A may include a plurality of pixel points a corresponding to the outline of the user a.
  • the multiple pixel points a' located within the multiple pixel points a in the subframe A may form a subframe a' of the user's sub-video, and may form the image of the user a; the multiple pixel points located in the subframe A A A plurality of pixel points a" other than a may form a subframe a" of the background sub-video, and may form the background image.
  • the gallery co-shooting control 340 may be used to select a gallery video from a local gallery to complete the first user's co-shooting with the gallery video.
  • the gallery video may be understood as a video stored locally on the first electronic device.
  • the gallery video is a second video containing a target person (eg, a second user).
  • the first user may shoot the first video through the first electronic device.
  • the first electronic device may capture a first video including the first user.
  • the first electronic device can obtain one or more processed videos according to the first video and the gallery video by using the video processing method provided in the embodiment of the present application.
  • the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person.
  • the first person sub-video may include an image of the first user and not include a background image in the first video.
  • the first electronic device may synthesize the first character sub-video, the gallery video and the background multimedia data into a first target video, wherein the gallery video may not include a background image corresponding to the target character, and the background multimedia data may serve as the first character sub-video, Background for gallery videos.
  • the background multimedia data may, for example, come from other files than the first video and material.
  • the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person.
  • the first electronic device may synthesize the first person sub-video and the gallery video into a first target video, wherein the gallery video may include a background image corresponding to the target person, so that the background image may serve as the background of the first person sub-video.
  • the first electronic device may synthesize the first video and the gallery video into the first target video.
  • the gallery video may not include a background image corresponding to the target person.
  • the background image in the first video can serve as the background for the gallery video.
  • the user interface 300 may further include a gallery control 350 .
  • the first electronic device may jump to the gallery application to view the photographed or stored multimedia data.
  • the first electronic device may display a user interface 400 as shown in FIG. 4 .
  • the user interface 400 may include a first interface area 460 and a second interface area 470 .
  • the first interface region 460 and the second interface region 470 may not cross each other.
  • the first interface area 460 and the second interface area 470 may be located anywhere on the user interface 400 .
  • the second interface area 470 may be located above the user interface 400 , for example, and the first interface area 460 may be located below the user interface 400 , for example.
  • the first user can observe the second interface area 470 of the user interface 400 , so as to understand and be familiar with the actions of the target person in the second interface area 470 .
  • the second interface area 470 may display the video call content of the second user, in this case, the target person may be the second user; in another possible example, the second user
  • the interface area 470 may, for example, display the material, in this case, the target person may be the target person in the material; in an example, the second interface area 470 may, for example, display the gallery video, in this case, the target person may be the gallery The target person in the video.
  • the video resources displayed in the second interface area 470 are collectively referred to as the second video.
  • the second video may be any of the following: video call data received from a second electronic device during a video call, where the second electronic device is an electronic device used by the second user; material; gallery video.
  • the second video may include a second character sub-video, or the second character sub-video may be extracted from the second video. That is, the second video may include subframes corresponding to the target person.
  • the second electronic device can display a second character image 471 in the second interface area 470, and then can play a picture of the sub-video of the second character. That is, the second interface area 470 may include the second character image 471 .
  • the second interface area 470 may include pixel points corresponding to the target person.
  • the first electronic device may directly play the second video within the second interface area 470 .
  • the second interface area 470 may include a second character image 471 and a second background image 472 , and the second background image 472 may serve as a background of the second character image 471 . That is, the first electronic device may not perform video cropping or video extraction on the second video.
  • the first user can imitate the target person to make a series of actions, which are recorded by the first electronic device.
  • the second video is a video call video of the second user, the first user can imitate the second user.
  • the second video is a material, the first user can imitate the target person in the material.
  • the second video is a gallery video, the first user can imitate the target person in the gallery video.
  • user interface 400 may include recording controls 410 .
  • the first electronic device may capture a first video.
  • the first user can preview the shooting effect of the first video through the first interface area 460 shown in FIG. 4 .
  • the first electronic device may include the first character sub-video, or the first character sub-video may be extracted from the first video. That is, the second video may include subframes corresponding to the first user.
  • the first electronic device may display the first character image 461 in the first interface area 460, and then may play a picture of the sub-video of the first character. That is, the first interface area 460 may include the first character image 461 .
  • the first interface area 460 may include pixel points corresponding to the first user.
  • the first electronic device may directly play the first video in the first interface area 460 .
  • the first interface area 460 may include a first character image 461 and a first background image 462 , and the first background image 462 may serve as a background of the first character image 461 . That is, the first electronic device may not perform video cropping or video extraction on the first video.
  • the electronic device may synthesize the first video and the second video to obtain, for example, the first target video shown in FIG. 5 and FIG. 6 .
  • the first target video may include a first image area 560 corresponding to the first video or the first user, and a second image area 570 corresponding to the second video or the target person.
  • the first image area 560 may correspond to the first interface area 460
  • the second image area 570 may correspond to the second interface area 470, so that the preview video during the shooting process and the synthesized video may have relatively high unity.
  • two users can imitate one or more characters in the same video to perform actions through a video call.
  • the two users can communicate details of the imitation through a video call.
  • the first electronic device may send a video call invitation to the second electronic device according to the operation of the first user on the user co-shot control 320 as shown in FIG. 3
  • the user using the second electronic device may be the third user.
  • a video call connection can be established between the first electronic device and the second electronic device.
  • the first user and the third user may, for example, select the second video through the material co-shooting control 330 or the gallery co-shooting video 340 shown in FIG. 3 .
  • the second video may be a video about the target person.
  • the second video may show the action of the target person.
  • Both the first electronic device and the third electronic device may display one or more of the first interface area, the second interface area, and the third interface area on the user interface.
  • the first interface area may display the content of the video call of the first user; the second interface area may display the second video; and the third interface area may display the content of the video call of the third user.
  • the first user and the third user can imitate the actions in the second video to generate the first video and the third video during the video call. Since the first user and the third user imitate the actions of the same target character in the same video, the first video and the third video can be processed respectively with reference to the action form of the target character in the second video to obtain a result that includes the first user , the target video of the third user.
  • the first user and the third user can imitate the action of the target person at the same time, or they can imitate the action of the target person in different time periods successively.
  • the first electronic device may send a video call invitation to the second electronic device according to the operation of the first user on the user co-shot control 320 as shown in FIG. 3
  • the user using the second electronic device may be the third user.
  • a video call connection can be established between the first electronic device and the second electronic device.
  • the first user and the third user may, for example, select the second video through the material co-shooting control 330 or the gallery co-shooting video 340 shown in FIG. 3 .
  • the second video may be a video about the first target person and the second target person.
  • the first target person and the second target person may cooperate to complete a series of actions in the second video.
  • Both the first electronic device and the third electronic device may display one or more of the first interface area, the second interface area, and the third interface area on the user interface.
  • the first interface area may display the content of the video call of the first user; the second interface area may display the second video; and the third interface area may display the content of the video call of the third user.
  • the first user can imitate the action of the first target person in the second video, and generate the first video through a video call connection.
  • the third user can imitate the action of the second target person in the second video, and generate a third video through a video call connection. Since the first user and the third user imitate the actions of the first target character and the second target character in the same video, the first video , and the third video is processed to obtain a target video including the first user and the third user.
  • the period during which the first user imitates the action of the first target person may substantially overlap with the period during which the third user imitates the action of the second target person, or the first user imitates the first target person.
  • the time period for the action of the second target character may not overlap with the time period for the third user to imitate the action of the second target character.
  • User interface 400 may include, for example, a split screen switch control 420 .
  • the first interface area 460 and the second interface area 470 may be, for example, two regular display areas. That is, the outline of the first interface area 460 may not match (or correspond to) the outline of the first user, and the outline of the second interface area 470 may not match (or correspond to) the outline of the target person.
  • the area of the first interface region 460 and the area of the second interface region 470 may correspond to a fixed ratio (eg, 1:1, 1:1.5, etc.).
  • the split screen switch control 420 is currently in an on state. Both the first interface area 460 and the second interface area 470 may be rectangular in shape.
  • the first image area 560 and the second image area 570 of the first target video may be two regular display areas.
  • the outline of the first image area 560 may not match (or not correspond to) the outline of the first user, and the outline of the second image area 570 may not match (or not correspond to) the outline of the target person.
  • the area of the first image area 560 and the area of the second image area 570 may correspond to a fixed ratio (eg, 1:1, 1:1.5, etc.).
  • the shapes of the first image area 560 and the second image area 570 may both be rectangles. That is, both the first image area 560 and the second image area 570 may include a background image.
  • the outline of the first interface area 460 may match (or correspond to) the outline of the first user
  • the outline of the second interface area 470 may match (or correspond to), for example, the outline of the first user.
  • the profile of the second user matches (or corresponds). That is, the first interface area 460 may not include the first background image 462 of the first video as shown in FIG. 4 ; the second interface area 470 may not include the second background in the second video as shown in FIG. 4 . image 472.
  • the contour of the first image area 560 of the first target video may match (or correspond to) the contour of the first user
  • the second image area 570 of the first target video may match (or correspond to) the contour of the first user.
  • the profile of can match (or correspond to) the profile of the second user. That is, the first image area 560 may not include the first background image 462 of the first video as shown in FIG. 4 ; the second image area 570 may not include the second background in the second video as shown in FIG. 4 . image 472.
  • the first target video may include a first background image area 580 .
  • the pixel points of the first background image area 580 may be default values.
  • the pixel points of the first background image area 580 may also correspond to any one of the first background image 462, the second background image 472, and the target gallery image.
  • the target gallery image may be a subframe of the gallery video.
  • a certain subframe of the first target video may correspond to a target gallery image, and multiple subframes of the co-shot video may correspond one-to-one with multiple subframes of the video where the target gallery image is located.
  • the first user can indicate to the first electronic device that the background of the first target video corresponds to the target gallery image by acting on the user interface.
  • the first electronic device may, in response to an instruction from the user, determine that the pixels of the first background image area 580 of the first target video correspond to the target gallery image, so that the first target video shown in FIG. Pixels corresponding to the first background image 462 and the second background image 472.
  • the electronic device may display the first character image 461 or the second character image 471 preferentially.
  • the first person image 461 may be overlaid on the second person image 471
  • the second person image 471 may be overlaid on the first person image 461 .
  • the user can adjust the display size of the first character image 461 and the second character image 471 by operating on the user interface 400, and then adjust the image of the first user. and the size ratio of the image of the target person in the first target video.
  • the user interface 400 may include a background removal switch control 430 .
  • the electronic device may not deduct the background of the first video and the background of the second video, that is, display the background image of the first video and the background image of the second video on the user interface 400 .
  • the background removal switch control 430 may currently be in an off state.
  • the first interface area 460 may display a first character image 461 and a first background image 462 .
  • the first background image 462 may be the background image of the first user.
  • the first background image 462 may be obtained by photographing the scene where the first user is located. That is, the first interface area 460 may include pixels corresponding to the first user and pixels corresponding to the scene where the first user is located.
  • the second interface area 470 may display a second character image 471 and a second background image 472 .
  • the second background image 472 may be a background image of the target person. That is, the second interface area 470 may include pixels corresponding to the target character and pixels corresponding to the scene where the target character is located.
  • the electronic device may, for example, deduct the background of the first video and/or the background of the second video.
  • the first electronic device may display the background image of the first video in both the first interface area 460 and the second interface area 470; for another example, the first electronic device may display the background image in the first interface area 460 and the second interface area 470 Both display the background image of the second video; for another example, the first electronic device may display other background images except the background image of the first video and the background of the second video in the first interface area 460 and the second interface area 470.
  • the first electronic device may display the background image of the first video on the user interface 400, but not the background image of the second video; for another example, the first electronic device may display the background of the second video on the user interface 400 image, the background image of the first video is not displayed; for another example, the first electronic device may display other background images on the user interface 400 except for the background image of the first video and the background of the second video.
  • Other background images other than the background image of the first video and the background of the second video may be, for example, the target gallery image.
  • the first image area 560 in the first target video may include the first person image 461 and the first background image 462 and the second image area 570 in the first target video may include the second person image 471 and the first background image 462, the first background image 462 is used to serve as the background of the second person image 471; alternatively, the first image area 560 in the first target video may include the first person image 461, the second background image 472, the first target video The second image area 570 in the video may include a second person image 471, a second background image 472, and the second background image 472 is used to serve as the background of the first person image 461; or, the first image area 560 in the first target video It may include a first person image 461 and a target gallery image, and the second image area 570 in the first target video may include a second person image 471 and a target gallery image, and the target gallery image is used to serve as the first character image 461 and the second character.
  • the background of the image 471 may include the first person image 461 and not include the first background image 462, and the second image area 570 in the first target video may include the second The character image 471 does not include the second background image 472; the first background image area 580 in the first target video may include any of the following: the first background image 462, the second background image 472, the target gallery image, the first The background image area 580 may be used to serve as a background for the first image area 560 and the second image area 570 .
  • the first electronic device may respond to an operation performed by the first user on the user interface 400, and determine whether the user is in the first interface area 460, the second interface area 470 or the user interface. Background image displayed within interface 400 .
  • the background removal switch control 430 may be in an on state.
  • the user interface 400 may include a beauty switch control 440 .
  • the electronic device can perform portrait beautification for the first person image 461 and/or the second person image 471 . That is, the electronic device may display the first person image 461 and/or the second person image 471 after beautification of the portrait on the user interface 400; in the synthesized first target video, the person in the first image area 560
  • the image and/or the person image in the second image area 570 may be an image after beautification processing.
  • the electronic device may not perform portrait beautification for the first person image 461 and the second person image 471 . That is to say, the electronic device can display the first person image 461 and the second person image 471, the first person image 461 and the second person image 471 on the user interface 400 according to the original image of the first user and the original image of the target person. It can be an unbeautified image.
  • the person image in the first image area 560 can be obtained from the original image of the first user
  • the person image in the second image area 570 can be obtained from the original image of the target person.
  • the person image in the image area 560 and the person image in the second image area 570 may be images without beauty treatment.
  • the user interface 400 may further include a filter switch control 450 .
  • the electronic device may perform filter beautification for the image of the first video and/or the image of the second video. That is, the electronic device may display the image of the first video and/or the image of the first video after beautification by the filter on the user interface 400; and, in the synthesized first target video, the first image area 560
  • the image within and/or the image within the second image area 570 may be a filtered image.
  • the electronic device may not perform filter beautification for the first person image 461 and the second person image 471 . That is to say, the electronic device can display the unfiltered image in the user interface 400 according to the original image of the first video and the original image of the second video; in the synthesized first target video, the first image area The image in 560 can be obtained from the original image of the first video, and the image in the second image area 570 can be obtained from the original image of the second first video, that is, the first target video may not include filtered images.
  • the first electronic device may process the first video or the first target video according to the first video and the second video by using the video processing method provided in the embodiment of the present application , the first target video shown in Figure 5 and Figure 6 is obtained.
  • the electronic device may simultaneously perform the shooting of the first video and the processing of the first video.
  • This embodiment of the present application may not limit the specific sequence of steps for processing video. The following describes the video processing method provided by the embodiment of the present application with reference to FIG. 7 and FIG. 8 .
  • the first electronic device may extract the first action file according to the first video.
  • the action file can indicate the relative positions of the multiple limbs of the character on the image in multiple frames of a video, thereby reflecting the action information of the character in the video.
  • the first video may include or be extracted to obtain a sub-video of the first person.
  • the first person sub-video may include a plurality of first sub-frames.
  • the first action file may include first action subfiles corresponding to the plurality of first subframes one-to-one. Each first subframe may contain one action of the first user. As shown in FIG. 7, 710 shows a first subframe A of the first person sub-video.
  • the action performed by the first user in the first subframe A may be the first action A.
  • 711 shows the first action sub-file A corresponding to the first action A.
  • the first electronic device may, for example, determine the first action sub-file A according to the positional relationship or coordinates between the following at least two items: the first head pixel, the first neck pixel, the first torso pixel, the first upper left pixel Forelimb pixel point, first left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point, first right lower forelimb pixel point, first right Lower hindlimb pixels, first left-hand pixel, and first right-hand pixel.
  • the first head pixel point may be a pixel point corresponding to the head of the first user.
  • the first neck pixel point may be a pixel point corresponding to the neck of the first user.
  • the first torso pixel point may be a pixel point corresponding to the torso of the first user.
  • the first upper left forelimb pixel point may be a pixel point corresponding to the upper left forelimb of the first user.
  • the pixel point of the first upper left hind limb may be a pixel point corresponding to the upper left hind limb of the first user.
  • the first lower left forelimb pixel point may be a pixel point corresponding to the lower left forelimb of the first user.
  • the pixel point of the first lower left hind limb may be a pixel point corresponding to the lower left hind limb of the first user.
  • the pixel point of the first upper right forelimb may be a pixel point corresponding to the upper right forelimb of the first user.
  • the pixel point of the first upper right hind limb may be a pixel point corresponding to the upper right hind limb of the first user.
  • the first lower right forelimb pixel point may be a pixel point corresponding to the first user's lower right forelimb.
  • the pixel point of the first lower right hind limb may be a pixel point corresponding to the lower right hind limb of the first user.
  • the first left-hand pixel point may be a pixel point corresponding to the left hand of the first user.
  • the first right-hand pixel point may be a pixel point corresponding to the right hand of the first user.
  • the first action sub-file may be data reflecting or indicating or describing or corresponding to the first action.
  • a plurality of pixel points can be approximately fitted into line segments.
  • the type of line segment may include, for example, one or more of the following: head line segment, neck line segment, trunk line segment, left upper forelimb line segment, left upper hindlimb line segment, left lower limb line segment, left lower forelimb line segment, left lower hindlimb line segment, right upper forelimb line segment, right upper hindlimb line segment Line segment, right lower forelimb line segment, right lower hindlimb line segment, left hand line segment, right hand line segment.
  • the action sub-file may include, for example, data of line segments fitted by pixel points.
  • the positional relationship between the two types of pixel points can correspond to information such as the angle and distance between the two fitted line segments.
  • type 1 pixels can be fitted to line segment 1
  • type 2 pixels can be fitted to line segment 2.
  • the length of line segment 1 can reflect the relative number of type 1 pixels; the length of line segment 2 can reflect the relative number of type 2 pixels.
  • the positional relationship between the type 1 pixel point and the type 2 pixel point may correspond to information such as the angle and distance between the line segment 1 and the line segment 2.
  • a negative angle value may mean that the limb is inclined to the left;
  • a positive angle value may mean that the limb is inclined to the right. The larger the absolute value of the angle, the more tilted the limb can be considered to be.
  • the first action sub-file A may reflect that the first action A of the first user may include raising the right upper limb.
  • the relative positional relationship between the first upper right hindlimb pixel point and the first torso pixel point, as well as the relative positional relationship between the first upper right frontal pixel point and the first right upper hindlimb pixel point, can reflect that in the first action A , the lifting angle of the upper right hind limb of the first user is the first right rear upper limb angle, and the lifting angle of the first user's right upper fore limb is the first right front upper limb angle. As shown in FIG.
  • the first right upper hind limb angle may be, for example, about 85°, and the first right upper fore limb angle may be, for example, about -10°. That is, in other examples of the first user, the first upper right forelimb angle may be determined according to the first upper right forelimb pixel point and the first torso pixel point. In this case, the first right upper forelimb angle may be, for example, about 75°.
  • the first action sub-file A may reflect that the first action A of the first user may include raising the upper left limb.
  • the relative positional relationship between the pixels of the second upper left hind limb and the pixels of the first torso, as well as the relative positional relationship between the pixels of the first upper left front and the pixels of the first upper left hindlimb, can reflect that in the first action A , the lift angle of the left upper hind limb of the first user is the first left upper hind limb angle, and the lift angle of the first user's left upper fore limb is the first left upper fore limb angle. As shown in FIG.
  • the angle of the first upper left hind limb may be, for example, slightly less than -90°, and the angle of the first upper left front limb may be, for example, about -45°.
  • the first upper left forelimb angle may be determined according to the first upper left forelimb pixel point and the first torso pixel point. In this case, the first upper left forelimb angle may be, for example, about -135°.
  • the first action sub-file A may reflect that the first action A of the first user may include raising the right lower limb.
  • the relative positional relationship between the pixels of the first lower right hindlimb and the first torso, as well as the relative positional relationship between the pixels of the first lower right front and the first lower right hindlimb, can reflect that in the first In Action A, the lifting angle of the first user's lower right hind limb is the first right rear lower limb angle, and the lifting angle of the first user's right lower fore limb is the first right front lower limb angle.
  • the first right lower hind limb angle may be, for example, about 60°, and the first right lower fore limb angle may be, for example, about 0°.
  • the first right lower forelimb angle may be determined according to the first right lower forelimb pixel point and the first torso pixel point. In this case, the first right lower forelimb angle may be, for example, about 60°.
  • the first action sub-file A may reflect that the first action A of the first user may include not raising the left lower limb.
  • the relative positional relationship between the pixels of the second lower left hind limb and the pixels of the first torso, as well as the relative positional relationship between the pixels of the first lower left front and the pixels of the first lower left hindlimb, can reflect that in the first action A , the lifting angle of the left lower hind limb of the first user is the first left lower hind limb angle, and the lifting angle of the first user's left lower fore limb is the first left lower fore limb angle. As shown in FIG.
  • the first left lower hind limb angle may be, for example, about -5°, and the first left lower fore limb angle may be, for example, about 5°.
  • the first left lower forelimb angle may be determined according to the first left lower forelimb pixel point and the first torso pixel point. In this case, the first left lower forelimb angle may be, for example, about 0°.
  • the first action sub-file A may reflect that the first action A of the first user may include twisting the neck.
  • the relative positional relationship between the first neck pixel point and the first torso pixel point can reflect that, in the first action A, the angle of the neck twist is the first neck angle.
  • the first neck angle may be, for example, about 5°.
  • the first action sub-file A may reflect that the first action A of the first user may include twisting his head.
  • the relative positional relationship between the first head pixel point and the first neck pixel point can reflect that, in the first action A, the angle of the head twist is the first head angle.
  • the first head angle may be about 15°, for example.
  • the first head angle may be determined according to the first head pixels and the first torso pixels. In this case, the first head angle may be about 20°, for example.
  • the first action sub-file A may reflect that the first action A of the first user may include not leaning the torso.
  • the relative positional relationship between the first torso pixel point and the mid-vertical line may reflect that the angle at which the torso is inclined in the first action A is the first torso angle.
  • the first torso angle may be about 0°, for example.
  • the first action sub-file A may reflect the first left-hand angle and/or the first right-hand angle.
  • the first left hand angle may reflect the angle between the first left hand and the first upper left forelimb.
  • the first left-hand angle can be obtained, for example, according to the first left-hand pixel point and the first left upper forelimb pixel point.
  • the first left hand angle may reflect the angle between the first left hand and the first torso. It can be obtained from the first left-hand pixel and the first torso pixel.
  • the first right hand angle may reflect the angle between the first right hand and the first right upper forelimb.
  • the first right hand angle can be obtained, for example, according to the first right hand pixel point and the first right upper forelimb pixel point.
  • the first right hand angle may reflect the angle between the first right hand and the first torso. It can be obtained from the first right hand pixel and the first torso pixel.
  • the first electronic device may extract the second action file according to the second video.
  • the second video may include or be extracted to obtain a sub-video of the second person.
  • the second person sub-video may include a plurality of second sub-frames.
  • the second action file may include second action subfiles corresponding to the plurality of second subframes one-to-one.
  • Each second subframe may contain an action of the target character.
  • FIG. 7, 720 shows a second subframe a of the second person sub-video.
  • the action made by the target person in the second subframe a may be the second action a.
  • 721 shows the second action sub-file a corresponding to the second action a.
  • the second electronic device may determine the second action sub-file a according to the positional relationship or coordinates between at least two of the following: the second head pixel, the second neck pixel, the second torso pixel, the second upper left pixel Forelimb pixels, second upper left hindlimb pixel, second left lower forelimb pixel, second left lower hindlimb pixel, second right upper forelimb pixel, second right upper hindlimb pixel, second right lower forelimb pixel, second right Lower hindlimb pixels, second left-hand pixel, second right-hand pixel.
  • the second head pixel point may be a pixel point corresponding to the head of the target person.
  • the second neck pixel point may be a pixel point corresponding to the neck of the target person.
  • the second torso pixel point may be a pixel point corresponding to the torso of the target person.
  • the second upper left forelimb pixel point may be a pixel point corresponding to the upper left forelimb of the target person.
  • the second upper left hind limb pixel point may be a pixel point corresponding to the left upper hind limb of the target person.
  • the second left lower forelimb pixel point may be a pixel point corresponding to the left lower forelimb of the target person.
  • the second lower left hind limb pixel point may be a pixel point corresponding to the left lower hind limb of the target person.
  • the second upper right forelimb pixel point may be a pixel point corresponding to the upper right forelimb of the target person.
  • the second upper right hindlimb pixel point may be a pixel point corresponding to the upper right hindlimb of the target person.
  • the second right lower forelimb pixel point may be a pixel point corresponding to the target person's lower right forelimb.
  • the second lower right hindlimb pixel point may be a pixel point corresponding to the lower right hindlimb of the target person.
  • the second left-hand pixel point may be a pixel point corresponding to the left hand of the target person.
  • the second right-hand pixel point may be a pixel point corresponding to the right hand of the target person.
  • the second action subfile may be data reflecting or indicating or describing or corresponding to the second action.
  • the positional relationship, quantity relationship, etc. between different types of pixels can reflect the action direction, action angle, action range, etc. of the target person.
  • the second action sub-file a may reflect that the second action a of the target person may include raising the right upper limb.
  • the relative positional relationship between the second upper right hindlimb pixel point and the second torso pixel point, as well as the relative positional relationship between the second upper right frontal pixel point and the second right upper hindlimb pixel point, can reflect that in the second action a , the lifting angle of the upper right hind limb of the target person is the second right rear upper limb angle, and the lifting angle of the target person's upper right forelimb is the second right front upper limb angle. As shown in FIG.
  • the angle of the second upper right hind limb may be, for example, about 60°, and the angle of the second upper right front limb may be, for example, about 30°. That is, in other examples of the target person, the second upper right forelimb angle may be determined according to the second upper right forelimb pixel point and the second torso pixel point. In this case, the second upper right forelimb angle may be, for example, about 90°.
  • the second action subfile a may reflect that the second action a of the target person may include raising the upper left limb.
  • the relative positional relationship between the pixels of the second upper left hindlimb and the second torso, as well as the relative positional relationship between the pixels of the second upper left front and the second upper left hindlimb, can reflect that in the second action a , the lifting angle of the upper left hind limb of the target person is the second upper left hind limb angle, and the lifting angle of the upper left front limb of the target person is the second upper left forelimb angle.
  • the angle of the second upper left hind limb may be, for example, slightly less than -135°, and the angle of the second upper left fore limb may be, for example, about -15°.
  • the second upper left forelimb angle may be determined according to the second upper left forelimb pixel point and the second torso pixel point. In this case, the second upper left forelimb angle may be, for example, about -150°.
  • the second action sub-file a may reflect that the second action a of the target person may include raising the right lower limb.
  • the relative positional relationship between the pixels of the second lower right hindlimb and the second torso, as well as the relative positional relationship between the pixels of the second lower right front and the second lower right hindlimb, can reflect that in the second In action a, the lifting angle of the lower right hind limb of the target person is the second right rear lower limb angle, and the lifting angle of the target person's lower right fore limb is the second right front lower limb angle.
  • the second right lower hind limb angle may be, for example, about 60°, and the second right lower front limb angle may be, for example, about 0°.
  • the second lower right forelimb angle may be determined according to the second lower right forelimb pixel point and the second torso pixel point. In this case, the second right lower forelimb angle may be, for example, about 60°.
  • the second action subfile a may reflect that the second action a of the target person may include not raising the left lower limb.
  • the relative positional relationship between the pixels of the second lower left hind limb and the second torso, as well as the relative positional relationship between the pixels of the second lower left front and the second lower left hindlimb, can reflect that in the second action a , the raising angle of the lower left hind limb of the target person is the second lower left hind limb angle, and the raising angle of the lower left front limb of the target person is the second lower left front limb angle. As shown in FIG.
  • the second left lower hind limb angle may be, for example, about 0°, and the second left lower fore limb angle may be, for example, about 0°.
  • the second left lower forelimb angle may be determined according to the second left lower forelimb pixel point and the second torso pixel point. In this case, the second left lower forelimb angle may be approximately 0°, for example.
  • the second action sub-file a may reflect that the second action a of the target person may include twisting the neck.
  • the relative positional relationship between the second neck pixel point and the second torso pixel point may reflect that, in the second action a, the angle of the neck twist is the second neck angle.
  • the second neck angle may be, for example, about 30°.
  • the second action sub-file a may reflect that the second action a of the target person may include twisting his head.
  • the relative positional relationship between the second head pixel point and the second neck pixel point can reflect that, in the second action a, the angle of the head twist is the second head angle.
  • the second head angle may be about 0°, for example.
  • the second head angle may be determined from the second head pixels and the second torso pixels. In this case, the second head angle may be about 30°, for example.
  • the second action sub-file a may reflect that the second action a of the target person may include not leaning the torso.
  • the relative positional relationship between the second torso pixel point and the mid-perpendicular line (the mid-perpendicular line may be perpendicular to the horizon) may reflect that the angle at which the torso is inclined in the second action a is the second torso angle.
  • the second torso angle may be, for example, about -5°.
  • the second action sub-file a may reflect the second left-hand angle and/or the second right-hand angle.
  • the second left hand angle may reflect the angle between the second left hand and the second upper left forelimb.
  • the second left-hand angle can be obtained according to the second left-hand pixel point and the second left upper forelimb pixel point.
  • the second left hand angle may reflect the angle between the second left hand and the second torso. It can be obtained from the second left hand pixel and the second torso pixel.
  • the second right hand angle may reflect the angle between the second right hand and the second upper right forelimb.
  • the second right-hand angle can be obtained according to the second right-hand pixel point and the second right upper forelimb pixel point.
  • the second right hand angle may reflect the angle between the second right hand and the second torso. It can be obtained from the second right hand pixel and the second torso pixel.
  • the angle of the first upper right forelimb can be, for example, about -10°
  • the angle of the second upper right forelimb for example, can be about is 30°.
  • the first right upper hindlimb angle may be, for example, about 85°
  • the second right upper hindlimb angle may be, for example, about 60°.
  • the first upper left forelimb angle may be, for example, about -45°
  • the second upper left forelimb angle may be, for example, about -15°.
  • the first upper left hind limb angle may be, for example, slightly less than -90°, and the second upper left hind limb angle may be, for example, about -135°.
  • the first right lower forelimb angle may be, for example, about 0°, and the second right lower forelimb angle may be, for example, about 0°.
  • the first right lower hindlimb angle may be, for example, about 60°, and the second right lower hindlimb angle may be, for example, about 60°.
  • the first left lower forelimb angle may be, for example, about 5°, and the second left lower forelimb angle may be, for example, about 0°.
  • the first left lower hindlimb angle may be, for example, about -5°, and the second left lower hindlimb angle may be, for example, about 0°.
  • the first neck angle may be about 5°, for example.
  • the second neck angle may be about 30°, for example.
  • the first head angle may be approximately 15°, for example.
  • the second head angle may be approximately 30°, for example.
  • the first torso angle may be approximately 0°, for example.
  • the second torso angle may be about -5°, for example.
  • the angle of the first upper right upper limb may be different from the angle of the second upper right forelimb; the angle of the first upper right hind limb may be different from the angle of the second upper right hind limb; the angle of the first upper left forearm may be different from that of the second upper right hind limb.
  • the first left upper hindlimb angle can be different from the second left upper hindlimb angle; the first left lower forelimb angle can be different from the second left lower forelimb angle; the first left lower hindlimb angle can be different from the second left lower hindlimb angle ; the first neck angle can be different from the second neck angle; the first head angle can be different from the second head angle; the first torso angle can be different from the second torso angle.
  • the first electronic device can adjust the pixels in the first subframe according to the second action subfile a, and the first action subfile A can also be adjusted accordingly, so that the action subfile corresponding to the processed first video is the same as the first action subfile A.
  • the two action subfiles a can be as similar or corresponding as possible.
  • the first electronic device may adjust the pixels in the first subframe so that: the first right upper right upper limb angle can be equal to or approximately equal to the second right upper forelimb angle; the first right upper hind limb angle The angle may be equal or approximately equal to the second upper right hind limb angle; the first left upper forelimb angle may be equal or approximately equal to the second left upper forelimb angle; the first left upper hind limb angle may be equal or approximately equal to the second left upper hind limb angle; The forelimb angle may be equal or approximately equal to the second left lower forelimb angle; the first left lower hind leg angle may be equal or approximately equal to the second left lower hind leg angle; the first neck angle may be equal or approximately equal to the second neck angle; the first The head angle may be identical or approximately identical to the second head angle; the first torso angle may be identical or approximately identical to the second torso angle. Furthermore, the first action a in the processed first subframe may be as similar or corresponding to the first action
  • the first electronic device may output the processed first subframe, as shown by 730 in FIG. 7 . It can be seen that the adjusted action of the first user may be more similar to the action of the target character. That is to say, through the method shown in FIG. 7 , the action angle, action direction, action range, etc. of the user in the first video can be adjusted, thereby helping to improve the action matching degree between the first user and the target person.
  • the first electronic device may compare the size of the first user sub-video with the playback size of the second user sub-video according to the first action sub-file A and the second action sub-file a. For example, according to at least one of head pixels, neck pixels, torso pixels, left upper body pixels, left lower body pixels, right upper body pixels, right lower body pixels, left hand pixels, and right hand pixels, One or more line segments can be fitted. The first electronic device may determine the size of the user sub-video according to the length of the one or more line segments.
  • the size of the first user sub-video may be relatively small, and the size of the second user sub-video may be relatively large.
  • the first electronic device may adjust the pixels in the first user sub-video so that the size of the first user sub-video and the size of the second user sub-video can relatively match. That is, with the method shown in FIG. 7 , the screen ratio occupied by the first user sub-video can be adjusted, which is beneficial to improve the size matching degree between the first user sub-video and the second user sub-video.
  • the multiple first subframes of the first person sub-video may further include a first subframe B, as shown by 810 in FIG. 8 .
  • the action performed by the first user in the first subframe B may be the first action B.
  • the first subframe A and the first subframe B are two different subframes in the first person sub-video.
  • the first electronic device may determine the first action subfile B according to the first subframe B in combination with the method shown in FIG. 7 , as shown in 811 in FIG. 8 .
  • the multiple second subframes of the second person sub-video may further include a second subframe b, as shown in 820 in FIG. 8 .
  • the action performed by the second user in the second subframe b may be the second action b.
  • the second subframe a and the second subframe b are two different subframes in the second person sub-video.
  • the first electronic device may obtain the second action subfile b according to the second subframe b or from the cloud server in combination with the method shown in FIG. 7 , as shown in 821 in FIG. 8 .
  • the first subframe A (shown as 710 in FIG. 8 ) may correspond to the second subframe a (shown as 720 in FIG. 8 ), and the first subframe B may correspond to the second subframe b. That is to say, the first action sub-file A (shown as 711 in FIG. 8 ) may have a relatively high similarity with the second action sub-file a (shown as 721 in FIG. 8 ). The file B may have a relatively high similarity with the second action sub-file b.
  • the time difference between the first subframe A and the first subframe B may be T, and the time difference between the second subframe a and the second subframe b may be t. That is, in the first video, relative to the second video, the first user makes the first action A and transitions to the first action B may be relatively fast or relatively slow. As shown in FIG. 8 , T may be greater than t, that is, the action of the first user may be relatively slow.
  • the first electronic device may adjust the subframe between the first subframe A and the first subframe B according to the first subframe A, the first subframe B, the second subframe a, and the second subframe b, so that the A subframe B may be close to the first subframe A or far away from the first subframe A, and then the time difference between the first subframe A and the first subframe B may be adjusted.
  • a subframe with a distance t from the first subframe A is the first subframe C (as shown by the dotted rectangle in FIG. 8 ).
  • the first electronic device can adjust the subframe between the first subframe A and the first subframe B, so that the first subframe B can be adjusted to the position before the first subframe C is adjusted.
  • the time for the target person to make the second action a and transition to the second action b is relatively short, that is to say, the target person’s action is relatively fast; the first electronic device can reduce the first subframe A The time difference between the first subframe B and the first subframe B, so that the action of the first user can be accelerated, as shown by the dashed arrow in FIG. 8 .
  • the first electronic device can process the first video, which is beneficial to improve the speed similarity between the actions of the first user and the actions of the target person.
  • the processed first video may be the first target video.
  • the electronic device may further process the first video to obtain the first target video, as shown in the user interface 900 in FIG. 9 .
  • the first target video may be obtained by processing the first video and the second video through the methods shown in FIG. 7 and FIG. 8 .
  • the first target video includes, for example, the first image area 560 shown in FIG. 5 and FIG. 6 , that is, includes pixels corresponding to the first interface area 460 shown in FIG. 4 . That is, the first target video shown in FIG. 9 may not include the second image area 570 shown in FIG. 5 and FIG. 6 , that is, not include pixels corresponding to the second interface area 470 shown in FIG. 4 .
  • the video processing method provided by the embodiment of the present application can be applied to the optimization of action coordination in a co-shot scene.
  • the method for processing video provided by the embodiment of the present application may also be applied to other scenarios except the co-shooting scenario, for example, action optimization is performed for a single video.
  • the range of motion of the first user, the screen size of the first user, the speed of the motion of the first user, etc. in the first video can be adjusted, thereby reducing the impact of the first user on the first video. amount of post-processing.
  • the electronic device may retrieve the first target video shown in FIG. 5 , FIG. 6 or FIG. 9 , so that the user can watch the first target video.
  • the electronic device may perform post-adjustment on the first target video. For example, you can adjust the speed of the first image area, the playback speed of the second image area, beautify the first image area, beautify the second image area, the size of the first image area, and the size of the second image area.
  • the first electronic device may adjust the relationship between the first action sub-file and the second action sub-file similarity, and then the first user can flexibly specify the adjustment range of the action. For example, if the first user does not want the first video to be identical to the second video, the first user can use the action optimization control 550 to reduce the degree to which the first video or the first target video is processed or optimized; When a user wants the first video and the second video to be as identical as possible, the first user can use the action optimization control 550 to increase the degree to which the first video or the first target video is processed or optimized.
  • the degree to which the first video is processed or optimized may be 0.6 ⁇ 0.7 by default, for example. In this way, it is not only beneficial to improve the action matching degree between the action of the first user and the target character, but also to retain the characteristics of the first user.
  • multiple users can imitate the same footage or the same gallery video.
  • the electronic device may synthesize the videos of the multiple users into a co-shot video, so as to improve the coordination of the co-shot video including the multiple users.
  • the third user can imitate the target person in the second video to make a series of actions, and shoot the third video through the third electronic device.
  • the target character may be the same character as the character imitated by the first user above.
  • the third electronic device may display the user interface 1000 as shown in FIG. 10 .
  • the user interface 1000 may include a third interface area 1060 and a fourth interface area 1070 .
  • the third electronic device may display a third character image 1061 and a third background image 1062 in the third interface area 1060, wherein the third character image 1061 may include pixels corresponding to the third user, and the third The background image 1062 may include pixel points corresponding to the scene where the third user is located.
  • the third interface area 1060 may be used to preview the shooting effect of the third user.
  • the third electronic device may display the second character image 471 in the fourth interface area 1070, and then may play the screen of the second character sub-video.
  • the fourth interface area 1070 may be used to prompt the action of the target character.
  • the user interface may include recording controls 1010 .
  • the third electronic device may capture a third video.
  • the third video may include or be extracted to obtain a third user sub-video and a third background sub-video.
  • the third electronic device may determine, according to the third user sub-video, a plurality of third action sub-files, the plurality of third action sub-files There may be one-to-one correspondence with multiple third subframes of the third user sub-video.
  • the third action subfile may be used to reflect the actions of the third user in the third subframe.
  • the mirror action of the third user may have a higher degree of matching with the action of the target character, and the third electronic device may determine the plurality of third actions according to the mirror video of the third video. sub file.
  • the third electronic device can adjust the pixels of the third video according to the third action sub-file and the second action sub-file corresponding to the third action sub-file, so as to realize the processing of the third video, which can be beneficial to improve the Action similarity between the third user and the target character.
  • the captured movements of the third user are similar to but slightly different from those of the target person; as shown in FIG. 11 , after the third video is processed, the movements of the third user are similar to those of the target person. can have higher similarity.
  • the third electronic device may synthesize the second video and the third video into a second target video, where the second target video and/or the third video may be processed videos.
  • the second target video may belong to a video that has undergone split-screen processing and has undergone background removal processing.
  • the second target video may include a third image area 1160 and a fourth image area 1170 .
  • the third image area 1160 may include pixels corresponding to the third user sub-video and pixels corresponding to the second background sub-video.
  • the fourth image area 1170 may include pixels corresponding to the second user sub-video and pixels corresponding to the second background sub-video. That is, the background image in the second video can serve as the background of the third user sub-video.
  • the second target video may not belong to a split-screen video, or may belong to a video that has undergone split-screen processing but has not undergone background removal processing.
  • the first electronic device or the third electronic device may synthesize the first video and the third video into a third target video, where both the first video and the third video may be processed videos.
  • the third target video shown in FIG. 12 may belong to a video that has undergone split-screen processing but has not undergone background removal processing.
  • the third target video may include a fifth image area 1260 and a sixth image area 1270 .
  • the fifth image area 1260 may include pixels corresponding to the first user sub-video shown in FIG. 5 and pixels corresponding to the first background sub-video.
  • the sixth image area 1270 may include pixels corresponding to the third user sub-video shown in FIG. 10 and pixels corresponding to the third background sub-video.
  • the third target video may belong to a video that has undergone split-screen processing and background removal processing.
  • the third target video shown in FIG. 13 may belong to a video that has not undergone split-screen processing but has undergone background removal processing.
  • the third target video may include a fifth image area 1260, a sixth image area 1270, and a second background image area 1380.
  • the fifth image area 1260 may include pixels corresponding to the first user sub-video, and may not include pixels corresponding to the first background sub-video.
  • the sixth image area 1270 may include pixels corresponding to the third user sub-video, and may not include pixels corresponding to the third background sub-video.
  • the second background image area 1380 may include pixel points corresponding to the target gallery image. In other examples, the second background image area 1380 may include pixel points corresponding to the first background image shown in FIG. 4 or the third background image shown in FIG. 10 .
  • the first user may imitate the first target person in the second video to make a series of actions, and shoot the first video through the first electronic device; the third user may The second target person in the second video is imitated to make a series of actions, and the third video is captured by the third electronic device.
  • the first target person and the second target person may be two different people in the second video.
  • the first electronic device, the third electronic device, or other electronic devices may process the first video and the third video to obtain a target video including the first user and the third user.
  • the electronic device may acquire the first action file, the second action file, the third action file, and the fourth action file.
  • the first action file can be obtained by extracting action information of the first user in the first video.
  • the second action file can be obtained by extracting the action information of the first target person in the second video.
  • the third action file can be obtained by extracting action information of the third user in the third video.
  • the fourth action file can be obtained by extracting action information of the second target person in the second video.
  • the electronic device may compare the first action sub-file with the second action sub-file, process the first video, and obtain a first target video, where the actions of the first user in the first target video may be the same as the actions of the first user in the first video. Slightly different, the actions of the first user in the first target video may be more similar to the actions of the first target person in the second video.
  • the electronic device may compare the third action sub-file with the fourth action sub-file, process the third video, and obtain a third target video, and the action of the third user in the third target video may be the same as the action of the third user in the third video. Slightly different, the actions of the third user in the third target video may be more similar to the actions of the second target person in the second video.
  • the electronic device may synthesize the first target video and the third target video into a new video, and the new video may show actions of the first user in the first target video and actions of the third user in the third target video.
  • the new video may also include data in the second video.
  • the new video may also show the actions of the first target person and the second target person in the second video.
  • FIG. 14 is a schematic diagram of another user interface 1400 provided by an embodiment of the present application.
  • the user interface 1400 may be displayed on the first electronic device.
  • the user interface 1400 may be an interface of a Connect application, or an interface of other applications having a video call function. That is to say, the first electronic device can carry the Changlian application or other applications with a video call function.
  • the first electronic device may display the user interface 1400 in response to operations performed by the first user corresponding to the applications.
  • the first user can open the Changlian application by clicking on the icon of the Changlian application, and then the first electronic device can display the user interface 1400 .
  • the user interface 1400 may include a plurality of user controls 1410 in a one-to-one correspondence with a plurality of users.
  • the plurality of users may include a second user.
  • the first electronic device may display the contact information of the second user.
  • the contact information of the second user may include at least one of the following: the name of the second user, the contact information of the second user, the call record of the second user, and the like.
  • the user interface may include a user search control 1420.
  • the first user may invite the second user to make a video call through the user search control.
  • the first electronic device can obtain the relevant information of the second user ( For example, part or all of the name of the second user, the initials of the second user's name, part or all of the video call number of the second user, etc.).
  • the first electronic device may determine user records of the second user from multiple user records stored in the first electronic device according to the relevant information of the second user, and the multiple user records may be in one-to-one correspondence with the multiple users. Furthermore, the first electronic device can quickly display the user control of the second user on the user interface.
  • the user interface may include common user controls 1412. As shown in FIG. 14 , the second user may belong to frequently used contacts, and the user interface may include a frequently used user control 1411 corresponding to the second user.
  • the first electronic device may count the user with the most times of co-shooting as user A, and display a common user control A on the user interface, where the common user control A may be a control corresponding to user A.
  • the first electronic device may count the user with the most video calls as user B, and display a common user control B on the user interface, where the common user control B may be a control corresponding to user B.
  • multiple users may be arranged in alphabetical order, for example.
  • the user interface may include letter controls.
  • the first electronic device may switch user controls displayed on the user interface.
  • the user interface may include smooth video controls 1430 . As shown in FIG. 14 , the user interface may include a plurality of smooth video controls 1430 corresponding to a plurality of users one-to-one.
  • the first user may invite the second user to make a video call through the first electronic device.
  • the first electronic device may initiate a video call to the second electronic device, wherein the second electronic device may be the second user electronic equipment used.
  • the second user may receive the video call invitation from the first user through the second electronic device.
  • the second electronic device may display an interface for the video call invitation, and the interface may include controls for answering the video call.
  • a video call connection can be established between the first electronic device and the second electronic device.
  • the first electronic device After the first electronic device establishes a video call connection with the second electronic device, the first electronic device can obtain the first video by shooting, and the second electronic device can obtain the second video by shooting; and the first electronic device can obtain the video through the first electronic device.
  • the call is connected to obtain the second video, and the second electronic device can obtain the first video through the video call connection.
  • the first user may invite the second user to take a photo remotely during the video call.
  • the second user may invite the first user to take a photo remotely during the video call.
  • the first electronic device and the second electronic device may display a user interface 1500 as shown in FIG. 15 .
  • User interface 1500 may be a preparation interface for a remote sync.
  • the user interface shown in FIG. 14 may further include a remote synchronization control 1440 .
  • the user interface 1400 may include a plurality of remote snap controls 1440 that correspond one-to-one with a plurality of users.
  • the first user may invite the second user to complete the remote co-shooting through a video call through the remote co-shooting control 1440 .
  • the first electronic device in response to an operation (such as a click operation) performed by the first user on the remote synchronization control 1440, the first electronic device can initiate a video call to the second electronic device, and send instruction information to the second electronic device.
  • the indication information is used to invite the second user to take a photo together, wherein the second electronic device may be an electronic device used by the second user.
  • the second user may receive the remote co-shooting invitation from the first user through the second electronic device.
  • the second electronic device may display an interface for the remote co-shot invitation, which interface may include controls for answering the video call.
  • a video call connection can be established between the first electronic device and the second electronic device, and both the first electronic device and the second electronic device can display as shown in Figure 15 user interface 1500.
  • the user interface 1500 may include a first interface area 1560 and a second interface area 1570.
  • the first interface area 1560 may display part or all of the images currently captured by the first electronic device, and the second interface area 1570 may display Part or all of the images currently captured by the second electronic device.
  • the first interface region 1560 and the second interface region 1570 may not cross each other.
  • the first interface area 1560 and the second interface area 1570 may be located anywhere on the user interface 1500 .
  • the first interface area 1560 may be located above the user interface 1500
  • the second interface area 1570 may be located below the user interface 1500 . That is, some or all of the images captured by the first electronic device and some or all of the images captured by the second electronic device may be displayed on the user interface 1500 at the same time.
  • the user can observe the user interface 1500, and then can preview the in-time effect of the first user and the second user.
  • the first interface area 1560 may include the first The character image 1561
  • the second interface area 1570 may include the second character image 1571 . That is, the first interface area 1560 may include pixels corresponding to the first user, and the second interface area 1570 may include pixels corresponding to the second user. It should be understood that in other examples, the first electronic device and/or the second electronic device may use a rear-facing camera to capture an image containing the user.
  • User interface 1500 may also include controls for adjusting the in-time effect.
  • the user interface 1500 may include a split screen switch control 1520 , a background removal switch control 1530 , and a beautification switch control 1540 . These controls allow the user to adjust the timing effect before or during the timing.
  • the split screen switch control 1520 may have the function of the split screen switch control 420 described above
  • the background removal switch control 1530 may have the background removal switch control 430 described above.
  • the beautification switch control 1540 may have the functions of the beauty switch control 440 and/or the filter switch control 450 described above, which will not be described in detail here.
  • User interface 1500 may include recording controls 1510 .
  • the electronic device can synthesize the first video shot by the first electronic device and the second video shot by the second electronic device to obtain the first target video as shown in FIG. 5 and FIG. 6 . . That is to say, in the examples shown in FIG. 14 and FIG. 15 , the user can obtain a co-shot video with relatively high coordination through the Changlian application and the video processing method provided by the embodiment of the present application.
  • the first user can open the Changlian application by clicking the icon of the Changlian application.
  • the first electronic device may display a plurality of user controls on the user interface.
  • the plurality of users may include a third user.
  • the first electronic device may initiate a video call to the second electronic device used by the third user, and invite the third user to make a video call.
  • the third user may receive the video call invitation from the first user through the second electronic device. After that, a video call connection can be established between the first electronic device and the second electronic device.
  • the first electronic device can obtain the first video by shooting, and the first video can be the video of the first user; the second electronic device can obtain the third video by shooting video, the first video may be a video of a third user; and the first electronic device may obtain the third video through the video call connection, and the second electronic device may obtain the first video through the video call connection.
  • a first action file can be obtained, and the first action file can indicate the action of the first user in the first video.
  • a third action file can be obtained, and the third action file can indicate the actions of the third user in the third video.
  • the first user can invite the third user to take a photo remotely during the video call.
  • the third user may invite the first user to take a photo remotely during the video call.
  • the first electronic device and the second electronic device may display a preparation interface for remote co-op.
  • the material co-shot control 330 and/or the gallery co-shot control 340 as shown in FIG. 3 may be displayed on the remote co-shot preparation interface.
  • One of the first user and the third user can select the second video through the material co-shot control 330 or the gallery co-shot control 340 .
  • the second video may be a video of the first target person, showing the actions of the first target person.
  • the first user can imitate the action of the first target person in the second video
  • the third user can imitate the action of the first target person in the second video.
  • the period during which the first user imitates the action may be the same or different from the period during which the third user imitates the action.
  • One of the first electronic device and the second electronic device may, according to the acquired first video, third video, first action file, third action file, and the second action file corresponding to the second video, make an
  • the first video and the third video are processed to obtain the target video.
  • the second action file may correspond to the action of the first target person in the second video.
  • the target video may include an image of a first user and an image of a third user; wherein the actions of the first user in the target video may be different from the actions of the first user in the first video, and the first user is in the target video
  • the action of the first target person in the second video may correspond to the action of the first target person
  • the action of the third user in the target video may be different from the action of the third user in the third video
  • the action of the third user in the target video It may correspond to the action of the first target person in the second video.
  • the target video may further include an image of the first target person in the second video.
  • the second video may be a video of the first target person and the second target person, showing actions of the first target person and actions of the second target person.
  • the first user can imitate the action of the first target person in the second video
  • the third user can imitate the action of the second target person in the second video.
  • the period during which the first user imitates the action may be the same or different from the period during which the third user imitates the action.
  • One of the first electronic device and the second electronic device can obtain the first video, the third video, the first action file, the third action file, and the second action file, the third action file corresponding to the second video Four action files, the first video and the third video are processed to obtain the target video.
  • the second action file may correspond to the action of the first target person in the second video.
  • the fourth action file may correspond to the action of the second target person in the second video.
  • the target video may include an image of a first user and an image of a third user; wherein the actions of the first user in the target video may be different from the actions of the first user in the first video, and the first user is in the target video
  • the action of the first target person in the second video may correspond to the action of the first target person; the action of the third user in the target video may be different from the action of the third user in the third video, and the action of the third user in the target video It may correspond to the action of the second target person in the second video.
  • the target video may further include an image of the first target person in the second video, and an image of the second target person in the second video.
  • This embodiment of the present application also provides a method 1600 for processing video, and the method 1600 may be implemented in an electronic device (eg, a mobile phone, a tablet computer, etc.) as shown in FIG. 1 and FIG. 2 .
  • the method 1600 may include the following steps:
  • the first electronic device acquires a first video, where the first video is a video of a first character.
  • the first electronic device acquires a first action file corresponding to the first video, where the first action file corresponds to the action of the first character.
  • the first action file may refer to the example shown in the first action sub-file 711 in FIG. 7 .
  • the first action file may refer to the example shown in the first action sub-file 811 in FIG. 8 .
  • the first electronic device acquires a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to the action of the second character.
  • the second action file may refer to the example shown in the second action sub-file 721 in FIG. 7 .
  • the second action file may refer to the example shown in the second action sub-file 821 in FIG. 8 .
  • the first electronic device generates a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, so The actions of the first character in the target video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video.
  • the actions of the characters correspond.
  • first person image in the target video reference may be made to the examples shown in the first person image 461 in FIG. 5 , FIG. 6 , and FIG. 9 .
  • first character image in the target video reference may be made to the example shown in the first character image 1561 in FIG. 15 .
  • the method further includes: the first electronic device establishes a video call connection between the first electronic device and the second electronic device, and the first electronic device establishes a video call connection between the first electronic device and the second electronic device.
  • the electronic device is the electronic device of the first character
  • the second electronic device is the electronic device of the second character;
  • acquiring the first video by the first electronic device includes: the first electronic device is in a video call During the process, the first video is acquired; the method further includes: the first electronic device acquires the second video from the second electronic device through the video call connection.
  • the first video and the second video correspond to the same time period during the video call
  • the target video further includes a second character image of the second character
  • the target video Actions of the second character correspond to actions of the second character in the second video.
  • a certain frame of the target video may be shown with reference to the user interface shown in FIG. 15 . That is to say, the first character and the second character can perform similar actions synchronously. From the actions of the second character, the first video is processed to make the actions of the first character and the second character in the target video more coordinated.
  • the method further includes: acquiring, by the first electronic device, a third video, where the third video is a video of a third person; and acquiring, by the first electronic device, a third video corresponding to the third video.
  • an action file wherein the third action file corresponds to the action of the third character;
  • the first electronic device generates a target video according to the first video, the first action file, and the second action file, including: the first electronic device generates the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the The target video further includes a third character image of the third character, the actions of the third character in the target video are different from those of the third character in the third video, and the actions of the third character in the target video are different from those of the third character in the target video.
  • the actions of the third character correspond to the actions of the second character in the second video.
  • the third video may refer to the example shown in the third interface area 1060 of FIG. 10 .
  • the image of the third person in the third video reference may be made to the example shown in the image 1061 of the third person in 10 .
  • the target video may refer to the example shown in the third image area 1160 in FIG. 11 , or the example shown in the third image area 1160 and the fourth image area 1170 in FIG. 11 , or the third image in FIG. 12 .
  • the example shown in area 1260 or refer to the example shown in the third image area 1260, the fourth image area 1270 of FIG. 12, or refer to the example shown in the user interface 1300 of FIG.
  • the target video further includes a second character image of the second character, and actions of the second character in the target video correspond to actions of the second character in the second video.
  • the first person image and the second person image belong to the same frame image in the target video.
  • the second video is a video of the second character and the fourth character
  • the method further includes: acquiring, by the first electronic device, a third video, and the third video is a third character the first electronic device obtains a third action file corresponding to the third video, and the third action file corresponds to the action of the third character; the first electronic device obtains a fourth action file , the fourth action file corresponds to the action of the fourth character in the second video; the first electronic device is based on the first video, the first action file, and the second action file , generating a target video, including: the first electronic device according to the first video, the third video, the first action file, the second action file, the third action file, the first action file Four action files to generate the target video, the target video further includes a third character image of the third character, the actions of the third character in the target video and the third character in the third video The actions of the characters are different, and the actions of the third character in the target video correspond to the actions of the fourth character in the second video.
  • the target video further includes a second character image of the second character and a fourth character image of the fourth character, and the actions of the second character in the target video are related to the second video.
  • the action of the second character in the target video corresponds to the action of the fourth character in the target video
  • the action of the fourth character in the second video corresponds to the action of the fourth character in the second video.
  • the first person image, the second person image, the third person image, and the fourth person image belong to the same frame of images in the target video.
  • the method further includes: the first electronic device establishes a video call connection between the first electronic device and the second electronic device, and the first electronic device establishes a video call connection between the first electronic device and the second electronic device.
  • the electronic device is the electronic device of the first character
  • the second electronic device is the electronic device of the third character
  • the acquisition of the first video by the first electronic device includes: the first electronic device is in the process of a video call , acquiring the first video; and acquiring, by the first electronic device, a third video, comprising: the first electronic device acquiring the third video from the second electronic device through the video call connection.
  • the first video and the third video correspond to the same time period during the video call.
  • establishing, by the first electronic device, a video call connection between the first electronic device and the second electronic device includes: establishing, by the first electronic device, the first electronic device through a photographing application or a video calling application. A video call connection with a second electronic device.
  • the video call application may refer to the examples shown in FIG. 14 to FIG. 15 .
  • the second video is a video stored locally or in the cloud.
  • acquiring, by the first electronic device, a second action file corresponding to the second video includes: acquiring, by the first electronic device, the second action file from the second electronic device.
  • the action of the first character in the target video corresponds to the action of the second character in the second video, including: the action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the matching degree between the first target action file and the second action file is the second matching degree , the second matching degree is greater than the first matching degree.
  • obtaining, by the first electronic device, a first action file corresponding to the first video includes: the first electronic device determining the first action sub-file according to at least two of the following: a first header Part pixel, first neck pixel, first torso pixel, first left upper forelimb pixel, first left upper hindlimb pixel, first left lower forelimb pixel, first left lower hindlimb pixel, first right upper forelimb pixel point, the first right upper hind limb pixel point, the first right lower forelimb pixel point, the first right lower hind limb pixel point, the first left hand pixel point, and the first right hand pixel point.
  • the first action sub-file may refer to the example shown in the first action sub-file 711 in FIG. 7 .
  • the first action subfile includes at least one of the following limb angles: a first head angle, a first neck angle, a first trunk angle, a first upper left forelimb angle, a first upper left hind limb angle, a first Left lower forelimb angle, first left lower hindlimb angle, first right upper forelimb angle, first right upper hindlimb angle, first right lower forelimb angle, first right lower hindlimb angle, first left hand angle, first right hand angle.
  • the first action file corresponds to a first limb angle
  • the second action file corresponds to a second limb angle
  • the target action file corresponds to a third limb angle
  • the first limb angle is the same as the second limb angle.
  • the difference between the limb angles is smaller than a preset angle
  • the third limb angle is between the first limb angle and the second limb angle.
  • the first video includes a first subframe and a second subframe
  • the second video includes a third subframe and a fourth subframe
  • the target video includes a fifth subframe and a sixth subframe
  • the first subframe, the third subframe, and the fifth subframe correspond to each other
  • the second subframe, the fourth subframe, and the sixth subframe correspond to each other
  • the time difference between a subframe and the second subframe is the first time difference
  • the time difference between the third subframe and the fourth subframe is the second time difference
  • the time difference of the sixth subframe is a third time difference
  • the third time difference is between the first time difference and the second time difference.
  • the target video includes a first image area and a second image area
  • the first image area includes pixels corresponding to the first character
  • the second image area includes pixels corresponding to the second character. corresponding pixels.
  • first image area reference may be made to the examples shown in the first image area 560 in FIG. 5 , FIG. 6 , and FIG. 9 .
  • first character image in the target video reference may be made to the example shown in the first interface area 1560 in FIG. 15 .
  • the first image area includes pixels corresponding to any of the following: a first background image, a second background image, and a target gallery image
  • the first background image includes a scene with the first character.
  • the second background image includes pixel points corresponding to the scene where the second character is located
  • the target gallery image is an image stored on the first electronic device.
  • the first image area includes a first background image
  • the first image area may be, for example, the first image area 560 shown in FIG. 5 .
  • the first image area includes a second background image
  • the first image area may be, for example, the third image area 1160 shown in FIG. 11 .
  • the second image area includes pixels corresponding to any one of the following: a first background image, a second background image, and a target gallery image
  • the first background image includes a scene with the first character.
  • the second background image includes pixel points corresponding to the scene where the second character is located
  • the target gallery image is an image stored on the first electronic device.
  • the second image area includes the first background image, and the second image area may be, for example, the second image area 570 shown in FIG. 5 .
  • the second image area includes a second background image
  • the second image area may be, for example, the fourth image area 1170 shown in FIG. 11 .
  • the co-shot video further includes a background image area, the background image area is the background of the first image area and the second image area, and the background image area includes pixels corresponding to any of the following: Points: a first background image, a second background image, and a target gallery image, the first background image includes pixels corresponding to the scene where the first character is located, and the second background image includes pixels corresponding to the scene where the second character is located.
  • Points a first background image, a second background image, and a target gallery image
  • the first background image includes pixels corresponding to the scene where the first character is located
  • the second background image includes pixels corresponding to the scene where the second character is located
  • the pixel points corresponding to the scene, and the target gallery image is an image stored on the first electronic device.
  • the background image area includes a target gallery image
  • the background image area may be, for example, the first background image area 580 shown in FIG. 6 or the second background image area 1380 shown in FIG. 13 .
  • the electronic device includes corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the electronic device can be divided into functional modules according to the above method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 17 shows a possible schematic diagram of the composition of the electronic device 1700 involved in the above embodiment.
  • the electronic device 1700 may include: an acquisition unit 1701 .
  • Processing unit 1702 may be included in the electronic device 1700 .
  • the obtaining unit 1701 may be configured to obtain a first video, where the first video is a video of a first character.
  • the obtaining unit 1701 may also be configured to obtain a first action file corresponding to the first video, where the first action file corresponds to the action of the first character.
  • the obtaining unit 1701 may also be configured to obtain a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to the action of the second character.
  • the processing unit 1702 may be configured to generate a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video
  • the actions of the first character in the video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. Action corresponds.
  • the electronic device may include a processing module, a memory module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device, for example, may be used to support the electronic device to perform the steps performed by the above units.
  • the storage module may be used to support the electronic device to execute stored program codes and data, and the like.
  • the communication module can be used to support the communication between the electronic device and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may be a transceiver.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • the electronic device involved in this embodiment may be a device having the structure shown in FIG. 1 .
  • This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the method for processing video in the above-mentioned embodiment. .
  • This embodiment also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the method for processing a video in the above-mentioned embodiment.
  • the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the video processing method in the foregoing method embodiments.
  • the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

Provided in the present application are a video processing method and an electronic device. By means of extracting action information from a video, mutual comparison between actions of a plurality of persons can be realized. An action of a first person is corrected on the basis of an action of a second person; a new video is generated, and the new video may comprise an image of the first person; and the corrected action of the first person is displayed. In the new video, the action of the first person may be more similar to the action of the second person. Therefore, the aim of the present application is to improve the action matching degree or action coordination degree between a plurality of users and reduce the amount of post-processing a user performs on videos.

Description

处理视频的方法和装置Method and apparatus for processing video
本申请要求于2021年2月9日提交中国专利局、申请号为202110178452.9、申请名称为“处理视频的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110178452.9 and the application title "Method and Apparatus for Processing Video" filed with the China Patent Office on February 9, 2021, the entire contents of which are incorporated into this application by reference.
本申请要求于2021年5月14日提交中国专利局、申请号为202110529002.X、申请名称为“处理视频的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110529002.X and the application title "Method and Apparatus for Processing Video" filed with the China Patent Office on May 14, 2021, the entire contents of which are incorporated herein by reference middle.
技术领域technical field
本申请涉及电子设备领域,并且更具体地,涉及一种处理视频的方法和装置。The present application relates to the field of electronic equipment, and more particularly, to a method and apparatus for processing video.
背景技术Background technique
位于同一场地内的多个用户可以通过一个或多个摄像设备(带有摄像头的电子设备)合拍,以获得包含该多个用户的样貌的合拍视频。单个用户可以与视频素材合拍,得到包含该用户和该视频素材的合拍视频。然而,如果没有经过多次排练,多个用户或多个人物的合拍动作通常很难协调,进而可能导致合拍效果一般或者不甚理想。这还可能需要用户对合拍视频进行额外的后期处理。Multiple users located in the same venue can take a photo with one or more camera devices (electronic devices with cameras) to obtain a co-shot video containing the appearances of the multiple users. A single user can co-shoot with the video material to obtain a co-production video including the user and the video material. However, without many rehearsals, the coordinated actions of multiple users or characters are often difficult to coordinate, which may result in mediocre or suboptimal coordination. This may also require the user to perform additional post-processing on the co-shot video.
发明内容SUMMARY OF THE INVENTION
本申请提供一种处理视频的方法和装置,目的是提高多个用户的动作匹配度,减少用户对视频的后期处理量。The present application provides a method and apparatus for processing video, with the purpose of improving the action matching degree of multiple users and reducing the post-processing amount of video by users.
第一方面,提供了一种处理视频的方法,包括:In a first aspect, a method for processing video is provided, including:
第一电子设备获取第一视频,所述第一视频为第一人物的视频;The first electronic device acquires a first video, where the first video is a video of a first character;
所述第一电子设备获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应;obtaining, by the first electronic device, a first action file corresponding to the first video, where the first action file corresponds to an action of the first character;
所述第一电子设备获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应;The first electronic device obtains a second action file corresponding to a second video, the second video is a video of a second character, and the second action file corresponds to an action of the second character;
所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应。The first electronic device generates a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video The actions of the first character in the video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. Action corresponds.
本申请提供的方案可以对视频中第一人物的动作提取信息,并根据第二人物的动作来修正第一人物的动作,使得第一人物的动作可以更贴近第二人物的动作。这有利于减少用户对视频的后期处理工作量,进而有利于提升拍摄、制作、处理视频的用户体验感。The solution provided by the present application can extract information on the actions of the first character in the video, and modify the actions of the first character according to the actions of the second character, so that the actions of the first character can be closer to the actions of the second character. This helps to reduce the post-processing workload of the user for the video, and further helps to improve the user experience of shooting, producing, and processing the video.
结合第一方面,在第一方面的某些实现方式中,在所述第一电子设备获取第一视频之 前,所述方法还包括:In conjunction with the first aspect, in some implementations of the first aspect, before the first electronic device acquires the first video, the method further includes:
所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为所述第二人物的电子设备;The first electronic device establishes a video call connection between the first electronic device and a second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the second electronic device the character's electronic equipment;
所述第一电子设备获取第一视频,包括:The first electronic device obtains the first video, including:
所述第一电子设备在视频通话过程中,获取所述第一视频;The first electronic device acquires the first video during a video call;
所述方法还包括:The method also includes:
所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取所述第二视频。The first electronic device acquires the second video from the second electronic device through the video call connection.
第一人物和第二人物可以通过视频通话的方式交互视频,以制作新的视频。这有利于增加视频通话可应用的场景,视频通话还可以具有制作视频的功能。视频通话过程中获得的视频数据还可以用于制作新的视频,提升了设备间的交互效率。并且,视频通话还便于第一人物和第二人物交互动作细节,有利于提高第一人物做出动作的准确性,进而有利于进一步减少用户对视频的后期处理工作量。The first character and the second character can interact with the video through a video call to make a new video. This is beneficial to increase the applicable scenarios of video calls, and video calls can also have the function of making videos. The video data obtained during the video call can also be used to create a new video, which improves the interaction efficiency between devices. In addition, the video call also facilitates the details of the interaction between the first character and the second character, which is beneficial to improve the accuracy of the actions made by the first character, and further helps to further reduce the post-processing workload of the user for the video.
可选的,第二视频可以与第一视频是同一视频。第一视频可以是第一人物和第二人物的视频。Optionally, the second video may be the same video as the first video. The first video may be a video of the first person and the second person.
结合第一方面,在第一方面的某些实现方式中,所述第一视频、所述第二视频对应所述视频通话过程中的相同时段,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。With reference to the first aspect, in some implementations of the first aspect, the first video and the second video correspond to the same time period during the video call, and the target video further includes the second character's A second character image, where actions of the second character in the target video correspond to actions of the second character in the second video.
目标视频包括第二人物,可以实现第一人物、第二人物的合拍,有利于增添视频的灵活性。The target video includes the second character, which can realize the co-production of the first character and the second character, which is beneficial to increase the flexibility of the video.
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:
所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;The first electronic device acquires a third video, and the third video is a video of a third character;
所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;The first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:The first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第二人物的动作对应。The first electronic device generates the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the target video Also includes a third character image of the third character, the action of the third character in the target video is different from the action of the third character in the third video, and the third character in the target video is different. The action of the character corresponds to the action of the second character in the second video.
第三人物和第一人物可以对照着相同的第二人物做动作。在不作任何视频处理的情况下,第三人物的动作和第一人物的动作很难足够协调。为使动作足够协调,第一人物和第二人物需要事先排练多次,增大了合拍视频的难度。本申请提供的方案可以提取多个人物的动作文件,并基于样本动作,对多个人物的动作统一调整,有利于增加多个人物的动作协调性,有利于减少用户对视频的后期处理工作量。The third character and the first character can act against the same second character. Without any video processing, it is difficult to coordinate the movements of the third character with the movements of the first character. In order to make the movements sufficiently coordinated, the first character and the second character need to be rehearsed many times in advance, which increases the difficulty of co-producing the video. The solution provided by this application can extract the action files of multiple characters, and adjust the actions of multiple characters in a unified manner based on sample actions, which is beneficial to increase the coordination of actions of multiple characters and reduce the post-processing workload of users for videos. .
结合第一方面,在第一方面的某些实现方式中,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。With reference to the first aspect, in some implementations of the first aspect, the target video further includes a second character image of the second character, and the actions of the second character in the target video are similar to the second character image of the second character. The action of the second character in the video corresponds.
目标视频包括第二人物,可以实现第一人物与第二人物的合拍,有利于增添视频的灵 活性。The target video includes the second character, which can realize the co-production of the first character and the second character, which is beneficial to increase the flexibility of the video.
结合第一方面,在第一方面的某些实现方式中,所述第一人物图像、所述第二人物图像属于所述目标视频中的同一帧图像。With reference to the first aspect, in some implementations of the first aspect, the first person image and the second person image belong to the same frame image in the target video.
在同一帧中,两个人物的动作可以较相似,因此有利于提高第一人物、第二人物在时序上的动作协调性,例如第一人物的动作和第二人物的动作的摆动速度可以更加相近。In the same frame, the actions of the two characters can be relatively similar, so it is beneficial to improve the coordination of the actions of the first character and the second character in terms of time sequence. For example, the swing speed of the first character and the second character can be faster. similar.
结合第一方面,在第一方面的某些实现方式中,所述第二视频为所述第二人物和所述第四人物的视频,所述方法还包括:With reference to the first aspect, in some implementations of the first aspect, the second video is a video of the second character and the fourth character, and the method further includes:
所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;The first electronic device acquires a third video, and the third video is a video of a third character;
所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;The first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
所述第一电子设备获取第四动作文件,所述第四动作文件与所述第二视频中的所述第四人物的动作对应;The first electronic device acquires a fourth action file, where the fourth action file corresponds to the action of the fourth character in the second video;
所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:The first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件、所述第四动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第四人物的动作对应。The first electronic device generates the said first video, the third video, the first action file, the second action file, the third action file, and the fourth action file A target video, the target video further includes a third character image of the third character, the action of the third character in the target video is different from the action of the third character in the third video, the The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
第三人物和第一人物可以对照着同一视频中的两个人物做动作,有利于提高第三人物和第一人物的动作合作性。在不作任何视频处理的情况下,第三人物的动作和第一人物的动作之间的关联可能相对较弱,第一人物和第三人物共同完成一段动作的难度可能相对较大。如果不使用本申请提供的方案,第一人物和第二人物需要事先排练多次,增大了合拍视频的难度。本申请提供的方案可以提取多个人物的动作文件,并基于两个人物的样本动作,对多个人物的动作分别调整,有利于增加多个人物的动作合作性,有利于减少用户对视频的后期处理工作量。The third character and the first character can perform actions according to the two characters in the same video, which is beneficial to improve the action cooperation between the third character and the first character. Without any video processing, the correlation between the actions of the third character and the actions of the first character may be relatively weak, and it may be relatively difficult for the first character and the third character to jointly complete an action. If the solution provided by the present application is not used, the first character and the second character need to be rehearsed many times in advance, which increases the difficulty of co-producing a video. The solution provided by this application can extract the action files of multiple characters, and adjust the actions of the multiple characters based on the sample actions of the two characters, which is beneficial to increase the cooperation of the actions of the multiple characters, and is beneficial to reduce the user's attention to the video. Post-processing workload.
结合第一方面,在第一方面的某些实现方式中,所述目标视频还包括所述第二人物的第二人物图像和所述第四人物的第四人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应,所述目标视频中所述第四人物的动作与所述第二视频中所述第四人物的动作对应。With reference to the first aspect, in some implementations of the first aspect, the target video further includes a second character image of the second character and a fourth character image of the fourth character. The action of the second character corresponds to the action of the second character in the second video, and the action of the fourth character in the target video corresponds to the action of the fourth character in the second video.
目标视频包括第二人物、第四人物,可以实现第一人物、第二人物、第三人物、第四人物的合拍,有利于增添视频的灵活性。The target video includes the second character and the fourth character, and the first character, the second character, the third character, and the fourth character can be co-produced, which is beneficial to increase the flexibility of the video.
结合第一方面,在第一方面的某些实现方式中,所述第一人物图像、所述第二人物图像、所述第三人物图像、所述第四人物图像属于所述目标视频中的同一帧图像。With reference to the first aspect, in some implementations of the first aspect, the first person image, the second person image, the third person image, and the fourth person image belong to the target video. the same frame of image.
在同一帧中,第一人物、第二人物、第三人物、第四人物的动作可以较相似,因此有利于提高第一人物、第二人物、第三人物、第四人物在时序上的动作协调性,例如第一人物、第二人物、第三人物、第四人物的动作的摆动速度可以更加相近。In the same frame, the actions of the first character, the second character, the third character, and the fourth character can be relatively similar, so it is beneficial to improve the actions of the first character, the second character, the third character, and the fourth character in time sequence. Coordination, for example, the swing speeds of the movements of the first character, the second character, the third character, and the fourth character can be more similar.
结合第一方面,在第一方面的某些实现方式中,在所述第一电子设备获取第一视频之前,所述方法还包括:With reference to the first aspect, in some implementations of the first aspect, before the first electronic device acquires the first video, the method further includes:
所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为第三人物的电子设备;The first electronic device establishes a video call connection between the first electronic device and the second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the third character's electronic device Electronic equipment;
所述第一电子设备获取第一视频,包括:The first electronic device obtains the first video, including:
所述第一电子设备在视频通话过程中,获取所述第一视频;The first electronic device acquires the first video during a video call;
所述第一电子设备获取第三视频,包括:The first electronic device acquires the third video, including:
所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取第三视频。The first electronic device acquires a third video from the second electronic device through the video call connection.
第一人物和第三人物可以通过视频通话的方式交互视频,以制作新的视频。这有利于增加视频通话可应用的场景,视频通话还可以具有制作视频的功能。视频通话过程中获得的视频数据还可以用于制作新的视频,提升了设备间的交互效率。并且,视频通话还便于第一人物和第三人物交互动作细节,有利于提高第一人物、第三人物做出动作的准确性,进而有利于进一步减少用户对视频的后期处理工作量。The first character and the third character can interact with the video through a video call to make a new video. This is beneficial to increase the applicable scenarios of video calls, and video calls can also have the function of making videos. The video data obtained during the video call can also be used to create a new video, which improves the interaction efficiency between devices. In addition, the video call also facilitates the details of the interaction between the first character and the third character, which helps to improve the accuracy of the actions of the first character and the third character, and further helps to further reduce the post-processing workload of the user for the video.
结合第一方面,在第一方面的某些实现方式中,所述第一视频、所述第三视频对应所述视频通话过程中的相同时段。With reference to the first aspect, in some implementations of the first aspect, the first video and the third video correspond to the same time period during the video call.
第一人物可以和第三人物同步做出动作,有利于提高第一人物的动作和第三人物的动作在时序上的协调性。The first character can perform actions synchronously with the third character, which is beneficial to improve the coordination in timing between the actions of the first character and the actions of the third character.
结合第一方面,在第一方面的某些实现方式中,所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,包括:With reference to the first aspect, in some implementations of the first aspect, establishing, by the first electronic device, a video call connection between the first electronic device and the second electronic device includes:
所述第一电子设备通过拍摄应用或视频通话应用,建立所述第一电子设备与第二电子设备的视频通话连接。The first electronic device establishes a video call connection between the first electronic device and the second electronic device through a photographing application or a video calling application.
拍摄应用可以从拍摄应用以外的其他应用调用用户控件,从而可以向其他用户发起合拍请求。另外,通过合拍控件,可以使得电子设备的多个应用(包括拍摄应用)协同运行,以实现多个用户的合拍。The shooting application can call user controls from other applications than the shooting application, so that it can initiate a co-shooting request to other users. In addition, through the co-shot control, multiple applications (including a shooting application) of the electronic device can be made to run cooperatively, so as to realize the co-shot of multiple users.
视频通话应用可以与其他应用协同运行,以实现多个用户的合拍。从而,视频通话应用除了可以具有视频通话的功能,还可以具有生成视频的功能。Video calling apps can run in tandem with other apps to achieve co-production of multiple users. Therefore, in addition to the function of video calling, the video calling application may also have the function of generating video.
结合第一方面,在第一方面的某些实现方式中,所述第二视频为本地或云端存储的视频。With reference to the first aspect, in some implementations of the first aspect, the second video is a video stored locally or in the cloud.
第一电子设备可以根据已有的视频,修正第一视频中第一人物的动作。该已有的视频还可以被继续复用,有利于提高处理视频的灵活性。The first electronic device may modify the action of the first character in the first video according to the existing video. The existing video can also be reused, which is beneficial to improve the flexibility of video processing.
结合第一方面,在第一方面的某些实现方式中,所述第一电子设备获取与第二视频对应的第二动作文件,包括:With reference to the first aspect, in some implementations of the first aspect, the first electronic device obtains a second action file corresponding to the second video, including:
所述第一电子设备从第二电子设备获取所述第二动作文件。The first electronic device acquires the second action file from the second electronic device.
第一电子设备可以不获取第二视频,而仅获取第二视频中与动作相关的信息,这有利于减少第一电子设备与第二电子设备之间的信息传输量,进而有利于提高视频处理效率和通信效率。The first electronic device may not obtain the second video, but only obtain the information related to the action in the second video, which is beneficial to reduce the amount of information transmission between the first electronic device and the second electronic device, thereby improving the video processing. Efficiency and communication efficiency.
结合第一方面,在第一方面的某些实现方式中,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应,包括:With reference to the first aspect, in some implementations of the first aspect, the action of the first character in the target video corresponds to the action of the second character in the second video, including:
与所述第一人物图像对应的动作文件为第一目标动作文件,所述第一动作文件与所述第二动作文件之间的匹配度为第一匹配度,所述第一目标动作文件与所述第二动作文件之间的匹配度为第二匹配度,所述第二匹配度大于所述第一匹配度。The action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the first target action file and The matching degree between the second action files is a second matching degree, and the second matching degree is greater than the first matching degree.
本申请提供的方法有利于在原有视频的基础上,提高两个人物在动作上的相似度,有利于使处理后的视频具有相对较高的动作协调性。The method provided by the present application is beneficial to improve the similarity of the actions of two characters on the basis of the original video, and is beneficial to make the processed video have relatively high action coordination.
结合第一方面,在第一方面的某些实现方式中,所述第一电子设备获取与所述第一视频对应的第一动作文件,包括:With reference to the first aspect, in some implementations of the first aspect, the first electronic device obtains a first action file corresponding to the first video, including:
所述第一电子设备根据以下至少两项,确定所述第一动作子文件:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。The first electronic device determines the first action sub-file according to at least two of the following: a first head pixel, a first neck pixel, a first torso pixel, a first upper left forelimb pixel, a first Left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point, first right lower forelimb pixel point, first right lower hindlimb pixel point, A left-hand pixel, a first right-hand pixel.
本申请的方案可以对人物的身体的各个按区划分,以便于提取身体各个部位的相关信息,得到人物的动作信息。The solution of the present application can divide each area of a person's body, so as to extract the relevant information of each part of the body and obtain the action information of the person.
结合第一方面,在第一方面的某些实现方式中,所述第一动作子文件包括以下至少一项肢体角度:With reference to the first aspect, in some implementations of the first aspect, the first action subfile includes at least one of the following limb angles:
第一头部角度、第一颈部角度、第一躯干角度、第一左上前肢角度、第一左上后肢角度、第一左下前肢角度、第一左下后肢角度、第一右上前肢角度、第一右上后肢角度、第一右下前肢角度、第一右下后肢角度、第一左手角度、第一右手角度。The first head angle, the first neck angle, the first trunk angle, the first left upper forelimb angle, the first left upper hindlimb angle, the first left lower forelimb angle, the first left lower hindlimb angle, the first right upper forelimb angle, the first right upper Hind limb angle, first right lower forelimb angle, first right lower hind limb angle, first left hand angle, first right hand angle.
本申请的方案可以针对两个人物某些部位的区别,以确认两个人物在动作上的相同之处和不同之处。The solution of the present application can aim at the difference of some parts of the two characters to confirm the similarities and differences in the actions of the two characters.
结合第一方面,在第一方面的某些实现方式中,所述第一动作文件对应第一肢体角度,所述第二动作文件对应第二肢体角度,所述目标动作文件对应第三肢体角度,所述第一肢体角度与所述第二肢体角度的差值小于预设角度,所述第三肢体角度介于所述第一肢体角度与所述第二肢体角度之间。In combination with the first aspect, in some implementations of the first aspect, the first action file corresponds to a first limb angle, the second action file corresponds to a second limb angle, and the target action file corresponds to a third limb angle , the difference between the first limb angle and the second limb angle is smaller than a preset angle, and the third limb angle is between the first limb angle and the second limb angle.
本申请的方案可以通过调整某个肢体的角度,以调整人物的动作,进而使多个人物的动作可以更加协调。The solution of the present application can adjust the movement of a character by adjusting the angle of a certain limb, so that the movements of multiple characters can be more coordinated.
结合第一方面,在第一方面的某些实现方式中,所述第一视频包括第一子帧、第二子帧,所述第二视频包括第三子帧、第四子帧,所述目标视频包括第五子帧、第六子帧,所述第一子帧、所述第三子帧、所述第五子帧相互对应,所述第二子帧、所述第四子帧、所述第六子帧相互对应,所述第一子帧与所述第二子帧之间的时间差为第一时间差,所述第三子帧与所述第四子帧之间的时间差为第二时间差,所述第五子帧与所述第六子帧的时间差为第三时间差,所述第三时间差介于所述第一时间差与所述第二时间差之间。With reference to the first aspect, in some implementations of the first aspect, the first video includes a first subframe and a second subframe, the second video includes a third subframe and a fourth subframe, and the The target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other, and the second subframe, the fourth subframe, The sixth subframes correspond to each other, the time difference between the first subframe and the second subframe is the first time difference, and the time difference between the third subframe and the fourth subframe is the first time difference. Two time differences, the time difference between the fifth subframe and the sixth subframe is a third time difference, and the third time difference is between the first time difference and the second time difference.
本申请的方案可以调整多个动作之间的时间差,有利于使多个人物在一段时间内的动作快慢可以更加相似。The solution of the present application can adjust the time difference between multiple actions, which is beneficial to make the actions of multiple characters more similar within a period of time.
结合第一方面,在第一方面的某些实现方式中,所述目标视频包括第一图像区域、第二图像区域,所述第一图像区域包括与所述第一人物对应的像素点,所述第二图像区域包括与所述第二人物对应的像素点。With reference to the first aspect, in some implementations of the first aspect, the target video includes a first image area and a second image area, and the first image area includes pixels corresponding to the first character, so The second image area includes pixels corresponding to the second person.
目标视频包括两个人物的动作,有利于用户更加直观的观察到第一人物的修正后的动作,以及第一人物和第二人物之间相对较高的动作协调性。The target video includes the actions of the two characters, which is helpful for the user to observe the corrected actions of the first character more intuitively, and the relatively high action coordination between the first character and the second character.
结合第一方面,在第一方面的某些实现方式中,所述第一图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对 应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。With reference to the first aspect, in some implementations of the first aspect, the first image area includes pixels corresponding to any of the following: a first background image, a second background image, a target gallery image, the first A background image includes pixels corresponding to the scene where the first character is located, the second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is stored in the first electronic image on the device.
结合第一方面,在第一方面的某些实现方式中,所述第二图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。With reference to the first aspect, in some implementations of the first aspect, the second image area includes pixels corresponding to any one of the following: a first background image, a second background image, a target gallery image, the first A background image includes pixels corresponding to the scene where the first character is located, the second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is stored in the first electronic image on the device.
目标视频可以灵活采用第一视频、第二视频或图库图像中的任一个作为目标视频的背景。如果第一图像区域和第二图像区域采用相同的背景,第一图像区域和第二图像区域可以被视为处于同一背景或同一场景下,进而有利于增加第一图像区域和第二图像区域之间的关联性和融合性。第一人物图像和第二人物图像可以在用户界面上被归属于不同的区域,这可以更适应于需要相对明显地区分人物图像的场景,例如因人物身份不同而不适于将多个人物的图像混合起来的场景。The target video can flexibly use any one of the first video, the second video or the gallery image as the background of the target video. If the first image area and the second image area use the same background, the first image area and the second image area can be regarded as being in the same background or the same scene, which is beneficial to increase the relationship between the first image area and the second image area. correlation and integration. The first character image and the second character image can be assigned to different areas on the user interface, which can be more suitable for scenes that need to distinguish the character images relatively clearly. mixed scene.
结合第一方面,在第一方面的某些实现方式中,所述合拍视频还包括背景图像区域,所述背景图像区域为所述第一图像区域、所述第二图像区域的背景,所述背景图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。With reference to the first aspect, in some implementations of the first aspect, the co-shot video further includes a background image area, and the background image area is the background of the first image area and the second image area, and the The background image area includes pixels corresponding to any one of the following: a first background image, a second background image, and a target gallery image, the first background image includes pixels corresponding to the scene where the first character is located, and the The second background image includes pixels corresponding to the scene where the second character is located, and the target gallery image is an image stored on the first electronic device.
背景图像区域可以灵活采用第一视频、第二视频或图库图像中的任一个作为目标视频的背景。第一图像区域和第二图像区域可以被视为处于同一背景或同一场景下,进而有利于增加第一图像区域和第二图像区域之间的关联性和融合性。这可以更适应于不需要明显区域用户图像的场景,例如群体合拍场景。The background image area can flexibly use any one of the first video, the second video or the gallery image as the background of the target video. The first image area and the second image area can be regarded as being in the same background or the same scene, which is beneficial to increase the correlation and fusion between the first image area and the second image area. This can be more suitable for scenes that do not require significant area user images, such as group co-shot scenes.
第二方面,提供了一种电子设备,包括:处理器、存储器和收发器,所述存储器用于存储计算机程序,所述处理器用于执行所述存储器中存储的计算机程序;其中,In a second aspect, an electronic device is provided, comprising: a processor, a memory and a transceiver, the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory; wherein,
所述处理器用于,获取第一视频,所述第一视频为第一人物的视频;The processor is configured to obtain a first video, where the first video is a video of a first character;
所述处理器还用于,获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应;The processor is further configured to acquire a first action file corresponding to the first video, where the first action file corresponds to the action of the first character;
所述处理器还用于,获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应;The processor is further configured to acquire a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to an action of the second character;
所述处理器还用于,根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应。The processor is further configured to generate a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video is The actions of the first character in the target video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. The actions of the characters correspond.
结合第二方面,在第二方面的某些实现方式中,在所述处理器获取第一视频之前,所述处理器还用于:With reference to the second aspect, in some implementations of the second aspect, before the processor acquires the first video, the processor is further configured to:
建立所述电子设备与第二电子设备的视频通话连接,所述电子设备为所述第一人物的电子设备,所述第二电子设备为所述第二人物的电子设备;establishing a video call connection between the electronic device and a second electronic device, where the electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the second character;
所述处理器具体用于,在视频通话过程中,获取所述第一视频;The processor is specifically configured to acquire the first video during a video call;
所述处理器还用于,通过所述视频通话连接,从所述第二电子设备获取所述第二视频。The processor is further configured to acquire the second video from the second electronic device through the video call connection.
结合第二方面,在第二方面的某些实现方式中,所述第一视频、所述第二视频对应所述视频通话过程中的相同时段,所述目标视频还包括所述第二人物的第二人物图像,所述 目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。With reference to the second aspect, in some implementations of the second aspect, the first video and the second video correspond to the same time period during the video call, and the target video further includes the second character's A second character image, where actions of the second character in the target video correspond to actions of the second character in the second video.
结合第二方面,在第二方面的某些实现方式中,所述处理器还用于:In conjunction with the second aspect, in some implementations of the second aspect, the processor is further configured to:
获取第三视频,所述第三视频为第三人物的视频;obtaining a third video, where the third video is a video of a third character;
获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;acquiring a third action file corresponding to the third video, where the third action file corresponds to the action of the third character;
所述处理器具体用于,根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第二人物的动作对应。The processor is specifically configured to generate the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the The target video further includes a third character image of the third character, the actions of the third character in the target video are different from those of the third character in the third video, and the actions of the third character in the target video are different from those of the third character in the target video. The actions of the third character correspond to the actions of the second character in the second video.
结合第二方面,在第二方面的某些实现方式中,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。With reference to the second aspect, in some implementations of the second aspect, the target video further includes a second character image of the second character, and the action of the second character in the target video is the same as the second character image. The action of the second character in the video corresponds.
结合第二方面,在第二方面的某些实现方式中,所述第一人物图像、所述第二人物图像属于所述目标视频中的同一帧图像。With reference to the second aspect, in some implementations of the second aspect, the first person image and the second person image belong to the same frame of images in the target video.
结合第二方面,在第二方面的某些实现方式中,所述第二视频为所述第二人物和所述第四人物的视频,所述处理器还用于:With reference to the second aspect, in some implementations of the second aspect, the second video is a video of the second character and the fourth character, and the processor is further configured to:
获取第三视频,所述第三视频为第三人物的视频;obtaining a third video, where the third video is a video of a third character;
获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;acquiring a third action file corresponding to the third video, where the third action file corresponds to the action of the third character;
获取第四动作文件,所述第四动作文件与所述第二视频中的所述第四人物的动作对应;acquiring a fourth action file, the fourth action file corresponds to the action of the fourth character in the second video;
所述处理器具体用于,根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件、所述第四动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第四人物的动作对应。The processor is specifically configured to, according to the first video, the third video, the first action file, the second action file, the third action file, and the fourth action file, generate the target video, the target video further includes a third character image of the third character, and the movement of the third character in the target video is different from the movement of the third character in the third video, The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
结合第二方面,在第二方面的某些实现方式中,所述目标视频还包括所述第二人物的第二人物图像和所述第四人物的第四人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应,所述目标视频中所述第四人物的动作与所述第二视频中所述第四人物的动作对应。With reference to the second aspect, in some implementations of the second aspect, the target video further includes a second character image of the second character and a fourth character image of the fourth character. The action of the second character corresponds to the action of the second character in the second video, and the action of the fourth character in the target video corresponds to the action of the fourth character in the second video.
结合第二方面,在第二方面的某些实现方式中,所述第一人物图像、所述第二人物图像、所述第三人物图像、所述第四人物图像属于所述目标视频中的同一帧图像。With reference to the second aspect, in some implementations of the second aspect, the first person image, the second person image, the third person image, and the fourth person image belong to the target video. the same frame of image.
结合第二方面,在第二方面的某些实现方式中,在所述处理器获取第一视频之前,所述处理器还用于:With reference to the second aspect, in some implementations of the second aspect, before the processor acquires the first video, the processor is further configured to:
建立所述电子设备与第二电子设备的视频通话连接,所述电子设备为所述第一人物的电子设备,所述第二电子设备为第三人物的电子设备;establishing a video call connection between the electronic device and a second electronic device, where the electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the third character;
所述处理器具体用于,在视频通话过程中,获取所述第一视频;The processor is specifically configured to acquire the first video during a video call;
所述处理器具体用于,通过所述视频通话连接,从所述第二电子设备获取第三视频。The processor is specifically configured to acquire a third video from the second electronic device through the video call connection.
结合第二方面,在第二方面的某些实现方式中,所述第一视频、所述第三视频对应所述视频通话过程中的相同时段。With reference to the second aspect, in some implementations of the second aspect, the first video and the third video correspond to the same time period during the video call.
结合第二方面,在第二方面的某些实现方式中,所述处理器具体用于,通过拍摄应用或视频通话应用,建立所述电子设备与第二电子设备的视频通话连接。With reference to the second aspect, in some implementations of the second aspect, the processor is specifically configured to establish a video call connection between the electronic device and the second electronic device through a photographing application or a video calling application.
结合第二方面,在第二方面的某些实现方式中,所述第二视频为本地或云端存储的视频。With reference to the second aspect, in some implementations of the second aspect, the second video is a video stored locally or in the cloud.
结合第二方面,在第二方面的某些实现方式中,所述处理器具体用于,从第二电子设备获取所述第二动作文件。With reference to the second aspect, in some implementations of the second aspect, the processor is specifically configured to acquire the second action file from the second electronic device.
结合第二方面,在第二方面的某些实现方式中,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应,包括:With reference to the second aspect, in some implementations of the second aspect, the action of the first character in the target video corresponds to the action of the second character in the second video, including:
与所述第一人物图像对应的动作文件为第一目标动作文件,所述第一动作文件与所述第二动作文件之间的匹配度为第一匹配度,所述第一目标动作文件与所述第二动作文件之间的匹配度为第二匹配度,所述第二匹配度大于所述第一匹配度。The action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the first target action file and The matching degree between the second action files is a second matching degree, and the second matching degree is greater than the first matching degree.
结合第二方面,在第二方面的某些实现方式中,所述处理器具体用于,根据以下至少两项,确定所述第一动作子文件:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。With reference to the second aspect, in some implementations of the second aspect, the processor is specifically configured to determine the first action sub-file according to at least two of the following: a first header pixel, a first neck Pixel point, first torso pixel point, first left upper forelimb pixel point, first left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point , the first pixel point of the lower right forelimb, the first pixel point of the lower right hind limb, the first pixel point of the left hand, and the first pixel point of the right hand.
结合第二方面,在第二方面的某些实现方式中,所述第一动作子文件包括以下至少一项肢体角度:With reference to the second aspect, in some implementations of the second aspect, the first action subfile includes at least one of the following limb angles:
第一头部角度、第一颈部角度、第一躯干角度、第一左上前肢角度、第一左上后肢角度、第一左下前肢角度、第一左下后肢角度、第一右上前肢角度、第一右上后肢角度、第一右下前肢角度、第一右下后肢角度、第一左手角度、第一右手角度。The first head angle, the first neck angle, the first trunk angle, the first left upper forelimb angle, the first left upper hindlimb angle, the first left lower forelimb angle, the first left lower hindlimb angle, the first right upper forelimb angle, the first right upper Hind limb angle, first right lower forelimb angle, first right lower hind limb angle, first left hand angle, first right hand angle.
结合第二方面,在第二方面的某些实现方式中,所述第一动作文件对应第一肢体角度,所述第二动作文件对应第二肢体角度,所述目标动作文件对应第三肢体角度,所述第一肢体角度与所述第二肢体角度的差值小于预设角度,所述第三肢体角度介于所述第一肢体角度与所述第二肢体角度之间。In combination with the second aspect, in some implementations of the second aspect, the first action file corresponds to a first limb angle, the second action file corresponds to a second limb angle, and the target action file corresponds to a third limb angle , the difference between the first limb angle and the second limb angle is smaller than a preset angle, and the third limb angle is between the first limb angle and the second limb angle.
结合第二方面,在第二方面的某些实现方式中,所述第一视频包括第一子帧、第二子帧,所述第二视频包括第三子帧、第四子帧,所述目标视频包括第五子帧、第六子帧,所述第一子帧、所述第三子帧、所述第五子帧相互对应,所述第二子帧、所述第四子帧、所述第六子帧相互对应,所述第一子帧与所述第二子帧之间的时间差为第一时间差,所述第三子帧与所述第四子帧之间的时间差为第二时间差,所述第五子帧与所述第六子帧的时间差为第三时间差,所述第三时间差介于所述第一时间差与所述第二时间差之间。With reference to the second aspect, in some implementations of the second aspect, the first video includes a first subframe and a second subframe, the second video includes a third subframe and a fourth subframe, and the The target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other, and the second subframe, the fourth subframe, The sixth subframes correspond to each other, the time difference between the first subframe and the second subframe is the first time difference, and the time difference between the third subframe and the fourth subframe is the first time difference. Two time differences, the time difference between the fifth subframe and the sixth subframe is a third time difference, and the third time difference is between the first time difference and the second time difference.
第三方面,提供了一种计算机存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行上述第一方面的任一项可能的实现方式中所述的方法。In a third aspect, a computer storage medium is provided, including computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to perform the above-mentioned any one of the possible implementations of the first aspect. method.
第四方面,提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述第一方面的任一项可能的实现方式中所述的方法。In a fourth aspect, a computer program product is provided, which, when the computer program product runs on a computer, causes the computer to execute the method described in any one of the possible implementations of the first aspect above.
附图说明Description of drawings
图1是本申请实施例提供的一种电子设备的示意性结构图。FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图2是本申请实施例提供的一种电子设备的软件结构框图。FIG. 2 is a software structural block diagram of an electronic device provided by an embodiment of the present application.
图3是本申请实施例提供的一种用户界面的示意性结构图。FIG. 3 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图4是本申请实施例提供的一种用户界面的示意性结构图。FIG. 4 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图5是本申请实施例提供的一种用户界面的示意性结构图。FIG. 5 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图6是本申请实施例提供的一种用户界面的示意性结构图。FIG. 6 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图7是本申请实施例提供的一种提取动作文件的示意性结构图。FIG. 7 is a schematic structural diagram of an extraction action file provided by an embodiment of the present application.
图8是本申请实施例提供的一种处理视频的示意性结构图。FIG. 8 is a schematic structural diagram of a video processing method provided by an embodiment of the present application.
图9是本申请实施例提供的一种用户界面的示意性结构图。FIG. 9 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图10是本申请实施例提供的一种用户界面的示意性结构图。FIG. 10 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图11是本申请实施例提供的一种用户界面的示意性结构图。FIG. 11 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图12是本申请实施例提供的一种用户界面的示意性结构图。FIG. 12 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图13是本申请实施例提供的一种用户界面的示意性结构图。FIG. 13 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图14是本申请实施例提供的一种用户界面的示意性结构图。FIG. 14 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图15是本申请实施例提供的一种用户界面的示意性结构图。FIG. 15 is a schematic structural diagram of a user interface provided by an embodiment of the present application.
图16是本申请实施例提供的一种处理视频的方法的示意性流程图。FIG. 16 is a schematic flowchart of a method for processing video provided by an embodiment of the present application.
图17是本申请实施例提供的一种电子设备的示意性结构图。FIG. 17 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are for the purpose of describing particular embodiments only, and are not intended to be limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "an," "the," "above," "the," and "the" are intended to also Expressions such as "one or more" are included unless the context clearly dictates otherwise. It should also be understood that, in the following embodiments of the present application, "at least one" and "one or more" refer to one, two or more than two. The term "and/or", used to describe the association relationship of related objects, indicates that there can be three kinds of relationships; for example, A and/or B, can indicate: A alone exists, A and B exist at the same time, and B exists alone, A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
以下介绍了本申请实施例提供的电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限 于搭载
Figure PCTCN2021136393-appb-000001
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
The electronic device provided by the embodiments of the present application, a user interface for such an electronic device, and an embodiment for using such an electronic device are described below. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication capabilities (eg, a smart watch) Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on
Figure PCTCN2021136393-appb-000001
Or portable electronic devices with other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) or the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,按键190,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100 . The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , the mobile communication module 150, the wireless communication module 160, the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, the button 190, the camera 193, the display screen 194, and the subscriber identification module (SIM) card Interface 195, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备101也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备101处理数据或执行指令的效率。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, the electronic device 101 may also include one or more processors 110 . The controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions. In some other embodiments, a memory may also be provided in the processor 110 for storing instructions and data. Illustratively, the memory in the processor 110 may be a cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. In this way, repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 101 in processing data or executing instructions.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备101充电,也可以用于电子设备101与外围设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal) asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc. Among them, the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transmit data between the electronic device 101 and peripheral devices. The USB interface 130 can also be used to connect an earphone, and play audio through the earphone.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口 130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。 在一些实施例中,电子设备100可以包括1个或多个显示屏194。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, electronic device 100 may include one or more display screens 194 .
电子设备100的显示屏194可以是一种柔性屏,目前,柔性屏以其独特的特性和巨大的潜力而备受关注。柔性屏相对于传统屏幕而言,具有柔韧性强和可弯曲的特点,可以给用户提供基于可弯折特性的新交互方式,可以满足用户对于电子设备的更多需求。对于配置有可折叠显示屏的电子设备而言,电子设备上的可折叠显示屏可以随时在折叠形态下的小屏和展开形态下大屏之间切换。因此,用户在配置有可折叠显示屏的电子设备上使用分屏功能,也越来越频繁。The display screen 194 of the electronic device 100 may be a flexible screen. Currently, the flexible screen has attracted much attention due to its unique characteristics and great potential. Compared with traditional screens, flexible screens have the characteristics of strong flexibility and bendability, which can provide users with new interactive methods based on the bendable characteristics, and can meet more needs of users for electronic devices. For an electronic device equipped with a foldable display screen, the foldable display screen on the electronic device can be switched between a small screen in a folded state and a large screen in an unfolded state at any time. Therefore, users are using the split-screen function more and more frequently on electronic devices equipped with foldable displays.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或多个摄像头193。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include one or more cameras 193 .
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备101执行本申请一些实施例中所提供的灭屏显示的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备101使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器 121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备101执行本申请实施例中所提供的灭屏显示的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。Internal memory 121 may be used to store one or more computer programs including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, thereby causing the electronic device 101 to execute the method for off-screen display, various applications and data processing provided in some embodiments of the present application. The internal memory 121 may include a storage program area and a storage data area. Wherein, the stored program area may store the operating system; the stored program area may also store one or more applications (such as gallery, contacts, etc.) and the like. The storage data area may store data (such as photos, contacts, etc.) created during the use of the electronic device 101 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device 101 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 . The method of off-screen display, and other applications and data processing. The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
图2是本申请实施例的电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。应用程序层可以包括一系列应用程序包。FIG. 2 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer. The application layer can include a series of application packages.
如图2所示,应用程序包可以包括图库,相机,畅连,地图,导航等应用程序。As shown in Figure 2, the application package can include applications such as gallery, camera, Changlian, map, and navigation.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架 层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
本申请实施例提供的方案可以应用于合拍场景,例如用户与素材合拍、用户与用户合拍的场景。用户和用户合拍的场景还可以包括远程多用户合拍场景。远程多用户合拍场景可以指,至少两个用户无法或很难在同一时间、通过同一摄像设备完成合拍。下面描述合拍场景的一些可能的示例。The solutions provided by the embodiments of the present application can be applied to co-production scenarios, for example, scenarios in which a user is in a co-production with a material, and a user is in a co-production with a user. The user and the user co-production scene may also include a remote multi-user co-production scene. The remote multi-user co-production scenario may refer to the inability or difficulty of at least two users to complete co-production at the same time with the same camera device. Some possible examples of co-production scenarios are described below.
示例一Example 1
用户A可以通过带有摄像功能的电子设备A进行自拍,得到自拍视频A;用户B可以通过带有摄像头的电子设备B进行自拍。通过将视频A与视频B合成,可以得到用户A与用户B的合拍视频。自拍视频A与自拍视频B可以通过异步拍摄的方式得到。User A can take a selfie through an electronic device A with a camera function to obtain a selfie video A; user B can take a selfie through an electronic device B with a camera. By synthesizing video A and video B, a co-production video of user A and user B can be obtained. The selfie video A and the selfie video B can be obtained by asynchronous shooting.
在这一示例中,用户A与用户B的合拍动作在视觉上的协调性可能较差。例如,用户A与电子设备A的距离可能和用户B与电子设备B的距离相差较大,因此自拍视频A中用户A的轮廓大小与自拍视频B中的用户B的轮廓大小相差较大。又如,用户A与用户B做类似的动作,但是用户A的动作相对较快,幅度较大,用户B的动作相对较慢,幅度较小。因此,视频A与视频B的匹配度可能相对较差;相应地,合拍视频的协调性可能相对较差。为了使合拍视频达到相对较高的协调性,用户需要对合拍视频进行工作量较大的后期处理。In this example, the visual coordination of user A's and user B's synchronized actions may be poor. For example, the distance between user A and electronic device A may be quite different from the distance between user B and electronic device B, so the outline size of user A in selfie video A and the outline size of user B in selfie video B are quite different. For another example, user A and user B perform similar actions, but user A's action is relatively fast and the action is relatively large, while the action of user B is relatively slow and small. Therefore, the matching degree of video A and video B may be relatively poor; correspondingly, the coordination of co-produced videos may be relatively poor. In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
示例二Example 2
用户A可以通过带有摄像功能的电子设备A,与用户B视频通话,并通过录屏的方式获取既包含用户A又包含用户B的合拍视频。User A can make a video call with user B through the electronic device A with the camera function, and obtain a co-shot video that includes both user A and user B by recording the screen.
然而,通过录屏得到的合拍视频的清晰度通常相对较差。合拍视频的最大分辨率通常取决于电子设备A的显示分辨率。并且,即使用户A与用户B沟通协商清楚了诸多拍摄细节,但是多个用户做出相似度高的动作可能需要多次排练。因此合拍视频的协调性可能相对较差。为了使合拍视频达到相对较高的协调性,用户需要对合拍视频进行工作量较大的后期处理。However, the clarity of the co-shot video obtained through screen recording is usually relatively poor. The maximum resolution of the co-shot video usually depends on the display resolution of the electronic device A. Moreover, even if user A and user B communicated and negotiated many shooting details, multiple rehearsals may be required for multiple users to perform actions with high similarity. Therefore, the coordination of co-production videos may be relatively poor. In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
示例三Example three
用户A与用户B可以位于同一场景内。用户A、用户B可以做类似的动作,并通过带有摄像功能的电子设备A进行自拍,可以得到合拍视频。User A and User B may be located in the same scene. User A and User B can perform similar actions, and take a selfie through the electronic device A with a camera function to obtain a co-shot video.
在这一示例中,用户A的动作与用户B的动作的协调性可能相对较差。例如,用户A 与用户B做类似的动作,但是用户A的动作相对较快,幅度较大,用户B的动作相对较慢,幅度较小。因此合拍视频的协调性可能相对较差。为了使合拍视频达到相对较高的协调性,用户需要对合拍视频进行工作量较大的后期处理。In this example, user A's actions may be relatively poorly coordinated with user B's actions. For example, user A and user B perform similar actions, but the action of user A is relatively fast and the action is relatively large, while the action of user B is relatively slow and the action is relatively small. Therefore, the coordination of co-production videos may be relatively poor. In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
示例四Example four
用户A可以观察视频素材。该视频素材包含人物C的一系列动作。用户A模仿人物C在视频素材中的动作,并通过带有摄像功能的电子设备A记录用户A做出的动作,以得到视频A。可选的,通过合成视频A与视频素材,可以得到合拍视频。User A can observe the video material. The video footage contains a series of actions of Person C. The user A imitates the action of the character C in the video material, and records the action made by the user A through the electronic device A with the camera function, so as to obtain the video A. Optionally, by synthesizing the video A and the video material, a co-shot video can be obtained.
即使用户A反复观看、模仿人物C在视频素材中的动作,但是用户A可能需要反复排练,才有可能做出与人物C的动作相似度高的动作。因此,视频A与视频素材的匹配度可能相对较差。相应地,合拍视频的协调性可能相对较差。为了使合拍视频达到相对较高的协调性,用户需要对合拍视频进行工作量较大的后期处理。Even if user A repeatedly watches and imitates the actions of character C in the video material, user A may need to rehearse repeatedly to make actions that are highly similar to the actions of character C. Therefore, the match of Video A with the video material may be relatively poor. Correspondingly, the coordination of co-production videos may be relatively poor. In order to achieve relatively high coordination of the co-shot video, the user needs to perform post-processing with a large workload on the co-shot video.
本申请实施例提供一种新的处理视频的方法,目的包括减少用户对视频的后期处理工作量,进而有利于提升拍摄、制作、处理视频的用户体验感。Embodiments of the present application provide a new method for video processing, which aims to reduce the post-processing workload of the user for the video, thereby helping to improve the user experience of shooting, producing, and processing the video.
图3是本申请实施例提供的一种用户界面300的示意图。该用户界面300可以显示在第一电子设备上。该用户界面300可以为相机应用的界面,或者其他具有拍摄功能的应用的界面。也就是说,第一电子设备上可以承载相机应用或其他具有拍摄功能的应用。响应第一用户对这些应用做出的操作,第一电子设备可以显示该用户界面300。FIG. 3 is a schematic diagram of a user interface 300 provided by an embodiment of the present application. The user interface 300 may be displayed on the first electronic device. The user interface 300 may be an interface of a camera application, or an interface of other applications having a photographing function. That is to say, a camera application or other applications having a photographing function may be carried on the first electronic device. The first electronic device may display the user interface 300 in response to operations made by the first user on the applications.
例如,第一用户可以通过点击相机应用的图标,打开相机应用,进而第一电子设备可以显示用户界面300。相机应用可以调用图1所示的摄像头193,拍摄第一电子设备周围的景象。例如,相机应用可以调用第一电子设备的前置摄像头,以拍摄第一用户的自拍图像,并在用户界面300上显示该自拍图像。For example, the first user may open the camera application by clicking on the icon of the camera application, and then the first electronic device may display the user interface 300 . The camera application can call the camera 193 shown in FIG. 1 to capture the scene around the first electronic device. For example, the camera application may call the front camera of the first electronic device to take a selfie image of the first user, and display the selfie image on the user interface 300 .
用户界面300可以包括多个功能控件310(该功能控件310可以以选项卡的形式呈现在用户界面300上),该多个功能控件310可以分别与相机应用的多个相机功能一一对应。如图3所示,该多个相机功能例如可以包括人像功能、拍照功能、录像功能、视频合拍功能、专业功能等,多个功能控件310可以包括人像功能控件、拍照功能控件、录像功能控件、视频合拍功能控件、专业功能控件。The user interface 300 may include a plurality of function controls 310 (the function controls 310 may be presented on the user interface 300 in the form of tabs), and the plurality of function controls 310 may respectively correspond to a plurality of camera functions of the camera application. As shown in FIG. 3 , the multiple camera functions may include, for example, a portrait function, a photographing function, a video recording function, a video co-shooting function, a professional function, etc., and the multiple function controls 310 may include a portrait function control, a photographing function control, a video recording function control, Video co-shooting function controls, professional function controls.
第一电子设备可以响应第一用户作用在用户界面300上的操作(如滑动操作),将当前相机功能切换至用于完成视频合拍的功能,例如图3所示的“视频合拍”功能。应理解,在其他可能的示例中,相机应用可以包括其他相机功能以用于完成视频合拍。本申请实施例下面以视频合拍功能为例进行阐述。The first electronic device can switch the current camera function to a function for completing video co-shooting, such as the "video co-shooting" function shown in FIG. It should be understood that, in other possible examples, the camera application may include other camera functions for completing video co-shooting. The embodiments of the present application are described below by taking the video co-shooting function as an example.
在当前相机功能为视频合拍功能的情况下,用户界面300例如可以包括以下至少一种控件:用户合拍控件320、素材合拍控件330、图库合拍控件340。响应第一用户作用在任一控件的操作,第一电子设备可以将拍摄视频与其他文件合成,进而完成合拍。In the case that the current camera function is a video co-shooting function, the user interface 300 may include, for example, at least one of the following controls: a user co-shooting control 320 , a material co-shooting control 330 , and a gallery co-shooting control 340 . In response to an operation performed by the first user on any of the controls, the first electronic device may synthesize the captured video with other files, thereby completing the co-shooting.
用户合拍控件320可以用于选择或邀请第二用户视频通话,以完成第一用户与第二用户的同步合拍。The user co-shooting control 320 can be used to select or invite the second user to make a video call, so as to complete the synchronization and co-shooting of the first user and the second user.
例如,响应第一用户作用在用户合拍控件320上的操作(如点击操作),第一电子设备可以在用户界面300上显示与多个用户一一对应的多个用户控件,该多个用户可以包括第二用户。响应第一用户作用在该第二用户的用户控件的操作(如点击操作),第一电子设备可以向第二电子设备发起视频通话,其中,第二电子设备可以为第二用户使用的电子 设备。相应地,第二用户可以通过第二电子设备接收到第一用户的视频通话邀请。第二电子设备可以显示视频通话邀请的界面,该界面可以包括视频通话接听控件。响应第二用户作用在视频通话接听控件上的操作,第一电子设备与第二电子设备之间可以建立视频通话连接。在第一电子设备与第二电子设备建立视频通话连接后,第一电子设备通过拍摄可以得到第一视频,第二电子设备通过拍摄可以得到第二视频。第一电子设备可以通过该视频通话连接,获取该第二视频。第二电子设备可以通过视频通话连接,获取该第一视频。电子设备可以根据第一视频、第二视频,通过本申请实施例提供的处理视频的方法,可以得到一种或多种处理后的视频。For example, in response to an operation (such as a click operation) performed by the first user on the user snap control 320, the first electronic device may display a plurality of user controls corresponding to a plurality of users on the user interface 300, and the plurality of users may Including the second user. In response to an operation (such as a click operation) by the first user on the user control of the second user, the first electronic device may initiate a video call to the second electronic device, wherein the second electronic device may be the electronic device used by the second user . Correspondingly, the second user may receive the video call invitation from the first user through the second electronic device. The second electronic device may display an interface for the video call invitation, and the interface may include controls for answering the video call. In response to an operation performed by the second user on the video call answering control, a video call connection can be established between the first electronic device and the second electronic device. After the first electronic device establishes a video call connection with the second electronic device, the first electronic device can obtain the first video by shooting, and the second electronic device can obtain the second video by shooting. The first electronic device may acquire the second video through the video call connection. The second electronic device may be connected through a video call to obtain the first video. The electronic device can obtain one or more processed videos according to the first video and the second video by using the video processing method provided in the embodiment of the present application.
素材合拍控件330可以用于从云端选择素材,以完成第一用户与素材的合拍。素材可以指云端存储的视频、动作模板等可以反映动作的文件。云端例如可以指云端服务器、云端存储设备等。The material co-shot control 330 may be used to select a material from the cloud, so as to complete the co-production between the first user and the material. The material may refer to files that can reflect actions, such as videos and action templates stored in the cloud. For example, the cloud may refer to a cloud server, a cloud storage device, and the like.
例如,素材可以为包含目标人物(如第二用户)的第二视频。在本申请中,目标人物例如可以是第一用户认识或熟悉的人,如朋友、家人、名人等,也可以是陌生人,还可以是具有人物特征的卡通形象。在某些示例中,素材可以理解为一种动作模板。素材可以包含目标人物的多帧动作图像。结合图3所示的示例,第一电子设备可以响应用户作用在素材合拍控件的操作,从云端服务器获取素材。For example, the material may be a second video containing a target person (eg, a second user). In this application, the target person may be, for example, a person known or familiar to the first user, such as a friend, family member, celebrity, etc., or a stranger, or a cartoon image with character characteristics. In some examples, a material can be understood as a kind of action template. Footage can contain multiple frames of action images of the target person. With reference to the example shown in FIG. 3 , the first electronic device may acquire the material from the cloud server in response to the user's operation on the material in-time control.
第一用户可以通过第一电子设备拍摄第一视频。第一电子设备可以拍摄包含第一用户的第一视频。第一电子设备可以根据第一视频、素材,通过本申请实施例提供的处理视频的方法,可以得到一种或多种处理后的视频。The first user may shoot the first video through the first electronic device. The first electronic device may capture a first video including the first user. The first electronic device can obtain one or more processed videos by using the video processing method provided in the embodiment of the present application according to the first video and material.
在一个示例中,第一电子设备可以根据第一视频中第一用户的轮廓,裁剪第一视频,得到第一人物子视频。第一人物子视频可以包含第一用户的图像,且不包含第一视频中的背景图像。第一电子设备可以将第一人物子视频、素材和背景多媒体数据合成为第一目标视频,其中素材可以不包括与目标人物对应的背景图像,背景多媒体数据可以充当第一人物子视频、素材的背景。背景多媒体数据例如可以来自除第一视频、素材以外的其他文件。In an example, the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person. The first person sub-video may include an image of the first user and not include a background image in the first video. The first electronic device may synthesize the first character sub-video, material and background multimedia data into a first target video, wherein the material may not include a background image corresponding to the target character, and the background multimedia data may serve as the first character sub-video, the material's background image. background. The background multimedia data may, for example, come from other files than the first video and material.
在另一个示例中,第一电子设备可以根据第一视频中第一用户的轮廓,裁剪第一视频,得到第一人物子视频。第一电子设备可以将第一人物子视频、素材合成为第一目标视频,其中素材可以包括与目标人物对应的背景图像,从而该素材中的背景图像可以充当第一人物子视频的背景。In another example, the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person. The first electronic device may synthesize the first character sub-video and material into a first target video, wherein the material may include a background image corresponding to the target character, so that the background image in the material may serve as the background of the first character sub-video.
在又一个示例中,第一电子设备可以将第一视频、素材合成为第一目标视频。其中素材可以不包括与目标人物对应的背景图像。第一视频中的背景图像可以充当素材的背景。In yet another example, the first electronic device may synthesize the first video and material into the first target video. The material may not include a background image corresponding to the target person. The background image in the first video can serve as the background for the footage.
下面以一个例子阐述用户图像(或用户像素点、用户图像块)与背景图像(或背景像素点、背景图像块)之间的关系。An example is given below to illustrate the relationship between the user image (or user pixels, user image blocks) and the background image (or background pixels, background image blocks).
例如,用户a可以通过电子设备a自拍一段视频。在电子设备a拍摄的视频A包含用户a的情况下,电子设备a可以根据视频A中用户a的轮廓,裁剪视频A,得到用户子视频和背景子视频。其中,用户子视频可以包含用户a的图像,且不包含背景图像;背景子视频可以包含背景图像,且不包含用户a的图像。For example, user a can take a selfie of a video through electronic device a. In the case that the video A shot by the electronic device a includes the user a, the electronic device a can crop the video A according to the outline of the user a in the video A to obtain the user sub-video and the background sub-video. Wherein, the user sub-video may include the image of user a and not include the background image; the background sub-video may include the background image and not include the image of user a.
下面以视频A的一个子帧A为例进行详细说明。子帧A可以包括多个像素点A,该多个像素点A可以包括与用户a的轮廓对应的多个像素点a。子帧A中位于该多个像素点a以内的多个像素点a’可以形成用户子视频的一个子帧a’,且可以形成该用户a的图像; 子帧A中位于该多个像素点a以外的多个像素点a”可以形成背景子视频的一个子帧a”,且可以形成该背景图像。The following takes a subframe A of video A as an example for detailed description. The subframe A may include a plurality of pixel points A, and the plurality of pixel points A may include a plurality of pixel points a corresponding to the outline of the user a. The multiple pixel points a' located within the multiple pixel points a in the subframe A may form a subframe a' of the user's sub-video, and may form the image of the user a; the multiple pixel points located in the subframe A A plurality of pixel points a" other than a may form a subframe a" of the background sub-video, and may form the background image.
图库合拍控件340可以用于从本地图库中选择图库视频,以完成第一用户与图库视频的合拍。图库视频可以理解为存储在第一电子设备本地的视频。The gallery co-shooting control 340 may be used to select a gallery video from a local gallery to complete the first user's co-shooting with the gallery video. The gallery video may be understood as a video stored locally on the first electronic device.
例如,图库视频为包含目标人物(如第二用户)的第二视频。第一用户可以通过第一电子设备拍摄第一视频。第一电子设备可以拍摄包含第一用户的第一视频。第一电子设备可以根据第一视频、图库视频,通过本申请实施例提供的处理视频的方法,可以得到一种或多种处理后的视频。For example, the gallery video is a second video containing a target person (eg, a second user). The first user may shoot the first video through the first electronic device. The first electronic device may capture a first video including the first user. The first electronic device can obtain one or more processed videos according to the first video and the gallery video by using the video processing method provided in the embodiment of the present application.
在一个示例中,第一电子设备可以根据第一视频中第一用户的轮廓,裁剪第一视频,得到第一人物子视频。第一人物子视频可以包含第一用户的图像,且不包含第一视频中的背景图像。第一电子设备可以将第一人物子视频、图库视频和背景多媒体数据合成为第一目标视频,其中图库视频可以不包括与目标人物对应的背景图像,背景多媒体数据可以充当第一人物子视频、图库视频的背景。背景多媒体数据例如可以来自除第一视频、素材以外的其他文件。In an example, the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person. The first person sub-video may include an image of the first user and not include a background image in the first video. The first electronic device may synthesize the first character sub-video, the gallery video and the background multimedia data into a first target video, wherein the gallery video may not include a background image corresponding to the target character, and the background multimedia data may serve as the first character sub-video, Background for gallery videos. The background multimedia data may, for example, come from other files than the first video and material.
在另一个示例中,第一电子设备可以根据第一视频中第一用户的轮廓,裁剪第一视频,得到第一人物子视频。第一电子设备可以将第一人物子视频、图库视频合成为第一目标视频,其中图库视频可以包括与目标人物对应的背景图像,从而该背景图像可以充当第一人物子视频的背景。In another example, the first electronic device may crop the first video according to the outline of the first user in the first video to obtain a sub-video of the first person. The first electronic device may synthesize the first person sub-video and the gallery video into a first target video, wherein the gallery video may include a background image corresponding to the target person, so that the background image may serve as the background of the first person sub-video.
在又一个示例中,第一电子设备可以将第一视频、图库视频合成为第一目标视频。其中图库视频可以不包括与目标人物对应的背景图像。第一视频中的背景图像可以充当图库视频的背景。In yet another example, the first electronic device may synthesize the first video and the gallery video into the first target video. The gallery video may not include a background image corresponding to the target person. The background image in the first video can serve as the background for the gallery video.
可选的,用户界面300还可以包括图库控件350。响应第一用户作用在图库控件350的操作,第一电子设备可以跳转至图库应用,以查看已拍摄或已存储的多媒体数据。Optionally, the user interface 300 may further include a gallery control 350 . In response to the first user's operation on the gallery control 350, the first electronic device may jump to the gallery application to view the photographed or stored multimedia data.
响应第一用户作用在上述用户合拍控件320、素材合拍控件330、图库合拍控件340中的任一项,第一电子设备可以显示如图4所示的用户界面400。用户界面400可以包括第一界面区域460、第二界面区域470。第一界面区域460与第二界面区域470之间可以互不交叉。第一界面区域460、第二界面区域470可以位于用户界面400上的任意位置。如图4所示,第二界面区域470例如可以位于用户界面400的上方,第一界面区域460例如可以位于用户界面400的下方。In response to the first user acting on any one of the user snap control 320 , the material snap control 330 , and the gallery snap control 340 , the first electronic device may display a user interface 400 as shown in FIG. 4 . The user interface 400 may include a first interface area 460 and a second interface area 470 . The first interface region 460 and the second interface region 470 may not cross each other. The first interface area 460 and the second interface area 470 may be located anywhere on the user interface 400 . As shown in FIG. 4 , the second interface area 470 may be located above the user interface 400 , for example, and the first interface area 460 may be located below the user interface 400 , for example.
第一用户可以观察用户界面400的第二界面区域470,进而可以了解、熟悉第二界面区域470中的目标人物的动作。结合图3,在一个可能的示例中,第二界面区域470例如可以显示第二用户的视频通话内容,在此情况下,目标人物可以为第二用户;在另一个可能的示例中,第二界面区域470例如可以显示素材,在此情况下,目标人物可以为素材中的目标人物;在有一个示例中,第二界面区域470例如可以显示图库视频,在此情况下,目标人物可以为图库视频中的目标人物。The first user can observe the second interface area 470 of the user interface 400 , so as to understand and be familiar with the actions of the target person in the second interface area 470 . 3, in a possible example, the second interface area 470 may display the video call content of the second user, in this case, the target person may be the second user; in another possible example, the second user The interface area 470 may, for example, display the material, in this case, the target person may be the target person in the material; in an example, the second interface area 470 may, for example, display the gallery video, in this case, the target person may be the gallery The target person in the video.
以下为便于描述,将第二界面区域470显示的视频资源统称为第二视频。其中,第二视频可以为以下任一种:在视频通话过程中从第二电子设备接收到的视频通话数据,第二电子设备为第二用户使用的电子设备;素材;图库视频。In the following, for the convenience of description, the video resources displayed in the second interface area 470 are collectively referred to as the second video. Wherein, the second video may be any of the following: video call data received from a second electronic device during a video call, where the second electronic device is an electronic device used by the second user; material; gallery video.
第二视频可以包括第二人物子视频,或者,从第二视频中可以提取出第二人物子视频。 也就是说,第二视频可以包括与目标人物对应的子帧。如图4所示,第二电子设备可以在第二界面区域470内显示第二人物图像471,进而可以播放第二人物子视频的画面。也就是说,第二界面区域470可以包括第二人物图像471。第二界面区域470可以包括与目标人物对应的像素点。The second video may include a second character sub-video, or the second character sub-video may be extracted from the second video. That is, the second video may include subframes corresponding to the target person. As shown in FIG. 4 , the second electronic device can display a second character image 471 in the second interface area 470, and then can play a picture of the sub-video of the second character. That is, the second interface area 470 may include the second character image 471 . The second interface area 470 may include pixel points corresponding to the target person.
在其他示例中,第一电子设备可以直接在第二界面区域470内播放第二视频。该第二界面区域470可以包括第二人物图像471和第二背景图像472,第二背景图像472可以充当第二人物图像471的背景。也就是说,第一电子设备可以不对第二视频进行视裁剪或视频提取。In other examples, the first electronic device may directly play the second video within the second interface area 470 . The second interface area 470 may include a second character image 471 and a second background image 472 , and the second background image 472 may serve as a background of the second character image 471 . That is, the first electronic device may not perform video cropping or video extraction on the second video.
第一用户可以模仿目标人物做出一系列动作,并通过第一电子设备拍摄记录下来。如果第二视频为第二用户的视频通话视频,则第一用户可以模仿第二用户。如果第二视频为素材,则第一用户可以模仿素材中的目标人物。如果第二视频为图库视频,则第一用户可以模仿图库视频中的目标人物。如图4所示,用户界面400可以包括录制控件410。响应第一用户作用在该录制控件410上的操作,第一电子设备可以拍摄得到第一视频。The first user can imitate the target person to make a series of actions, which are recorded by the first electronic device. If the second video is a video call video of the second user, the first user can imitate the second user. If the second video is a material, the first user can imitate the target person in the material. If the second video is a gallery video, the first user can imitate the target person in the gallery video. As shown in FIG. 4 , user interface 400 may include recording controls 410 . In response to an operation performed by the first user on the recording control 410, the first electronic device may capture a first video.
第一用户可以在拍摄第一视频的过程中,通过图4所示的第一界面区域460,预览第一视频的拍摄效果。During the process of shooting the first video, the first user can preview the shooting effect of the first video through the first interface area 460 shown in FIG. 4 .
在一个示例中,第一电子设备可以包括第一人物子视频,或者,从第一视频中可以提取出第一人物子视频。也就是说,第二视频可以包括与第一用户对应的子帧。第一电子设备可以在第一界面区域460内显示第一人物图像461,进而可以播放第一人物子视频的画面。也就是说,第一界面区域460可以包括第一人物图像461。第一界面区域460可以包括与第一用户对应的像素点。In one example, the first electronic device may include the first character sub-video, or the first character sub-video may be extracted from the first video. That is, the second video may include subframes corresponding to the first user. The first electronic device may display the first character image 461 in the first interface area 460, and then may play a picture of the sub-video of the first character. That is, the first interface area 460 may include the first character image 461 . The first interface area 460 may include pixel points corresponding to the first user.
在其他示例中,第一电子设备可以直接在第一界面区域460内播放第一视频。该第一界面区域460可以包括第一人物图像461和第一背景图像462,第一背景图像462可以充当第一人物图像461的背景。也就是说,第一电子设备可以不对第一视频进行视裁剪或视频提取。In other examples, the first electronic device may directly play the first video in the first interface area 460 . The first interface area 460 may include a first character image 461 and a first background image 462 , and the first background image 462 may serve as a background of the first character image 461 . That is, the first electronic device may not perform video cropping or video extraction on the first video.
可选的,响应用户作用在录制控件410上的操作,电子设备可以合成第一视频、第二视频,得到例如图5、图6所示的第一目标视频。该第一目标视频可以包括与第一视频或第一用户对应的第一图像区域560,以及与第二视频或目标人物对应的第二图像区域570。第一图像区域560可以对应第一界面区域460,第二图像区域570可以对应第二界面区域470,使得拍摄过程中的预览视频与合成后的视频可以具有相对高的统一性。Optionally, in response to an operation performed by the user on the recording control 410, the electronic device may synthesize the first video and the second video to obtain, for example, the first target video shown in FIG. 5 and FIG. 6 . The first target video may include a first image area 560 corresponding to the first video or the first user, and a second image area 570 corresponding to the second video or the target person. The first image area 560 may correspond to the first interface area 460, and the second image area 570 may correspond to the second interface area 470, so that the preview video during the shooting process and the synthesized video may have relatively high unity.
在又一种可能的场景下,两个用户可以通过视频通话,模仿同一个视频中的一个或多个人物做动作。两个用户可以通过视频通话交流模仿细节。In yet another possible scenario, two users can imitate one or more characters in the same video to perform actions through a video call. The two users can communicate details of the imitation through a video call.
例如,第一电子设备可以相应第一用户作用在如图3所示的用户合拍控件320的操作,向第二电子设备发出视频通话邀请,使用第二电子设备的用户可以是第三用户。之后,第一电子设备、第二电子设备之间可以建立视频通话连接。第一用户、第三用户例如可以通过图3所示的素材合拍控件330或图库合拍视频340,选择第二视频。第二视频可以是有关目标人物的视频。第二视频可以展示目标人物的动作。第一电子设备、第三电子设备均可以在用户界面上显示第一界面区域、第二界面区域、第三界面区域中的一个或多个。其中,第一界面区域可以显示第一用户视频通话的内容;第二界面区域可以显示第二视频;第三界面区域可以显示第三用户视频通话的内容。第一用户、第三用户可以模仿该第二视 频中的动作,在视频通话过程中生成第一视频和第三视频。由于第一用户、第三用户模仿同一视频中同一目标人物的动作,因此后续可以参照第二视频中该目标人物的动作形态,分别对第一视频、第三视频进行处理,得到包含第一用户、第三用户的目标视频。For example, the first electronic device may send a video call invitation to the second electronic device according to the operation of the first user on the user co-shot control 320 as shown in FIG. 3 , and the user using the second electronic device may be the third user. After that, a video call connection can be established between the first electronic device and the second electronic device. The first user and the third user may, for example, select the second video through the material co-shooting control 330 or the gallery co-shooting video 340 shown in FIG. 3 . The second video may be a video about the target person. The second video may show the action of the target person. Both the first electronic device and the third electronic device may display one or more of the first interface area, the second interface area, and the third interface area on the user interface. The first interface area may display the content of the video call of the first user; the second interface area may display the second video; and the third interface area may display the content of the video call of the third user. The first user and the third user can imitate the actions in the second video to generate the first video and the third video during the video call. Since the first user and the third user imitate the actions of the same target character in the same video, the first video and the third video can be processed respectively with reference to the action form of the target character in the second video to obtain a result that includes the first user , the target video of the third user.
可选的,在视频通话过程中,第一用户、第三用户可以同时模仿目标人物的动作,也可以先后在不同的时段模仿模仿目标人物的动作。Optionally, during the video call, the first user and the third user can imitate the action of the target person at the same time, or they can imitate the action of the target person in different time periods successively.
例如,第一电子设备可以相应第一用户作用在如图3所示的用户合拍控件320的操作,向第二电子设备发出视频通话邀请,使用第二电子设备的用户可以是第三用户。之后,第一电子设备、第二电子设备之间可以建立视频通话连接。第一用户、第三用户例如可以通过图3所示的素材合拍控件330或图库合拍视频340,选择第二视频。第二视频可以是有关第一目标人物、第二目标人物的视频。第一目标人物、第二目标人物例如可以在第二视频中合作完成一系列动作。第一电子设备、第三电子设备均可以在用户界面上显示第一界面区域、第二界面区域、第三界面区域中的一个或多个。其中,第一界面区域可以显示第一用户视频通话的内容;第二界面区域可以显示第二视频;第三界面区域可以显示第三用户视频通话的内容。第一用户可以模仿该第二视频中第一目标人物的动作,并通过视频通话连接生成第一视频。第三用户可以模仿该第二视频中第二目标人物的动作,并通过视频通话连接生成第三视频。由于第一用户、第三用户模仿同一视频中第一目标人物、第二目标人物的动作,因此后续可以参照第二视频中第一目标人物、第二目标人物的动作形态,分别对第一视频、第三视频进行处理,得到包含第一用户、第三用户的目标视频。For example, the first electronic device may send a video call invitation to the second electronic device according to the operation of the first user on the user co-shot control 320 as shown in FIG. 3 , and the user using the second electronic device may be the third user. After that, a video call connection can be established between the first electronic device and the second electronic device. The first user and the third user may, for example, select the second video through the material co-shooting control 330 or the gallery co-shooting video 340 shown in FIG. 3 . The second video may be a video about the first target person and the second target person. For example, the first target person and the second target person may cooperate to complete a series of actions in the second video. Both the first electronic device and the third electronic device may display one or more of the first interface area, the second interface area, and the third interface area on the user interface. The first interface area may display the content of the video call of the first user; the second interface area may display the second video; and the third interface area may display the content of the video call of the third user. The first user can imitate the action of the first target person in the second video, and generate the first video through a video call connection. The third user can imitate the action of the second target person in the second video, and generate a third video through a video call connection. Since the first user and the third user imitate the actions of the first target character and the second target character in the same video, the first video , and the third video is processed to obtain a target video including the first user and the third user.
可选的,在视频通话过程中,第一用户模仿第一目标人物的动作的时段,可以与第三用户模仿第二目标人物的动作的时段大致重叠,或者,第一用户模仿第一目标人物的动作的时段,可以与第三用户模仿第二目标人物的动作的时段互不交叉。Optionally, during the video call, the period during which the first user imitates the action of the first target person may substantially overlap with the period during which the third user imitates the action of the second target person, or the first user imitates the first target person. The time period for the action of the second target character may not overlap with the time period for the third user to imitate the action of the second target character.
下面介绍图4所示的用户界面400可能包含的操作控件。Operation controls that may be included in the user interface 400 shown in FIG. 4 are described below.
用户界面400例如可以包括分屏开关控件420。 User interface 400 may include, for example, a split screen switch control 420 .
如图的用户界面400所示,在分屏开关控件420处于开启状态的情况下,第一界面区域460和第二界面区域470例如可以为两个规则的显示区域。也就是说,第一界面区域460的轮廓与第一用户的轮廓可以不匹配(或不对应),且第二界面区域470的轮廓与目标人物的轮廓可以不匹配(或不对应)。第一界面区域460的面积和第二界面区域470的面积例如可以对应固定比例(如1:1、1:1.5等)。在图4所示的示例中,分屏开关控件420当前处于开启状态。第一界面区域460和第二界面区域470的形状均可以为矩形。As shown in the user interface 400 in the figure, when the split screen switch control 420 is in an on state, the first interface area 460 and the second interface area 470 may be, for example, two regular display areas. That is, the outline of the first interface area 460 may not match (or correspond to) the outline of the first user, and the outline of the second interface area 470 may not match (or correspond to) the outline of the target person. For example, the area of the first interface region 460 and the area of the second interface region 470 may correspond to a fixed ratio (eg, 1:1, 1:1.5, etc.). In the example shown in FIG. 4 , the split screen switch control 420 is currently in an on state. Both the first interface area 460 and the second interface area 470 may be rectangular in shape.
相应地,在图5所示的用户界面500中,第一目标视频的第一图像区域560和第二图像区域570可以为两个规则的显示区域。第一图像区域560的轮廓与第一用户的轮廓可以不匹配(或不对应),且第二图像区域570的轮廓与目标人物的轮廓可以不匹配(或不对应)。第一图像区域560的面积和第二图像区域570的面积例如可以对应固定比例(如1:1、1:1.5等)。结合图5所示的示例,第一图像区域560和第二图像区域570的形状均可以为矩形。也就是说,第一图像区域560、第二图像区域570均可以包括背景图像。Correspondingly, in the user interface 500 shown in FIG. 5 , the first image area 560 and the second image area 570 of the first target video may be two regular display areas. The outline of the first image area 560 may not match (or not correspond to) the outline of the first user, and the outline of the second image area 570 may not match (or not correspond to) the outline of the target person. For example, the area of the first image area 560 and the area of the second image area 570 may correspond to a fixed ratio (eg, 1:1, 1:1.5, etc.). With reference to the example shown in FIG. 5 , the shapes of the first image area 560 and the second image area 570 may both be rectangles. That is, both the first image area 560 and the second image area 570 may include a background image.
在其他示例中,在分屏开关控件420处于关闭状态的情况下,第一界面区域460的轮廓例如可以与第一用户的轮廓匹配(或对应),且第二界面区域470的轮廓例如可以与第二用户的轮廓匹配(或对应)。也就是说,第一界面区域460可以不包括如图4所示的第一视频的第一背景图像462;第二界面区域470可以不包括如图4所示的第二视频中的第 二背景图像472。In other examples, when the split-screen switch control 420 is in an off state, the outline of the first interface area 460 may match (or correspond to) the outline of the first user, and the outline of the second interface area 470 may match (or correspond to), for example, the outline of the first user. The profile of the second user matches (or corresponds). That is, the first interface area 460 may not include the first background image 462 of the first video as shown in FIG. 4 ; the second interface area 470 may not include the second background in the second video as shown in FIG. 4 . image 472.
相应地,在图6所示的示例中,该第一目标视频的第一图像区域560的轮廓可以与第一用户的轮廓匹配(或对应),且该第一目标视频的第二图像区域570的轮廓可以与第二用户的轮廓匹配(或对应)。也就是说,第一图像区域560可以不包括如图4所示的第一视频的第一背景图像462;第二图像区域570可以不包括如图4所示的第二视频中的第二背景图像472。Correspondingly, in the example shown in FIG. 6 , the contour of the first image area 560 of the first target video may match (or correspond to) the contour of the first user, and the second image area 570 of the first target video may match (or correspond to) the contour of the first user. The profile of can match (or correspond to) the profile of the second user. That is, the first image area 560 may not include the first background image 462 of the first video as shown in FIG. 4 ; the second image area 570 may not include the second background in the second video as shown in FIG. 4 . image 472.
可选的,第一目标视频可以包括第一背景图像区域580。第一背景图像区域580的像素点例如可以是默认值。第一背景图像区域580的像素点还可以与第一背景图像462、第二背景图像472、目标图库图像中的任一个对应。在一些示例中,目标图库图像可以为图库视频的一个子帧。例如,第一目标视频的某个子帧可以与目标图库图像对应,该合拍视频的多个子帧可以与该目标图库图像所在视频的多个子帧一一对应。Optionally, the first target video may include a first background image area 580 . For example, the pixel points of the first background image area 580 may be default values. The pixel points of the first background image area 580 may also correspond to any one of the first background image 462, the second background image 472, and the target gallery image. In some examples, the target gallery image may be a subframe of the gallery video. For example, a certain subframe of the first target video may correspond to a target gallery image, and multiple subframes of the co-shot video may correspond one-to-one with multiple subframes of the video where the target gallery image is located.
如图6的用户界面600所示,第一用户可以通过作用在用户界面上操作,向第一电子设备指示第一目标视频的背景对应目标图库图像。第一电子设备可以响应来自用户的指示,确定第一目标视频的第一背景图像区域580的像素点对应目标图库图像,使得如图6所示的第一目标视频可以不包括与图4所示的第一背景图像462、第二背景图像472对应的像素点。As shown in the user interface 600 of FIG. 6 , the first user can indicate to the first electronic device that the background of the first target video corresponds to the target gallery image by acting on the user interface. The first electronic device may, in response to an instruction from the user, determine that the pixels of the first background image area 580 of the first target video correspond to the target gallery image, so that the first target video shown in FIG. Pixels corresponding to the first background image 462 and the second background image 472.
可选的,当第一人物图像461与第二人物图像471在用户界面400上可能存在显示冲突时,电子设备可以优先显示第一人物图像461或第二人物图像471。换句话说,第一人物图像461可以覆盖在第二人物图像471上,或者第二人物图像471可以覆盖在第一人物图像461上。Optionally, when there may be a display conflict between the first character image 461 and the second character image 471 on the user interface 400 , the electronic device may display the first character image 461 or the second character image 471 preferentially. In other words, the first person image 461 may be overlaid on the second person image 471 , or the second person image 471 may be overlaid on the first person image 461 .
可选的,为了减少用户后期处理视频的工作量,用户可以通过作用在用户界面400上的操作,调整第一人物图像461和第二人物图像471的显示大小,进而可以调整第一用户的图像和目标人物的图像在第一目标视频中的尺寸比例。Optionally, in order to reduce the workload of post-processing the video for the user, the user can adjust the display size of the first character image 461 and the second character image 471 by operating on the user interface 400, and then adjust the image of the first user. and the size ratio of the image of the target person in the first target video.
可选的,如图4所示,用户界面400可以包括背景去除开关控件430。Optionally, as shown in FIG. 4 , the user interface 400 may include a background removal switch control 430 .
在背景去除开关控件430处于关闭状态的情况下,电子设备可以不扣除第一视频的背景和第二视频的背景,即在用户界面400上显示第一视频的背景图像和第二视频的背景图像。When the background removal switch control 430 is in an off state, the electronic device may not deduct the background of the first video and the background of the second video, that is, display the background image of the first video and the background image of the second video on the user interface 400 .
在图4所示的示例中,背景去除开关控件430当前可以处于关闭状态。第一界面区域460可以显示有第一人物图像461和第一背景图像462。第一背景图像462可以为第一用户的背景图像。第一背景图像462可以通过拍摄第一用户所在场景得到。也就是说,第一界面区域460可以包括与第一用户对应的像素点,以及与第一用户所在场景对应的像素点。第二界面区域470可以显示有第二人物图像471和第二背景图像472。第二背景图像472可以为目标人物的背景图像。也就是说,第二界面区域470可以包括与目标人物对应的像素点,以及与目标人物所在场景对应的像素点。In the example shown in FIG. 4, the background removal switch control 430 may currently be in an off state. The first interface area 460 may display a first character image 461 and a first background image 462 . The first background image 462 may be the background image of the first user. The first background image 462 may be obtained by photographing the scene where the first user is located. That is, the first interface area 460 may include pixels corresponding to the first user and pixels corresponding to the scene where the first user is located. The second interface area 470 may display a second character image 471 and a second background image 472 . The second background image 472 may be a background image of the target person. That is, the second interface area 470 may include pixels corresponding to the target character and pixels corresponding to the scene where the target character is located.
在背景去除开关控件430处于开启状态的情况下,电子设备例如可以扣除第一视频的背景和/或第二视频的背景。例如,第一电子设备可以在第一界面区域460、第二界面区域470内均显示第一视频的背景图像;又如,第一电子设备可以在第一界面区域460、第二界面区域470内均显示第二视频的背景图像;又如,第一电子设备可以在第一界面区域460、第二界面区域470内均显示除第一视频的背景图像、第二视频的背景以外的其他背 景图像;又如,第一电子设备可以在用户界面400上显示第一视频的背景图像,不显示第二视频的背景图像;又如,第一电子设备可以在用户界面400上显示第二视频的背景图像,不显示第一视频的背景图像;又如,第一电子设备可以在用户界面400上显示除第一视频的背景图像、第二视频的背景以外的其他背景图像。除第一视频的背景图像、第二视频的背景以外的其他背景图像例如可以是目标图库图像。When the background removal switch control 430 is in an on state, the electronic device may, for example, deduct the background of the first video and/or the background of the second video. For example, the first electronic device may display the background image of the first video in both the first interface area 460 and the second interface area 470; for another example, the first electronic device may display the background image in the first interface area 460 and the second interface area 470 Both display the background image of the second video; for another example, the first electronic device may display other background images except the background image of the first video and the background of the second video in the first interface area 460 and the second interface area 470. For another example, the first electronic device may display the background image of the first video on the user interface 400, but not the background image of the second video; for another example, the first electronic device may display the background of the second video on the user interface 400 image, the background image of the first video is not displayed; for another example, the first electronic device may display other background images on the user interface 400 except for the background image of the first video and the background of the second video. Other background images other than the background image of the first video and the background of the second video may be, for example, the target gallery image.
相应地,第一目标视频中的第一图像区域560可以包括第一人物图像461、第一背景图像462,第一目标视频中的第二图像区域570可以包括第二人物图像471、第一背景图像462,第一背景图像462用于充当第二人物图像471的背景;或者,第一目标视频中的第一图像区域560可以包括第一人物图像461、第二背景图像472,第一目标视频中的第二图像区域570可以包括第二人物图像471、第二背景图像472,第二背景图像472用于充当第一人物图像461的背景;或者,第一目标视频中的第一图像区域560可以包括第一人物图像461、目标图库图像,第一目标视频中的第二图像区域570可以包括第二人物图像471、目标图库图像,目标图库图像用于充当第一人物图像461、第二人物图像471的背景;或者,第一目标视频中的第一图像区域560可以包括第一人物图像461,且不包括第一背景图像462,第一目标视频中的第二图像区域570可以包括第二人物图像471,且不包括第二背景图像472;第一目标视频中的第一背景图像区域580可以包括以下任一种:第一背景图像462,第二背景图像472,目标图库图像,第一背景图像区域580可以用于充当第一图像区域560、第二图像区域570的背景。Correspondingly, the first image area 560 in the first target video may include the first person image 461 and the first background image 462, and the second image area 570 in the first target video may include the second person image 471 and the first background image 462, the first background image 462 is used to serve as the background of the second person image 471; alternatively, the first image area 560 in the first target video may include the first person image 461, the second background image 472, the first target video The second image area 570 in the video may include a second person image 471, a second background image 472, and the second background image 472 is used to serve as the background of the first person image 461; or, the first image area 560 in the first target video It may include a first person image 461 and a target gallery image, and the second image area 570 in the first target video may include a second person image 471 and a target gallery image, and the target gallery image is used to serve as the first character image 461 and the second character. The background of the image 471; alternatively, the first image area 560 in the first target video may include the first person image 461 and not include the first background image 462, and the second image area 570 in the first target video may include the second The character image 471 does not include the second background image 472; the first background image area 580 in the first target video may include any of the following: the first background image 462, the second background image 472, the target gallery image, the first The background image area 580 may be used to serve as a background for the first image area 560 and the second image area 570 .
可选的,在背景去除开关控件430处于开启状态的情况下,第一电子设备可以响应第一用户作用在用户界面400上的操作,确定在第一界面区域460、第二界面区域470或用户界面400内显示的背景图像。Optionally, in the case that the background removal switch control 430 is in an on state, the first electronic device may respond to an operation performed by the first user on the user interface 400, and determine whether the user is in the first interface area 460, the second interface area 470 or the user interface. Background image displayed within interface 400 .
可选的,在分屏开关控件420处于关闭状态的情况下,背景去除开关控件430可以处于开启状态。Optionally, when the split screen switch control 420 is in an off state, the background removal switch control 430 may be in an on state.
可选的,如图4所示,用户界面400可以包括美颜开关控件440。Optionally, as shown in FIG. 4 , the user interface 400 may include a beauty switch control 440 .
在美颜开关控件440处于开启状态的情况下,电子设备可以针对第一人物图像461和/或第二人物图像471进行人像美化。也就是说,电子设备可以在用户界面400上显示经人像美化后的第一人物图像461和/或第二人物图像471;在合成后的第一目标视频中,第一图像区域560内的人物图像和/或第二图像区域570内的人物图像可以是经过美颜处理后的图像。When the beauty switch control 440 is in an on state, the electronic device can perform portrait beautification for the first person image 461 and/or the second person image 471 . That is, the electronic device may display the first person image 461 and/or the second person image 471 after beautification of the portrait on the user interface 400; in the synthesized first target video, the person in the first image area 560 The image and/or the person image in the second image area 570 may be an image after beautification processing.
在美颜开关控件440处于关闭状态的情况下,电子设备可以不针对第一人物图像461和第二人物图像471进行人像美化。也就是说,电子设备可以根据第一用户的原始图像和目标人物的原始图像,在用户界面400可以显示第一人物图像461和第二人物图像471,第一人物图像461、第二人物图像471可以是未经美颜处理的图像。在合成后的第一目标视频中,第一图像区域560内的人物图像可以根据第一用户的原始图像得到,第二图像区域570内的人物图像可以根据目标人物的原始图像得到,即第一图像区域560内的人物图像、第二图像区域570内的人物图像可以是未经美颜处理的图像。When the beauty switch control 440 is in an off state, the electronic device may not perform portrait beautification for the first person image 461 and the second person image 471 . That is to say, the electronic device can display the first person image 461 and the second person image 471, the first person image 461 and the second person image 471 on the user interface 400 according to the original image of the first user and the original image of the target person. It can be an unbeautified image. In the synthesized first target video, the person image in the first image area 560 can be obtained from the original image of the first user, and the person image in the second image area 570 can be obtained from the original image of the target person. The person image in the image area 560 and the person image in the second image area 570 may be images without beauty treatment.
可选的,如图所示,用户界面400还可以包括滤镜开关控件450。Optionally, as shown in the figure, the user interface 400 may further include a filter switch control 450 .
在滤镜开关控件450处于开启状态的情况下,电子设备可以针对第一视频的图像和/或第二视频的图像进行滤镜美化。也就是说,电子设备可以在用户界面400上显示经滤镜 美化后的第一视频的图像和/或第一视频的图像;并且,在合成后的第一目标视频中,第一图像区域560内的图像和/或第二图像区域570内的图像可以是经过滤镜处理后的图像。When the filter switch control 450 is in an on state, the electronic device may perform filter beautification for the image of the first video and/or the image of the second video. That is, the electronic device may display the image of the first video and/or the image of the first video after beautification by the filter on the user interface 400; and, in the synthesized first target video, the first image area 560 The image within and/or the image within the second image area 570 may be a filtered image.
在滤镜开关控件450处于关闭状态的情况下,电子设备可以不针对第一人物图像461和第二人物图像471进行滤镜美化。也就是说,电子设备可以根据第一视频的原始图像和第二视频的原始图像,在用户界面400内显示未经滤镜处理的图像;在合成后的第一目标视频中,第一图像区域560内的图像可以根据第一视频的原始图像得到,第二图像区域570内的图像可以根据第二第一视频的原始图像得到,即第一目标视频可以不包括经过滤镜处理的图像。When the filter switch control 450 is in an off state, the electronic device may not perform filter beautification for the first person image 461 and the second person image 471 . That is to say, the electronic device can display the unfiltered image in the user interface 400 according to the original image of the first video and the original image of the second video; in the synthesized first target video, the first image area The image in 560 can be obtained from the original image of the first video, and the image in the second image area 570 can be obtained from the original image of the second first video, that is, the first target video may not include filtered images.
在一个示例中,在第一视频拍摄结束后,第一电子设备可以根据第一视频和第二视频,通过本申请实施例提供的处理视频的方法,对第一视频或第一目标视频进行处理,得到如图5、图6所示的第一目标视频。在另一个示例中,电子设备可以同时进行第一视频的拍摄和对第一视频的处理。本申请实施例可以不限定处理视频的具体步骤顺序。下面结合图7、图8,阐述本申请实施例提供的处理视频的方法。In an example, after the shooting of the first video is completed, the first electronic device may process the first video or the first target video according to the first video and the second video by using the video processing method provided in the embodiment of the present application , the first target video shown in Figure 5 and Figure 6 is obtained. In another example, the electronic device may simultaneously perform the shooting of the first video and the processing of the first video. This embodiment of the present application may not limit the specific sequence of steps for processing video. The following describes the video processing method provided by the embodiment of the present application with reference to FIG. 7 and FIG. 8 .
第一电子设备可以根据第一视频,提取第一动作文件。动作文件可以指示在一段视频的多个帧中,人物的多个肢体在图像上的相对位置,进而反映该人物在视频中的动作信息。根据前文可知,第一视频可以包括或提取得到第一人物子视频。第一人物子视频可以包括多个第一子帧。第一动作文件可以包括与多个第一子帧一一对应的第一动作子文件。每个第一子帧可以包含第一用户的一个动作。如图7所示,710示出了第一人物子视频的一个第一子帧A。第一用户在该第一子帧A中做出的动作可以为第一动作A。711示出了与该第一动作A对应的第一动作子文件A。The first electronic device may extract the first action file according to the first video. The action file can indicate the relative positions of the multiple limbs of the character on the image in multiple frames of a video, thereby reflecting the action information of the character in the video. It can be known from the foregoing that the first video may include or be extracted to obtain a sub-video of the first person. The first person sub-video may include a plurality of first sub-frames. The first action file may include first action subfiles corresponding to the plurality of first subframes one-to-one. Each first subframe may contain one action of the first user. As shown in FIG. 7, 710 shows a first subframe A of the first person sub-video. The action performed by the first user in the first subframe A may be the first action A. 711 shows the first action sub-file A corresponding to the first action A.
第一电子设备例如可以根据以下至少两项之间的位置关系或坐标,确定第一动作子文件A:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。The first electronic device may, for example, determine the first action sub-file A according to the positional relationship or coordinates between the following at least two items: the first head pixel, the first neck pixel, the first torso pixel, the first upper left pixel Forelimb pixel point, first left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point, first right lower forelimb pixel point, first right Lower hindlimb pixels, first left-hand pixel, and first right-hand pixel.
其中,第一头部像素点可以为与第一用户的头部对应的像素点。第一颈部像素点可以为与第一用户的颈部对应的像素点。第一躯干像素点可以为与第一用户的躯干对应的像素点。第一左上前肢像素点可以为与第一用户的左上前肢对应的像素点。第一左上后肢像素点可以为与第一用户的左上后肢对应的像素点。第一左下前肢像素点可以为与第一用户的左下前肢对应的像素点。第一左下后肢像素点可以为与第一用户的左下后肢对应的像素点。第一右上前肢像素点可以为与第一用户的右上前肢对应的像素点。第一右上后肢像素点可以为与第一用户的右上后肢对应的像素点。第一右下前肢像素点可以为与第一用户的右下前肢对应的像素点。第一右下后肢像素点可以为与第一用户的右下后肢对应的像素点。第一左手像素点可以为与第一用户的左手对应的像素点。第一右手像素点可以为与第一用户的右手对应的像素点。第一动作子文件可以为反映或指示或描述或对应第一动作的数据。The first head pixel point may be a pixel point corresponding to the head of the first user. The first neck pixel point may be a pixel point corresponding to the neck of the first user. The first torso pixel point may be a pixel point corresponding to the torso of the first user. The first upper left forelimb pixel point may be a pixel point corresponding to the upper left forelimb of the first user. The pixel point of the first upper left hind limb may be a pixel point corresponding to the upper left hind limb of the first user. The first lower left forelimb pixel point may be a pixel point corresponding to the lower left forelimb of the first user. The pixel point of the first lower left hind limb may be a pixel point corresponding to the lower left hind limb of the first user. The pixel point of the first upper right forelimb may be a pixel point corresponding to the upper right forelimb of the first user. The pixel point of the first upper right hind limb may be a pixel point corresponding to the upper right hind limb of the first user. The first lower right forelimb pixel point may be a pixel point corresponding to the first user's lower right forelimb. The pixel point of the first lower right hind limb may be a pixel point corresponding to the lower right hind limb of the first user. The first left-hand pixel point may be a pixel point corresponding to the left hand of the first user. The first right-hand pixel point may be a pixel point corresponding to the right hand of the first user. The first action sub-file may be data reflecting or indicating or describing or corresponding to the first action.
在一个示例中,如图7所示,多个像素点可以被近似拟合成线段。线段的类型例如可以包括以下一种或多种:头部线段、颈部线段、躯干线段、左上前肢线段、左上后肢线段、左下肢线段、左下前肢线段、左下后肢线段、右上前肢线段、右上后肢线段、右下前肢线 段、右下后肢线段、左手线段、右手线段。动作子文件例如可以包括由像素点拟合得到的线段的数据。In one example, as shown in FIG. 7 , a plurality of pixel points can be approximately fitted into line segments. The type of line segment may include, for example, one or more of the following: head line segment, neck line segment, trunk line segment, left upper forelimb line segment, left upper hindlimb line segment, left lower limb line segment, left lower forelimb line segment, left lower hindlimb line segment, right upper forelimb line segment, right upper hindlimb line segment Line segment, right lower forelimb line segment, right lower hindlimb line segment, left hand line segment, right hand line segment. The action sub-file may include, for example, data of line segments fitted by pixel points.
两种类型像素点之间的位置关系,可以对应两种拟合线段之间的角度、距离等信息。例如,类型1像素点可以拟合为线段1,类型2像素点可以拟合为线段2。线段1的长度可以反映类型1像素点的相对数量;线段2的长度可以反映类型2像素点的相对数量。类型1像素点与类型2像素点之间的位置关系,可以对应线段1与线段2之间的角度、距离等信息。在本申请中,角度值为负,可以指该肢体向左倾斜;角度值为正,可以指该肢体向右倾斜。角度的绝对值越大,可以认为该肢体倾斜的程度越大。The positional relationship between the two types of pixel points can correspond to information such as the angle and distance between the two fitted line segments. For example, type 1 pixels can be fitted to line segment 1, and type 2 pixels can be fitted to line segment 2. The length of line segment 1 can reflect the relative number of type 1 pixels; the length of line segment 2 can reflect the relative number of type 2 pixels. The positional relationship between the type 1 pixel point and the type 2 pixel point may correspond to information such as the angle and distance between the line segment 1 and the line segment 2. In this application, a negative angle value may mean that the limb is inclined to the left; a positive angle value may mean that the limb is inclined to the right. The larger the absolute value of the angle, the more tilted the limb can be considered to be.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括举起右上肢。第一右上后肢像素点与第一躯干像素点之间的相对位置关系,以及第一右上前置像素点与第一右上后肢像素点之间的相对位置关系,可以反映,在第一动作A中,第一用户的右上后肢的举起角度为第一右后上肢角度,第一用户的右上前肢的举起角度为第一右前上肢角度。如图7所示,第一右上后肢角度例如可以约为85°,第一右上前肢角度例如可以约为-10°。也就是说,第一用户的在其他示例中,第一右上前肢角度可以根据第一右上前肢像素点和第一躯干像素点确定。在此情况下,第一右上前肢角度例如可以约为75°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include raising the right upper limb. The relative positional relationship between the first upper right hindlimb pixel point and the first torso pixel point, as well as the relative positional relationship between the first upper right frontal pixel point and the first right upper hindlimb pixel point, can reflect that in the first action A , the lifting angle of the upper right hind limb of the first user is the first right rear upper limb angle, and the lifting angle of the first user's right upper fore limb is the first right front upper limb angle. As shown in FIG. 7 , the first right upper hind limb angle may be, for example, about 85°, and the first right upper fore limb angle may be, for example, about -10°. That is, in other examples of the first user, the first upper right forelimb angle may be determined according to the first upper right forelimb pixel point and the first torso pixel point. In this case, the first right upper forelimb angle may be, for example, about 75°.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括举起左上肢。第二左上后肢像素点与第一躯干像素点之间的相对位置关系,以及第一左上前置像素点与第一左上后肢像素点之间的相对位置关系,可以反映,在第一动作A中,第一用户的左上后肢的举起角度为第一左上后肢角度,第一用户的左上前肢的举起角度为第一左上前肢角度。如图7所示,第一左上后肢角度例如可以略小于-90°,第一左上前肢角度例如可以约为-45°。在其他示例中,第一左上前肢角度可以根据第一左上前肢像素点和第一躯干像素点确定。在此情况下,第一左上前肢角度例如可以约为-135°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include raising the upper left limb. The relative positional relationship between the pixels of the second upper left hind limb and the pixels of the first torso, as well as the relative positional relationship between the pixels of the first upper left front and the pixels of the first upper left hindlimb, can reflect that in the first action A , the lift angle of the left upper hind limb of the first user is the first left upper hind limb angle, and the lift angle of the first user's left upper fore limb is the first left upper fore limb angle. As shown in FIG. 7 , the angle of the first upper left hind limb may be, for example, slightly less than -90°, and the angle of the first upper left front limb may be, for example, about -45°. In other examples, the first upper left forelimb angle may be determined according to the first upper left forelimb pixel point and the first torso pixel point. In this case, the first upper left forelimb angle may be, for example, about -135°.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括举起右下肢。第一右下后肢像素点与第一躯干像素点之间的相对位置关系,以及第一右下前置像素点与第一右下后肢像素点之间的相对位置关系,可以反映,在第一动作A中,第一用户的右下后肢的举起角度为第一右后下肢角度,第一用户的右下前肢的举起角度为第一右前下肢角度。如图7所示,第一右下后肢角度例如可以约为60°,第一右下前肢角度例如可以约为0°。在其他示例中,第一右下前肢角度可以根据第一右下前肢像素点和第一躯干像素点确定。在此情况下,第一右下前肢角度例如可以约为60°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include raising the right lower limb. The relative positional relationship between the pixels of the first lower right hindlimb and the first torso, as well as the relative positional relationship between the pixels of the first lower right front and the first lower right hindlimb, can reflect that in the first In Action A, the lifting angle of the first user's lower right hind limb is the first right rear lower limb angle, and the lifting angle of the first user's right lower fore limb is the first right front lower limb angle. As shown in FIG. 7 , the first right lower hind limb angle may be, for example, about 60°, and the first right lower fore limb angle may be, for example, about 0°. In other examples, the first right lower forelimb angle may be determined according to the first right lower forelimb pixel point and the first torso pixel point. In this case, the first right lower forelimb angle may be, for example, about 60°.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括不举起左下肢。第二左下后肢像素点与第一躯干像素点之间的相对位置关系,以及第一左下前置像素点与第一左下后肢像素点之间的相对位置关系,可以反映,在第一动作A中,第一用户的左下后肢的举起角度为第一左下后肢角度,第一用户的左下前肢的举起角度为第一左下前肢角度。如图7所示,第一左下后肢角度例如可以约为-5°,第一左下前肢角度例如可以约为5°。在其他示例中,第一左下前肢角度可以根据第一左下前肢像素点和第一躯干像素点确定。在此情况下,第一左下前肢角度例如可以约为0°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include not raising the left lower limb. The relative positional relationship between the pixels of the second lower left hind limb and the pixels of the first torso, as well as the relative positional relationship between the pixels of the first lower left front and the pixels of the first lower left hindlimb, can reflect that in the first action A , the lifting angle of the left lower hind limb of the first user is the first left lower hind limb angle, and the lifting angle of the first user's left lower fore limb is the first left lower fore limb angle. As shown in FIG. 7 , the first left lower hind limb angle may be, for example, about -5°, and the first left lower fore limb angle may be, for example, about 5°. In other examples, the first left lower forelimb angle may be determined according to the first left lower forelimb pixel point and the first torso pixel point. In this case, the first left lower forelimb angle may be, for example, about 0°.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括歪扭颈部。第一颈部像素点与第一躯干像素点之间的相对位置关系可以反映,在第一动 作A中,颈部歪扭的角度为第一颈部角度。如图7所示,第一颈部角度例如可以约为5°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include twisting the neck. The relative positional relationship between the first neck pixel point and the first torso pixel point can reflect that, in the first action A, the angle of the neck twist is the first neck angle. As shown in FIG. 7 , the first neck angle may be, for example, about 5°.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括歪扭头部。第一头部像素点与第一颈部像素点之间的相对位置关系可以反映,在第一动作A中,头部歪扭的角度为第一头部角度。如图7所示,第一头部角度例如可以约为15°。在其他示例中,第一头部角度可以根据第一头部像素点和第一躯干像素点确定。在此情况下,第一头部角度例如可以约为20°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include twisting his head. The relative positional relationship between the first head pixel point and the first neck pixel point can reflect that, in the first action A, the angle of the head twist is the first head angle. As shown in FIG. 7 , the first head angle may be about 15°, for example. In other examples, the first head angle may be determined according to the first head pixels and the first torso pixels. In this case, the first head angle may be about 20°, for example.
在图7所示的示例中,第一动作子文件A可以反映,第一用户的第一动作A可以包括不倾斜躯干。第一躯干像素点与中垂线(中垂线可以相对于地平线垂直)之间的相对位置关系可以反映,在第一动作A中躯干倾斜的角度为第一躯干角度。如图7所示,第一躯干角度例如可以约为0°。In the example shown in FIG. 7 , the first action sub-file A may reflect that the first action A of the first user may include not leaning the torso. The relative positional relationship between the first torso pixel point and the mid-vertical line (the mid-vertical line may be perpendicular to the horizon) may reflect that the angle at which the torso is inclined in the first action A is the first torso angle. As shown in FIG. 7 , the first torso angle may be about 0°, for example.
可选的,第一动作子文件A可以反映,第一左手角度和/或第一右手角度。Optionally, the first action sub-file A may reflect the first left-hand angle and/or the first right-hand angle.
例如,第一左手角度可以反映第一左手与第一左上前肢之间的角度。第一左手角度例如可以根据第一左手像素点与第一左上前肢像素点得到。For example, the first left hand angle may reflect the angle between the first left hand and the first upper left forelimb. The first left-hand angle can be obtained, for example, according to the first left-hand pixel point and the first left upper forelimb pixel point.
又如,第一左手角度可以反映第一左手与第一躯干之间的角度。可以根据第一左手像素点与第一躯干像素点得到。For another example, the first left hand angle may reflect the angle between the first left hand and the first torso. It can be obtained from the first left-hand pixel and the first torso pixel.
例如,第一右手角度可以反映第一右手与第一右上前肢之间的角度。第一右手角度例如可以根据第一右手像素点与第一右上前肢像素点得到。For example, the first right hand angle may reflect the angle between the first right hand and the first right upper forelimb. The first right hand angle can be obtained, for example, according to the first right hand pixel point and the first right upper forelimb pixel point.
又如,第一右手角度可以反映第一右手与第一躯干之间的角度。可以根据第一右手像素点与第一躯干像素点得到。For another example, the first right hand angle may reflect the angle between the first right hand and the first torso. It can be obtained from the first right hand pixel and the first torso pixel.
应理解,本申请实施例通过图7所示的示例,阐述第一用户的一种可能的动作。本申请实施例无意于限定第一动作的具体内容。It should be understood that, in this embodiment of the present application, a possible action of the first user is described by using the example shown in FIG. 7 . The embodiments of the present application are not intended to limit the specific content of the first action.
第一电子设备可以根据第二视频,提取第二动作文件。根据前文可知,第二视频可以包括或提取得到第二人物子视频。第二人物子视频可以包括多个第二子帧。第二动作文件可以包括与多个第二子帧一一对应的第二动作子文件。每个第二子帧可以包含目标人物的一个动作。如图7所示,720示出了第二人物子视频的一个第二子帧a。目标人物在该第二子帧a中做出的动作可以为第二动作a。721示出了与该第二动作a对应的第二动作子文件a。The first electronic device may extract the second action file according to the second video. It can be known from the foregoing that the second video may include or be extracted to obtain a sub-video of the second person. The second person sub-video may include a plurality of second sub-frames. The second action file may include second action subfiles corresponding to the plurality of second subframes one-to-one. Each second subframe may contain an action of the target character. As shown in FIG. 7, 720 shows a second subframe a of the second person sub-video. The action made by the target person in the second subframe a may be the second action a. 721 shows the second action sub-file a corresponding to the second action a.
第二电子设备例如可以根据以下至少两项之间的位置关系或坐标,确定第二动作子文件a:第二头部像素点、第二颈部像素点、第二躯干像素点、第二左上前肢像素点、第二左上后肢像素点、第二左下前肢像素点、第二左下后肢像素点、第二右上前肢像素点、第二右上后肢像素点、第二右下前肢像素点、第二右下后肢像素点、第二左手像素点、第二右手像素点。For example, the second electronic device may determine the second action sub-file a according to the positional relationship or coordinates between at least two of the following: the second head pixel, the second neck pixel, the second torso pixel, the second upper left pixel Forelimb pixels, second upper left hindlimb pixel, second left lower forelimb pixel, second left lower hindlimb pixel, second right upper forelimb pixel, second right upper hindlimb pixel, second right lower forelimb pixel, second right Lower hindlimb pixels, second left-hand pixel, second right-hand pixel.
其中,第二头部像素点可以为与目标人物的头部对应的像素点。第二颈部像素点可以为与目标人物的颈部对应的像素点。第二躯干像素点可以为与目标人物的躯干对应的像素点。第二左上前肢像素点可以为与目标人物的左上前肢对应的像素点。第二左上后肢像素点可以为与目标人物的左上后肢对应的像素点。第二左下前肢像素点可以为与目标人物的左下前肢对应的像素点。第二左下后肢像素点可以为与目标人物的左下后肢对应的像素点。第二右上前肢像素点可以为与目标人物的右上前肢对应的像素点。第二右上后肢像素点可以为与目标人物的右上后肢对应的像素点。第二右下前肢像素点可以为与目标人物的 右下前肢对应的像素点。第二右下后肢像素点可以为与目标人物的右下后肢对应的像素点。第二左手像素点可以为与目标人物的左手对应的像素点。第二右手像素点可以为与目标人物的右手对应的像素点。第二动作子文件可以为反映或指示或描述或对应第二动作的数据。如上所述,不同类型的像素点之间的位置关系、数量关系等,可以反映目标人物的动作方向、动作角度、动作幅度等。Wherein, the second head pixel point may be a pixel point corresponding to the head of the target person. The second neck pixel point may be a pixel point corresponding to the neck of the target person. The second torso pixel point may be a pixel point corresponding to the torso of the target person. The second upper left forelimb pixel point may be a pixel point corresponding to the upper left forelimb of the target person. The second upper left hind limb pixel point may be a pixel point corresponding to the left upper hind limb of the target person. The second left lower forelimb pixel point may be a pixel point corresponding to the left lower forelimb of the target person. The second lower left hind limb pixel point may be a pixel point corresponding to the left lower hind limb of the target person. The second upper right forelimb pixel point may be a pixel point corresponding to the upper right forelimb of the target person. The second upper right hindlimb pixel point may be a pixel point corresponding to the upper right hindlimb of the target person. The second right lower forelimb pixel point may be a pixel point corresponding to the target person's lower right forelimb. The second lower right hindlimb pixel point may be a pixel point corresponding to the lower right hindlimb of the target person. The second left-hand pixel point may be a pixel point corresponding to the left hand of the target person. The second right-hand pixel point may be a pixel point corresponding to the right hand of the target person. The second action subfile may be data reflecting or indicating or describing or corresponding to the second action. As mentioned above, the positional relationship, quantity relationship, etc. between different types of pixels can reflect the action direction, action angle, action range, etc. of the target person.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括举起右上肢。第二右上后肢像素点与第二躯干像素点之间的相对位置关系,以及第二右上前置像素点与第二右上后肢像素点之间的相对位置关系,可以反映,在第二动作a中,目标人物的右上后肢的举起角度为第二右后上肢角度,目标人物的右上前肢的举起角度为第二右前上肢角度。如图7所示,第二右上后肢角度例如可以约为60°,第二右上前肢角度例如可以约为30°。也就是说,目标人物的在其他示例中,第二右上前肢角度可以根据第二右上前肢像素点和第二躯干像素点确定。在此情况下,第二右上前肢角度例如可以约为90°。In the example shown in FIG. 7 , the second action sub-file a may reflect that the second action a of the target person may include raising the right upper limb. The relative positional relationship between the second upper right hindlimb pixel point and the second torso pixel point, as well as the relative positional relationship between the second upper right frontal pixel point and the second right upper hindlimb pixel point, can reflect that in the second action a , the lifting angle of the upper right hind limb of the target person is the second right rear upper limb angle, and the lifting angle of the target person's upper right forelimb is the second right front upper limb angle. As shown in FIG. 7 , the angle of the second upper right hind limb may be, for example, about 60°, and the angle of the second upper right front limb may be, for example, about 30°. That is, in other examples of the target person, the second upper right forelimb angle may be determined according to the second upper right forelimb pixel point and the second torso pixel point. In this case, the second upper right forelimb angle may be, for example, about 90°.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括举起左上肢。第二左上后肢像素点与第二躯干像素点之间的相对位置关系,以及第二左上前置像素点与第二左上后肢像素点之间的相对位置关系,可以反映,在第二动作a中,目标人物的左上后肢的举起角度为第二左上后肢角度,目标人物的左上前肢的举起角度为第二左上前肢角度。如图7所示,第二左上后肢角度例如可以略小于-135°,第二左上前肢角度例如可以约为-15°。在其他示例中,第二左上前肢角度可以根据第二左上前肢像素点和第二躯干像素点确定。在此情况下,第二左上前肢角度例如可以约为-150°。In the example shown in FIG. 7 , the second action subfile a may reflect that the second action a of the target person may include raising the upper left limb. The relative positional relationship between the pixels of the second upper left hindlimb and the second torso, as well as the relative positional relationship between the pixels of the second upper left front and the second upper left hindlimb, can reflect that in the second action a , the lifting angle of the upper left hind limb of the target person is the second upper left hind limb angle, and the lifting angle of the upper left front limb of the target person is the second upper left forelimb angle. As shown in FIG. 7 , the angle of the second upper left hind limb may be, for example, slightly less than -135°, and the angle of the second upper left fore limb may be, for example, about -15°. In other examples, the second upper left forelimb angle may be determined according to the second upper left forelimb pixel point and the second torso pixel point. In this case, the second upper left forelimb angle may be, for example, about -150°.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括举起右下肢。第二右下后肢像素点与第二躯干像素点之间的相对位置关系,以及第二右下前置像素点与第二右下后肢像素点之间的相对位置关系,可以反映,在第二动作a中,目标人物的右下后肢的举起角度为第二右后下肢角度,目标人物的右下前肢的举起角度为第二右前下肢角度。如图7所示,第二右下后肢角度例如可以约为60°,第二右下前肢角度例如可以约为0°。在其他示例中,第二右下前肢角度可以根据第二右下前肢像素点和第二躯干像素点确定。在此情况下,第二右下前肢角度例如可以约为60°。In the example shown in FIG. 7 , the second action sub-file a may reflect that the second action a of the target person may include raising the right lower limb. The relative positional relationship between the pixels of the second lower right hindlimb and the second torso, as well as the relative positional relationship between the pixels of the second lower right front and the second lower right hindlimb, can reflect that in the second In action a, the lifting angle of the lower right hind limb of the target person is the second right rear lower limb angle, and the lifting angle of the target person's lower right fore limb is the second right front lower limb angle. As shown in FIG. 7 , the second right lower hind limb angle may be, for example, about 60°, and the second right lower front limb angle may be, for example, about 0°. In other examples, the second lower right forelimb angle may be determined according to the second lower right forelimb pixel point and the second torso pixel point. In this case, the second right lower forelimb angle may be, for example, about 60°.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括不举起左下肢。第二左下后肢像素点与第二躯干像素点之间的相对位置关系,以及第二左下前置像素点与第二左下后肢像素点之间的相对位置关系,可以反映,在第二动作a中,目标人物的左下后肢的举起角度为第二左下后肢角度,目标人物的左下前肢的举起角度为第二左下前肢角度。如图7所示,第二左下后肢角度例如可以约为0°,第二左下前肢角度例如可以约为0°。在其他示例中,第二左下前肢角度可以根据第二左下前肢像素点和第二躯干像素点确定。在此情况下,第二左下前肢角度例如可以约为0°。In the example shown in FIG. 7 , the second action subfile a may reflect that the second action a of the target person may include not raising the left lower limb. The relative positional relationship between the pixels of the second lower left hind limb and the second torso, as well as the relative positional relationship between the pixels of the second lower left front and the second lower left hindlimb, can reflect that in the second action a , the raising angle of the lower left hind limb of the target person is the second lower left hind limb angle, and the raising angle of the lower left front limb of the target person is the second lower left front limb angle. As shown in FIG. 7 , the second left lower hind limb angle may be, for example, about 0°, and the second left lower fore limb angle may be, for example, about 0°. In other examples, the second left lower forelimb angle may be determined according to the second left lower forelimb pixel point and the second torso pixel point. In this case, the second left lower forelimb angle may be approximately 0°, for example.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括歪扭颈部。第二颈部像素点与第二躯干像素点之间的相对位置关系可以反映,在第二动作a中,颈部歪扭的角度为第二颈部角度。如图7所示,第二颈部角度例如可以约为30°。In the example shown in FIG. 7 , the second action sub-file a may reflect that the second action a of the target person may include twisting the neck. The relative positional relationship between the second neck pixel point and the second torso pixel point may reflect that, in the second action a, the angle of the neck twist is the second neck angle. As shown in FIG. 7 , the second neck angle may be, for example, about 30°.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括歪扭头部。第二头部像素点与第二颈部像素点之间的相对位置关系可以反映,在第二动作 a中,头部歪扭的角度为第二头部角度。如图7所示,第二头部角度例如可以约为0°。在其他示例中,第二头部角度可以根据第二头部像素点和第二躯干像素点确定。在此情况下,第二头部角度例如可以约为30°。In the example shown in FIG. 7 , the second action sub-file a may reflect that the second action a of the target person may include twisting his head. The relative positional relationship between the second head pixel point and the second neck pixel point can reflect that, in the second action a, the angle of the head twist is the second head angle. As shown in FIG. 7 , the second head angle may be about 0°, for example. In other examples, the second head angle may be determined from the second head pixels and the second torso pixels. In this case, the second head angle may be about 30°, for example.
在图7所示的示例中,第二动作子文件a可以反映,目标人物的第二动作a可以包括不倾斜躯干。第二躯干像素点与中垂线(中垂线可以相对于地平线垂直)之间的相对位置关系可以反映,在第二动作a中躯干倾斜的角度为第二躯干角度。如图7所示,第二躯干角度例如可以约为-5°。In the example shown in FIG. 7 , the second action sub-file a may reflect that the second action a of the target person may include not leaning the torso. The relative positional relationship between the second torso pixel point and the mid-perpendicular line (the mid-perpendicular line may be perpendicular to the horizon) may reflect that the angle at which the torso is inclined in the second action a is the second torso angle. As shown in FIG. 7, the second torso angle may be, for example, about -5°.
可选的,第二动作子文件a可以反映,第二左手角度和/或第二右手角度。Optionally, the second action sub-file a may reflect the second left-hand angle and/or the second right-hand angle.
例如,第二左手角度可以反映第二左手与第二左上前肢之间的角度。第二左手角度例如可以根据第二左手像素点与第二左上前肢像素点得到。For example, the second left hand angle may reflect the angle between the second left hand and the second upper left forelimb. For example, the second left-hand angle can be obtained according to the second left-hand pixel point and the second left upper forelimb pixel point.
又如,第二左手角度可以反映第二左手与第二躯干之间的角度。可以根据第二左手像素点与第二躯干像素点得到。For another example, the second left hand angle may reflect the angle between the second left hand and the second torso. It can be obtained from the second left hand pixel and the second torso pixel.
例如,第二右手角度可以反映第二右手与第二右上前肢之间的角度。第二右手角度例如可以根据第二右手像素点与第二右上前肢像素点得到。For example, the second right hand angle may reflect the angle between the second right hand and the second upper right forelimb. For example, the second right-hand angle can be obtained according to the second right-hand pixel point and the second right upper forelimb pixel point.
又如,第二右手角度可以反映第二右手与第二躯干之间的角度。可以根据第二右手像素点与第二躯干像素点得到。As another example, the second right hand angle may reflect the angle between the second right hand and the second torso. It can be obtained from the second right hand pixel and the second torso pixel.
结合图7的示例可知,第一用户的动作和目标人物的动作相似度比较高,但是二者仍有差异:第一右上前肢角度例如可以约为-10°,第二右上前肢角度例如可以约为30°。第一右上后肢角度例如可以约为85°,第二右上后肢角度例如可以约为60°。第一左上前肢角度例如可以约为-45°,第二左上前肢角度例如可以约为-15°。第一左上后肢角度例如可以略小于-90°,第二左上后肢角度例如可以约为-135°。第一右下前肢角度例如可以约为0°,第二右下前肢角度例如可以约为0°。第一右下后肢角度例如可以约为60°,第二右下后肢角度例如可以约为60°。第一左下前肢角度例如可以约为5°,第二左下前肢角度例如可以约为0°。第一左下后肢角度例如可以约为-5°,第二左下后肢角度例如可以约为0°。第一颈部角度例如可以约为5°。第二颈部角度例如可以约为30°。第一头部角度例如可以约为15°。第二头部角度例如可以约为30°。第一躯干角度例如可以约为0°。第二躯干角度例如可以约为-5°。With reference to the example in FIG. 7, it can be seen that the motion of the first user and the motion of the target person are relatively similar, but there are still differences between the two: the angle of the first upper right forelimb can be, for example, about -10°, and the angle of the second upper right forelimb, for example, can be about is 30°. The first right upper hindlimb angle may be, for example, about 85°, and the second right upper hindlimb angle may be, for example, about 60°. The first upper left forelimb angle may be, for example, about -45°, and the second upper left forelimb angle may be, for example, about -15°. The first upper left hind limb angle may be, for example, slightly less than -90°, and the second upper left hind limb angle may be, for example, about -135°. The first right lower forelimb angle may be, for example, about 0°, and the second right lower forelimb angle may be, for example, about 0°. The first right lower hindlimb angle may be, for example, about 60°, and the second right lower hindlimb angle may be, for example, about 60°. The first left lower forelimb angle may be, for example, about 5°, and the second left lower forelimb angle may be, for example, about 0°. The first left lower hindlimb angle may be, for example, about -5°, and the second left lower hindlimb angle may be, for example, about 0°. The first neck angle may be about 5°, for example. The second neck angle may be about 30°, for example. The first head angle may be approximately 15°, for example. The second head angle may be approximately 30°, for example. The first torso angle may be approximately 0°, for example. The second torso angle may be about -5°, for example.
将第一动作A与第二动作a比较,至少可以得出:第一右前上肢角度可以不同于第二右上前肢角度;第一右上后肢角度可以不同于第二右上后肢角度;第一左上前肢角度可以不同于第二左上前肢角度;第一左上后肢角度可以不同于第二左上后肢角度;第一左下前肢角度可以不同于第二左下前肢角度;第一左下后肢角度可以不同于第二左下后肢角度;第一颈部角度可以不同于第二颈部角度;第一头部角度可以不同于第二头部角度;第一躯干角度可以不同于第二躯干角度。Comparing the first action A with the second action a, at least it can be concluded that the angle of the first upper right upper limb may be different from the angle of the second upper right forelimb; the angle of the first upper right hind limb may be different from the angle of the second upper right hind limb; the angle of the first upper left forearm may be different from that of the second upper right hind limb. can be different from the second upper left forelimb angle; the first left upper hindlimb angle can be different from the second left upper hindlimb angle; the first left lower forelimb angle can be different from the second left lower forelimb angle; the first left lower hindlimb angle can be different from the second left lower hindlimb angle ; the first neck angle can be different from the second neck angle; the first head angle can be different from the second head angle; the first torso angle can be different from the second torso angle.
第一电子设备可以根据第二动作子文件a,调整第一子帧中的像素点,第一动作子文件A也可以被相应调整,从而处理后的第一视频所对应的动作子文件与第二动作子文件a可以尽可能相似或对应。The first electronic device can adjust the pixels in the first subframe according to the second action subfile a, and the first action subfile A can also be adjusted accordingly, so that the action subfile corresponding to the processed first video is the same as the first action subfile A. The two action subfiles a can be as similar or corresponding as possible.
例如,在图7所示的示例中,第一电子设备可以通过调整第一子帧中的像素点,使得:第一右前上肢角度可以等同或近似等同于第二右上前肢角度;第一右上后肢角度可以等同或近似等同于第二右上后肢角度;第一左上前肢角度可以等同或近似等同于第二左上前肢 角度;第一左上后肢角度可以等同或近似等同于第二左上后肢角度;第一左下前肢角度可以等同或近似等同于第二左下前肢角度;第一左下后肢角度可以等同或近似等同于第二左下后肢角度;第一颈部角度可以等同或近似等同于第二颈部角度;第一头部角度可以等同或近似等同于第二头部角度;第一躯干角度可以等同或近似等同于第二躯干角度。进而,在处理后的第一子帧中的第一动作a可以与第二视频中的第一动作A尽可能相似或对应。For example, in the example shown in FIG. 7 , the first electronic device may adjust the pixels in the first subframe so that: the first right upper right upper limb angle can be equal to or approximately equal to the second right upper forelimb angle; the first right upper hind limb angle The angle may be equal or approximately equal to the second upper right hind limb angle; the first left upper forelimb angle may be equal or approximately equal to the second left upper forelimb angle; the first left upper hind limb angle may be equal or approximately equal to the second left upper hind limb angle; The forelimb angle may be equal or approximately equal to the second left lower forelimb angle; the first left lower hind leg angle may be equal or approximately equal to the second left lower hind leg angle; the first neck angle may be equal or approximately equal to the second neck angle; the first The head angle may be identical or approximately identical to the second head angle; the first torso angle may be identical or approximately identical to the second torso angle. Furthermore, the first action a in the processed first subframe may be as similar or corresponding to the first action A in the second video as possible.
第一电子设备可以输出处理后的第一子帧,如图7中的730所示。可以看出,调整后的第一用户的动作可以与目标人物的动作更加相似。也就是说,通过图7所示的方法,可以调整第一视频中用户的动作角度、动作方向、动作幅度等,进而有利于提高第一用户与目标人物之间的动作匹配度。The first electronic device may output the processed first subframe, as shown by 730 in FIG. 7 . It can be seen that the adjusted action of the first user may be more similar to the action of the target character. That is to say, through the method shown in FIG. 7 , the action angle, action direction, action range, etc. of the user in the first video can be adjusted, thereby helping to improve the action matching degree between the first user and the target person.
第一电子设备可以根据上述第一动作子文件A、上述第二动作子文件a,比较第一用户子视频的尺寸与第二用户子视频的播放尺寸。例如,根据头部像素点、颈部像素点、躯干像素点、左上肢像素点、左下肢像素点、右上肢像素点、右下肢像素点、左手像素点、右手像素点中的至少一种,可以拟合得到一个或多个线段。第一电子设备可以根据该一个或多个线段的长度,确定用户子视频的尺寸。The first electronic device may compare the size of the first user sub-video with the playback size of the second user sub-video according to the first action sub-file A and the second action sub-file a. For example, according to at least one of head pixels, neck pixels, torso pixels, left upper body pixels, left lower body pixels, right upper body pixels, right lower body pixels, left hand pixels, and right hand pixels, One or more line segments can be fitted. The first electronic device may determine the size of the user sub-video according to the length of the one or more line segments.
在图7所示的示例中,第一用户子视频的尺寸可以相对较小,第二用户子视频的尺寸可以相对较大。第一电子设备可以调整通过调整第一用户子视频中的像素点,以使得第一用户子视频的尺寸与第二用户子视频的尺寸可以相对匹配。也就是说,通过图7所示的方法,可以调整第一用户子视频占用的画面比例,有利于提高第一用户子视频与第二用户子视频之间的尺寸匹配度。In the example shown in FIG. 7 , the size of the first user sub-video may be relatively small, and the size of the second user sub-video may be relatively large. The first electronic device may adjust the pixels in the first user sub-video so that the size of the first user sub-video and the size of the second user sub-video can relatively match. That is, with the method shown in FIG. 7 , the screen ratio occupied by the first user sub-video can be adjusted, which is beneficial to improve the size matching degree between the first user sub-video and the second user sub-video.
第一人物子视频的多个第一子帧中还可以包括第一子帧B,如图8中的810所示。第一用户在该第一子帧B中做出的动作可以为第一动作B。第一子帧A与第一子帧B为第一人物子视频中的两个不同的子帧。第一电子设备可以结合如图7所示的方法,根据第一子帧B,确定第一动作子文件B,如图8中的811所示。The multiple first subframes of the first person sub-video may further include a first subframe B, as shown by 810 in FIG. 8 . The action performed by the first user in the first subframe B may be the first action B. The first subframe A and the first subframe B are two different subframes in the first person sub-video. The first electronic device may determine the first action subfile B according to the first subframe B in combination with the method shown in FIG. 7 , as shown in 811 in FIG. 8 .
第二人物子视频的多个第二子帧中还可以包括第二子帧b,如图8中的820所示。第二用户在该第二子帧b中做出的动作可以为第二动作b。第二子帧a与第二子帧b为第二人物子视频中的两个不同的子帧。第一电子设备可以结合如图7所示的方法,根据第二子帧b,或从云端服务器,获取第二动作子文件b,如图8中的821所示。The multiple second subframes of the second person sub-video may further include a second subframe b, as shown in 820 in FIG. 8 . The action performed by the second user in the second subframe b may be the second action b. The second subframe a and the second subframe b are two different subframes in the second person sub-video. The first electronic device may obtain the second action subfile b according to the second subframe b or from the cloud server in combination with the method shown in FIG. 7 , as shown in 821 in FIG. 8 .
第一子帧A(如图8中的710所示)可以与第二子帧a(如图8中的720所示)对应,第一子帧B可以与第二子帧b对应。也就是说,第一动作子文件A(如图8中的711所示)可以与第二动作子文件a(如图8中的721所示)具有相对较高的相似度,第一动作子文件B可以与第二动作子文件b具有相对较高的相似度。The first subframe A (shown as 710 in FIG. 8 ) may correspond to the second subframe a (shown as 720 in FIG. 8 ), and the first subframe B may correspond to the second subframe b. That is to say, the first action sub-file A (shown as 711 in FIG. 8 ) may have a relatively high similarity with the second action sub-file a (shown as 721 in FIG. 8 ). The file B may have a relatively high similarity with the second action sub-file b.
在一个示例中,第一子帧A与第一子帧B之间的时间差可以为T,第二子帧a与第二子帧b之间的时间差可以为t。也就是说,在第一视频中,相对于第二视频而言,第一用户做出第一动作A并过渡到第一动作B可以相对较快或相对较慢。如图8所示,T可以大于t,即第一用户的动作可以相对较慢。In one example, the time difference between the first subframe A and the first subframe B may be T, and the time difference between the second subframe a and the second subframe b may be t. That is, in the first video, relative to the second video, the first user makes the first action A and transitions to the first action B may be relatively fast or relatively slow. As shown in FIG. 8 , T may be greater than t, that is, the action of the first user may be relatively slow.
第一电子设备可以根据第一子帧A、第一子帧B、第二子帧a、第二子帧b,调整第一子帧A与第一子帧B之间的子帧,使得第一子帧B可以靠近第一子帧A或远离第一子帧A,进而可以调整第一子帧A与第一子帧B之间的时间差。例如,在第一视频中,与第一子帧A距离为t的子帧为第一子帧C(如图8中的虚线矩形所示)。第一电子设备可 以调整第一子帧A与第一子帧B之间的子帧,使得第一子帧B可以被调整至第一子帧C被调整前的位置。The first electronic device may adjust the subframe between the first subframe A and the first subframe B according to the first subframe A, the first subframe B, the second subframe a, and the second subframe b, so that the A subframe B may be close to the first subframe A or far away from the first subframe A, and then the time difference between the first subframe A and the first subframe B may be adjusted. For example, in the first video, a subframe with a distance t from the first subframe A is the first subframe C (as shown by the dotted rectangle in FIG. 8 ). The first electronic device can adjust the subframe between the first subframe A and the first subframe B, so that the first subframe B can be adjusted to the position before the first subframe C is adjusted.
结合图8所示的示例,目标人物做出第二动作a并过渡到第二动作b的时间较短,也就是说目标人物的动作相对较快;第一电子设备可以缩小第一子帧A与第一子帧B之间的时间差,从而可以加快第一用户的动作,如图8中的虚线箭头所示。With reference to the example shown in FIG. 8 , the time for the target person to make the second action a and transition to the second action b is relatively short, that is to say, the target person’s action is relatively fast; the first electronic device can reduce the first subframe A The time difference between the first subframe B and the first subframe B, so that the action of the first user can be accelerated, as shown by the dashed arrow in FIG. 8 .
通过本申请实施例提供的图8所示的方法,第一电子设备可以对第一视频进行处理,有利于提高第一用户的动作与目标人物的动作之间的速度相似度。处理后的第一视频可以是第一目标视频。With the method shown in FIG. 8 provided by the embodiment of the present application, the first electronic device can process the first video, which is beneficial to improve the speed similarity between the actions of the first user and the actions of the target person. The processed first video may be the first target video.
在其他的示例中,响应用户作用在图4所示的录制控件410上的操作,电子设备还可以对第一视频进行处理,得到第一目标视频,如图9中的用户界面900所示。该第一目标视频可以通过如图7、图8所示的方法,根据第一视频以及第二视频处理得到。该第一目标视频例如包括如图5、图6所示的第一图像区域560,即包括对应图4所示的第一界面区域460的像素点。也就是说,图9所示的第一目标视频可以不包括如图5、图6所示的第二图像区域570,即不包括对应图4所示的第二界面区域470的像素点。In other examples, in response to the user's operation on the recording control 410 shown in FIG. 4 , the electronic device may further process the first video to obtain the first target video, as shown in the user interface 900 in FIG. 9 . The first target video may be obtained by processing the first video and the second video through the methods shown in FIG. 7 and FIG. 8 . The first target video includes, for example, the first image area 560 shown in FIG. 5 and FIG. 6 , that is, includes pixels corresponding to the first interface area 460 shown in FIG. 4 . That is, the first target video shown in FIG. 9 may not include the second image area 570 shown in FIG. 5 and FIG. 6 , that is, not include pixels corresponding to the second interface area 470 shown in FIG. 4 .
如图5、图6所示,本申请实施例提供的处理视频的方法可以应用于合拍场景中动作协调性的优化。如图8所示,本申请实施例提供的处理视频的方法还可以应用于除合拍场景以外的其他场景,例如针对单个视频进行动作优化。通过本申请实施例提供的处理视频的方法,可以调整第一视频中第一用户的动作幅度、第一用户的画面尺寸、第一用户的动作快慢等,进而可以减少第一用户对第一视频的后期处理量。As shown in FIG. 5 and FIG. 6 , the video processing method provided by the embodiment of the present application can be applied to the optimization of action coordination in a co-shot scene. As shown in FIG. 8 , the method for processing video provided by the embodiment of the present application may also be applied to other scenarios except the co-shooting scenario, for example, action optimization is performed for a single video. With the video processing method provided in the embodiment of the present application, the range of motion of the first user, the screen size of the first user, the speed of the motion of the first user, etc. in the first video can be adjusted, thereby reducing the impact of the first user on the first video. amount of post-processing.
响应用户针对图库应用的操作,电子设备可以调取图5、图6或图9所示的第一目标视频,从而用户可以观看第一目标视频。响应用户针对图库应用的操作,电子设备可以对第一目标视频进行后期调整。例如可以调整第一图像区域的快慢、第二图像区域的播放快慢、对第一图像区域美化、对第二图像区域美化、第一图像区域的大小、第二图像区域的大小等。In response to the user's operation on the gallery application, the electronic device may retrieve the first target video shown in FIG. 5 , FIG. 6 or FIG. 9 , so that the user can watch the first target video. In response to the user's operation on the gallery application, the electronic device may perform post-adjustment on the first target video. For example, you can adjust the speed of the first image area, the playback speed of the second image area, beautify the first image area, beautify the second image area, the size of the first image area, and the size of the second image area.
在一个可能的示例中,响应第一用户作用在如图5、图6、图9所示的动作优化控件550,第一电子设备可以调整第一动作子文件与第二动作子文件之间的相似度,进而第一用户可以灵活指定动作的调整幅度。例如在第一用户不希望第一视频与第二视频完全相同的情况下,第一用户可以通过动作优化控件550,减小第一视频或第一目标视频被处理或被优化的程度;在第一用户希望第一视频与第二视频尽可能相同的情况下,第一用户可以通过动作优化控件550,增大第一视频或第一目标视频被处理或被优化的程度。第一视频被处理或被优化的程度例如可以默认为0.6~0.7。这样既有利于提高第一用户的动作与目标人物之间的动作匹配度,还有利于保留有第一用户自身的特点。In a possible example, in response to the first user acting on the action optimization control 550 shown in FIG. 5 , FIG. 6 , and FIG. 9 , the first electronic device may adjust the relationship between the first action sub-file and the second action sub-file similarity, and then the first user can flexibly specify the adjustment range of the action. For example, if the first user does not want the first video to be identical to the second video, the first user can use the action optimization control 550 to reduce the degree to which the first video or the first target video is processed or optimized; When a user wants the first video and the second video to be as identical as possible, the first user can use the action optimization control 550 to increase the degree to which the first video or the first target video is processed or optimized. The degree to which the first video is processed or optimized may be 0.6˜0.7 by default, for example. In this way, it is not only beneficial to improve the action matching degree between the action of the first user and the target character, but also to retain the characteristics of the first user.
在一些场景中,多个用户可以模仿同一素材或同一图库视频。电子设备可以将多个用户的视频合成为合拍视频,以提高包含多个用户的合拍视频的协调性。In some scenarios, multiple users can imitate the same footage or the same gallery video. The electronic device may synthesize the videos of the multiple users into a co-shot video, so as to improve the coordination of the co-shot video including the multiple users.
参照图3至图9所示的示例,第三用户可以模仿第二视频中的目标人物做出一系列动作,并通过第三电子设备拍摄第三视频。该目标人物可以与上文中第一用户模仿的人物为同一人物。如图10所示,第三电子设备可以显示如图10所示的用户界面1000。用户界面1000可以包括第三界面区域1060、第四界面区域1070。Referring to the examples shown in FIG. 3 to FIG. 9 , the third user can imitate the target person in the second video to make a series of actions, and shoot the third video through the third electronic device. The target character may be the same character as the character imitated by the first user above. As shown in FIG. 10 , the third electronic device may display the user interface 1000 as shown in FIG. 10 . The user interface 1000 may include a third interface area 1060 and a fourth interface area 1070 .
如图10所示,第三电子设备可以在第三界面区域1060内显示第三人物图像1061和 第三背景图像1062,其中第三人物图像1061可以包括与第三用户对应的像素点,第三背景图像1062可以包括与第三用户所在场景对应的像素点。第三界面区域1060可以用于预览第三用户的拍摄效果。第三电子设备可以在第四界面区域1070内显示第二人物图像471,进而可以播放第二人物子视频的画面。第四界面区域1070可以用于提示目标人物的动作。As shown in FIG. 10 , the third electronic device may display a third character image 1061 and a third background image 1062 in the third interface area 1060, wherein the third character image 1061 may include pixels corresponding to the third user, and the third The background image 1062 may include pixel points corresponding to the scene where the third user is located. The third interface area 1060 may be used to preview the shooting effect of the third user. The third electronic device may display the second character image 471 in the fourth interface area 1070, and then may play the screen of the second character sub-video. The fourth interface area 1070 may be used to prompt the action of the target character.
如图10所示,用户界面可以包括录制控件1010。响应第三用户作用在该录制控件1010上的操作,第三电子设备可以拍摄得到第三视频。该第三视频可以包括或提取得到第三用户子视频、第三背景子视频。As shown in FIG. 10 , the user interface may include recording controls 1010 . In response to an operation performed by the third user on the recording control 1010, the third electronic device may capture a third video. The third video may include or be extracted to obtain a third user sub-video and a third background sub-video.
在一个可能的示例中,结合图7、图8所示的处理视频的方法,第三电子设备可以根据第三用户子视频,确定多个第三动作子文件,该多个第三动作子文件可以与该第三用户子视频的多个第三子帧一一对应。第三动作子文件可以用于反映在第三子帧中第三用户的动作。可选的,在图10所示的示例中,第三用户的镜像动作可以与目标人物的动作匹配度更高,第三电子设备可以根据第三视频的镜像视频,确定该多个第三动作子文件。In a possible example, in conjunction with the video processing methods shown in FIG. 7 and FIG. 8 , the third electronic device may determine, according to the third user sub-video, a plurality of third action sub-files, the plurality of third action sub-files There may be one-to-one correspondence with multiple third subframes of the third user sub-video. The third action subfile may be used to reflect the actions of the third user in the third subframe. Optionally, in the example shown in FIG. 10 , the mirror action of the third user may have a higher degree of matching with the action of the target character, and the third electronic device may determine the plurality of third actions according to the mirror video of the third video. sub file.
第三电子设备可以根据第三动作子文件,以及与该第三动作子文件对应的第二动作子文件,调整第三视频的像素点,以实现对第三视频的处理,进而可以有利于提高第三用户与目标人物之间的动作相似度。如图10所示,被拍摄到的第三用户的动作与目标人物的动作相似但略有不同;如图11所示,在对第三视频处理后,第三用户的动作与目标人物的动作可以具有更高的相似度。The third electronic device can adjust the pixels of the third video according to the third action sub-file and the second action sub-file corresponding to the third action sub-file, so as to realize the processing of the third video, which can be beneficial to improve the Action similarity between the third user and the target character. As shown in FIG. 10 , the captured movements of the third user are similar to but slightly different from those of the target person; as shown in FIG. 11 , after the third video is processed, the movements of the third user are similar to those of the target person. can have higher similarity.
在一个示例中,第三电子设备可以将第二视频与第三视频合成为第二目标视频,其中第二目标视频和/或第三视频可以为经过处理的视频。在图11所示的示例中,第二目标视频可以属于经过分屏处理,且经过背景去除处理后的视频。第二目标视频可以包括第三图像区域1160、第四图像区域1170。第三图像区域1160可以包括与第三用户子视频对应的像素点,以及与第二背景子视频对应的像素点。第四图像区域1170可以包括与第二用户子视频对应的像素点,以及与第二背景子视频对应的像素点。也就是说,第二视频中的背景图像可以充当第三用户子视频的背景。In one example, the third electronic device may synthesize the second video and the third video into a second target video, where the second target video and/or the third video may be processed videos. In the example shown in FIG. 11 , the second target video may belong to a video that has undergone split-screen processing and has undergone background removal processing. The second target video may include a third image area 1160 and a fourth image area 1170 . The third image area 1160 may include pixels corresponding to the third user sub-video and pixels corresponding to the second background sub-video. The fourth image area 1170 may include pixels corresponding to the second user sub-video and pixels corresponding to the second background sub-video. That is, the background image in the second video can serve as the background of the third user sub-video.
在其他示例中,第二目标视频可以不属于分屏视频,或者可以属于经过分屏处理但未经过背景去除处理的视频。In other examples, the second target video may not belong to a split-screen video, or may belong to a video that has undergone split-screen processing but has not undergone background removal processing.
由于第一用户、第三用户均模仿目标人物的动作,因此将处理后的第一视频、第三视频合成为第三目标视频,有利于获得协调度相对较高的合拍视频。如图12所示,第一电子设备或第三电子设备可以将第一视频、第三视频合成为第三目标视频,其中第一视频、第三视频均可以为经过处理后的视频。Since both the first user and the third user imitate the action of the target person, synthesizing the processed first video and the third video into the third target video is beneficial to obtain a co-shot video with a relatively high degree of coordination. As shown in FIG. 12 , the first electronic device or the third electronic device may synthesize the first video and the third video into a third target video, where both the first video and the third video may be processed videos.
在一个可能的示例中,图12所示的第三目标视频可以属于经过分屏处理但未经背景去除处理的视频。第三目标视频可以包括第五图像区域1260、第六图像区域1270。第五图像区域1260可以包括与图5所示的第一用户子视频对应的像素点,以及与第一背景子视频对应的像素点。第六图像区域1270可以包括与图10所示的第三用户子视频对应的像素点,以及与第三背景子视频对应的像素点。在其他的示例中,第三目标视频可以属于经过分屏处理以及背景去除处理的视频。In a possible example, the third target video shown in FIG. 12 may belong to a video that has undergone split-screen processing but has not undergone background removal processing. The third target video may include a fifth image area 1260 and a sixth image area 1270 . The fifth image area 1260 may include pixels corresponding to the first user sub-video shown in FIG. 5 and pixels corresponding to the first background sub-video. The sixth image area 1270 may include pixels corresponding to the third user sub-video shown in FIG. 10 and pixels corresponding to the third background sub-video. In other examples, the third target video may belong to a video that has undergone split-screen processing and background removal processing.
在另一个示例中,图13所示的第三目标视频可以属于未经过分屏处理但经过背景去除处理的视频。第三目标视频可以包括第五图像区域1260、第六图像区域1270、第二背 景图像区域1380。第五图像区域1260可以包括与第一用户子视频对应的像素点,可以不包括与第一背景子视频对应的像素点。第六图像区域1270可以包括与第三用户子视频对应的像素点,可以不包括与第三背景子视频对应的像素点。第二背景图像区域1380可以包括与目标图库图像对应的像素点。在其他的示例中,第二背景图像区域1380可以包括与图4所示的第一背景图像或图10所示的第三背景图像对应的像素点。In another example, the third target video shown in FIG. 13 may belong to a video that has not undergone split-screen processing but has undergone background removal processing. The third target video may include a fifth image area 1260, a sixth image area 1270, and a second background image area 1380. The fifth image area 1260 may include pixels corresponding to the first user sub-video, and may not include pixels corresponding to the first background sub-video. The sixth image area 1270 may include pixels corresponding to the third user sub-video, and may not include pixels corresponding to the third background sub-video. The second background image area 1380 may include pixel points corresponding to the target gallery image. In other examples, the second background image area 1380 may include pixel points corresponding to the first background image shown in FIG. 4 or the third background image shown in FIG. 10 .
结合上文所述的示例,在其他可能的应用中,第一用户可以模仿第二视频中的第一目标人物做出一系列动作,并通过第一电子设备拍摄第一视频;第三用户可以模仿第二视频中的第二目标人物做出一系列动作,并通过第三电子设备拍摄第三视频。第一目标人物和第二目标人物可以是第二视频中的两个不同的人物。参照上文所述的示例,第一电子设备、第三电子设备或其他电子设备可以对第一视频、第三视频进行处理,得到包含第一用户、第三用户的目标视频。In combination with the examples described above, in other possible applications, the first user may imitate the first target person in the second video to make a series of actions, and shoot the first video through the first electronic device; the third user may The second target person in the second video is imitated to make a series of actions, and the third video is captured by the third electronic device. The first target person and the second target person may be two different people in the second video. Referring to the examples described above, the first electronic device, the third electronic device, or other electronic devices may process the first video and the third video to obtain a target video including the first user and the third user.
在一个示例中,电子设备可以获取第一动作文件、第二动作文件、第三动作文件、第四动作文件。第一动作文件可以通过提取第一视频中第一用户的动作信息得到。第二动作文件可以通过提取第二视频中第一目标人物的动作信息得到。第三动作文件可以通过提取第三视频中第三用户的动作信息得到。第四动作文件可以通过提取第二视频中第二目标人物的动作信息得到。In one example, the electronic device may acquire the first action file, the second action file, the third action file, and the fourth action file. The first action file can be obtained by extracting action information of the first user in the first video. The second action file can be obtained by extracting the action information of the first target person in the second video. The third action file can be obtained by extracting action information of the third user in the third video. The fourth action file can be obtained by extracting action information of the second target person in the second video.
电子设备可以对比第一动作子文件和第二动作子文件,对第一视频进行处理,得到第一目标视频,第一目标视频中第一用户的动作可以与第一视频中第一用户的动作略有不同,第一目标视频中第一用户的动作可以与第二视频中第一目标人物的动作更相似。The electronic device may compare the first action sub-file with the second action sub-file, process the first video, and obtain a first target video, where the actions of the first user in the first target video may be the same as the actions of the first user in the first video. Slightly different, the actions of the first user in the first target video may be more similar to the actions of the first target person in the second video.
电子设备可以对比第三动作子文件和第四动作子文件,对第三视频进行处理,得到第三目标视频,第三目标视频中第三用户的动作可以与第三视频中第三用户的动作略有不同,第三目标视频中第三用户的动作可以与第二视频中第二目标人物的动作更相似。The electronic device may compare the third action sub-file with the fourth action sub-file, process the third video, and obtain a third target video, and the action of the third user in the third target video may be the same as the action of the third user in the third video. Slightly different, the actions of the third user in the third target video may be more similar to the actions of the second target person in the second video.
电子设备可以将第一目标视频和第三目标视频合成为新的视频,该新的视频可以展示第一目标视频中第一用户的动作,且可以展示第三目标视频中第三用户的动作。可选的,该新的视频还可以包括第二视频中的数据。例如,该新的视频还可以展示第二视频中第一目标人物和第二目标人物的动作。The electronic device may synthesize the first target video and the third target video into a new video, and the new video may show actions of the first user in the first target video and actions of the third user in the third target video. Optionally, the new video may also include data in the second video. For example, the new video may also show the actions of the first target person and the second target person in the second video.
在其他示例中,电子设备可以根据第一视频、第三视频、第一动作文件、第二动作文件、第三动作文件、第四动作文件,直接生成一个完整的视频,既可以跳过生成第一目标视频和第三目标视频的步骤。图14是本申请实施例提供的另一种用户界面1400的示意图。该用户界面1400可以显示在第一电子设备上。该用户界面1400可以为畅连应用的界面,或者其他具有视频通话功能的应用的界面。也就是说,第一电子设备上可以承载畅连应用或其他具有视频通话功能的应用。响应第一用户作用的与这些应用对应的操作,第一电子设备可以显示该用户界面1400。In other examples, the electronic device may directly generate a complete video according to the first video, the third video, the first action file, the second action file, the third action file, and the fourth action file, or skip generating the first action file. The steps of a target video and a third target video. FIG. 14 is a schematic diagram of another user interface 1400 provided by an embodiment of the present application. The user interface 1400 may be displayed on the first electronic device. The user interface 1400 may be an interface of a Connect application, or an interface of other applications having a video call function. That is to say, the first electronic device can carry the Changlian application or other applications with a video call function. The first electronic device may display the user interface 1400 in response to operations performed by the first user corresponding to the applications.
例如,第一用户可以通过点击畅连应用的图标,打开畅连应用,进而第一电子设备可以显示用户界面1400。For example, the first user can open the Changlian application by clicking on the icon of the Changlian application, and then the first electronic device can display the user interface 1400 .
用户界面1400可以包括与多个用户一一对应的多个用户控件1410。该多个用户可以包括第二用户。响应第一用户对第二用户控件1410的操作(如点击操作),第一电子设备可以显示该第二用户的联系信息。第二用户的联系信息可以包括以下至少一项:第二用户的姓名、第二用户的联系方式、第二用户的通话记录等。The user interface 1400 may include a plurality of user controls 1410 in a one-to-one correspondence with a plurality of users. The plurality of users may include a second user. In response to an operation (eg, a click operation) of the second user control 1410 by the first user, the first electronic device may display the contact information of the second user. The contact information of the second user may include at least one of the following: the name of the second user, the contact information of the second user, the call record of the second user, and the like.
如图14所示,用户界面可以包括用户搜索控件1420。在一个示例中,第一用户可以通过该用户搜索控件,邀请第二用户进行视频通话。响应第一用户作用在用户搜索控件的操作(如点击操作),以及后续一系列操作(如文字输入、语音输入、扫描二维码等),第一电子设备可以获取第二用户的相关信息(如第二用户的部分或全部姓名、第二用户的姓名的首字母、第二用户的部分或全部视频通话号码等)。第一电子设备可以根据该第二用户的相关信息,从第一电子设备存储的多个用户记录中确定第二用户的用户记录,该多个用户记录可以与该多个用户一一对应。进而,第一电子设备可以快速在用户界面上显示该第二用户的用户控件。As shown in FIG. 14, the user interface may include a user search control 1420. In one example, the first user may invite the second user to make a video call through the user search control. In response to the first user's operation on the user's search control (such as a click operation) and a series of subsequent operations (such as text input, voice input, scanning a QR code, etc.), the first electronic device can obtain the relevant information of the second user ( For example, part or all of the name of the second user, the initials of the second user's name, part or all of the video call number of the second user, etc.). The first electronic device may determine user records of the second user from multiple user records stored in the first electronic device according to the relevant information of the second user, and the multiple user records may be in one-to-one correspondence with the multiple users. Furthermore, the first electronic device can quickly display the user control of the second user on the user interface.
可选的,用户界面可以包括常用用户控件1412。如图14所示,第二用户可以属于常用联系人,用户界面可以包括与第二用户对应的常用用户控件1411。Optionally, the user interface may include common user controls 1412. As shown in FIG. 14 , the second user may belong to frequently used contacts, and the user interface may include a frequently used user control 1411 corresponding to the second user.
在一个示例中,第一电子设备可以统计合拍次数最多的用户为用户A,并在用户界面上显示常用用户控件A,该常用用户控件A可以为与用户A对应的控件。在另一个示例中,第一电子设备可以统计视频通话次数最多的用户为用户B,并在用户界面上显示常用用户控件B,该常用用户控件B可以为与用户B对应的控件。In one example, the first electronic device may count the user with the most times of co-shooting as user A, and display a common user control A on the user interface, where the common user control A may be a control corresponding to user A. In another example, the first electronic device may count the user with the most video calls as user B, and display a common user control B on the user interface, where the common user control B may be a control corresponding to user B.
可选的,为便于第一用户快速搜索第二用户,多个用户例如可以按照字母的顺序排列。Optionally, in order to facilitate the first user to quickly search for the second user, multiple users may be arranged in alphabetical order, for example.
可选的,用户界面可以包括字母控件。响应第一用户作用在该字母控件上的操作,第一电子设备可以切换在用户界面上显示的用户控件。Optionally, the user interface may include letter controls. In response to an operation performed by the first user on the letter control, the first electronic device may switch user controls displayed on the user interface.
用户界面可以包括畅连视频控件1430。如图14所示,用户界面可以包括与多个用户一一对应的多个畅连视频控件1430。The user interface may include smooth video controls 1430 . As shown in FIG. 14 , the user interface may include a plurality of smooth video controls 1430 corresponding to a plurality of users one-to-one.
第一用户可以通过第一电子设备,邀请第二用户进行视频通话。响应第一用户作用在与第二用户对应的畅连视频控件1430的操作(如点击操作),第一电子设备可以向第二电子设备发起视频通话,其中,第二电子设备可以为第二用户使用的电子设备。相应地,第二用户可以通过第二电子设备接收到第一用户的视频通话邀请。第二电子设备可以显示视频通话邀请的界面,该界面可以包括视频通话接听控件。响应第二用户作用在视频通话接听控件上的操作,第一电子设备与第二电子设备之间可以建立视频通话连接。The first user may invite the second user to make a video call through the first electronic device. In response to an operation (such as a click operation) performed by the first user on the connected video control 1430 corresponding to the second user, the first electronic device may initiate a video call to the second electronic device, wherein the second electronic device may be the second user electronic equipment used. Correspondingly, the second user may receive the video call invitation from the first user through the second electronic device. The second electronic device may display an interface for the video call invitation, and the interface may include controls for answering the video call. In response to an operation performed by the second user on the video call answering control, a video call connection can be established between the first electronic device and the second electronic device.
在第一电子设备与第二电子设备建立视频通话连接后,第一电子设备通过拍摄可以得到第一视频,第二电子设备通过拍摄可以得到第二视频;并且,第一电子设备可以通过该视频通话连接,获取该第二视频,第二电子设备可以通过视频通话连接,获取该第一视频。After the first electronic device establishes a video call connection with the second electronic device, the first electronic device can obtain the first video by shooting, and the second electronic device can obtain the second video by shooting; and the first electronic device can obtain the video through the first electronic device. The call is connected to obtain the second video, and the second electronic device can obtain the first video through the video call connection.
在一个示例中,第一用户可以在视频通话过程中邀请第二用户远程合拍。在其他示例中,第二用户可以在视频通话过程中邀请第一用户远程合拍。在远程合拍被第一用户、第二用户均授权后,第一电子设备、第二电子设备可以显示如图15所示的用户界面1500。用户界面1500可以是远程合拍的准备界面。In one example, the first user may invite the second user to take a photo remotely during the video call. In other examples, the second user may invite the first user to take a photo remotely during the video call. After the remote co-shooting is authorized by both the first user and the second user, the first electronic device and the second electronic device may display a user interface 1500 as shown in FIG. 15 . User interface 1500 may be a preparation interface for a remote sync.
可选的,图14所示的用户界面还可以包括远程合拍控件1440。如图14所示,用户界面1400可以包括与多个用户一一对应的多个远程合拍控件1440。第一用户可以通过远程合拍控件1440,邀请第二用户通过视频通话完成远程合拍。结合图14所示,响应第一用户作用在该远程合拍控件1440的操作(如点击操作),第一电子设备可以向第二电子设备发起视频通话,并向第二电子设备发送指示信息,该指示信息用于邀请第二用户合拍,其中,第二电子设备可以为第二用户使用的电子设备。相应地,第二用户可以通过第二电子设备接收到第一用户的远程合拍邀请。第二电子设备可以显示远程合拍邀请的界面,该 界面可以包括视频通话接听控件。响应第二用户作用在视频通话接听控件上的操作,第一电子设备与第二电子设备之间可以建立视频通话连接,并且,第一电子设备、第二电子设备均可以显示如图15所示的用户界面1500。Optionally, the user interface shown in FIG. 14 may further include a remote synchronization control 1440 . As shown in FIG. 14, the user interface 1400 may include a plurality of remote snap controls 1440 that correspond one-to-one with a plurality of users. The first user may invite the second user to complete the remote co-shooting through a video call through the remote co-shooting control 1440 . With reference to FIG. 14 , in response to an operation (such as a click operation) performed by the first user on the remote synchronization control 1440, the first electronic device can initiate a video call to the second electronic device, and send instruction information to the second electronic device. The indication information is used to invite the second user to take a photo together, wherein the second electronic device may be an electronic device used by the second user. Correspondingly, the second user may receive the remote co-shooting invitation from the first user through the second electronic device. The second electronic device may display an interface for the remote co-shot invitation, which interface may include controls for answering the video call. In response to the operation of the second user acting on the video call answering control, a video call connection can be established between the first electronic device and the second electronic device, and both the first electronic device and the second electronic device can display as shown in Figure 15 user interface 1500.
如图15所示,用户界面1500可以包括第一界面区域1560、第二界面区域1570,第一界面区域1560可以显示第一电子设备当前拍摄到的部分或全部图像,第二界面区域1570可以显示第二电子设备当前拍摄到的部分或全部图像。第一界面区域1560与第二界面区域1570之间可以互不交叉。第一界面区域1560、第二界面区域1570可以位于用户界面1500上的任意位置。如图15所示,第一界面区域1560可以位于用户界面1500的上方,第二界面区域1570可以位于用户界面1500的下方。也就是说,第一电子设备拍摄到的部分或全部图像与第二电子设备拍摄到的部分或全部图像可以同时显示在用户界面1500上。As shown in FIG. 15 , the user interface 1500 may include a first interface area 1560 and a second interface area 1570. The first interface area 1560 may display part or all of the images currently captured by the first electronic device, and the second interface area 1570 may display Part or all of the images currently captured by the second electronic device. The first interface region 1560 and the second interface region 1570 may not cross each other. The first interface area 1560 and the second interface area 1570 may be located anywhere on the user interface 1500 . As shown in FIG. 15 , the first interface area 1560 may be located above the user interface 1500 , and the second interface area 1570 may be located below the user interface 1500 . That is, some or all of the images captured by the first electronic device and some or all of the images captured by the second electronic device may be displayed on the user interface 1500 at the same time.
用户可以观察用户界面1500,进而可以预览第一用户与第二用户的合拍效果。例如,如图15所示,在第一用户使用第一电子设备的前置摄像头自拍,且第二用户使用第二电子设备的前置摄像头自拍的情况下,第一界面区域1560可以包括第一人物图像1561,第二界面区域1570可以包括第二人物图像1571。也就是说,第一界面区域1560可以包括与第一用户对应的像素点,第二界面区域1570可以包括与第二用户对应的像素点。应理解,在其他示例中,第一电子设备和/或第二电子设备可以采用后置摄像头拍摄包含用户的图像。The user can observe the user interface 1500, and then can preview the in-time effect of the first user and the second user. For example, as shown in FIG. 15 , in the case where the first user uses the front camera of the first electronic device to take a selfie, and the second user uses the front camera of the second electronic device to take a selfie, the first interface area 1560 may include the first The character image 1561 , the second interface area 1570 may include the second character image 1571 . That is, the first interface area 1560 may include pixels corresponding to the first user, and the second interface area 1570 may include pixels corresponding to the second user. It should be understood that in other examples, the first electronic device and/or the second electronic device may use a rear-facing camera to capture an image containing the user.
用户界面1500还可以包括用于调整合拍效果的控件。如图15所示,用户界面1500可以包括分屏开关控件1520、背景去除开关控件1530、美化开关控件1540。在合拍开始之前或在合拍的过程中,用户可以通过这些控件调整合拍效果。可选的,参照图4所示的实施例,分屏开关控件1520可以具有上文所述的分屏开关控件420的功能,背景去除开关控件1530可以具有上文所述的背景去除开关控件430的功能,美化开关控件1540可以具有上文所述的美颜开关控件440和/或滤镜开关控件450的功能,在此就不再详细赘述。 User interface 1500 may also include controls for adjusting the in-time effect. As shown in FIG. 15 , the user interface 1500 may include a split screen switch control 1520 , a background removal switch control 1530 , and a beautification switch control 1540 . These controls allow the user to adjust the timing effect before or during the timing. Optionally, referring to the embodiment shown in FIG. 4 , the split screen switch control 1520 may have the function of the split screen switch control 420 described above, and the background removal switch control 1530 may have the background removal switch control 430 described above. The beautification switch control 1540 may have the functions of the beauty switch control 440 and/or the filter switch control 450 described above, which will not be described in detail here.
用户界面1500可以包括录制控件1510。响应用户作用在该录制控件1510上的操作,电子设备可以合成第一电子设备拍摄的第一视频以及第二电子设备拍摄的第二视频,得到如图5、图6所示的第一目标视频。也就是说,在图14、图15所示的示例中,用户可以通过畅连应用以及本申请实施例提供的处理视频的方法,得到协调性相对较高的合拍视频。 User interface 1500 may include recording controls 1510 . In response to the user's operation on the recording control 1510, the electronic device can synthesize the first video shot by the first electronic device and the second video shot by the second electronic device to obtain the first target video as shown in FIG. 5 and FIG. 6 . . That is to say, in the examples shown in FIG. 14 and FIG. 15 , the user can obtain a co-shot video with relatively high coordination through the Changlian application and the video processing method provided by the embodiment of the present application.
结合上文所述的示例,下面阐述一种新的应用场景。Combined with the examples described above, a new application scenario is described below.
第一用户可以通过点击畅连应用的图标,打开畅连应用。第一电子设备可以显示在用户界面上显示多个用户控件。该多个用户可以包括第三用户。响应第一用户对第三用户的控件的操作(如点击操作),第一电子设备可以向第三用户使用的第二电子设备发起视频通话,邀请第三用户进行视频通话。相应地,第三用户可以通过第二电子设备接收到第一用户的视频通话邀请。之后,第一电子设备与第二电子设备之间可以建立视频通话连接。The first user can open the Changlian application by clicking the icon of the Changlian application. The first electronic device may display a plurality of user controls on the user interface. The plurality of users may include a third user. In response to an operation (eg, a click operation) by the first user on the control of the third user, the first electronic device may initiate a video call to the second electronic device used by the third user, and invite the third user to make a video call. Correspondingly, the third user may receive the video call invitation from the first user through the second electronic device. After that, a video call connection can be established between the first electronic device and the second electronic device.
在第一电子设备与第二电子设备建立视频通话连接后,第一电子设备通过拍摄可以得到第一视频,该第一视频可以是第一用户的视频;第二电子设备通过拍摄可以得到第三视频,该第一视频可以是第三用户的视频;并且,第一电子设备可以通过该视频通话连接,获取该第三视频,第二电子设备可以通过视频通话连接,获取该第一视频。对第一视频的 动作信息提取,可以得到第一动作文件,第一动作文件可以指示了第一用户在第一视频中的动作。对第三视频的动作信息提取,可以得到第三动作文件,第三动作文件可以指示第三用户在第三视频中的动作。After the first electronic device establishes a video call connection with the second electronic device, the first electronic device can obtain the first video by shooting, and the first video can be the video of the first user; the second electronic device can obtain the third video by shooting video, the first video may be a video of a third user; and the first electronic device may obtain the third video through the video call connection, and the second electronic device may obtain the first video through the video call connection. By extracting the action information of the first video, a first action file can be obtained, and the first action file can indicate the action of the first user in the first video. By extracting the action information of the third video, a third action file can be obtained, and the third action file can indicate the actions of the third user in the third video.
第一用户可以在视频通话过程中邀请第三用户远程合拍。或者,第三用户可以在视频通话过程中邀请第一用户远程合拍。在远程合拍被第一用户、第三用户均授权后,第一电子设备、第二电子设备可以显示远程合拍的准备界面。该远程合拍的准备界面上可以显示有如图3所示的素材合拍控件330和/或图库合拍控件340。第一用户和第三用户中的一个可以通过素材合拍控件330或图库合拍控件340选择第二视频。The first user can invite the third user to take a photo remotely during the video call. Alternatively, the third user may invite the first user to take a photo remotely during the video call. After the remote co-op is authorized by both the first user and the third user, the first electronic device and the second electronic device may display a preparation interface for remote co-op. The material co-shot control 330 and/or the gallery co-shot control 340 as shown in FIG. 3 may be displayed on the remote co-shot preparation interface. One of the first user and the third user can select the second video through the material co-shot control 330 or the gallery co-shot control 340 .
在一个示例中,第二视频可以是第一目标人物的视频,展示了第一目标人物的动作。在视频通话过程中,第一用户可以模仿第二视频中的第一目标人物的动作,且第三用户可以模仿第二视频中第一目标人物的动作。第一用户模仿动作的时段可以与第三用户模仿动作的时段相同或不同。In one example, the second video may be a video of the first target person, showing the actions of the first target person. During the video call, the first user can imitate the action of the first target person in the second video, and the third user can imitate the action of the first target person in the second video. The period during which the first user imitates the action may be the same or different from the period during which the third user imitates the action.
第一电子设备、第二电子设备中的一个电子设备可以根据获取到的第一视频、第三视频、第一动作文件、第三动作文件,以及与第二视频对应的第二动作文件,对第一视频、第三视频进行处理,得到目标视频。第二动作文件可以与第二视频中第一目标人物的动作对应。One of the first electronic device and the second electronic device may, according to the acquired first video, third video, first action file, third action file, and the second action file corresponding to the second video, make an The first video and the third video are processed to obtain the target video. The second action file may correspond to the action of the first target person in the second video.
该目标视频可以包括第一用户的图像和第三用户的图像;其中第一用户在该目标视频中的动作可以与第一视频中第一用户的动作不同,且第一用户在该目标视频中的动作可以与第二视频中第一目标人物的动作对应;第三用户在该目标视频中的动作可以与第三视频中第三用户的动作不同,且第三用户在该目标视频中的动作可以与第二视频中第一目标人物的动作对应。The target video may include an image of a first user and an image of a third user; wherein the actions of the first user in the target video may be different from the actions of the first user in the first video, and the first user is in the target video The action of the first target person in the second video may correspond to the action of the first target person; the action of the third user in the target video may be different from the action of the third user in the third video, and the action of the third user in the target video It may correspond to the action of the first target person in the second video.
可选的,目标视频还可以包括第二视频中第一目标人物的图像。Optionally, the target video may further include an image of the first target person in the second video.
在另一个示例中,第二视频可以是第一目标人物和第二目标人物的视频,展示了第一目标人物的动作以及第二目标人物的动作。在视频通话过程中,第一用户可以模仿第二视频中的第一目标人物的动作,且第三用户可以模仿第二视频中第二目标人物的动作。第一用户模仿动作的时段可以与第三用户模仿动作的时段相同或不同。In another example, the second video may be a video of the first target person and the second target person, showing actions of the first target person and actions of the second target person. During the video call, the first user can imitate the action of the first target person in the second video, and the third user can imitate the action of the second target person in the second video. The period during which the first user imitates the action may be the same or different from the period during which the third user imitates the action.
第一电子设备、第二电子设备中的一个电子设备可以根据获取到的第一视频、第三视频、第一动作文件、第三动作文件,以及与第二视频对应的第二动作文件、第四动作文件,对第一视频、第三视频进行处理,得到目标视频。第二动作文件可以与第二视频中第一目标人物的动作对应。第四动作文件可以与第二视频中第二目标人物的动作对应。One of the first electronic device and the second electronic device can obtain the first video, the third video, the first action file, the third action file, and the second action file, the third action file corresponding to the second video Four action files, the first video and the third video are processed to obtain the target video. The second action file may correspond to the action of the first target person in the second video. The fourth action file may correspond to the action of the second target person in the second video.
该目标视频可以包括第一用户的图像和第三用户的图像;其中第一用户在该目标视频中的动作可以与第一视频中第一用户的动作不同,且第一用户在该目标视频中的动作可以与第二视频中第一目标人物的动作对应;第三用户在该目标视频中的动作可以与第三视频中第三用户的动作不同,且第三用户在该目标视频中的动作可以与第二视频中第二目标人物的动作对应。The target video may include an image of a first user and an image of a third user; wherein the actions of the first user in the target video may be different from the actions of the first user in the first video, and the first user is in the target video The action of the first target person in the second video may correspond to the action of the first target person; the action of the third user in the target video may be different from the action of the third user in the third video, and the action of the third user in the target video It may correspond to the action of the second target person in the second video.
可选的,目标视频还可以包括第二视频中第一目标人物的图像,以及第二视频第二目标人物的图像。Optionally, the target video may further include an image of the first target person in the second video, and an image of the second target person in the second video.
本申请实施例还提供了一种处理视频的方法1600,该方法1600可以在如图1、图2所示的电子设备(例如手机、平板电脑等)中实现。如图16所示,该方法1600可以包括 以下步骤:This embodiment of the present application also provides a method 1600 for processing video, and the method 1600 may be implemented in an electronic device (eg, a mobile phone, a tablet computer, etc.) as shown in FIG. 1 and FIG. 2 . As shown in Figure 16, the method 1600 may include the following steps:
1601,第一电子设备获取第一视频,所述第一视频为第一人物的视频。1601. The first electronic device acquires a first video, where the first video is a video of a first character.
示例性的,第一人物以及第一视频可以参照图4至图6的第一人物图像461所示的示例。Exemplarily, for the first character and the first video, reference may be made to the examples shown in the first character image 461 in FIGS. 4 to 6 .
示例性的,第一人物以及第一视频可以参照图15的第一人物图像1561所示的示例。Exemplarily, for the first character and the first video, reference may be made to the example shown in the first character image 1561 in FIG. 15 .
1602,所述第一电子设备获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应。1602. The first electronic device acquires a first action file corresponding to the first video, where the first action file corresponds to the action of the first character.
示例性的,第一动作文件可以参照图7中的第一动作子文件711所示的示例。Exemplarily, the first action file may refer to the example shown in the first action sub-file 711 in FIG. 7 .
示例性的,第一动作文件可以参照图8中的第一动作子文件811所示的示例。Exemplarily, the first action file may refer to the example shown in the first action sub-file 811 in FIG. 8 .
1603,所述第一电子设备获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应。1603. The first electronic device acquires a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to the action of the second character.
示例性的,第二动作文件可以参照图7中的第二动作子文件721所示的示例。Exemplarily, the second action file may refer to the example shown in the second action sub-file 721 in FIG. 7 .
示例性的,第二动作文件可以参照图8中的第二动作子文件821所示的示例。Exemplarily, the second action file may refer to the example shown in the second action sub-file 821 in FIG. 8 .
1604,所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应。1604. The first electronic device generates a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, so The actions of the first character in the target video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. The actions of the characters correspond.
示例性的,目标视频中的第一人物图像可以参照图5、图6、图9中的第一人物图像461所示的示例。示例性的,目标视频中的第一人物图像可以参照图15中的第一人物图像1561所示的示例。Exemplarily, for the first person image in the target video, reference may be made to the examples shown in the first person image 461 in FIG. 5 , FIG. 6 , and FIG. 9 . Exemplarily, for the first character image in the target video, reference may be made to the example shown in the first character image 1561 in FIG. 15 .
可选的,在所述第一电子设备获取第一视频之前,所述方法还包括:所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为所述第二人物的电子设备;所述第一电子设备获取第一视频,包括:所述第一电子设备在视频通话过程中,获取所述第一视频;所述方法还包括:所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取所述第二视频。Optionally, before the first electronic device acquires the first video, the method further includes: the first electronic device establishes a video call connection between the first electronic device and the second electronic device, and the first electronic device establishes a video call connection between the first electronic device and the second electronic device. The electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the second character; acquiring the first video by the first electronic device includes: the first electronic device is in a video call During the process, the first video is acquired; the method further includes: the first electronic device acquires the second video from the second electronic device through the video call connection.
示例性的,视频通话连接的建立过程可以参照图14至图15所示的示例。Exemplarily, for the process of establishing a video call connection, reference may be made to the examples shown in FIG. 14 to FIG. 15 .
示例性的,第二人物以及第二视频可以参照图15的第二人物图像1571所示的示例。Exemplarily, for the second character and the second video, reference may be made to the example shown in the second character image 1571 in FIG. 15 .
可选的,所述第一视频、所述第二视频对应所述视频通话过程中的相同时段,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。示例性的,目标视频的某个帧可以参照图15所示的用户界面所示。也就是说,第一人物和第二人物可以同步做出相似的动作,从基于第二人物的动作,对第一视频处理,使目标视频中第一人物的第二人物的动作更加协调。Optionally, the first video and the second video correspond to the same time period during the video call, the target video further includes a second character image of the second character, and the target video Actions of the second character correspond to actions of the second character in the second video. Exemplarily, a certain frame of the target video may be shown with reference to the user interface shown in FIG. 15 . That is to say, the first character and the second character can perform similar actions synchronously. From the actions of the second character, the first video is processed to make the actions of the first character and the second character in the target video more coordinated.
示例性的,目标视频中的第二人物图像可以参照图15中的第二人物图像1571所示的示例。Exemplarily, for the second person image in the target video, reference may be made to the example shown in the second person image 1571 in FIG. 15 .
可选的,所述方法还包括:所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件,生成所述目标视频, 所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第二人物的动作对应。Optionally, the method further includes: acquiring, by the first electronic device, a third video, where the third video is a video of a third person; and acquiring, by the first electronic device, a third video corresponding to the third video. an action file, wherein the third action file corresponds to the action of the third character; the first electronic device generates a target video according to the first video, the first action file, and the second action file, including: the first electronic device generates the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the The target video further includes a third character image of the third character, the actions of the third character in the target video are different from those of the third character in the third video, and the actions of the third character in the target video are different from those of the third character in the target video. The actions of the third character correspond to the actions of the second character in the second video.
示例性的,第三视频可以参照图10的第三界面区域1060所示的示例。第三视频中第三人物的图像可以参照10的第三人物图像1061所示的示例。Exemplarily, the third video may refer to the example shown in the third interface area 1060 of FIG. 10 . For the image of the third person in the third video, reference may be made to the example shown in the image 1061 of the third person in 10 .
示例性的,目标视频可以参照图11的第三图像区域1160所示的示例,或者参照图11的第三图像区域1160、第四图像区域1170所示的示例,或者参照图12的第三图像区域1260所示的示例,或者参照图12的第三图像区域1260、第四图像区域1270所示的示例,或者参照图13的用户界面1300所示的示例。Exemplarily, the target video may refer to the example shown in the third image area 1160 in FIG. 11 , or the example shown in the third image area 1160 and the fourth image area 1170 in FIG. 11 , or the third image in FIG. 12 . The example shown in area 1260, or refer to the example shown in the third image area 1260, the fourth image area 1270 of FIG. 12, or refer to the example shown in the user interface 1300 of FIG.
可选的,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。Optionally, the target video further includes a second character image of the second character, and actions of the second character in the target video correspond to actions of the second character in the second video.
可选的,所述第一人物图像、所述第二人物图像属于所述目标视频中的同一帧图像。Optionally, the first person image and the second person image belong to the same frame image in the target video.
可选的,所述第二视频为所述第二人物和所述第四人物的视频,所述方法还包括:所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;所述第一电子设备获取第四动作文件,所述第四动作文件与所述第二视频中的所述第四人物的动作对应;所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件、所述第四动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第四人物的动作对应。Optionally, the second video is a video of the second character and the fourth character, and the method further includes: acquiring, by the first electronic device, a third video, and the third video is a third character the first electronic device obtains a third action file corresponding to the third video, and the third action file corresponds to the action of the third character; the first electronic device obtains a fourth action file , the fourth action file corresponds to the action of the fourth character in the second video; the first electronic device is based on the first video, the first action file, and the second action file , generating a target video, including: the first electronic device according to the first video, the third video, the first action file, the second action file, the third action file, the first action file Four action files to generate the target video, the target video further includes a third character image of the third character, the actions of the third character in the target video and the third character in the third video The actions of the characters are different, and the actions of the third character in the target video correspond to the actions of the fourth character in the second video.
可选的,所述目标视频还包括所述第二人物的第二人物图像和所述第四人物的第四人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应,所述目标视频中所述第四人物的动作与所述第二视频中所述第四人物的动作对应。Optionally, the target video further includes a second character image of the second character and a fourth character image of the fourth character, and the actions of the second character in the target video are related to the second video. The action of the second character in the target video corresponds to the action of the fourth character in the target video, and the action of the fourth character in the second video corresponds to the action of the fourth character in the second video.
可选的,所述第一人物图像、所述第二人物图像、所述第三人物图像、所述第四人物图像属于所述目标视频中的同一帧图像。Optionally, the first person image, the second person image, the third person image, and the fourth person image belong to the same frame of images in the target video.
可选的,在所述第一电子设备获取第一视频之前,所述方法还包括:所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为第三人物的电子设备;所述第一电子设备获取第一视频,包括:所述第一电子设备在视频通话过程中,获取所述第一视频;所述第一电子设备获取第三视频,包括:所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取第三视频。Optionally, before the first electronic device acquires the first video, the method further includes: the first electronic device establishes a video call connection between the first electronic device and the second electronic device, and the first electronic device establishes a video call connection between the first electronic device and the second electronic device. The electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the third character; the acquisition of the first video by the first electronic device includes: the first electronic device is in the process of a video call , acquiring the first video; and acquiring, by the first electronic device, a third video, comprising: the first electronic device acquiring the third video from the second electronic device through the video call connection.
示例性的,第一电子设备与第二电子设备的视频通话的过程可以参照图14至图15所示的示例。Exemplarily, for the process of the video call between the first electronic device and the second electronic device, reference may be made to the examples shown in FIG. 14 to FIG. 15 .
可选的,所述第一视频、所述第三视频对应所述视频通话过程中的相同时段。Optionally, the first video and the third video correspond to the same time period during the video call.
可选的,所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,包括:所述第一电子设备通过拍摄应用或视频通话应用,建立所述第一电子设备与第二电子设备的视频通话连接。Optionally, establishing, by the first electronic device, a video call connection between the first electronic device and the second electronic device includes: establishing, by the first electronic device, the first electronic device through a photographing application or a video calling application. A video call connection with a second electronic device.
示例性的,拍摄应用可以参照图3所示的示例。Exemplarily, for a photographing application, reference may be made to the example shown in FIG. 3 .
示例性的,视频通话应用可以参照图14至图15所示的示例。Exemplarily, the video call application may refer to the examples shown in FIG. 14 to FIG. 15 .
可选的,所述第二视频为本地或云端存储的视频。Optionally, the second video is a video stored locally or in the cloud.
示例性的,本地存储的视频可以参照图3所示的图库合拍控件340所示的示例。Exemplarily, for the locally stored video, reference may be made to the example shown in the gallery co-shot control 340 shown in FIG. 3 .
示例性的,云端存储的视频可以参照图3所示的素材合拍控件330所示的示例。Exemplarily, for the video stored in the cloud, reference may be made to the example shown in the material co-shot control 330 shown in FIG. 3 .
可选的,所述第一电子设备获取与第二视频对应的第二动作文件,包括:所述第一电子设备从第二电子设备获取所述第二动作文件。Optionally, acquiring, by the first electronic device, a second action file corresponding to the second video includes: acquiring, by the first electronic device, the second action file from the second electronic device.
可选的,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应,包括:与所述第一人物图像对应的动作文件为第一目标动作文件,所述第一动作文件与所述第二动作文件之间的匹配度为第一匹配度,所述第一目标动作文件与所述第二动作文件之间的匹配度为第二匹配度,所述第二匹配度大于所述第一匹配度。Optionally, the action of the first character in the target video corresponds to the action of the second character in the second video, including: the action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the matching degree between the first target action file and the second action file is the second matching degree , the second matching degree is greater than the first matching degree.
可选的,所述第一电子设备获取与所述第一视频对应的第一动作文件,包括:所述第一电子设备根据以下至少两项,确定所述第一动作子文件:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。Optionally, obtaining, by the first electronic device, a first action file corresponding to the first video includes: the first electronic device determining the first action sub-file according to at least two of the following: a first header Part pixel, first neck pixel, first torso pixel, first left upper forelimb pixel, first left upper hindlimb pixel, first left lower forelimb pixel, first left lower hindlimb pixel, first right upper forelimb pixel point, the first right upper hind limb pixel point, the first right lower forelimb pixel point, the first right lower hind limb pixel point, the first left hand pixel point, and the first right hand pixel point.
示例性的,第一动作子文件可以参照图7中的第一动作子文件711所示的示例。Exemplarily, the first action sub-file may refer to the example shown in the first action sub-file 711 in FIG. 7 .
可选的,所述第一动作子文件包括以下至少一项肢体角度:第一头部角度、第一颈部角度、第一躯干角度、第一左上前肢角度、第一左上后肢角度、第一左下前肢角度、第一左下后肢角度、第一右上前肢角度、第一右上后肢角度、第一右下前肢角度、第一右下后肢角度、第一左手角度、第一右手角度。Optionally, the first action subfile includes at least one of the following limb angles: a first head angle, a first neck angle, a first trunk angle, a first upper left forelimb angle, a first upper left hind limb angle, a first Left lower forelimb angle, first left lower hindlimb angle, first right upper forelimb angle, first right upper hindlimb angle, first right lower forelimb angle, first right lower hindlimb angle, first left hand angle, first right hand angle.
可选的,所述第一动作文件对应第一肢体角度,所述第二动作文件对应第二肢体角度,所述目标动作文件对应第三肢体角度,所述第一肢体角度与所述第二肢体角度的差值小于预设角度,所述第三肢体角度介于所述第一肢体角度与所述第二肢体角度之间。Optionally, the first action file corresponds to a first limb angle, the second action file corresponds to a second limb angle, the target action file corresponds to a third limb angle, and the first limb angle is the same as the second limb angle. The difference between the limb angles is smaller than a preset angle, and the third limb angle is between the first limb angle and the second limb angle.
可选的,所述第一视频包括第一子帧、第二子帧,所述第二视频包括第三子帧、第四子帧,所述目标视频包括第五子帧、第六子帧,所述第一子帧、所述第三子帧、所述第五子帧相互对应,所述第二子帧、所述第四子帧、所述第六子帧相互对应,所述第一子帧与所述第二子帧之间的时间差为第一时间差,所述第三子帧与所述第四子帧之间的时间差为第二时间差,所述第五子帧与所述第六子帧的时间差为第三时间差,所述第三时间差介于所述第一时间差与所述第二时间差之间。Optionally, the first video includes a first subframe and a second subframe, the second video includes a third subframe and a fourth subframe, and the target video includes a fifth subframe and a sixth subframe , the first subframe, the third subframe, and the fifth subframe correspond to each other, the second subframe, the fourth subframe, and the sixth subframe correspond to each other, and the first subframe The time difference between a subframe and the second subframe is the first time difference, the time difference between the third subframe and the fourth subframe is the second time difference, and the fifth subframe and the The time difference of the sixth subframe is a third time difference, and the third time difference is between the first time difference and the second time difference.
可选的,所述目标视频包括第一图像区域、第二图像区域,所述第一图像区域包括与所述第一人物对应的像素点,所述第二图像区域包括与所述第二人物对应的像素点。Optionally, the target video includes a first image area and a second image area, the first image area includes pixels corresponding to the first character, and the second image area includes pixels corresponding to the second character. corresponding pixels.
示例性的,第一图像区域可以参照图5、图6、图9中的第一图像区域560所示的示例。示例性的,目标视频中的第一人物图像可以参照图15中的第一界面区域1560所示的示例。Exemplarily, for the first image area, reference may be made to the examples shown in the first image area 560 in FIG. 5 , FIG. 6 , and FIG. 9 . Exemplarily, for the first character image in the target video, reference may be made to the example shown in the first interface area 1560 in FIG. 15 .
可选的,所述第一图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。Optionally, the first image area includes pixels corresponding to any of the following: a first background image, a second background image, and a target gallery image, and the first background image includes a scene with the first character. Corresponding pixel points, the second background image includes pixel points corresponding to the scene where the second character is located, and the target gallery image is an image stored on the first electronic device.
示例性的,所述第一图像区域包括第一背景图像,第一图像区域例如可以是图5所示的第一图像区域560。Exemplarily, the first image area includes a first background image, and the first image area may be, for example, the first image area 560 shown in FIG. 5 .
示例性的,所述第一图像区域包括第二背景图像,第一图像区域例如可以是图11所示的第三图像区域1160。Exemplarily, the first image area includes a second background image, and the first image area may be, for example, the third image area 1160 shown in FIG. 11 .
可选的,所述第二图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。Optionally, the second image area includes pixels corresponding to any one of the following: a first background image, a second background image, and a target gallery image, and the first background image includes a scene with the first character. Corresponding pixel points, the second background image includes pixel points corresponding to the scene where the second character is located, and the target gallery image is an image stored on the first electronic device.
示例性的,所述第二图像区域包括第一背景图像,第二图像区域例如可以是图5所示的第二图像区域570。Exemplarily, the second image area includes the first background image, and the second image area may be, for example, the second image area 570 shown in FIG. 5 .
示例性的,所述第二图像区域包括第二背景图像,第二图像区域例如可以是图11所示的第四图像区域1170。Exemplarily, the second image area includes a second background image, and the second image area may be, for example, the fourth image area 1170 shown in FIG. 11 .
可选的,所述合拍视频还包括背景图像区域,所述背景图像区域为所述第一图像区域、所述第二图像区域的背景,所述背景图像区域包括与以下任一项对应的像素点:第一背景图像、第二背景图像、目标图库图像,所述第一背景图像包括与所述第一人物所在场景对应的像素点,所述第二背景图像包括与所述第二人物所在场景对应的像素点,所述目标图库图像为存储在所述第一电子设备上的图像。Optionally, the co-shot video further includes a background image area, the background image area is the background of the first image area and the second image area, and the background image area includes pixels corresponding to any of the following: Points: a first background image, a second background image, and a target gallery image, the first background image includes pixels corresponding to the scene where the first character is located, and the second background image includes pixels corresponding to the scene where the second character is located The pixel points corresponding to the scene, and the target gallery image is an image stored on the first electronic device.
示例性的,背景图像区域包括目标图库图像,背景图像区域例如可以是图6所示的第一背景图像区域580,或图13所示的第二背景图像区域1380。Exemplarily, the background image area includes a target gallery image, and the background image area may be, for example, the first background image area 580 shown in FIG. 6 or the second background image area 1380 shown in FIG. 13 .
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above-mentioned functions, the electronic device includes corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device can be divided into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图17示出了上述实施例中涉及的电子设备1700的一种可能的组成示意图,如图17所示,该电子设备1700可以包括:获取单元1701、处理单元1702。In the case where each functional module is divided according to each function, FIG. 17 shows a possible schematic diagram of the composition of the electronic device 1700 involved in the above embodiment. As shown in FIG. 17 , the electronic device 1700 may include: an acquisition unit 1701 . Processing unit 1702 .
获取单元1701可以用于获取第一视频,所述第一视频为第一人物的视频。The obtaining unit 1701 may be configured to obtain a first video, where the first video is a video of a first character.
获取单元1701还可以用于获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应。The obtaining unit 1701 may also be configured to obtain a first action file corresponding to the first video, where the first action file corresponds to the action of the first character.
获取单元1701还可以用于获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应。The obtaining unit 1701 may also be configured to obtain a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to the action of the second character.
处理单元1702可以用于根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第 一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应。The processing unit 1702 may be configured to generate a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video The actions of the first character in the video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. Action corresponds.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that, all relevant contents of the steps involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here.
在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行上述各个单元执行的步骤。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。Where an integrated unit is employed, the electronic device may include a processing module, a memory module and a communication module. The processing module may be used to control and manage the actions of the electronic device, for example, may be used to support the electronic device to perform the steps performed by the above units. The storage module may be used to support the electronic device to execute stored program codes and data, and the like. The communication module can be used to support the communication between the electronic device and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块可以是收发器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like. The storage module may be a memory. The communication module may be a transceiver. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1所示结构的设备。In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a device having the structure shown in FIG. 1 .
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的处理视频的方法。This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the method for processing video in the above-mentioned embodiment. .
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的处理视频的方法。This embodiment also provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the above-mentioned relevant steps, so as to realize the method for processing a video in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的处理视频的方法。In addition, the embodiments of the present application also provide an apparatus, which may specifically be a chip, a component or a module, and the apparatus may include a connected processor and a memory; wherein, the memory is used for storing computer execution instructions, and when the apparatus is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the video processing method in the foregoing method embodiments.
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference can be made to the corresponding provided above. The beneficial effects in the method will not be repeated here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间 接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (40)

  1. 一种处理视频的方法,其特征在于,包括:A method for processing video, comprising:
    第一电子设备获取第一视频,所述第一视频为第一人物的视频;The first electronic device acquires a first video, where the first video is a video of a first character;
    所述第一电子设备获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应;obtaining, by the first electronic device, a first action file corresponding to the first video, where the first action file corresponds to an action of the first character;
    所述第一电子设备获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应;The first electronic device obtains a second action file corresponding to a second video, the second video is a video of a second character, and the second action file corresponds to an action of the second character;
    所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应。The first electronic device generates a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video The actions of the first character in the video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. Action corresponds.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一电子设备获取第一视频之前,所述方法还包括:The method according to claim 1, wherein before the first electronic device acquires the first video, the method further comprises:
    所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为所述第二人物的电子设备;The first electronic device establishes a video call connection between the first electronic device and a second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the second electronic device the character's electronic equipment;
    所述第一电子设备获取第一视频,包括:The first electronic device obtains the first video, including:
    所述第一电子设备在视频通话过程中,获取所述第一视频;The first electronic device acquires the first video during a video call;
    所述方法还包括:The method also includes:
    所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取所述第二视频。The first electronic device acquires the second video from the second electronic device through the video call connection.
  3. 根据权利要求2所述的方法,其特征在于,所述第一视频、所述第二视频对应所述视频通话过程中的相同时段,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。The method according to claim 2, wherein the first video and the second video correspond to the same time period during the video call, and the target video further includes a second character of the second character An image, the actions of the second character in the target video correspond to the actions of the second character in the second video.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;The first electronic device acquires a third video, and the third video is a video of a third character;
    所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;The first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
    所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:The first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
    所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第二人物的动作对应。The first electronic device generates the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the target video Also includes a third character image of the third character, the action of the third character in the target video is different from the action of the third character in the third video, and the third character in the target video is different. The action of the character corresponds to the action of the second character in the second video.
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。The method according to any one of claims 2 to 4, wherein the target video further comprises a second character image of the second character, and the movement of the second character in the target video is the same as the corresponding to the actions of the second character in the second video.
  6. 根据权利要求5所述的方法,其特征在于,所述第一人物图像、所述第二人物图 像属于所述目标视频中的同一帧图像。The method according to claim 5, wherein the first person image and the second person image belong to the same frame image in the target video.
  7. 根据权利要求1所述的方法,其特征在于,所述第二视频为所述第二人物和所述第四人物的视频,所述方法还包括:The method according to claim 1, wherein the second video is a video of the second person and the fourth person, and the method further comprises:
    所述第一电子设备获取第三视频,所述第三视频为第三人物的视频;The first electronic device acquires a third video, and the third video is a video of a third character;
    所述第一电子设备获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;The first electronic device acquires a third action file corresponding to the third video, and the third action file corresponds to the action of the third character;
    所述第一电子设备获取第四动作文件,所述第四动作文件与所述第二视频中的所述第四人物的动作对应;The first electronic device acquires a fourth action file, where the fourth action file corresponds to the action of the fourth character in the second video;
    所述第一电子设备根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,包括:The first electronic device generates a target video according to the first video, the first action file, and the second action file, including:
    所述第一电子设备根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件、所述第四动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第四人物的动作对应。The first electronic device generates the said first video, the third video, the first action file, the second action file, the third action file, and the fourth action file A target video, the target video further includes a third character image of the third character, the action of the third character in the target video is different from the action of the third character in the third video, the The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
  8. 根据权利要求7所述的方法,其特征在于,所述目标视频还包括所述第二人物的第二人物图像和所述第四人物的第四人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应,所述目标视频中所述第四人物的动作与所述第二视频中所述第四人物的动作对应。The method according to claim 7, wherein the target video further comprises a second character image of the second character and a fourth character image of the fourth character, and the second character in the target video The action of the character corresponds to the action of the second character in the second video, and the action of the fourth character in the target video corresponds to the action of the fourth character in the second video.
  9. 根据权利要求8所述的方法,其特征在于,所述第一人物图像、所述第二人物图像、所述第三人物图像、所述第四人物图像属于所述目标视频中的同一帧图像。The method according to claim 8, wherein the first person image, the second person image, the third person image, and the fourth person image belong to the same frame image in the target video .
  10. 根据权利要求4、7-9中任一项所述的方法,其特征在于,在所述第一电子设备获取第一视频之前,所述方法还包括:The method according to any one of claims 4, 7-9, wherein before the first electronic device acquires the first video, the method further comprises:
    所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,所述第一电子设备为所述第一人物的电子设备,所述第二电子设备为第三人物的电子设备;The first electronic device establishes a video call connection between the first electronic device and the second electronic device, where the first electronic device is the electronic device of the first character, and the second electronic device is the third character's electronic device Electronic equipment;
    所述第一电子设备获取第一视频,包括:The first electronic device obtains the first video, including:
    所述第一电子设备在视频通话过程中,获取所述第一视频;The first electronic device acquires the first video during a video call;
    所述第一电子设备获取第三视频,包括:The first electronic device acquires the third video, including:
    所述第一电子设备通过所述视频通话连接,从所述第二电子设备获取第三视频。The first electronic device acquires a third video from the second electronic device through the video call connection.
  11. 根据权利要求10所述的方法,其特征在于,所述第一视频、所述第三视频对应所述视频通话过程中的相同时段。The method according to claim 10, wherein the first video and the third video correspond to the same time period during the video call.
  12. 根据权利要求2、3、10、11中任一项所述的方法,其特征在于,所述第一电子设备建立所述第一电子设备与第二电子设备的视频通话连接,包括:The method according to any one of claims 2, 3, 10, and 11, wherein, establishing, by the first electronic device, a video call connection between the first electronic device and the second electronic device, comprising:
    所述第一电子设备通过拍摄应用或视频通话应用,建立所述第一电子设备与第二电子设备的视频通话连接。The first electronic device establishes a video call connection between the first electronic device and the second electronic device through a photographing application or a video calling application.
  13. 根据权利要求1所述的方法,其特征在于,所述第二视频为本地或云端存储的视频。The method according to claim 1, wherein the second video is a video stored locally or in the cloud.
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述第一电子设备获取与第二视频对应的第二动作文件,包括:The method according to any one of claims 1 to 13, wherein the obtaining, by the first electronic device, a second action file corresponding to the second video comprises:
    所述第一电子设备从第二电子设备获取所述第二动作文件。The first electronic device acquires the second action file from the second electronic device.
  15. 根据权利要求1至14中任一项所述的方法,其特征在于,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应,包括:The method according to any one of claims 1 to 14, wherein the action of the first character in the target video corresponds to the action of the second character in the second video, comprising:
    与所述第一人物图像对应的动作文件为第一目标动作文件,所述第一动作文件与所述第二动作文件之间的匹配度为第一匹配度,所述第一目标动作文件与所述第二动作文件之间的匹配度为第二匹配度,所述第二匹配度大于所述第一匹配度。The action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the first target action file and The matching degree between the second action files is a second matching degree, and the second matching degree is greater than the first matching degree.
  16. 根据权利要求1至15中任一项所述的方法,其特征在于,所述第一电子设备获取与所述第一视频对应的第一动作文件,包括:The method according to any one of claims 1 to 15, wherein the obtaining, by the first electronic device, a first action file corresponding to the first video comprises:
    所述第一电子设备根据以下至少两项,确定所述第一动作子文件:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。The first electronic device determines the first action sub-file according to at least two of the following: a first head pixel, a first neck pixel, a first torso pixel, a first upper left forelimb pixel, a first Left upper hindlimb pixel point, first left lower forelimb pixel point, first left lower hindlimb pixel point, first right upper forelimb pixel point, first right upper hindlimb pixel point, first right lower forelimb pixel point, first right lower hindlimb pixel point, A left-hand pixel, a first right-hand pixel.
  17. 根据权利要求1至16中任一项所述的方法,其特征在于,所述第一动作子文件包括以下至少一项肢体角度:The method according to any one of claims 1 to 16, wherein the first action subfile includes at least one of the following limb angles:
    第一头部角度、第一颈部角度、第一躯干角度、第一左上前肢角度、第一左上后肢角度、第一左下前肢角度、第一左下后肢角度、第一右上前肢角度、第一右上后肢角度、第一右下前肢角度、第一右下后肢角度、第一左手角度、第一右手角度。The first head angle, the first neck angle, the first trunk angle, the first left upper forelimb angle, the first left upper hindlimb angle, the first left lower forelimb angle, the first left lower hindlimb angle, the first right upper forelimb angle, the first right upper Hind limb angle, first right lower forelimb angle, first right lower hind limb angle, first left hand angle, first right hand angle.
  18. 根据权利要求1至17中任一项所述的方法,其特征在于,所述第一动作文件对应第一肢体角度,所述第二动作文件对应第二肢体角度,所述目标动作文件对应第三肢体角度,所述第一肢体角度与所述第二肢体角度的差值小于预设角度,所述第三肢体角度介于所述第一肢体角度与所述第二肢体角度之间。The method according to any one of claims 1 to 17, wherein the first action file corresponds to a first limb angle, the second action file corresponds to a second limb angle, and the target action file corresponds to a first limb angle. Three limb angles, the difference between the first limb angle and the second limb angle is smaller than a preset angle, and the third limb angle is between the first limb angle and the second limb angle.
  19. 根据权利要求1至18中任一项所述的方法,其特征在于,所述第一视频包括第一子帧、第二子帧,所述第二视频包括第三子帧、第四子帧,所述目标视频包括第五子帧、第六子帧,所述第一子帧、所述第三子帧、所述第五子帧相互对应,所述第二子帧、所述第四子帧、所述第六子帧相互对应,所述第一子帧与所述第二子帧之间的时间差为第一时间差,所述第三子帧与所述第四子帧之间的时间差为第二时间差,所述第五子帧与所述第六子帧的时间差为第三时间差,所述第三时间差介于所述第一时间差与所述第二时间差之间。The method according to any one of claims 1 to 18, wherein the first video includes a first subframe and a second subframe, and the second video includes a third subframe and a fourth subframe , the target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other, the second subframe, the fourth subframe The subframe and the sixth subframe correspond to each other, the time difference between the first subframe and the second subframe is the first time difference, and the time difference between the third subframe and the fourth subframe is the first time difference. The time difference is a second time difference, the time difference between the fifth subframe and the sixth subframe is a third time difference, and the third time difference is between the first time difference and the second time difference.
  20. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    处理器、存储器和收发器,所述存储器用于存储计算机程序,所述处理器用于执行所述存储器中存储的计算机程序;其中,a processor, a memory, and a transceiver, the memory for storing a computer program, the processor for executing the computer program stored in the memory; wherein,
    所述处理器用于,获取第一视频,所述第一视频为第一人物的视频;The processor is configured to obtain a first video, where the first video is a video of a first character;
    所述处理器还用于,获取与所述第一视频对应的第一动作文件,所述第一动作文件与所述第一人物的动作对应;The processor is further configured to acquire a first action file corresponding to the first video, where the first action file corresponds to the action of the first character;
    所述处理器还用于,获取与第二视频对应的第二动作文件,所述第二视频为第二人物的视频,所述第二动作文件与所述第二人物的动作对应;The processor is further configured to acquire a second action file corresponding to a second video, where the second video is a video of a second character, and the second action file corresponds to an action of the second character;
    所述处理器还用于,根据所述第一视频、所述第一动作文件、所述第二动作文件,生成目标视频,所述目标视频包括所述第一人物的第一人物图像,所述目标视频中所述第一人物的动作与所述第一视频中所述第一人物的动作不同,所述目标视频中所述第一人物的 动作与所述第二视频中所述第二人物的动作对应。The processor is further configured to generate a target video according to the first video, the first action file, and the second action file, where the target video includes a first character image of the first character, and the target video is The actions of the first character in the target video are different from those of the first character in the first video, and the actions of the first character in the target video are different from those of the second character in the second video. The actions of the characters correspond.
  21. 根据权利要求20所述的电子设备,其特征在于,在所述处理器获取第一视频之前,所述处理器还用于:The electronic device according to claim 20, wherein before the processor acquires the first video, the processor is further configured to:
    建立所述电子设备与第二电子设备的视频通话连接,所述电子设备为所述第一人物的电子设备,所述第二电子设备为所述第二人物的电子设备;establishing a video call connection between the electronic device and a second electronic device, where the electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the second character;
    所述处理器具体用于,在视频通话过程中,获取所述第一视频;The processor is specifically configured to acquire the first video during a video call;
    所述处理器还用于,通过所述视频通话连接,从所述第二电子设备获取所述第二视频。The processor is further configured to acquire the second video from the second electronic device through the video call connection.
  22. 根据权利要求21所述的电子设备,其特征在于,所述第一视频、所述第二视频对应所述视频通话过程中的相同时段,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。The electronic device according to claim 21, wherein the first video and the second video correspond to the same time period during the video call, and the target video further includes a second image of the second character. A character image, where the actions of the second character in the target video correspond to the actions of the second character in the second video.
  23. 根据权利要求20所述的电子设备,其特征在于,所述处理器还用于:The electronic device according to claim 20, wherein the processor is further configured to:
    获取第三视频,所述第三视频为第三人物的视频;obtaining a third video, where the third video is a video of a third character;
    获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;acquiring a third action file corresponding to the third video, where the third action file corresponds to the action of the third character;
    所述处理器具体用于,根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第二人物的动作对应。The processor is specifically configured to generate the target video according to the first video, the third video, the first action file, the second action file, and the third action file, and the The target video further includes a third character image of the third character, the actions of the third character in the target video are different from those of the third character in the third video, and the actions of the third character in the target video are different from those of the third character in the target video. The actions of the third character correspond to the actions of the second character in the second video.
  24. 根据权利要求21至23中任一项所述的电子设备,其特征在于,所述目标视频还包括所述第二人物的第二人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应。The electronic device according to any one of claims 21 to 23, wherein the target video further includes a second character image of the second character, and the action of the second character in the target video is the same as the one of the second character. The action of the second character in the second video corresponds to.
  25. 根据权利要求24所述的电子设备,其特征在于,所述第一人物图像、所述第二人物图像属于所述目标视频中的同一帧图像。The electronic device according to claim 24, wherein the first person image and the second person image belong to the same frame image in the target video.
  26. 根据权利要求20所述的电子设备,其特征在于,所述第二视频为所述第二人物和所述第四人物的视频,所述处理器还用于:The electronic device according to claim 20, wherein the second video is a video of the second character and the fourth character, and the processor is further configured to:
    获取第三视频,所述第三视频为第三人物的视频;obtaining a third video, where the third video is a video of a third character;
    获取与所述第三视频对应的第三动作文件,所述第三动作文件与所述第三人物的动作对应;acquiring a third action file corresponding to the third video, where the third action file corresponds to the action of the third character;
    获取第四动作文件,所述第四动作文件与所述第二视频中的所述第四人物的动作对应;acquiring a fourth action file, the fourth action file corresponds to the action of the fourth character in the second video;
    所述处理器具体用于,根据所述第一视频、所述第三视频、所述第一动作文件、所述第二动作文件、所述第三动作文件、所述第四动作文件,生成所述目标视频,所述目标视频还包括所述第三人物的第三人物图像,所述目标视频中所述第三人物的动作与所述第三视频中所述第三人物的动作不同,所述目标视频中所述第三人物的动作与所述第二视频中所述第四人物的动作对应。The processor is specifically configured to, according to the first video, the third video, the first action file, the second action file, the third action file, and the fourth action file, generate the target video, the target video further includes a third character image of the third character, and the movement of the third character in the target video is different from the movement of the third character in the third video, The actions of the third character in the target video correspond to the actions of the fourth character in the second video.
  27. 根据权利要求26所述的电子设备,其特征在于,所述目标视频还包括所述第二人物的第二人物图像和所述第四人物的第四人物图像,所述目标视频中所述第二人物的动作与所述第二视频中所述第二人物的动作对应,所述目标视频中所述第四人物的动作与所 述第二视频中所述第四人物的动作对应。The electronic device according to claim 26, wherein the target video further comprises a second character image of the second character and a fourth character image of the fourth character, and the first character in the target video The movements of the two characters correspond to the movements of the second character in the second video, and the movements of the fourth character in the target video correspond to the movements of the fourth character in the second video.
  28. 根据权利要求27所述的电子设备,其特征在于,所述第一人物图像、所述第二人物图像、所述第三人物图像、所述第四人物图像属于所述目标视频中的同一帧图像。The electronic device according to claim 27, wherein the first person image, the second person image, the third person image, and the fourth person image belong to the same frame in the target video image.
  29. 根据权利要求23、26-28中任一项所述的电子设备,其特征在于,在所述处理器获取第一视频之前,所述处理器还用于:The electronic device according to any one of claims 23, 26-28, wherein before the processor acquires the first video, the processor is further configured to:
    建立所述电子设备与第二电子设备的视频通话连接,所述电子设备为所述第一人物的电子设备,所述第二电子设备为第三人物的电子设备;establishing a video call connection between the electronic device and a second electronic device, where the electronic device is the electronic device of the first character, and the second electronic device is the electronic device of the third character;
    所述处理器具体用于,在视频通话过程中,获取所述第一视频;The processor is specifically configured to acquire the first video during a video call;
    所述处理器具体用于,通过所述视频通话连接,从所述第二电子设备获取第三视频。The processor is specifically configured to acquire a third video from the second electronic device through the video call connection.
  30. 根据权利要求29所述的电子设备,其特征在于,所述第一视频、所述第三视频对应所述视频通话过程中的相同时段。The electronic device according to claim 29, wherein the first video and the third video correspond to the same time period during the video call.
  31. 根据权利要求21、22、29、30中任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 21, 22, 29, and 30, wherein,
    所述处理器具体用于,通过拍摄应用或视频通话应用,建立所述电子设备与第二电子设备的视频通话连接。The processor is specifically configured to establish a video call connection between the electronic device and the second electronic device through a photographing application or a video calling application.
  32. 根据权利要求20所述的电子设备,其特征在于,所述第二视频为本地或云端存储的视频。The electronic device according to claim 20, wherein the second video is a video stored locally or in the cloud.
  33. 根据权利要求20至32中任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 20 to 32, wherein,
    所述处理器具体用于,从第二电子设备获取所述第二动作文件。The processor is specifically configured to acquire the second action file from the second electronic device.
  34. 根据权利要求20至33中任一项所述的电子设备,其特征在于,所述目标视频中所述第一人物的动作与所述第二视频中所述第二人物的动作对应,包括:The electronic device according to any one of claims 20 to 33, wherein the action of the first character in the target video corresponds to the action of the second character in the second video, comprising:
    与所述第一人物图像对应的动作文件为第一目标动作文件,所述第一动作文件与所述第二动作文件之间的匹配度为第一匹配度,所述第一目标动作文件与所述第二动作文件之间的匹配度为第二匹配度,所述第二匹配度大于所述第一匹配度。The action file corresponding to the first character image is the first target action file, the matching degree between the first action file and the second action file is the first matching degree, and the first target action file and The matching degree between the second action files is a second matching degree, and the second matching degree is greater than the first matching degree.
  35. 根据权利要求20至34中任一项所述的电子设备,其特征在于,The electronic device according to any one of claims 20 to 34, wherein,
    所述处理器具体用于,根据以下至少两项,确定所述第一动作子文件:第一头部像素点、第一颈部像素点、第一躯干像素点、第一左上前肢像素点、第一左上后肢像素点、第一左下前肢像素点、第一左下后肢像素点、第一右上前肢像素点、第一右上后肢像素点、第一右下前肢像素点、第一右下后肢像素点、第一左手像素点、第一右手像素点。The processor is specifically configured to, according to at least two of the following items, determine the first action sub-file: a first head pixel point, a first neck pixel point, a first torso pixel point, a first upper left forelimb pixel point, The first upper left hindlimb pixel point, the first left lower forelimb pixel point, the first left lower hindlimb pixel point, the first right upper forelimb pixel point, the first right upper hindlimb pixel point, the first right lower forelimb pixel point, the first right lower hindlimb pixel point , the first left-hand pixel, and the first right-hand pixel.
  36. 根据权利要求20至35中任一项所述的电子设备,其特征在于,所述第一动作子文件包括以下至少一项肢体角度:The electronic device according to any one of claims 20 to 35, wherein the first action subfile includes at least one of the following limb angles:
    第一头部角度、第一颈部角度、第一躯干角度、第一左上前肢角度、第一左上后肢角度、第一左下前肢角度、第一左下后肢角度、第一右上前肢角度、第一右上后肢角度、第一右下前肢角度、第一右下后肢角度、第一左手角度、第一右手角度。The first head angle, the first neck angle, the first trunk angle, the first left upper forelimb angle, the first left upper hindlimb angle, the first left lower forelimb angle, the first left lower hindlimb angle, the first right upper forelimb angle, the first right upper Hind limb angle, first right lower forelimb angle, first right lower hind limb angle, first left hand angle, first right hand angle.
  37. 根据权利要求20至36中任一项所述的电子设备,其特征在于,所述第一动作文件对应第一肢体角度,所述第二动作文件对应第二肢体角度,所述目标动作文件对应第三肢体角度,所述第一肢体角度与所述第二肢体角度的差值小于预设角度,所述第三肢体角度介于所述第一肢体角度与所述第二肢体角度之间。The electronic device according to any one of claims 20 to 36, wherein the first action file corresponds to a first limb angle, the second action file corresponds to a second limb angle, and the target action file corresponds to A third limb angle, the difference between the first limb angle and the second limb angle is smaller than a preset angle, and the third limb angle is between the first limb angle and the second limb angle.
  38. 根据权利要求20至37中任一项所述的电子设备,其特征在于,所述第一视频包括第一子帧、第二子帧,所述第二视频包括第三子帧、第四子帧,所述目标视频包括第五 子帧、第六子帧,所述第一子帧、所述第三子帧、所述第五子帧相互对应,所述第二子帧、所述第四子帧、所述第六子帧相互对应,所述第一子帧与所述第二子帧之间的时间差为第一时间差,所述第三子帧与所述第四子帧之间的时间差为第二时间差,所述第五子帧与所述第六子帧的时间差为第三时间差,所述第三时间差介于所述第一时间差与所述第二时间差之间。The electronic device according to any one of claims 20 to 37, wherein the first video includes a first subframe and a second subframe, and the second video includes a third subframe and a fourth subframe frame, the target video includes a fifth subframe, a sixth subframe, the first subframe, the third subframe, and the fifth subframe correspond to each other, the second subframe, the sixth subframe The four subframes and the sixth subframe correspond to each other, the time difference between the first subframe and the second subframe is the first time difference, and the time difference between the third subframe and the fourth subframe is The time difference is a second time difference, the time difference between the fifth subframe and the sixth subframe is a third time difference, and the third time difference is between the first time difference and the second time difference.
  39. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至19中任一项所述的方法。A computer storage medium, characterized by comprising computer instructions, which, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 19 .
  40. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至19中任一项所述的方法。A computer program product, characterized in that, when the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 19.
PCT/CN2021/136393 2021-02-09 2021-12-08 Video processing method and apparatus WO2022170837A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110178452.9 2021-02-09
CN202110178452 2021-02-09
CN202110529002.X 2021-05-14
CN202110529002.XA CN114915722B (en) 2021-02-09 2021-05-14 Method and device for processing video

Publications (1)

Publication Number Publication Date
WO2022170837A1 true WO2022170837A1 (en) 2022-08-18

Family

ID=82761282

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136393 WO2022170837A1 (en) 2021-02-09 2021-12-08 Video processing method and apparatus

Country Status (2)

Country Link
CN (1) CN114915722B (en)
WO (1) WO2022170837A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303251A (en) * 2016-08-26 2017-01-04 深圳市金立通信设备有限公司 A kind of photographic method and terminal
CN109982130A (en) * 2019-04-11 2019-07-05 北京字节跳动网络技术有限公司 A kind of video capture method, apparatus, electronic equipment and storage medium
CN110475086A (en) * 2019-07-23 2019-11-19 咪咕动漫有限公司 Video recording method and system, server and terminal
CN110602396A (en) * 2019-09-11 2019-12-20 腾讯科技(深圳)有限公司 Intelligent group photo method and device, electronic equipment and storage medium
WO2020215722A1 (en) * 2019-04-26 2020-10-29 北京谦仁科技有限公司 Method and device for video processing, electronic device, and computer-readable storage medium
US20200396419A1 (en) * 2018-07-10 2020-12-17 Tencent Technology (Shenzhen) Company Limited Method and apparatus for generating video file, and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259810A (en) * 2018-03-29 2018-07-06 上海掌门科技有限公司 A kind of method of video calling, equipment and computer storage media
CN111447379B (en) * 2019-01-17 2022-08-23 百度在线网络技术(北京)有限公司 Method and device for generating information
CN110198428A (en) * 2019-05-29 2019-09-03 维沃移动通信有限公司 A kind of multimedia file producting method and first terminal
CN110490897A (en) * 2019-07-30 2019-11-22 维沃移动通信有限公司 Imitate the method and electronic equipment that video generates
CN111405361B (en) * 2020-03-27 2022-06-14 咪咕文化科技有限公司 Video acquisition method, electronic equipment and computer readable storage medium
CN111726536B (en) * 2020-07-03 2024-01-05 腾讯科技(深圳)有限公司 Video generation method, device, storage medium and computer equipment
CN112287848A (en) * 2020-10-30 2021-01-29 腾讯科技(深圳)有限公司 Live broadcast-based image processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303251A (en) * 2016-08-26 2017-01-04 深圳市金立通信设备有限公司 A kind of photographic method and terminal
US20200396419A1 (en) * 2018-07-10 2020-12-17 Tencent Technology (Shenzhen) Company Limited Method and apparatus for generating video file, and storage medium
CN109982130A (en) * 2019-04-11 2019-07-05 北京字节跳动网络技术有限公司 A kind of video capture method, apparatus, electronic equipment and storage medium
WO2020215722A1 (en) * 2019-04-26 2020-10-29 北京谦仁科技有限公司 Method and device for video processing, electronic device, and computer-readable storage medium
CN110475086A (en) * 2019-07-23 2019-11-19 咪咕动漫有限公司 Video recording method and system, server and terminal
CN110602396A (en) * 2019-09-11 2019-12-20 腾讯科技(深圳)有限公司 Intelligent group photo method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114915722B (en) 2023-08-22
CN114915722A (en) 2022-08-16

Similar Documents

Publication Publication Date Title
WO2020125410A1 (en) Image processing method and electronic device
WO2021027476A1 (en) Method for voice controlling apparatus, and electronic apparatus
CN112558825A (en) Information processing method and electronic equipment
CN114579075B (en) Data processing method and related device
CN112262563B (en) Image processing method and electronic device
WO2020093988A1 (en) Image processing method and electronic device
US20210358523A1 (en) Image processing method and image processing apparatus
CN113687803A (en) Screen projection method, screen projection source end, screen projection destination end, screen projection system and storage medium
WO2022007862A1 (en) Image processing method, system, electronic device and computer readable storage medium
CN113099146B (en) Video generation method and device and related equipment
CN112527174B (en) Information processing method and electronic equipment
CN114115769A (en) Display method and electronic equipment
CN112527222A (en) Information processing method and electronic equipment
CN114040242A (en) Screen projection method and electronic equipment
WO2022007707A1 (en) Home device control method, terminal device, and computer-readable storage medium
CN113965694A (en) Video recording method, electronic device and computer readable storage medium
CN115048012A (en) Data processing method and related device
CN115689963A (en) Image processing method and electronic equipment
WO2022252649A1 (en) Video processing method and electronic device
WO2021254113A1 (en) Control method for three-dimensional interface and terminal
CN114827696B (en) Method for synchronously playing audio and video data of cross-equipment and electronic equipment
WO2023001043A1 (en) Content display method, electronic device and system
WO2023045597A1 (en) Cross-device transfer control method and apparatus for large-screen service
WO2022170837A1 (en) Video processing method and apparatus
WO2022170918A1 (en) Multi-person-capturing method and electronic device

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

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

Country of ref document: EP

Kind code of ref document: A1