Nothing Special   »   [go: up one dir, main page]

WO2021174389A1 - Video processing method and apparatus - Google Patents

Video processing method and apparatus Download PDF

Info

Publication number
WO2021174389A1
WO2021174389A1 PCT/CN2020/077469 CN2020077469W WO2021174389A1 WO 2021174389 A1 WO2021174389 A1 WO 2021174389A1 CN 2020077469 W CN2020077469 W CN 2020077469W WO 2021174389 A1 WO2021174389 A1 WO 2021174389A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
special effect
superimposed
foreground image
image
Prior art date
Application number
PCT/CN2020/077469
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 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/077469 priority Critical patent/WO2021174389A1/en
Priority to CN202080004468.1A priority patent/CN112544070A/en
Publication of WO2021174389A1 publication Critical patent/WO2021174389A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay

Definitions

  • This application relates to the field of image processing, and in particular to a video processing method and device.
  • the adversarial game time is short, the game rules are complex, the game process is intense and exciting, and there are many status information updates. If the data information is used to present the status information to the audience, the audience cannot adapt and deal with so much in a short time. It’s easy for viewers to get tired when watching game videos, especially live game videos, and easily overlook important information.
  • people of different ages have some entry-level special effects understanding of the game. For example, the health bar special effect of each target object represents the current life value information of the target object, if it appears Drop blood or increase experience can display the blood deduction value or gold coin bonus value above the target object. Therefore, transforming the status information into the presentation method of visual special effects can improve the audience's understanding of the game situation and viewing experience.
  • the content of the live broadcast screen changes frequently, and the shooting position changes greatly.
  • the live broadcast screen is rendered with AR special effects, a fixed angle or area will be selected, and it is impossible to perform high-compatibility real-time AR special effects rendering for the entire scene; moreover, the rendered special effects
  • the type is also relatively simple, and special effects can only be rendered in a relatively open location, but virtual special effects cannot interact with real target objects in the scene.
  • This application provides a video processing method and device.
  • an embodiment of the present application provides a video processing method, and the method includes:
  • an embodiment of the present application provides a video processing device, and the device includes:
  • Storage device for storing program instructions
  • One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
  • an embodiment of the present application provides a video processing method, and the method includes:
  • the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  • an embodiment of the present application provides a video processing device, and the device includes:
  • Storage device for storing program instructions
  • One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
  • the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  • the present application superimposes the real target object in the image according to the position information and contour information of the target object in the image, or the posture of the camera when the image is currently superimposed with the special effect.
  • the understanding of the video stream improves the visual experience of the audience.
  • FIG. 2 is a schematic diagram of a method flow of a video processing method in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of an implementation manner of superimposing a target object in an image according to position information and contour information in an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a process of superimposing a stereoscopic special effect on a target object in a foreground image in an embodiment of the present application
  • FIG. 5 is a schematic diagram of a method flow of a video processing method in another embodiment of the present application.
  • Some TV programs use scene-level AR special effects.
  • the shooting device for shooting TV shows is usually at a fixed angle. Fusion effects such as AR model special effects are not easy to wear, and the positions of models and special effects can be registered and tested in advance.
  • the AR live broadcast is mainly designed for the rendering of background scenes, and currently there is no rendering of independent target objects.
  • the content of the live broadcast screen changes frequently, and the shooting position changes greatly.
  • the live broadcast screen is rendered with AR special effects, a fixed angle or area will be selected, and it is impossible to perform high-compatibility real-time AR special effects rendering for the entire scene; moreover, the rendered special effects
  • the type is also relatively simple, and special effects can only be rendered in a relatively open location, but virtual special effects cannot interact with real target objects in the scene.
  • the application superimposes the real target object in the image with special effect, which is beneficial to the interaction between the special effect and the target object. Brings a better display of special effects, enriches the understanding of the video stream, thereby increasing the viewing and comprehensibility of the video stream presentation, and this combination of virtual and real can simplify the audience’s understanding of the video stream and improve the audience’s vision Feel.
  • the game server includes a game server and an AR (Augmented Reality) server.
  • the game server is used to communicate with robots on the game field. , Used to obtain the real-time status information of the robot, the data information of the sensors on the robot and other competition information; the AR server communicates with the shooting device, and is used to control the shooting device and obtain the data information of the shooting device, such as the video stream collected by the shooting device, and Process the video stream based on the game information, etc.
  • the number of game servers is one.
  • the game server includes an AR server.
  • the game server is independent of the AR server and communicates with the AR server. That is, the AR server obtains the game information through the game server and the video stream through the camera. Process and output the video stream according to the game information.
  • the robot competition system may also include a referee system.
  • the referee system communicates with the competition server and each robot respectively.
  • the referee system obtains real-time status information of each robot and data from sensors on each robot and other competition information, and transmits it to the competition. server.
  • the video processing method of the embodiment of the present application can be applied to online processing of videos, and can also be applied to offline processing of videos.
  • FIG. 2 is a schematic diagram of the method flow of the video processing method in an embodiment of the present application; the execution subject of the video processing method in the embodiment of the present application may be a game server or other devices capable of data processing, such as a personal terminal .
  • the video processing method of the embodiment of the present invention may include S201 to S203.
  • the video stream may be a live video stream or a non-live video stream; the video stream may be a video stream of a competitive game or a video stream of a non-competitive game.
  • the video stream in the embodiment of the present application may be collected by a camera, and the camera can be mounted on a pan-tilt or on a movable platform such as an unmanned aerial vehicle.
  • each frame of image including the target object in the video stream is processed to obtain position information and contour information of the target object in the image.
  • the video stream is a video stream of a competitive game
  • the target object includes one or more of a moving object and a stationary object.
  • the target object is a moving object, such as a robot, a drone, a mobile car, etc.; optionally, the target object is a stationary object, such as a prop device on the playing field; optionally, the target object includes a moving object and a stationary object object.
  • the implementation process of S202 may include: processing the video stream based on the instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream.
  • an instance segmentation algorithm based on deep learning is used to process each frame image of the video stream including the target object to obtain the position information and area mask map (ie mask image) of the target object in each image of the video stream. ), that is, the area mask map is used to characterize the contour information of the target object in each image of the video stream.
  • each target object on the image is classified at the pixel level. There is a clear segmentation boundary between all target objects, and the mask image can effectively solve the occlusion problem between multiple target objects.
  • the target object in the image can be divided by a rectangular frame, which pixels in the rectangular frame belong to the target object, and which target object the pixels in the overlapping area between multiple target objects belong to will also be clearly divided. Examples
  • the results of the segmentation algorithm can determine the position information and edge information of the target object on the image, especially for the target objects with occlusion and overlap.
  • the mask map of the target object obtained by the result of the instance segmentation algorithm can superimpose special effects with occlusion relationship on the target object in the image, which is conducive to the design of richer and more appropriate special effects for the target object.
  • the special effects in the embodiments of the present application may be three-dimensional special effects, such as three-dimensional special effects.
  • the three-dimensional effect of the three-dimensional special effect lies in the occlusion effect.
  • the special effect will be blocked by specific pixels in the image during the movement to form a three-dimensional effect; of course, the special effect may also be two Dimensional special effects.
  • the use of two-dimensional special effects may display the special effects of one target object in the area of other target objects, and the use of three-dimensional special effects can more accurately position the target objects and distinguish different degrees of occlusion Therefore, the special effects of each target object are only displayed in their respective areas, which effectively prevents the special effects from being superimposed on other target objects and causing misunderstandings in viewing.
  • the special effect can also be a frame animation special effect, which is a special effect displayed by sequentially playing a group of pictures at a specific position in the image.
  • the position information and contour information in S301 respectively refer to the position information of the target object in the image and the contour information of the target object in the image.
  • the position information and contour information in S302 respectively refer to the position information of the target object in the foreground image and the contour information of the target object in the foreground image.
  • the size of the foreground image is equal to the size of the image
  • the position of the target object in the foreground image is the same as the position of the target object in the image
  • the contour information of the target object in the foreground image is the same as that of the target object.
  • the contour information in the image is also the same.
  • Step 1 Determine the position of the special effect superimposed on the foreground image according to the position information
  • the position of the special effect superimposed in the foreground image is the same as the position of the target object superimposed on the special effect in the foreground image; optionally, the position of the special effect superimposed in the foreground image is the same as the target object superimposed on the special effect
  • the deviation between the positions in the foreground image is less than the preset deviation threshold, and the size of the preset deviation threshold can be set as required, for example, the preset deviation threshold can be set to 1 mm or others.
  • Step 2 Determine the size of the special effect superimposed on the foreground image according to the contour information
  • Step 3 According to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
  • the special effects can be superimposed synchronously on the multiple target objects in the foreground image; of course, the special effect superimpositions on the multiple target objects in the foreground image can also be asynchronous.
  • the size of the target object is the size of the target object in the foreground image
  • the contour information of the target object is the contour information of the target object in the foreground image. Since the size of the foreground image in the embodiment of the present application is equal to the size of the image, the contour information of the target object in the foreground image is the same as the contour information of the target object in the image, that is, the target object is in the foreground image. The size is equal to the size of the target object in the image.
  • the process of determining the pixel occlusion relationship between the special effect and the target object may include: According to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, determine the front and back position relationship of each pixel of the special effect relative to the target object when the special effect is superimposed on the foreground image; according to the front and back position relationship , To determine the pixel occlusion relationship between the special effect and the target object.
  • FIG. 4(1) is a schematic diagram of the stereoscopic special effect 10; Fig. 4(1) is the front and back positional relationship between the stereoscopic special effect 10 and the target object 20 when the stereoscopic special effect 10 is superimposed on the target object 20 in the foreground image Schematic. Please refer to Figure 4(1)-(2).
  • the area 11 of the 3D special effect 10 (the part in bold in Figure 4(2)) is located on the target object 20 Back; the area 12 of the three-dimensional special effect 10 is located in front of the target object 20.
  • the process of determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship may include: in the foreground image, if the pixel of the special effect is located behind the target object, determining the pixel occlusion at the corresponding position of the target object Pixels for special effects.
  • the process of determining the pixel occlusion relationship between the special effect and the target object includes: in the foreground image, if the pixel of the special effect is located in front of the target object, determining the corresponding position where the pixel of the special effect occludes the target object Of pixels. Please refer to Figure 4(2).
  • the pixels of the area 11 are corresponding to the position of the target object 20 (the target object 20 and the area 11 overlapped by the pixel); in addition, because the area 12 is located in front of the target object 20, the pixels of the area 12 will block the corresponding position of the target object (the position of the overlapped portion on the target object 20 and the area 12) Of pixels.
  • Fig. 4(3) is a stereoscopic special effect foreground image obtained by superimposing a stereoscopic special effect on the target object in the foreground image.
  • the stereoscopic effect 10 is superimposed on the target object 20 in the foreground image, the pixels in the area 11 are blocked by the pixels corresponding to the target object 20, so Figure 4(3) The area 11 will not be displayed; the pixels of the area 12 will block the pixels of the corresponding position of the target object. Therefore, in FIG. 4(3), the area 12 is wrapped and displayed around the target object 20.
  • the implementation manner of superimposing special effects on the target object in the foreground image may also be implemented in other manners, and is not limited to steps 1 to 3.
  • the foreground image is placed in the field of view of the virtual camera to ensure that the field of view of the virtual camera just contains the entire foreground image. Since the foreground image only contains the target object, the remaining pixels are transparent, that is, the alpha channel (alpha channel, used for recording The special layer of transparency information) is 0, therefore, the occlusion relationship between the stereoscopic special effect and the foreground image is consistent with the occlusion relationship between the target object and the stereoscopic special effect.
  • the 3D special effect foreground image with occlusion is obtained through the depth rendering method of the virtual camera, and the 3D special effect foreground image is superimposed on the image captured by the real camera to obtain the 3D special effect superimposed image with the occlusion effect.
  • the implementation manner of superimposing special effects on the target object in the image may also be implemented in other manners, which is not limited to S301-S303.
  • the display content of the special effect can be set as required.
  • the display content of the special effect is determined according to the status information of the target object.
  • the video stream is a video stream of a competitive game
  • the status information of the target object includes one or more of blood volume, attack power, defense power, and skills (for example, additional game duration, accelerated movement skills); it should be understood Yes, the status information of the target object is not limited to the status information of the target object listed above, and can also be other.
  • the display contents of special effects corresponding to different types of status information are different.
  • the special effect corresponding to the blood volume of the target object can be characterized by the blood bar.
  • the blood bar is used to indicate the real-time blood volume of the target object.
  • the broken blood bar can be simulated by special effects.
  • the blood return effect is displayed when the blood return condition is met.
  • the blood return effect can refer to the effect of surrounding characters in general online games. In this embodiment, the surrounding target can be displayed around the target object.
  • the special effect of fire is displayed around the current target object, and the corresponding blood loss value will pop up on the special effect of the blood bar.
  • a whirlwind special effect surrounding the target object can be displayed around the target object, as shown in Figure 4(3).
  • the defensive power of the target object is increased, the special effect of the shield surrounding the target object can be displayed around the target object.
  • a special effect of accelerated movement surrounding the target object can be displayed around the bottom of the target object.
  • a three-dimensional protective cover is displayed around the target object.
  • the display content of the special effect includes at least one of the pattern and color of the special effect, and different special effects can be distinguished by the pattern.
  • the corresponding special effect pattern is broken; when the blood returns, The corresponding special effect pattern is the blood return effect surrounding the target object; different special effects can also be distinguished by color, or different special effects can be distinguished by pattern and color.
  • the display content of the special effect can also be other, not limited to patterns and colors.
  • the posture of the special effect is determined according to the posture of the camera when the image on which the special effect is currently superimposed is collected, and the presentation effect of the special effect can be enriched by combining the posture of the camera.
  • the posture of the special effect is used to characterize the three-dimensional degree of the special effect, that is, after the special effect is superimposed on the image, the special effect displays the three-dimensional effect.
  • the posture of the special effect in the embodiment of the present application changes with the posture of the shooting device, so as the shooting angle of the image is switched, the angle of the target object in the image will change, and the special effect presents the corresponding angle change, making the special effect and the target
  • the posture of the shooting device includes the posture of the shooting device relative to the scene where the target object is located. Based on the posture of the shooting device relative to the scene where the target object is located, the presentation effect of the stereo special effect in the image can be determined.
  • the posture of the shooting device relative to the scene where the target object is located is the translation and rotation relationship between the coordinate system of the shooting device and the scene coordinate system (the scene coordinate system may be a world coordinate system).
  • the shooting device is relative to the target object.
  • the posture of the scene includes the pitch posture of the shooting device relative to the scene where the target object is located.
  • the special effect also produces the attitude change in the pitching direction. For example, when the shooting device rotates vertically upwards, the target object moves down in the image, and the special effect is also in the image.
  • the distance that the special effect moves downward is equal to the distance that the target object moves downward; when the camera is turned vertically downward, the target object moves upward in the image, and the special effect also moves upward in the image. And the distance moved by the special effect is equal to the distance moved upward by the target object.
  • the camera is mounted on the drone, and the posture of the camera is acquired by the drone.
  • the camera is provided with an attitude sensor, and the drone obtains the data of the attitude sensor, and determines the attitude of the camera according to the data of the attitude sensor; of course, the manner in which the drone acquires the attitude of the camera is not limited to this.
  • FIG. 5 is a schematic diagram of the method flow of the video processing method in another embodiment of the application; the execution subject of the video processing method in the embodiment of the application may be a game server or other devices capable of data processing, such as individuals terminal.
  • the video processing method of the embodiment of the present invention may include S501 to S502.
  • the posture of the special effect changes with the posture of the shooting device, and the posture of the special effect is used to represent the three-dimensional degree of the special effect.
  • the posture of the shooting device includes the posture of the shooting device relative to the scene where the target object is located.
  • the posture of the shooting device relative to the scene where the target object is located includes the pitch posture of the shooting device relative to the scene where the target object is located.
  • the pan/tilt is fixedly installed at a preset position relative to the scene where the target object is located.
  • the camera is mounted on the drone, and the posture of the camera is acquired by the drone.
  • special effect processing is performed on each frame of image including the target object in the video stream to make the target object surround with special effects, including: processing each frame of image including the target object in the video stream to obtain the target object in the image According to the position information and contour information, special effects are superimposed on the target object in the image, so that the target object is surrounded by special effects.
  • superimpose the special effect on the target object in the foreground image according to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image including: superimposing the special effect on the foreground image according to the position of the special effect superimposed in the foreground image Determine the pixel occlusion relationship between the special effect and the target object in the size of the foreground image and the size of the target object; according to the pixel occlusion relationship, superimpose the special effect on the target object in the foreground image; among them, the size of the target object To be determined based on the contour information of the target object.
  • determine the pixel occlusion relationship between the special effect and the target object according to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object including: superimposing the special effect on the foreground image according to the special effect The position, the size of the special effect superimposed on the foreground image, and the size of the target object in the foreground image, determine the front and back position relationship of each pixel of the special effect relative to the target object when the special effect is superimposed on the foreground image; determine the special effect and the target object according to the front and back position relationship The pixel occlusion relationship between.
  • determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship includes: in the foreground image, if the pixel of the special effect is located behind the target object, determining that the pixel at the corresponding position of the target object occludes the pixel of the special effect .
  • the pixels of the special effect block the pixels of the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping part of the special effect and the background.
  • the display content of the special effect is determined according to the status information of the target object.
  • the video stream is a video stream of a competitive game
  • the status information of the target object includes one or more of blood volume, attack power, defense power, and skill.
  • the display contents of special effects corresponding to different types of status information are different.
  • the display content of the special effect includes at least one of a pattern and color of the special effect.
  • the video stream is a video stream of a competitive game
  • the target object includes one or more of a moving object and a stationary object.
  • FIG. 6 is a structural block diagram of a video processing device in an embodiment of the present application; referring to Fig. 6, the video processing device may include a storage device and one or more processors.
  • the storage device is used to store program instructions; one or more processors call the program instructions stored in the storage device.
  • one or more processors when the program instructions are executed, are individually or collectively configured to perform the following operations: obtain a video stream; perform operations on each frame of the video stream including the target object. Processing to obtain the position information and contour information of the target object in the image; according to the position information and contour information, special effects are superimposed on the target object in the image.
  • the processor of this embodiment can implement the interaction method of the embodiment shown in FIG. 2 and FIG. 3 of the present invention, and the movable platform of this embodiment can be described with reference to the interaction method of the foregoing embodiment.
  • one or more processors when the program instructions are executed, one or more processors are individually or collectively configured to perform the following operations: obtain a video stream; Special effect processing is performed to make the target object surround with special effects; wherein, the three-dimensional degree of the special effect is determined according to the posture of the camera when the image on which the special effect is currently superimposed is collected.
  • the processor of this embodiment can implement the interaction method of the embodiment shown in FIG. 5 of the present invention.
  • the movable platform of this embodiment can be described with reference to the interaction method of the foregoing embodiment.
  • the storage device may include a volatile memory (volatile memory), such as random-access memory (RAM); the storage device may also include a non-volatile memory (non-volatile memory), such as Flash memory (flash memory), hard disk drive (HDD) or solid-state drive (SSD); the storage device may also include a combination of the foregoing types of memory.
  • volatile memory volatile memory
  • non-volatile memory non-volatile memory
  • Flash memory flash memory
  • HDD hard disk drive
  • SSD solid-state drive
  • the storage device may also include a combination of the foregoing types of memory.
  • an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the video processing method in the first embodiment or the second embodiment are realized.
  • the computer-readable storage medium may be an internal storage unit of the video processing apparatus described in any of the foregoing embodiments, such as a hard disk or a memory.
  • the computer-readable storage medium may also be an external storage device of the video processing device, such as a plug-in hard disk, a smart media card (SMC), an SD card, and a flash card (Flash Card) equipped on the device. )Wait.
  • the computer-readable storage medium may also include both an internal storage unit of the video processing apparatus and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the video processing device, and can also be used to temporarily store data that has been output or will be output.
  • the program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium can be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Provided are a video processing method and apparatus. The method comprises: acquiring a video stream; and performing special effects processing on each frame of image comprising a target object in the video stream, such that the target object is surrounded by a special effect, wherein the three-dimensional degree of the special effect is determined according to the attitude of a photographic apparatus when collecting the image currently superimposed with the special effect. According to the present application, a special effect is superimposed onto a real target object in an image according to position information and contour information of the target object in the image, or the attitude of a photographic apparatus when collecting an image currently superimposed with the special effect, thereby facilitating interaction between the special effect and the target object, bringing about a better special effect display, and enriching the understanding of a video stream, and thus improving the viewing effect and understanding of video stream presentation. Moreover, the combination of virtuality and reality can simplify the audience's understanding of a video stream, thereby improving the visual perception of the audience.

Description

视频的处理方法和装置Video processing method and device 技术领域Technical field
本申请涉及图像处理领域,尤其涉及一种视频的处理方法和装置。This application relates to the field of image processing, and in particular to a video processing method and device.
背景技术Background technique
对抗性的比赛时间短、比赛规则复杂、比赛过程紧张刺激同时伴随有很多状态信息的更新,若采用数据信息展示的方式将这些状态信息呈现给观众,观众无法在短时间内适应和处理如此多的信息,观众观看比赛视频特别是比赛直播视频的过程容易疲乏,也容易忽略重要信息。随着网络游戏和手机游戏的高速发展,不同年龄层的人群对游戏都具备一些入门级别特效的理解,例如,每个目标对象的血条特效表示的是该目标对象当前生命值信息,如果出现掉血或者增加经验可在目标对象上方显示扣血值或者金币加成值。因此,将状态信息转化为视觉特效的呈现方式,可以提高观众对赛况的理解和观赏体验。The adversarial game time is short, the game rules are complex, the game process is intense and exciting, and there are many status information updates. If the data information is used to present the status information to the audience, the audience cannot adapt and deal with so much in a short time. It’s easy for viewers to get tired when watching game videos, especially live game videos, and easily overlook important information. With the rapid development of online games and mobile games, people of different ages have some entry-level special effects understanding of the game. For example, the health bar special effect of each target object represents the current life value information of the target object, if it appears Drop blood or increase experience can display the blood deduction value or gold coin bonus value above the target object. Therefore, transforming the status information into the presentation method of visual special effects can improve the audience's understanding of the game situation and viewing experience.
一般的直播画面内容切换频繁,拍摄位置变化较大,如果对直播画面进行AR特效渲染都会选择一个固定的角度或者区域,无法对全场进行高兼容性的实时AR特效渲染;并且,渲染的特效种类也比较简单,只能在较为空旷的位置进行特效渲染,但虚拟的特效无法与场景上的真实的目标对象进行互动。Generally, the content of the live broadcast screen changes frequently, and the shooting position changes greatly. If the live broadcast screen is rendered with AR special effects, a fixed angle or area will be selected, and it is impossible to perform high-compatibility real-time AR special effects rendering for the entire scene; moreover, the rendered special effects The type is also relatively simple, and special effects can only be rendered in a relatively open location, but virtual special effects cannot interact with real target objects in the scene.
发明内容Summary of the invention
本申请提供一种视频的处理方法和装置。This application provides a video processing method and device.
具体地,本申请是通过如下技术方案实现的:Specifically, this application is implemented through the following technical solutions:
第一方面,本申请实施例提供一种视频的处理方法,所述方法包括:In the first aspect, an embodiment of the present application provides a video processing method, and the method includes:
获取视频流;Get the video stream;
对所述视频流包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of the image including the target object in the video stream to obtain position information and contour information of the target object in the image;
根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加。According to the position information and the contour information, superimpose special effects on the target object in the image.
第二方面,本申请实施例提供一种视频的处理装置,所述装置包括:In a second aspect, an embodiment of the present application provides a video processing device, and the device includes:
存储装置,用于存储程序指令;以及Storage device for storing program instructions; and
一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
获取视频流;Get the video stream;
对所述视频流包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of the image including the target object in the video stream to obtain position information and contour information of the target object in the image;
根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加。According to the position information and the contour information, superimpose special effects on the target object in the image.
第三方面,本申请实施例提供一种视频的处理方法,所述方法包括:In a third aspect, an embodiment of the present application provides a video processing method, and the method includes:
获取视频流;Get the video stream;
对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效;Performing special effect processing on each frame of image including the target object in the video stream, so that the target object is surrounded by special effects;
其中,所述特效的立体程度为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。Wherein, the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
第四方面,本申请实施例提供一种视频的处理装置,所述装置包括:In a fourth aspect, an embodiment of the present application provides a video processing device, and the device includes:
存储装置,用于存储程序指令;以及Storage device for storing program instructions; and
一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
获取视频流;Get the video stream;
对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效;Performing special effect processing on each frame of image including the target object in the video stream, so that the target object is surrounded by special effects;
其中,所述特效的立体程度为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。Wherein, the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
根据本申请实施例提供的技术方案,本申请根据目标对象在图像中的位置信息和轮廓信息、或者拍摄装置采集当前叠加特效的图像时的姿态,对图像中真实的目标对象进行特效叠加,有利于特效与目标对象之间进行互动,带来了更好的特效展示,丰富了对视频流的理解,从而增加了视频流呈现的观赏性和理解性,且这种虚实结合方式能够简单化观众对视频流的理解,提高观众的视觉感受。According to the technical solution provided by the embodiments of the present application, the present application superimposes the real target object in the image according to the position information and contour information of the target object in the image, or the posture of the camera when the image is currently superimposed with the special effect. Facilitate the interaction between special effects and target objects, bringing better special effects display, enriching the understanding of the video stream, thereby increasing the viewing and understanding of the video stream presentation, and this combination of virtual and real can simplify the audience The understanding of the video stream improves the visual experience of the audience.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative labor.
图1是本申请一实施例中的视频的处理方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a video processing method in an embodiment of the present application;
图2是本申请一实施例中的视频的处理方法的方法流程示意图;FIG. 2 is a schematic diagram of a method flow of a video processing method in an embodiment of the present application;
图3是本申请一实施例中的根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加的一种实现方式的流程示意图;FIG. 3 is a schematic flowchart of an implementation manner of superimposing a target object in an image according to position information and contour information in an embodiment of the present application;
图4是本申请一实施例中的在前景图中的目标对像上叠加立体特效的过程示意图;4 is a schematic diagram of a process of superimposing a stereoscopic special effect on a target object in a foreground image in an embodiment of the present application;
图5是本申请另一实施例中的视频的处理方法的方法流程示意图;FIG. 5 is a schematic diagram of a method flow of a video processing method in another embodiment of the present application;
图6是本申请一实施例中的视频的处理装置的结构框图。Fig. 6 is a structural block diagram of a video processing device in an embodiment of the present application.
具体实施方式Detailed ways
现有的AR直播技术大多数还是基于屏幕级别的,即在屏幕上出现各种简单的特效内容,这种特效不需要对场景内容理解,只需要设定好特效在屏幕的呈现位置和特效播放的动画就可以。人像级别的AR特效依赖于AR识别跟踪算法,例如人脸特征识别,叠加虚拟道具且稳定跟踪。此外,还有类似手势识别触发AR特效、五官动作识别触发AR特效等。但该类特效方法适用于以人物为主且多数为小视频和拍摄所用,对人脸检测的精度要求不高,如果第一次没拍准确可以重新再拍过,使用者对其的容错率也比较高。一些电视节目使用场景级的AR特效,拍摄电视节目的拍摄装置通常为固定的角度,AR模型特效等融合效果不易穿帮,且模型和特效的位置都可以预先进行配准和测试。而AR直播主要是针对背景场景的渲染设计,目前没有对独立的目标对象的渲染。Most of the existing AR live broadcast technologies are still based on the screen level, that is, a variety of simple special effects appear on the screen. This kind of special effects does not require an understanding of the scene content, but only needs to set the presentation position of the special effect on the screen and the special effect playback The animation is fine. Portrait-level AR special effects rely on AR recognition and tracking algorithms, such as facial feature recognition, superimposed virtual props and stable tracking. In addition, there are similar AR effects triggered by gesture recognition, and AR effects triggered by facial gesture recognition. However, this type of special effects method is suitable for small videos and shooting with people as the mainstay. The accuracy of face detection is not high. If it is not accurate the first time, it can be shot again. The user's error tolerance rate It is also relatively high. Some TV programs use scene-level AR special effects. The shooting device for shooting TV shows is usually at a fixed angle. Fusion effects such as AR model special effects are not easy to wear, and the positions of models and special effects can be registered and tested in advance. The AR live broadcast is mainly designed for the rendering of background scenes, and currently there is no rendering of independent target objects.
一般的直播画面内容切换频繁,拍摄位置变化较大,如果对直播画面进行AR特效渲染都会选择一个固定的角度或者区域,无法对全场进行高兼容性的实时AR特效渲染;并且,渲染的特效种类也比较简单,只能在较为空旷的位置进行特效渲染,但虚拟的特效无法与场景上的真实的目标对象进行互动。Generally, the content of the live broadcast screen changes frequently, and the shooting position changes greatly. If the live broadcast screen is rendered with AR special effects, a fixed angle or area will be selected, and it is impossible to perform high-compatibility real-time AR special effects rendering for the entire scene; moreover, the rendered special effects The type is also relatively simple, and special effects can only be rendered in a relatively open location, but virtual special effects cannot interact with real target objects in the scene.
本申请根据目标对象在图像中的位置信息和轮廓信息、或者拍摄装置采集当前叠加特效的图像时的姿态,对图像中真实的目标对象进行特效叠加,有利于特效与目标对象之间进行互动,带来了更好的特效展示,丰富了对视频流的理解,从而增加了视频流呈现的观赏性和理解性,且这种虚实结合方式能够简单化观众对视频流的理解,提高观众的视觉感受。According to the position information and contour information of the target object in the image, or the posture of the shooting device when the image is currently superimposed with the special effect, the application superimposes the real target object in the image with special effect, which is beneficial to the interaction between the special effect and the target object. Brings a better display of special effects, enriches the understanding of the video stream, thereby increasing the viewing and comprehensibility of the video stream presentation, and this combination of virtual and real can simplify the audience’s understanding of the video stream and improve the audience’s vision Feel.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
需要说明的是,在不冲突的情况下,下述的实施例及实施方式中的特征可以相互组合。It should be noted that, in the case of no conflict, the following embodiments and features in the implementation can be combined with each other.
本申请实施例的视频的处理方法可以应用于现实场景中的比赛,如具有真实的 竞技对象、真实的竞技选手(可控制竞技对象)的比赛,或者无竞技对象,但包括真实的竞技选手的比赛(如拳击)。竞技比赛还可为虚拟竞技比赛(如MOBA),竞技对象为虚拟的竞技对象,竞技选手为真实的竞技选手。目标对象可以包括比赛场地上各种移动物体,如竞技对象(如机器人、无人机、移动小车等)和/或竞技选手;目标对象还可以包括比赛场地上的静止物体,如比赛场地上的道具装置(如基地)。应当理解的是,本申请实施例的视频的处理方法还可以应用于其他类型的比赛。另外,本申请实施例的视频的处理方法还可以应用在非比赛状态下的实时视频录制、节目等。The video processing method of the embodiment of this application can be applied to games in real scenes, such as games with real competitive objects, real competitive players (controllable competitive objects), or games without competitive objects, but including real competitive players. Competition (such as boxing). The competitive game can also be a virtual competitive game (such as MOBA), the competitive object is a virtual competitive object, and the competitive player is a real competitive player. The target object may include various moving objects on the playing field, such as competitive objects (such as robots, drones, mobile cars, etc.) and/or competitive players; the target object may also include stationary objects on the playing field, such as those on the playing field. Prop equipment (such as a base). It should be understood that the video processing method of the embodiment of the present application can also be applied to other types of competitions. In addition, the video processing method of the embodiment of the present application can also be applied to real-time video recording, programs, etc. in a non-competitive state.
以视频的处理方法应用于现实场景中的机器人比赛为例进行说明,请参见图1,机器人比赛系统可以包括机器人、比赛服务器和拍摄装置。其中,机器人可以包括多个,各机器人与比赛服务器通信,比赛服务器能够获取各机器人的实时状态信息(如血量、攻击力、防御力、技能或其他)以及各机器人上的传感器的数据。拍摄装置可以包括一个或多个,本实施例的拍摄装置包括多个,分别与比赛服务器通信连接,拍摄装置可以从不同的角度进行拍摄,以获得不同角度的比赛画面。比赛服务器可以包括一个或多个,示例性地,比赛服务器的数量为两个,比赛服务器包括赛事服务器和AR(增强现实,Augmented Reality)服务器,其中,赛事服务器用于与比赛场地上的机器人通信,用于获取机器人的实时状态信息、机器人上的传感器的数据信息等比赛信息;AR服务器与拍摄装置通信,用于控制拍摄装置、获取拍摄装置的数据信息,如拍摄装置采集的视频流,并基于比赛信息对视频流进行处理等。示例性地,比赛服务器的数量为一个,比赛服务器包括AR服务器,赛事服务器独立于AR服务器,并与AR服务器通信连接,即AR服务器通过赛事服务器获取比赛信息,并通过拍摄装置获取视频流,而后根据比赛信息对视频流进行处理并输出。Taking a video processing method applied to a robot competition in a real scene as an example, please refer to Fig. 1. The robot competition system may include a robot, a competition server, and a shooting device. Among them, there may be multiple robots, and each robot communicates with a game server, and the game server can obtain real-time status information (such as blood volume, attack power, defense power, skills, or others) of each robot and data from sensors on each robot. The photographing device may include one or more. The photographing device in this embodiment includes a plurality of photographing devices, which are respectively connected to the game server in communication, and the photographing device can shoot from different angles to obtain game images from different angles. The game server may include one or more. For example, the number of game servers is two. The game server includes a game server and an AR (Augmented Reality) server. The game server is used to communicate with robots on the game field. , Used to obtain the real-time status information of the robot, the data information of the sensors on the robot and other competition information; the AR server communicates with the shooting device, and is used to control the shooting device and obtain the data information of the shooting device, such as the video stream collected by the shooting device, and Process the video stream based on the game information, etc. Exemplarily, the number of game servers is one. The game server includes an AR server. The game server is independent of the AR server and communicates with the AR server. That is, the AR server obtains the game information through the game server and the video stream through the camera. Process and output the video stream according to the game information.
可选地,机器人比赛系统还可以包括裁判系统,裁判系统与赛事服务器、各机器人分别通信连接,裁判系统获取各机器人的实时状态信息以及各机器人上的传感器的数据等比赛信息,并传输给赛事服务器。Optionally, the robot competition system may also include a referee system. The referee system communicates with the competition server and each robot respectively. The referee system obtains real-time status information of each robot and data from sensors on each robot and other competition information, and transmits it to the competition. server.
本申请实施例的视频的处理方法可以应用于视频的在线处理,也可以应用于视频的离线处理。The video processing method of the embodiment of the present application can be applied to online processing of videos, and can also be applied to offline processing of videos.
图2是本申请一实施例中的视频的处理方法的方法流程示意图;本申请实施例的视频的处理方法的执行主体可以为比赛服务器,也可以为其他能够进行数据处理的设备,如个人终端。请参见图2,本发明实施例的视频的处理方法可以包括S201~S203。Figure 2 is a schematic diagram of the method flow of the video processing method in an embodiment of the present application; the execution subject of the video processing method in the embodiment of the present application may be a game server or other devices capable of data processing, such as a personal terminal . Referring to FIG. 2, the video processing method of the embodiment of the present invention may include S201 to S203.
其中,在S201中,获取视频流。Among them, in S201, a video stream is obtained.
本申请实施例中,视频流可以为直播视频流,也可以为非直播视频流;视频流可以为竞技比赛的视频流,也可以为非竞技比赛的视频流。In the embodiments of this application, the video stream may be a live video stream or a non-live video stream; the video stream may be a video stream of a competitive game or a video stream of a non-competitive game.
本申请实施例的视频流可以由拍摄装置采集获得,该拍摄装置可以搭载在云台上,也可以搭载在可移动平台如无人机上。The video stream in the embodiment of the present application may be collected by a camera, and the camera can be mounted on a pan-tilt or on a movable platform such as an unmanned aerial vehicle.
在S202中,对视频流包括目标对象的每一帧图像进行处理,获得目标对象在图像中的位置信息和轮廓信息。In S202, each frame of image including the target object in the video stream is processed to obtain position information and contour information of the target object in the image.
在某些实施例中,视频流为竞技比赛的视频流,目标对象包括移动物体和静止物体中的一个或多个。可选地,目标对象为移动物体,如机器人、无人机、移动小车等;可选地,目标对象为静止物体,如比赛场地上的道具装置;可选地,目标对象包括移动物体和静止物体。In some embodiments, the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object. Optionally, the target object is a moving object, such as a robot, a drone, a mobile car, etc.; optionally, the target object is a stationary object, such as a prop device on the playing field; optionally, the target object includes a moving object and a stationary object object.
在某些实施例中,S202的实现过程可以包括:基于实例分割算法对视频流进行处理,获得目标对象在视频流的每一幅图像中的位置信息和轮廓信息。示例性地,使用基于深度学习的实例分割算法对视频流包括目标对象的每一帧图像进行处理,获得目标对象在视频流的每一幅图像中的位置信息和区域掩码图(即mask图),即利用区域掩码图来表征目标对象在视频流的每一幅图像中的轮廓信息。在经过实例分割算法处理后,对图像上每一个目标对象进行像素级别的分类,所有目标对象之间有清楚的分割边界,并且,mask图可以有效解决多目标对象之间的遮挡问题。可以通过矩形框将图像中的目标对象进行分割,在矩形框内的哪些像素点是属于该目标对象的,多目标对象之间重叠区域的像素点属于哪个目标对象也会有清晰的划分,实例分割算法的结果能很好的确定目标对象在图像上的位置信息和边缘信息,尤其对于存在遮挡和重叠关系的目标对象之间有很好的区分性。In some embodiments, the implementation process of S202 may include: processing the video stream based on the instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream. Exemplarily, an instance segmentation algorithm based on deep learning is used to process each frame image of the video stream including the target object to obtain the position information and area mask map (ie mask image) of the target object in each image of the video stream. ), that is, the area mask map is used to characterize the contour information of the target object in each image of the video stream. After being processed by the instance segmentation algorithm, each target object on the image is classified at the pixel level. There is a clear segmentation boundary between all target objects, and the mask image can effectively solve the occlusion problem between multiple target objects. The target object in the image can be divided by a rectangular frame, which pixels in the rectangular frame belong to the target object, and which target object the pixels in the overlapping area between multiple target objects belong to will also be clearly divided. Examples The results of the segmentation algorithm can determine the position information and edge information of the target object on the image, especially for the target objects with occlusion and overlap.
应当理解的是,还可以使用传统视觉的分割算法,或者使用模型匹配和边缘提取等算法结合对视频流进行处理,获得目标对象在视频流的每一幅图像中的位置信息和轮廓信息。It should be understood that traditional vision segmentation algorithms, or a combination of model matching and edge extraction algorithms can also be used to process the video stream to obtain the position information and contour information of the target object in each image of the video stream.
在S203中,根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加。In S203, special effects are superimposed on the target object in the image according to the position information and the contour information.
基于目标对象在图像中的位置信息和轮廓信息,为特效提供准确的遮挡关系和像素位置,有利于体现特效与目标对象之间的遮挡关系,同时,可以让特效在真实的目标对象上的显示更加包裹,且特效的定位更加准确。另外,利用实例分割算法结果得到的目标对象的mask图,可对图像中的目标对象叠加上带遮挡关系的特效,有利于对目标对象进行更丰富贴切的特效设计。Based on the position information and contour information of the target object in the image, it provides accurate occlusion relationship and pixel position for the special effect, which is beneficial to reflect the occlusion relationship between the special effect and the target object, and at the same time, allows the special effect to be displayed on the real target object It is more wrapped, and the positioning of special effects is more accurate. In addition, the mask map of the target object obtained by the result of the instance segmentation algorithm can superimpose special effects with occlusion relationship on the target object in the image, which is conducive to the design of richer and more appropriate special effects for the target object.
本申请实施例的特效可以为立体特效,如三维特效,立体特效的立体效果在于遮挡效果,特效在运动过程中会被图像中的特定像素所遮挡,形成立体效果;当然,特效也可以为二维特效。对于存在遮挡和重叠的多个目标对象,使用二维特效可能会将某一目标对象的特效展示在其他目标对象的区域范围,而使用立体特效可以更精确各目标对象的位置,区分不同遮挡程度的目标对象,从而使得各目标对象的特效仅展示在各自的区域范围,有效防止特效叠加在其他目标对象上而带来观赏上的误解。此外,特效还可以为帧动画特效,帧动画特效通过在图像中的特定位置顺序播放一组图片,而显示出的特效效果。The special effects in the embodiments of the present application may be three-dimensional special effects, such as three-dimensional special effects. The three-dimensional effect of the three-dimensional special effect lies in the occlusion effect. The special effect will be blocked by specific pixels in the image during the movement to form a three-dimensional effect; of course, the special effect may also be two Dimensional special effects. For multiple target objects that are occluded and overlapped, the use of two-dimensional special effects may display the special effects of one target object in the area of other target objects, and the use of three-dimensional special effects can more accurately position the target objects and distinguish different degrees of occlusion Therefore, the special effects of each target object are only displayed in their respective areas, which effectively prevents the special effects from being superimposed on other target objects and causing misunderstandings in viewing. In addition, the special effect can also be a frame animation special effect, which is a special effect displayed by sequentially playing a group of pictures at a specific position in the image.
本申请实施例进行特效叠加的虚拟引擎可以为Unity渲染引擎,也可以为Unreal(一种渲染软件)、Blender(一种开源的3D创作套件)或3ds Max(用于设计可视化、游戏和动画的三维建模和渲染软件)等渲染引擎。The virtual engine for superimposing special effects in the embodiments of this application can be the Unity rendering engine, or Unreal (a kind of rendering software), Blender (an open source 3D creation suite) or 3ds Max (used for designing visualization, games, and animations). 3D modeling and rendering software) and other rendering engines.
另外,可以对图像中的每个目标对象进行一个或多个特效的叠加,以展示给观众不同的内容。In addition, one or more special effects can be superimposed on each target object in the image to show different content to the audience.
图3是本申请一实施例中的根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加的一种实现方式的流程示意图;请参见图3,根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加的实现方式可以包括步骤S301~S303。Fig. 3 is a schematic flow diagram of an implementation manner of superimposing a target object in an image according to position information and contour information in an embodiment of the present application; please refer to Fig. 3, according to the position information and contour information, in the image The implementation manner of superimposing special effects on the target object may include steps S301 to S303.
其中,在S301中,根据位置信息和轮廓信息,将图像中的目标对象与背景进行分割,获得前景图;Among them, in S301, the target object in the image and the background are segmented according to the position information and the contour information to obtain a foreground image;
S301中的位置信息和轮廓信息分别指目标对象在图像中的位置信息、目标对象在图像中的轮廓信息。The position information and contour information in S301 respectively refer to the position information of the target object in the image and the contour information of the target object in the image.
本实施例的前景图仅包含目标对象,其余像素透明。另外,根据位置信息和轮廓信息,将图像中的目标对象与背景进行分割,还可以获得背景图。The foreground image of this embodiment only contains the target object, and the remaining pixels are transparent. In addition, according to the position information and contour information, the target object and the background in the image are segmented, and a background image can also be obtained.
在S302中,根据位置信息和轮廓信息,在前景图中对目标对象进行特效叠加。In S302, special effects are superimposed on the target object in the foreground image according to the position information and the contour information.
S302中的位置信息和轮廓信息分别指目标对象在前景图中的位置信息、目标对象在前景图中的轮廓信息。本申请实施例中,前景图的尺寸大小与图像的尺寸大小相等,目标对象在前景图中的位置与该目标对象在图像中的位置相同,目标对象在前景图中的轮廓信息与该目标对象在图像中的轮廓信息也相同。The position information and contour information in S302 respectively refer to the position information of the target object in the foreground image and the contour information of the target object in the foreground image. In the embodiment of the present application, the size of the foreground image is equal to the size of the image, the position of the target object in the foreground image is the same as the position of the target object in the image, and the contour information of the target object in the foreground image is the same as that of the target object. The contour information in the image is also the same.
一种根据位置信息和轮廓信息,在前景图中对目标对象进行特效叠加的实现过程可以包括:A realization process of superimposing special effects on the target object in the foreground image according to the position information and the contour information may include:
步骤1、根据位置信息,确定特效叠加在前景图中的位置; Step 1. Determine the position of the special effect superimposed on the foreground image according to the position information;
特效叠加在前景图中的位置与叠加该特效的目标对象在前景图中的位置之间的关系可以根据需要设置,为使得特效与叠加该特效的目标对象之间的包裹更贴合,特效定位的更加准确,可选地,特效叠加在前景图中的位置与叠加该特效的目标对象在前景图中的位置相同;可选地,特效叠加在前景图中的位置与叠加该特效的目标对象在前景图中的位置之间的偏差小于预设偏差阈值,预设偏差阈值的大小可以根据需要设置,如预设偏差阈值可以设置为1毫米或其他。The relationship between the position of the special effect superimposed in the foreground image and the position of the target object superimposed with the special effect in the foreground image can be set according to needs, so that the package between the special effect and the target object superimposed on the special effect is more suitable, and the special effect is positioned Is more accurate. Optionally, the position of the special effect superimposed in the foreground image is the same as the position of the target object superimposed on the special effect in the foreground image; optionally, the position of the special effect superimposed in the foreground image is the same as the target object superimposed on the special effect The deviation between the positions in the foreground image is less than the preset deviation threshold, and the size of the preset deviation threshold can be set as required, for example, the preset deviation threshold can be set to 1 mm or others.
步骤2、根据轮廓信息,确定特效叠加在前景图中的尺寸大小; Step 2. Determine the size of the special effect superimposed on the foreground image according to the contour information;
在实现步骤2时,可选地,根据目标对象在前景图中的轮廓信息,确定目标对象在前景图的尺寸大小;根据目标对象在前景图中的尺寸大小,确定特效叠加在前景图中的尺寸大小。When implementing step 2, optionally, according to the contour information of the target object in the foreground image, determine the size of the target object in the foreground image; according to the size of the target object in the foreground image, determine the special effect superimposed on the foreground image Size.
特效叠加在前景图中的尺寸大小与叠加该特效的目标对象在前景图中的尺寸大小之间的关系也可以根据需要设置,为使得特效与叠加该特效的目标对象之间的包裹更贴合,可选地,特效叠加在前景图中的尺寸大小与叠加该特效的目标对象在前景图中的尺寸大小相等;可选地,特效叠加在前景图中的尺寸大小大于叠加该特效的目标对象在前景图中的尺寸大小,且特效叠加在前景图中的尺寸大小与叠加该特效的目标对象在前景图中的尺寸大小之间的比值(即特效叠加在前景图中的尺寸大小/叠加该特效的目标对象在前景图中的尺寸大小)小于预设比值阈值,预设比值阈值的大小可以根据需要设置,如预设比值阈值可以设置为1.2或其他。The relationship between the size of the special effect superimposed in the foreground image and the size of the target object superimposed with the special effect in the foreground image can also be set as needed, so that the package between the special effect and the target object superimposed with the special effect is more suitable Optionally, the size of the special effect superimposed in the foreground image is equal to the size of the target object superimposed on the special effect in the foreground image; optionally, the size of the special effect superimposed in the foreground image is larger than the target object superimposed on the special effect The size in the foreground image, and the ratio between the size of the special effect superimposed in the foreground image and the size of the target object superimposed on the special effect in the foreground image (that is, the size of the special effect superimposed in the foreground image/superimposed the size of the The size of the target object of the special effect in the foreground image) is less than the preset ratio threshold. The preset ratio threshold can be set as needed. For example, the preset ratio threshold can be set to 1.2 or others.
需要说明的是,本申请实施例对步骤1和步骤2的执行时序不作具体限定,例如,在一些实施例中,步骤1和步骤2可以按照先后顺序执行,可以先执行步骤1,再执行步骤2;或者,先执行步骤2,再执行步骤1。在另外一些实施例中,步骤1和步骤2可以同步执行。It should be noted that the embodiment of the present application does not specifically limit the execution sequence of step 1 and step 2. For example, in some embodiments, step 1 and step 2 can be executed in a sequential order, and step 1 can be executed first, and then step can be executed. 2; Or, perform step 2 first, and then perform step 1. In other embodiments, step 1 and step 2 can be performed simultaneously.
步骤3、根据特效叠加在前景图中的位置和特效叠加在前景图中的尺寸大小,将特效叠加在前景图中的目标对象上。 Step 3. According to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
当前景图中的目标对象包括多个时,可对前景图中的多个目标对象同步进行特效叠加;当然,对前景图中的多个目标对象进行特效叠加也可以是非同步的。When there are multiple target objects in the foreground image, the special effects can be superimposed synchronously on the multiple target objects in the foreground image; of course, the special effect superimpositions on the multiple target objects in the foreground image can also be asynchronous.
一种根据特效叠加在前景图中的位置和特效叠加在前景图中的尺寸大小,将特效叠加在前景图中的目标对象上的实现过程可以包括但不限于如下步骤:A realization process of superimposing the special effect on the target object in the foreground image according to the position of the special effect superimposed on the foreground image and the size of the special effect superimposed on the foreground image may include but not limited to the following steps:
(1)、根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效与目标对象之间的像素遮挡关系,其中,目标对象的尺寸大小为根据目标对象的轮廓信息确定。(1) Determine the pixel occlusion relationship between the special effect and the target object according to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, where the size of the target object is Determined according to the contour information of the target object.
该步骤(1)中,目标对象的尺寸大小即为目标对象在前景图中的尺寸大小,目标对象的轮廓信息即为目标对象在前景图中的轮廓信息。由于本申请实施例的前景图的尺寸大小与图像的尺寸大小相等,因此,目标对象在前景图中的轮廓信息与目标对象在图像中的轮廓信息相同,也即,目标对象在前景图中的尺寸大小与目标对象在图像中的尺寸大小相等。In this step (1), the size of the target object is the size of the target object in the foreground image, and the contour information of the target object is the contour information of the target object in the foreground image. Since the size of the foreground image in the embodiment of the present application is equal to the size of the image, the contour information of the target object in the foreground image is the same as the contour information of the target object in the image, that is, the target object is in the foreground image. The size is equal to the size of the target object in the image.
在某些实施例中,根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效与目标对象之间的像素遮挡关系的实现过程可以包括:根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效叠加至前景图时,特效的各像素相对目标对象的前后位置关系;根据前后位置关系,确定特效与目标对象之间的像素遮挡关系。图4(1)为立体特效10的示意图;图4(1)为在将立体特效10叠加在前景图中的目标对像20上时,立体特效10与目标对像20之间的前后位置关系示意图。请参见图4(1)-(2),在前景图中的目标对像20上叠加立体特效10时,立体特效10的区域11(图4(2)中加粗部分) 位于目标对象20的后方;立体特效10的区域12位于目标对象20的前方。In some embodiments, according to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, the process of determining the pixel occlusion relationship between the special effect and the target object may include: According to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, determine the front and back position relationship of each pixel of the special effect relative to the target object when the special effect is superimposed on the foreground image; according to the front and back position relationship , To determine the pixel occlusion relationship between the special effect and the target object. Fig. 4(1) is a schematic diagram of the stereoscopic special effect 10; Fig. 4(1) is the front and back positional relationship between the stereoscopic special effect 10 and the target object 20 when the stereoscopic special effect 10 is superimposed on the target object 20 in the foreground image Schematic. Please refer to Figure 4(1)-(2). When the 3D special effect 10 is superimposed on the target object 20 in the foreground image, the area 11 of the 3D special effect 10 (the part in bold in Figure 4(2)) is located on the target object 20 Back; the area 12 of the three-dimensional special effect 10 is located in front of the target object 20.
可选地,根据前后位置关系,确定特效与目标对象之间的像素遮挡关系的实现过程可以包括:在前景图中,若特效的像素位于目标对象的后方,则确定目标对象对应位置的像素遮挡特效的像素。可选地,根据前后位置关系,确定特效与目标对象之间的像素遮挡关系的实现过程包括:在前景图中,若特效的像素位于目标对象的前方,则确定特效的像素遮挡目标对象对应位置的像素。请参见图4(2),在将立体特效10叠加在前景图中的目标对像20上时,由于区域11位于目标对象20的后方,故区域11的像素被目标对象20对应位置(目标对象20上与区域11重叠部分的位置)的像素遮挡;另外,由于区域12位于目标对象20的前方,故区域12的像素会遮挡目标对象对应位置(目标对象20上与区域12重叠部分的位置)的像素。Optionally, the process of determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship may include: in the foreground image, if the pixel of the special effect is located behind the target object, determining the pixel occlusion at the corresponding position of the target object Pixels for special effects. Optionally, according to the front and back position relationship, the process of determining the pixel occlusion relationship between the special effect and the target object includes: in the foreground image, if the pixel of the special effect is located in front of the target object, determining the corresponding position where the pixel of the special effect occludes the target object Of pixels. Please refer to Figure 4(2). When the stereoscopic special effect 10 is superimposed on the target object 20 in the foreground image, since the area 11 is located behind the target object 20, the pixels of the area 11 are corresponding to the position of the target object 20 (the target object 20 and the area 11 overlapped by the pixel); in addition, because the area 12 is located in front of the target object 20, the pixels of the area 12 will block the corresponding position of the target object (the position of the overlapped portion on the target object 20 and the area 12) Of pixels.
(2)、根据像素遮挡关系,将特效叠加在前景图中的目标对象上;(2) According to the pixel occlusion relationship, superimpose special effects on the target object in the foreground image;
图4(3)为在前景图中的目标对像上叠加立体特效获得的立体特效前景图。请参见图4(2)-(3),在将立体特效10叠加在前景图中的目标对像20上时,区域11的像素被目标对象20对应位置的像素遮挡,故图4(3)不会显示区域11;区域12的像素会遮挡目标对象对应位置的像素,故图4(3)中,区域12包裹展示在目标对象20的周围。Fig. 4(3) is a stereoscopic special effect foreground image obtained by superimposing a stereoscopic special effect on the target object in the foreground image. Please refer to Figures 4(2)-(3). When the stereoscopic effect 10 is superimposed on the target object 20 in the foreground image, the pixels in the area 11 are blocked by the pixels corresponding to the target object 20, so Figure 4(3) The area 11 will not be displayed; the pixels of the area 12 will block the pixels of the corresponding position of the target object. Therefore, in FIG. 4(3), the area 12 is wrapped and displayed around the target object 20.
需要说明的是,根据位置信息和轮廓信息,在前景图中对目标对象进行特效叠加的实现方式也可以采用其他方式,不限于步骤1-步骤3。It should be noted that, according to the position information and the contour information, the implementation manner of superimposing special effects on the target object in the foreground image may also be implemented in other manners, and is not limited to steps 1 to 3.
在S303中,将特效叠加后的前景图与图像进行叠加。In S303, the foreground image after the special effect is superimposed and the image are superimposed.
示例性地,将前景图放置在虚拟拍摄装置的视野之中,保证虚拟拍摄装置的视野刚好包含整个前景图,由于前景图仅包含目标对象,其余像素透明,即alpha通道(阿尔法通道,用记录透明度信息的特殊图层)为0,因此,立体特效和前景图的遮挡关系与目标对象和立体特效的遮挡关系一致。通过虚拟拍摄装置带深度的渲染方式得到带有遮挡的立体特效前景图,将立体特效前景图叠加于真实拍摄装置所拍摄的图像上,即可获得带遮挡效果的立体特效叠加的图像。Exemplarily, the foreground image is placed in the field of view of the virtual camera to ensure that the field of view of the virtual camera just contains the entire foreground image. Since the foreground image only contains the target object, the remaining pixels are transparent, that is, the alpha channel (alpha channel, used for recording The special layer of transparency information) is 0, therefore, the occlusion relationship between the stereoscopic special effect and the foreground image is consistent with the occlusion relationship between the target object and the stereoscopic special effect. The 3D special effect foreground image with occlusion is obtained through the depth rendering method of the virtual camera, and the 3D special effect foreground image is superimposed on the image captured by the real camera to obtain the 3D special effect superimposed image with the occlusion effect.
本申请实施例中,在将特效叠加后的前景图与图像进行叠加后,特效的像素遮挡图像的背景的对应位置的像素,背景的对应位置为特效与背景重叠部分的位置。请沿用图4所示实施例,区域12的像素遮挡图像的背景的对应位置(区域12与背景重叠部分的位置)的像素。In the embodiment of the present application, after superimposing the foreground image with the special effect superimposed on the image, the pixels of the special effect block the pixels at the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping part of the special effect and the background. Please follow the embodiment shown in FIG. 4, the pixels in the area 12 block the pixels in the corresponding position of the background of the image (the position where the area 12 overlaps with the background).
需要说明的是,根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加的实现方式也可以采用其他方式,不限于S301-S303。It should be noted that, according to the position information and the contour information, the implementation manner of superimposing special effects on the target object in the image may also be implemented in other manners, which is not limited to S301-S303.
特效的显示内容可以根据需要设置,例如,在某些实施例中,特效的显示内容为根据目标对象的状态信息确定。示例性地,视频流为竞技比赛的视频流,目标对象的状态信息包括血量、攻击力、防御力和技能(例如,额外延长比赛时长、加速移动 技能)中的一个或多个;应当理解的,目标对象的状态信息并不限于上述列举的目标对象的状态信息,也可以为其他。The display content of the special effect can be set as required. For example, in some embodiments, the display content of the special effect is determined according to the status information of the target object. Exemplarily, the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skills (for example, additional game duration, accelerated movement skills); it should be understood Yes, the status information of the target object is not limited to the status information of the target object listed above, and can also be other.
可选地,不同类型的状态信息对应的特效的显示内容不相同。例如,目标对象的血量对应的特效可以采用血条表征,血条用于指示目标对象的实时血量大小,当目标对象的血量降到0时,可以通过特效方式模拟血条破碎的情形,再例如,在目标对象的血量减少时,当满足回血条件后,显示回血效果,回血效果可参考一般网游中环绕人物四周的效果,在本实施例中可以在目标对象的周围显示环绕目标对象的回血效果,从而展示立体回血特效;再例如,当前目标对象被其他目标对象攻击掉血时,在当前目标对象的周围显示着火的特效,同时血条特效上会弹出对应的掉血值。又如,在目标对象的攻击力增加时,可以在目标对象的周围显示环绕目标对象的旋风特效,如图4(3)所示。又如,在目标对象的防御力增加时,可以目标对象的周围显示环绕目标对象的护盾特效。又如,在目标对象增加加速移动技能时,可以在目标对象的底部周围显示环绕目标对象的加速移动特效。又如,目标对象在无敌的时,在目标对象的周围显示立体的保护罩。Optionally, the display contents of special effects corresponding to different types of status information are different. For example, the special effect corresponding to the blood volume of the target object can be characterized by the blood bar. The blood bar is used to indicate the real-time blood volume of the target object. When the blood volume of the target object drops to 0, the broken blood bar can be simulated by special effects. , For another example, when the blood volume of the target object is reduced, the blood return effect is displayed when the blood return condition is met. The blood return effect can refer to the effect of surrounding characters in general online games. In this embodiment, the surrounding target can be displayed around the target object. For example, when the current target object is attacked by other target objects and loses blood, the special effect of fire is displayed around the current target object, and the corresponding blood loss value will pop up on the special effect of the blood bar. For another example, when the attack power of the target object increases, a whirlwind special effect surrounding the target object can be displayed around the target object, as shown in Figure 4(3). For another example, when the defensive power of the target object is increased, the special effect of the shield surrounding the target object can be displayed around the target object. For another example, when an accelerated movement skill is added to the target object, a special effect of accelerated movement surrounding the target object can be displayed around the bottom of the target object. For another example, when the target object is invincible, a three-dimensional protective cover is displayed around the target object.
可选地,特效的显示内容包括特效的图案和颜色中的至少一种,可以通过图案来区分不同的特效,如血量降到0时,对应的特效的图案为血条破碎;回血时,对应的特效的图案为环绕目标对象四周的回血效果;也可以通过颜色来区分不同的特效,或者通过图案和颜色来区分不同的特效。当然,特效的显示内容还可以为其他,不限于图案和颜色。Optionally, the display content of the special effect includes at least one of the pattern and color of the special effect, and different special effects can be distinguished by the pattern. For example, when the blood volume drops to 0, the corresponding special effect pattern is broken; when the blood returns, The corresponding special effect pattern is the blood return effect surrounding the target object; different special effects can also be distinguished by color, or different special effects can be distinguished by pattern and color. Of course, the display content of the special effect can also be other, not limited to patterns and colors.
可以理解的是,除目标对象的状态信息之外,也可以将目标对象的一些其他信息通过特效模拟显示在对应目标对象的周围,如目标对象的身份信息等。It is understandable that, in addition to the status information of the target object, some other information of the target object can also be displayed around the corresponding target object through special effects simulation, such as the identity information of the target object.
可选地,特效的姿态为根据拍摄装置采集当前叠加特效的图像时的姿态确定,通过结合拍摄装置的姿态,能够丰富特效的呈现效果。其中,特效的姿态用于表征特效的立体程度,即特效叠加在图像中后,特效所展示出来立体效果。Optionally, the posture of the special effect is determined according to the posture of the camera when the image on which the special effect is currently superimposed is collected, and the presentation effect of the special effect can be enriched by combining the posture of the camera. Among them, the posture of the special effect is used to characterize the three-dimensional degree of the special effect, that is, after the special effect is superimposed on the image, the special effect displays the three-dimensional effect.
本申请实施例的特效的姿态随拍摄装置的姿态变化而变化,从而随着图像的拍摄角度的切换,图像中的目标对象呈现的角度会产生变化,特效呈现对应的角度变化,使得特效与目标对象更加贴合,在视觉效果上犹如目标对象周围具有真实的特效产生一样。The posture of the special effect in the embodiment of the present application changes with the posture of the shooting device, so as the shooting angle of the image is switched, the angle of the target object in the image will change, and the special effect presents the corresponding angle change, making the special effect and the target The object fits more closely, and the visual effect is as if there are real special effects around the target object.
可选地,拍摄装置的姿态包括拍摄装置相对于目标对象所在场景的姿态,基于拍摄装置相对于目标对象所在场景的姿态,可以确定出立体特效在图像中的呈现效果。Optionally, the posture of the shooting device includes the posture of the shooting device relative to the scene where the target object is located. Based on the posture of the shooting device relative to the scene where the target object is located, the presentation effect of the stereo special effect in the image can be determined.
其中,拍摄装置相对于目标对象所在场景的姿态即为拍摄装置的坐标系相对于场景坐标系(场景坐标系可以为世界坐标系)的平移和旋转关系,可选地,拍摄装置相对于目标对象所在场景的姿态包括拍摄装置相对于目标对象所在场景的俯仰姿态。当拍摄装置相对于目标对象所在场景的俯仰姿态产生变化时,特效也产生俯仰方向的 姿态变化,例如,当拍摄装置竖直向上转动时,目标对象在图像中向下移动,特效在图像中也对应向下移动,且特效向下移动的距离与目标对象向下移动的距离大小相等;当拍摄装置竖直向下转动时,目标对象在图像中向上移动,特效在图像中也对应向上移动,且特效移动的距离与目标对象向上移动的距离大小相等。Among them, the posture of the shooting device relative to the scene where the target object is located is the translation and rotation relationship between the coordinate system of the shooting device and the scene coordinate system (the scene coordinate system may be a world coordinate system). Optionally, the shooting device is relative to the target object. The posture of the scene includes the pitch posture of the shooting device relative to the scene where the target object is located. When the pitching attitude of the shooting device relative to the scene where the target object is located changes, the special effect also produces the attitude change in the pitching direction. For example, when the shooting device rotates vertically upwards, the target object moves down in the image, and the special effect is also in the image. Corresponds to downward movement, and the distance that the special effect moves downward is equal to the distance that the target object moves downward; when the camera is turned vertically downward, the target object moves upward in the image, and the special effect also moves upward in the image. And the distance moved by the special effect is equal to the distance moved upward by the target object.
在某些实施例中,拍摄装置搭载在云台上,拍摄装置的姿态为通过云台获取。示例性地,拍摄装置上设有姿态传感器(如视觉里程计),云台获取姿态传感器的数据,并根据姿态传感器的数据确定拍摄装置的姿态;当然,云台获取拍摄装置的姿态的方式不限于此。另外,在本申请实施例中,云台相对于目标对象所在场景固定安装在预设位置处,拍摄装置姿态的获取更加简单。其中,预设位置可以根据需要选择。In some embodiments, the camera is mounted on the pan-tilt, and the posture of the camera is acquired through the pan-tilt. Exemplarily, the camera is equipped with a posture sensor (such as a visual odometer), the PTZ obtains the data of the posture sensor, and determines the posture of the camera according to the data of the posture sensor; of course, the way the PTZ obtains the posture of the camera is different. Limited to this. In addition, in the embodiment of the present application, the pan-tilt is fixedly installed at a preset position relative to the scene where the target object is located, and the acquisition of the posture of the camera is easier. Among them, the preset position can be selected according to needs.
在某些实施例中,拍摄装置搭载在无人机上,拍摄装置的姿态为通过无人机获取。示例性地,拍摄装置上设有姿态传感器,无人机获取姿态传感器的数据,并根据姿态传感器的数据确定拍摄装置的姿态;当然,无人机获取拍摄装置的姿态的方式不限于此。In some embodiments, the camera is mounted on the drone, and the posture of the camera is acquired by the drone. Exemplarily, the camera is provided with an attitude sensor, and the drone obtains the data of the attitude sensor, and determines the attitude of the camera according to the data of the attitude sensor; of course, the manner in which the drone acquires the attitude of the camera is not limited to this.
图5是本申请另一实施例中的视频的处理方法的方法流程示意图;本申请实施例的视频的处理方法的执行主体可以为比赛服务器,也可以为其他能够进行数据处理的设备,如个人终端。请参见图5,本发明实施例的视频的处理方法可以包括S501~S502。Figure 5 is a schematic diagram of the method flow of the video processing method in another embodiment of the application; the execution subject of the video processing method in the embodiment of the application may be a game server or other devices capable of data processing, such as individuals terminal. Referring to FIG. 5, the video processing method of the embodiment of the present invention may include S501 to S502.
其中,在S501中,获取视频流。Among them, in S501, a video stream is obtained.
在S502中,对视频流中包括目标对象的每一帧图像进行特效处理,以使得目标对象环绕有特效;其中,特效的立体程度为根据拍摄装置采集当前叠加特效的图像时的姿态确定。In S502, special effect processing is performed on each frame of image including the target object in the video stream, so that the target object surrounds the special effect; wherein the stereoscopic degree of the special effect is determined according to the posture of the camera when capturing the image with the current superimposed special effect.
可选地,特效的姿态随拍摄装置的姿态变化而变化,特效的姿态用于表征特效的立体程度。Optionally, the posture of the special effect changes with the posture of the shooting device, and the posture of the special effect is used to represent the three-dimensional degree of the special effect.
可选地,拍摄装置的姿态包括拍摄装置相对于目标对象所在场景的姿态。Optionally, the posture of the shooting device includes the posture of the shooting device relative to the scene where the target object is located.
可选地,拍摄装置相对于目标对象所在场景的姿态包括拍摄装置相对于目标对象所在场景的俯仰姿态。Optionally, the posture of the shooting device relative to the scene where the target object is located includes the pitch posture of the shooting device relative to the scene where the target object is located.
可选地,拍摄装置搭载在云台上,拍摄装置的姿态为通过云台获取。Optionally, the camera is mounted on a pan-tilt, and the posture of the camera is acquired through the pan-tilt.
可选地,云台相对于目标对象所在场景固定安装在预设位置处。Optionally, the pan/tilt is fixedly installed at a preset position relative to the scene where the target object is located.
可选地,拍摄装置搭载在无人机上,拍摄装置的姿态为通过无人机获取。Optionally, the camera is mounted on the drone, and the posture of the camera is acquired by the drone.
可选地,对视频流中包括目标对象的每一帧图像进行特效处理,以使得目标对象环绕有特效,包括:对视频流中包括目标对象的每一帧图像进行处理,获得目标对象在图像中的位置信息和轮廓信息;根据位置信息和轮廓信息,在图像中对目标对象 进行特效叠加,以使得目标对象环绕有特效。Optionally, special effect processing is performed on each frame of image including the target object in the video stream to make the target object surround with special effects, including: processing each frame of image including the target object in the video stream to obtain the target object in the image According to the position information and contour information, special effects are superimposed on the target object in the image, so that the target object is surrounded by special effects.
可选地,根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加,以使得目标对象环绕有特效,包括:根据位置信息和轮廓信息,将图像中的目标对象与背景进行分割,获得前景图;根据位置信息和轮廓信息,在前景图中对目标对象进行特效叠加,以使得目标对象环绕有特效;将特效叠加后的前景图与图像进行叠加。Optionally, according to the position information and contour information, superimpose special effects on the target object in the image to make the target object surround with special effects, including: segmenting the target object and the background in the image according to the position information and contour information to obtain Foreground image; according to the position information and contour information, superimpose special effects on the target object in the foreground image, so that the target object surrounds with special effects; superimpose the foreground image and the image after the special effects are superimposed.
可选地,根据位置信息和轮廓信息,在前景图中对目标对象进行特效叠加,包括:根据位置信息,确定特效叠加在前景图中的位置;根据轮廓信息,确定特效叠加在前景图中的尺寸大小;根据特效叠加在前景图中的位置和特效叠加在前景图中的尺寸大小,将特效叠加在前景图中的目标对象上。Optionally, according to the position information and the contour information, superimpose the special effect on the target object in the foreground image, including: determining the position of the special effect superimposed in the foreground image according to the position information; determining the special effect superimposed in the foreground image according to the contour information Size; according to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
可选地,根据特效叠加在前景图中的位置和特效叠加在前景图中的尺寸大小,将特效叠加在前景图中的目标对象上,包括:根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效与目标对象之间的像素遮挡关系;根据像素遮挡关系,将特效叠加在前景图中的目标对象上;其中,目标对象的尺寸大小为根据目标对象的轮廓信息确定。Optionally, superimpose the special effect on the target object in the foreground image according to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, including: superimposing the special effect on the foreground image according to the position of the special effect superimposed in the foreground image Determine the pixel occlusion relationship between the special effect and the target object in the size of the foreground image and the size of the target object; according to the pixel occlusion relationship, superimpose the special effect on the target object in the foreground image; among them, the size of the target object To be determined based on the contour information of the target object.
可选地,根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效与目标对象之间的像素遮挡关系,包括:根据特效叠加在前景图中的位置、特效叠加在前景图中的尺寸大小以及目标对象的尺寸大小,确定特效叠加至前景图时,特效的各像素相对目标对象的前后位置关系;根据前后位置关系,确定特效与目标对象之间的像素遮挡关系。Optionally, determine the pixel occlusion relationship between the special effect and the target object according to the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, including: superimposing the special effect on the foreground image according to the special effect The position, the size of the special effect superimposed on the foreground image, and the size of the target object in the foreground image, determine the front and back position relationship of each pixel of the special effect relative to the target object when the special effect is superimposed on the foreground image; determine the special effect and the target object according to the front and back position relationship The pixel occlusion relationship between.
可选地,根据前后位置关系,确定特效与目标对象之间的像素遮挡关系,包括:在前景图中,若特效的像素位于目标对象的后方,则确定目标对象对应位置的像素遮挡特效的像素。Optionally, determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship includes: in the foreground image, if the pixel of the special effect is located behind the target object, determining that the pixel at the corresponding position of the target object occludes the pixel of the special effect .
可选地,根据前后位置关系,确定特效与目标对象之间的像素遮挡关系,包括:在前景图中,若特效的像素位于目标对象的前方,则确定特效的像素遮挡目标对象对应位置的像素。Optionally, determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship includes: in the foreground image, if the pixel of the special effect is located in front of the target object, determining that the pixel of the special effect occludes the pixel at the corresponding position of the target object .
可选地,特效的像素遮挡图像的背景的对应位置的像素,背景的对应位置为特效与背景重叠部分的位置。Optionally, the pixels of the special effect block the pixels of the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping part of the special effect and the background.
可选地,特效的显示内容为根据目标对象的状态信息确定。Optionally, the display content of the special effect is determined according to the status information of the target object.
可选地,视频流为竞技比赛的视频流,目标对象的状态信息包括血量、攻击力、防御力和技能中的一个或多个。Optionally, the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skill.
可选地,不同类型的状态信息对应的特效的显示内容不相同。Optionally, the display contents of special effects corresponding to different types of status information are different.
可选地,特效的显示内容包括特效的图案和颜色中的至少一种。Optionally, the display content of the special effect includes at least one of a pattern and color of the special effect.
可选地,对视频流进行处理,获得目标对象在视频流的每一幅图像中的位置信息和轮廓信息,包括:基于实例分割算法对视频流进行处理,获得目标对象在视频流的每一幅图像中的位置信息和轮廓信息。Optionally, processing the video stream to obtain the position information and contour information of the target object in each image of the video stream includes: processing the video stream based on an instance segmentation algorithm to obtain each target object in the video stream Position information and contour information in an image.
可选地,视频流为竞技比赛的视频流,目标对象包括移动物体和静止物体中的一个或多个。Optionally, the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object.
图5所示实施例的视频的处理方法的实现过程可以参见图2所示实施例的视频的处理方法的实现过程相应部分的描述。For the implementation process of the video processing method of the embodiment shown in FIG. 5, reference may be made to the description of the corresponding part of the implementation process of the video processing method of the embodiment shown in FIG. 2.
对应于上述实施例的视频的处理方法,本申请实施例还提供一种视频的处理装置。图6是本申请一实施例中的视频的处理装置的结构框图;请参见图6,该视频的处理装置可以包括存储装置和一个或多个处理器。Corresponding to the video processing method of the foregoing embodiment, an embodiment of the present application also provides a video processing device. Fig. 6 is a structural block diagram of a video processing device in an embodiment of the present application; referring to Fig. 6, the video processing device may include a storage device and one or more processors.
其中,存储装置,用于存储程序指令;一个或多个处理器,调用存储装置中存储的程序指令。Among them, the storage device is used to store program instructions; one or more processors call the program instructions stored in the storage device.
在某些实施例中,当程序指令被执行时,一个或多个处理器单独地或共同地被配置成用于实施如下操作:获取视频流;对视频流包括目标对象的每一帧图像进行处理,获得目标对象在图像中的位置信息和轮廓信息;根据位置信息和轮廓信息,在图像中对目标对象进行特效叠加。本实施例的处理器可以实现如本发明图2、图3所示实施例的交互方法,可参见上述实施例的交互方法对本实施例的可移动平台进行说明。In some embodiments, when the program instructions are executed, one or more processors are individually or collectively configured to perform the following operations: obtain a video stream; perform operations on each frame of the video stream including the target object. Processing to obtain the position information and contour information of the target object in the image; according to the position information and contour information, special effects are superimposed on the target object in the image. The processor of this embodiment can implement the interaction method of the embodiment shown in FIG. 2 and FIG. 3 of the present invention, and the movable platform of this embodiment can be described with reference to the interaction method of the foregoing embodiment.
在某些实施例中,当程序指令被执行时,一个或多个处理器单独地或共同地被配置成用于实施如下操作:获取视频流;对视频流中包括目标对象的每一帧图像进行特效处理,以使得目标对象环绕有特效;其中,特效的立体程度为根据拍摄装置采集当前叠加特效的图像时的姿态确定。本实施例的处理器可以实现如本发明图5所示实施例的交互方法,可参见上述实施例的交互方法对本实施例的可移动平台进行说明。In some embodiments, when the program instructions are executed, one or more processors are individually or collectively configured to perform the following operations: obtain a video stream; Special effect processing is performed to make the target object surround with special effects; wherein, the three-dimensional degree of the special effect is determined according to the posture of the camera when the image on which the special effect is currently superimposed is collected. The processor of this embodiment can implement the interaction method of the embodiment shown in FIG. 5 of the present invention. The movable platform of this embodiment can be described with reference to the interaction method of the foregoing embodiment.
上述实施例中,存储装置可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储装置也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储装置还可以包括上述种类的存储器的组合。In the foregoing embodiment, the storage device may include a volatile memory (volatile memory), such as random-access memory (RAM); the storage device may also include a non-volatile memory (non-volatile memory), such as Flash memory (flash memory), hard disk drive (HDD) or solid-state drive (SSD); the storage device may also include a combination of the foregoing types of memory.
处理器可以是中央处理器(central processing unit,CPU)。所述处理器还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor may be a central processing unit (CPU). The processor may further include a hardware chip. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
此外,本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例一或实施例二的视频的处理方法的步骤。In addition, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the video processing method in the first embodiment or the second embodiment are realized.
所述计算机可读存储介质可以是前述任一实施例所述的视频的处理装置的内部存储单元,例如硬盘或内存。所述计算机可读存储介质也可以是视频的处理装置的外部存储设备,例如所述设备上配备的插接式硬盘、智能存储卡(Smart Media Card,SMC)、SD卡、闪存卡(Flash Card)等。进一步的,所述计算机可读存储介质还可以既包括视频的处理装置的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述视频的处理装置所需的其他程序和数据,还可以用于暂时地存储已经输出或者将要输出的数据。The computer-readable storage medium may be an internal storage unit of the video processing apparatus described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of the video processing device, such as a plug-in hard disk, a smart media card (SMC), an SD card, and a flash card (Flash Card) equipped on the device. )Wait. Further, the computer-readable storage medium may also include both an internal storage unit of the video processing apparatus and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the video processing device, and can also be used to temporarily store data that has been output or will be output.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments. Wherein, the storage medium can be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
以上所揭露的仅为本申请部分实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above-disclosed are only some of the embodiments of this application, which of course cannot be used to limit the scope of rights of this application. Therefore, equivalent changes made in accordance with the claims of this application still fall within the scope of this application.

Claims (86)

  1. 一种视频的处理方法,其特征在于,所述方法包括:A video processing method, characterized in that the method includes:
    获取视频流;Get the video stream;
    对所述视频流包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of the image including the target object in the video stream to obtain position information and contour information of the target object in the image;
    根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加。According to the position information and the contour information, superimpose special effects on the target object in the image.
  2. 根据权利要求1所述的方法,其特征在于,所述特效为立体特效。The method according to claim 1, wherein the special effect is a three-dimensional special effect.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加,包括:The method according to claim 1 or 2, wherein the performing special effect superposition on the target object in the image according to the position information and the contour information comprises:
    根据所述位置信息和所述轮廓信息,将所述图像中的所述目标对象与背景进行分割,获得前景图;Segmenting the target object and background in the image according to the position information and the contour information to obtain a foreground image;
    根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加;Performing special effect superposition on the target object in the foreground image according to the position information and the contour information;
    将特效叠加后的前景图与所述图像进行叠加。The foreground image after the special effect is superimposed and the image are superimposed.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加,包括:The method according to claim 3, wherein the performing special effect superposition on the target object in the foreground image according to the position information and the contour information comprises:
    根据所述位置信息,确定所述特效叠加在所述前景图中的位置;Determine the position where the special effect is superimposed on the foreground image according to the position information;
    根据所述轮廓信息,确定所述特效叠加在所述前景图中的尺寸大小;Determine the size of the special effect superimposed on the foreground image according to the contour information;
    根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上。According to the superimposed position of the special effect in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上,包括:The method according to claim 4, wherein the special effect is superimposed on the foreground image according to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image. The target object in the foreground image includes:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系;Determine the pixel occlusion between the special effect and the target object according to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object relation;
    根据所述像素遮挡关系,将所述特效叠加在所述前景图中的所述目标对象上;Superimpose the special effect on the target object in the foreground image according to the pixel occlusion relationship;
    其中,所述目标对象的尺寸大小为根据所述目标对象的轮廓信息确定。Wherein, the size of the target object is determined according to the contour information of the target object.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系,包括:The method according to claim 5, wherein the location of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object , Determining the pixel occlusion relationship between the special effect and the target object includes:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效叠加至所述前景图时,所述特效的各像素相对所述目标对象的前后位置关系;According to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, it is determined that when the special effect is superimposed on the foreground image, the The front and back positional relationship of each pixel of the special effect with respect to the target object;
    根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系。According to the front and rear position relationship, the pixel occlusion relationship between the special effect and the target object is determined.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述前后位置关系,确定 所述特效与所述目标对象之间的像素遮挡关系,包括:The method according to claim 6, wherein the determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship comprises:
    在所述前景图中,若所述特效的像素位于所述目标对象的后方,则确定所述目标对象对应位置的像素遮挡所述特效的像素。In the foreground image, if the pixel of the special effect is located behind the target object, it is determined that the pixel of the corresponding position of the target object blocks the pixel of the special effect.
  8. 根据权利要求6所述的方法,其特征在于,所述根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系,包括:The method according to claim 6, wherein the determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship comprises:
    在所述前景图中,若所述特效的像素位于所述目标对象的前方,则确定所述特效的像素遮挡所述目标对象对应位置的像素。In the foreground image, if the pixel of the special effect is located in front of the target object, it is determined that the pixel of the special effect occludes the pixel at the corresponding position of the target object.
  9. 根据权利要求3所述的方法,其特征在于,所述特效的像素遮挡所述图像的背景的对应位置的像素,所述背景的对应位置为所述特效与所述背景重叠部分的位置。The method according to claim 3, wherein the pixels of the special effect block the pixels of the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping part of the special effect and the background.
  10. 根据权利要求1或2所述的方法,其特征在于,所述特效的显示内容为根据所述目标对象的状态信息确定。The method according to claim 1 or 2, wherein the display content of the special effect is determined according to the status information of the target object.
  11. 根据权利要求10所述的方法,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象的状态信息包括血量、攻击力、防御力和技能中的一个或多个。The method according to claim 10, wherein the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skill.
  12. 根据权利要求10所述的方法,其特征在于,不同类型的所述状态信息对应的特效的显示内容不相同。The method according to claim 10, wherein the display content of the special effects corresponding to the different types of the state information is different.
  13. 根据权利要求10所述的方法,其特征在于,所述特效的显示内容包括所述特效的图案和颜色中的至少一种。The method according to claim 10, wherein the display content of the special effect includes at least one of a pattern and a color of the special effect.
  14. 根据权利要求1或2所述的方法,其特征在于,所述特效的姿态为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。The method according to claim 1 or 2, wherein the posture of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  15. 根据权利要求14所述的方法,其特征在于,所述特效的姿态随所述拍摄装置的姿态变化而变化。The method according to claim 14, wherein the posture of the special effect changes with the posture of the photographing device.
  16. 根据权利要求15所述的方法,其特征在于,所述拍摄装置的姿态包括拍摄装置相对于所述目标对象所在场景的姿态。The method according to claim 15, wherein the posture of the shooting device comprises the posture of the shooting device relative to the scene where the target object is located.
  17. 根据权利要求16所述的方法,其特征在于,所述拍摄装置相对于所述目标对象所在场景的姿态包括拍摄装置相对于所述目标对象所在场景的俯仰姿态。The method according to claim 16, wherein the posture of the photographing device relative to the scene where the target object is located comprises a pitch posture of the photographing device relative to the scene where the target object is located.
  18. 根据权利要求15至17中任一项所述的方法,其特征在于,所述拍摄装置搭载在云台上,所述拍摄装置的姿态为通过所述云台获取。The method according to any one of claims 15 to 17, wherein the camera is mounted on a pan/tilt, and the posture of the camera is acquired through the pan/tilt.
  19. 根据权利要求18所述的方法,其特征在于,所述云台相对于所述目标对象所在场景固定安装在预设位置处。The method according to claim 18, wherein the pan-tilt is fixedly installed at a preset position relative to the scene where the target object is located.
  20. 根据权利要求15至17中任一项所述的方法,其特征在于,所述拍摄装置搭载在无人机上,所述拍摄装置的姿态为通过所述无人机获取。The method according to any one of claims 15 to 17, wherein the camera is mounted on a drone, and the posture of the camera is acquired by the drone.
  21. 根据权利要求1或2所述的方法,其特征在于,所述对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息,包括:The method according to claim 1 or 2, wherein the processing the video stream to obtain the position information and contour information of the target object in each image of the video stream comprises:
    基于实例分割算法对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息。The video stream is processed based on an instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream.
  22. 根据权利要求1或2所述的方法,其特征在于,所述视频流为竞技比赛的视 频流,所述目标对象包括移动物体和静止物体中的一个或多个。The method according to claim 1 or 2, wherein the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object.
  23. 一种视频的处理装置,其特征在于,所述装置包括:A video processing device, characterized in that the device includes:
    存储装置,用于存储程序指令;以及Storage device for storing program instructions; and
    一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
    获取视频流;Get the video stream;
    对所述视频流包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of the image including the target object in the video stream to obtain position information and contour information of the target object in the image;
    根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加。According to the position information and the contour information, superimpose special effects on the target object in the image.
  24. 根据权利要求23所述的装置,其特征在于,所述特效为立体特效。The device according to claim 23, wherein the special effect is a three-dimensional special effect.
  25. 根据权利要求23或24所述的装置,其特征在于,所述一个或多个处理器在根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 23 or 24, wherein the one or more processors perform special effects superimposition on the target object in the image according to the position information and the contour information, Separately or collectively are further configured to implement the following operations:
    根据所述位置信息和所述轮廓信息,将所述图像中的所述目标对象与背景进行分割,获得前景图;Segmenting the target object and background in the image according to the position information and the contour information to obtain a foreground image;
    根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加;Performing special effect superposition on the target object in the foreground image according to the position information and the contour information;
    将特效叠加后的前景图与所述图像进行叠加。The foreground image after the special effect is superimposed and the image are superimposed.
  26. 根据权利要求25所述的装置,其特征在于,所述一个或多个处理器在根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 25, wherein the one or more processors independently superimpose the target object in the foreground image according to the position information and the contour information. Ground or collectively is further configured to perform the following operations:
    根据所述位置信息,确定所述特效叠加在所述前景图中的位置;Determine the position where the special effect is superimposed on the foreground image according to the position information;
    根据所述轮廓信息,确定所述特效叠加在所述前景图中的尺寸大小;Determine the size of the special effect superimposed on the foreground image according to the contour information;
    根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上。According to the superimposed position of the special effect in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
  27. 根据权利要求26所述的装置,其特征在于,所述一个或多个处理器在根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 26, wherein the one or more processors are based on the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, When the special effect is superimposed on the target object in the foreground image, it is separately or collectively further configured to perform the following operations:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系;Determine the pixel occlusion between the special effect and the target object according to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object relation;
    根据所述像素遮挡关系,将所述特效叠加在所述前景图中的所述目标对象上;Superimpose the special effect on the target object in the foreground image according to the pixel occlusion relationship;
    其中,所述目标对象的尺寸大小为根据所述目标对象的轮廓信息确定。Wherein, the size of the target object is determined according to the contour information of the target object.
  28. 根据权利要求27所述的装置,其特征在于,所述一个或多个处理器在根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所 述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:28. The device according to claim 27, wherein the one or more processors are superimposed on the foreground image according to the position of the special effect, the size of the special effect superimposed in the foreground image, and The size of the target object, when determining the pixel occlusion relationship between the special effect and the target object, is separately or collectively further configured to implement the following operations:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效叠加至所述前景图时,所述特效的各像素相对所述目标对象的前后位置关系;According to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, it is determined that when the special effect is superimposed on the foreground image, the The front and back positional relationship of each pixel of the special effect with respect to the target object;
    根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系。According to the front and rear position relationship, the pixel occlusion relationship between the special effect and the target object is determined.
  29. 根据权利要求28所述的装置,其特征在于,所述一个或多个处理器在根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 28, wherein when the one or more processors determine the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship, individually or collectively The ground is further configured to perform the following operations:
    在所述前景图中,若所述特效的像素位于所述目标对象的后方,则确定所述目标对象对应位置的像素遮挡所述特效的像素。In the foreground image, if the pixel of the special effect is located behind the target object, it is determined that the pixel of the corresponding position of the target object blocks the pixel of the special effect.
  30. 根据权利要求28所述的装置,其特征在于,所述一个或多个处理器在根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 28, wherein when the one or more processors determine the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship, individually or collectively The ground is further configured to perform the following operations:
    在所述前景图中,若所述特效的像素位于所述目标对象的前方,则确定所述特效的像素遮挡所述目标对象对应位置的像素。In the foreground image, if the pixel of the special effect is located in front of the target object, it is determined that the pixel of the special effect occludes the pixel at the corresponding position of the target object.
  31. 根据权利要求25所述的装置,其特征在于,所述特效的像素遮挡所述图像的背景的对应位置的像素,所述背景的对应位置为所述特效与所述背景重叠部分的位置。22. The device of claim 25, wherein the pixels of the special effect block the pixels at the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping portion of the special effect and the background.
  32. 根据权利要求23或24所述的装置,其特征在于,所述特效的显示内容为根据所述目标对象的状态信息确定。The device according to claim 23 or 24, wherein the display content of the special effect is determined according to the status information of the target object.
  33. 根据权利要求32所述的装置,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象的状态信息包括血量、攻击力、防御力和技能中的一个或多个。The device according to claim 32, wherein the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skills.
  34. 根据权利要求32所述的装置,其特征在于,不同类型的所述状态信息对应的特效的显示内容不相同。The device according to claim 32, wherein the display contents of the special effects corresponding to the different types of the status information are different.
  35. 根据权利要求32所述的装置,其特征在于,所述特效的显示内容包括所述特效的图案和颜色中的至少一种。The device according to claim 32, wherein the display content of the special effect includes at least one of a pattern and a color of the special effect.
  36. 根据权利要求23或24所述的装置,其特征在于,所述特效的姿态为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。The device according to claim 23 or 24, wherein the posture of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  37. 根据权利要求36所述的装置,其特征在于,所述特效的姿态随所述拍摄装置的姿态变化而变化。The device according to claim 36, wherein the posture of the special effect changes with the posture of the photographing device.
  38. 根据权利要求37所述的装置,其特征在于,所述拍摄装置的姿态包括拍摄装置相对于所述目标对象所在场景的姿态。The device according to claim 37, wherein the posture of the photographing device comprises the posture of the photographing device relative to the scene where the target object is located.
  39. 根据权利要求38所述的装置,其特征在于,所述拍摄装置相对于所述目标对象所在场景的姿态包括拍摄装置相对于所述目标对象所在场景的俯仰姿态。The device according to claim 38, wherein the posture of the photographing device relative to the scene where the target object is located comprises a pitch posture of the photographing device relative to the scene where the target object is located.
  40. 根据权利要求37至39中任一项所述的装置,其特征在于,所述拍摄装置搭载在云台上,所述拍摄装置的姿态为通过所述云台获取。The device according to any one of claims 37 to 39, wherein the camera is mounted on a pan-tilt, and the posture of the camera is acquired through the pan-tilt.
  41. 根据权利要求40所述的装置,其特征在于,所述云台相对于所述目标对象所在场景固定安装在预设位置处。The device according to claim 40, wherein the pan-tilt is fixedly installed at a preset position relative to the scene where the target object is located.
  42. 根据权利要求37至39中任一项所述的装置,其特征在于,所述拍摄装置搭载在无人机上,所述拍摄装置的姿态为通过所述无人机获取。The device according to any one of claims 37 to 39, wherein the camera is mounted on a drone, and the posture of the camera is acquired by the drone.
  43. 根据权利要求23或24所述的装置,其特征在于,所述一个或多个处理器在对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 23 or 24, wherein the one or more processors are processing the video stream to obtain the position information of the target object in each image of the video stream and When the profile information, individually or collectively, it is further configured to implement the following operations:
    基于实例分割算法对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息。The video stream is processed based on an instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream.
  44. 根据权利要求23或24所述的装置,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象包括移动物体和静止物体中的一个或多个。The device according to claim 23 or 24, wherein the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object.
  45. 一种视频的处理方法,其特征在于,所述方法包括:A video processing method, characterized in that the method includes:
    获取视频流;Get the video stream;
    对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效;Performing special effect processing on each frame of image including the target object in the video stream, so that the target object is surrounded by special effects;
    其中,所述特效的立体程度为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。Wherein, the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  46. 根据权利要求45所述的方法,其特征在于,所述特效的姿态随所述拍摄装置的姿态变化而变化,所述特效的姿态用于表征所述特效的立体程度。The method according to claim 45, wherein the posture of the special effect changes with the posture of the shooting device, and the posture of the special effect is used to represent the three-dimensional degree of the special effect.
  47. 根据权利要求45或46所述的方法,其特征在于,所述拍摄装置的姿态包括拍摄装置相对于所述目标对象所在场景的姿态。The method according to claim 45 or 46, wherein the posture of the photographing device comprises the posture of the photographing device relative to the scene in which the target object is located.
  48. 根据权利要求47所述的方法,其特征在于,所述拍摄装置相对于所述目标对象所在场景的姿态包括拍摄装置相对于所述目标对象所在场景的俯仰姿态。The method according to claim 47, wherein the posture of the photographing device relative to the scene where the target object is located comprises a pitch posture of the photographing device relative to the scene where the target object is located.
  49. 根据权利要求45所述的方法,其特征在于,所述拍摄装置搭载在云台上,所述拍摄装置的姿态为通过所述云台获取。The method according to claim 45, wherein the camera is mounted on a pan-tilt, and the posture of the camera is acquired through the pan-tilt.
  50. 根据权利要求49所述的方法,其特征在于,所述云台相对于所述目标对象所在场景固定安装在预设位置处。The method according to claim 49, wherein the pan-tilt is fixedly installed at a preset position relative to the scene where the target object is located.
  51. 根据权利要求45所述的方法,其特征在于,所述拍摄装置搭载在无人机上,所述拍摄装置的姿态为通过所述无人机获取。The method according to claim 45, wherein the camera is mounted on a drone, and the posture of the camera is acquired by the drone.
  52. 根据权利要求45所述的方法,其特征在于,所述对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效,包括:The method according to claim 45, wherein the performing special effect processing on each frame of image including the target object in the video stream, so that the target object surrounds with special effects, comprises:
    对所述视频流中包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of image including the target object in the video stream to obtain position information and contour information of the target object in the image;
    根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效。According to the position information and the contour information, a special effect is superimposed on the target object in the image, so that the target object is surrounded by a special effect.
  53. 根据权利要求52所述的方法,其特征在于,所述根据所述位置信息和所述轮 廓信息,在所述图像中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效,包括:The method according to claim 52, wherein the special effect is superimposed on the target object in the image according to the position information and the contour information, so that the target object surrounds the target object with special effects, include:
    根据所述位置信息和所述轮廓信息,将所述图像中的所述目标对象与背景进行分割,获得前景图;Segmenting the target object and background in the image according to the position information and the contour information to obtain a foreground image;
    根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效;Performing special effect superposition on the target object in the foreground image according to the position information and the contour information, so that the target object surrounds the target object with special effects;
    将特效叠加后的前景图与所述图像进行叠加。The foreground image after the special effect is superimposed and the image are superimposed.
  54. 根据权利要求53所述的方法,其特征在于,所述根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加,包括:The method according to claim 53, wherein the superimposing special effects on the target object in the foreground image according to the position information and the contour information comprises:
    根据所述位置信息,确定所述特效叠加在所述前景图中的位置;Determine the position where the special effect is superimposed on the foreground image according to the position information;
    根据所述轮廓信息,确定所述特效叠加在所述前景图中的尺寸大小;Determine the size of the special effect superimposed on the foreground image according to the contour information;
    根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上。According to the superimposed position of the special effect in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
  55. 根据权利要求54所述的方法,其特征在于,所述根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上,包括:The method according to claim 54, characterized in that, the special effect is superimposed on the foreground image according to the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image. The target object in the foreground image includes:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系;Determine the pixel occlusion between the special effect and the target object according to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object relation;
    根据所述像素遮挡关系,将所述特效叠加在所述前景图中的所述目标对象上;Superimpose the special effect on the target object in the foreground image according to the pixel occlusion relationship;
    其中,所述目标对象的尺寸大小为根据所述目标对象的轮廓信息确定。Wherein, the size of the target object is determined according to the contour information of the target object.
  56. 根据权利要求55所述的方法,其特征在于,所述根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系,包括:55. The method according to claim 55, wherein the position of the special effect superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object are , Determining the pixel occlusion relationship between the special effect and the target object includes:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效叠加至所述前景图时,所述特效的各像素相对所述目标对象的前后位置关系;According to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, it is determined that when the special effect is superimposed on the foreground image, the The front and back positional relationship of each pixel of the special effect with respect to the target object;
    根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系。According to the front and rear position relationship, the pixel occlusion relationship between the special effect and the target object is determined.
  57. 根据权利要求56所述的方法,其特征在于,所述根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系,包括:The method of claim 56, wherein the determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship comprises:
    在所述前景图中,若所述特效的像素位于所述目标对象的后方,则确定所述目标对象对应位置的像素遮挡所述特效的像素。In the foreground image, if the pixel of the special effect is located behind the target object, it is determined that the pixel of the corresponding position of the target object blocks the pixel of the special effect.
  58. 根据权利要求56所述的方法,其特征在于,所述根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系,包括:The method of claim 56, wherein the determining the pixel occlusion relationship between the special effect and the target object according to the front and back position relationship comprises:
    在所述前景图中,若所述特效的像素位于所述目标对象的前方,则确定所述特效的像素遮挡所述目标对象对应位置的像素。In the foreground image, if the pixel of the special effect is located in front of the target object, it is determined that the pixel of the special effect occludes the pixel at the corresponding position of the target object.
  59. 根据权利要求53所述的方法,其特征在于,所述特效的像素遮挡所述图像的背景的对应位置的像素,所述背景的对应位置为所述特效与所述背景重叠部分的位置。The method according to claim 53, wherein the pixels of the special effect block the pixels of the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping portion of the special effect and the background.
  60. 根据权利要求45所述的方法,其特征在于,所述特效的显示内容为根据所述目标对象的状态信息确定。The method according to claim 45, wherein the display content of the special effect is determined according to the status information of the target object.
  61. 根据权利要求60所述的方法,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象的状态信息包括血量、攻击力、防御力和技能中的一个或多个。The method according to claim 60, wherein the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skill.
  62. 根据权利要求60所述的方法,其特征在于,不同类型的所述状态信息对应的特效的显示内容不相同。The method according to claim 60, wherein the display contents of the special effects corresponding to the different types of the state information are different.
  63. 根据权利要求61所述的方法,其特征在于,所述特效的显示内容包括所述特效的图案和颜色中的至少一种。The method according to claim 61, wherein the display content of the special effect includes at least one of a pattern and a color of the special effect.
  64. 根据权利要求52所述的方法,其特征在于,所述对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息,包括:The method according to claim 52, wherein the processing the video stream to obtain the position information and contour information of the target object in each image of the video stream comprises:
    基于实例分割算法对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息。The video stream is processed based on an instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream.
  65. 根据权利要求45所述的方法,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象包括移动物体和静止物体中的一个或多个。The method according to claim 45, wherein the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object.
  66. 一种视频的处理装置,其特征在于,所述装置包括:A video processing device, characterized in that the device includes:
    存储装置,用于存储程序指令;以及Storage device for storing program instructions; and
    一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
    获取视频流;Get the video stream;
    对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效;Performing special effect processing on each frame of image including the target object in the video stream, so that the target object is surrounded by special effects;
    其中,所述特效的立体程度为根据拍摄装置采集当前叠加所述特效的图像时的姿态确定。Wherein, the three-dimensional degree of the special effect is determined according to the posture of the photographing device when the image on which the special effect is currently superimposed is collected.
  67. 根据权利要求66所述的装置,其特征在于,所述特效的姿态随所述拍摄装置的姿态变化而变化,所述特效的姿态用于表征所述特效的立体程度。The device according to claim 66, wherein the posture of the special effect changes with the posture of the photographing device, and the posture of the special effect is used to represent the three-dimensional degree of the special effect.
  68. 根据权利要求66或67所述的装置,其特征在于,所述拍摄装置的姿态包括拍摄装置相对于所述目标对象所在场景的姿态。The device according to claim 66 or 67, wherein the posture of the photographing device comprises the posture of the photographing device relative to the scene in which the target object is located.
  69. 根据权利要求68所述的装置,其特征在于,所述拍摄装置相对于所述目标对象所在场景的姿态包括拍摄装置相对于所述目标对象所在场景的俯仰姿态。The device according to claim 68, wherein the posture of the photographing device relative to the scene where the target object is located comprises a pitch posture of the photographing device relative to the scene where the target object is located.
  70. 根据权利要求66所述的装置,其特征在于,所述拍摄装置搭载在云台上,所述拍摄装置的姿态为通过所述云台获取。The device according to claim 66, wherein the camera is mounted on a pan/tilt, and the posture of the camera is acquired through the pan/tilt.
  71. 根据权利要求70所述的装置,其特征在于,所述云台相对于所述目标对象所在场景固定安装在预设位置处。The device according to claim 70, wherein the pan-tilt is fixedly installed at a preset position relative to the scene where the target object is located.
  72. 根据权利要求66所述的装置,其特征在于,所述拍摄装置搭载在无人机上, 所述拍摄装置的姿态为通过所述无人机获取。The device according to claim 66, wherein the camera is mounted on a drone, and the posture of the camera is acquired by the drone.
  73. 根据权利要求66所述的装置,其特征在于,所述一个或多个处理器在对所述视频流中包括目标对象的每一帧图像进行特效处理,以使得所述目标对象环绕有特效时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 66, wherein the one or more processors perform special effect processing on each frame of image including the target object in the video stream, so that the target object surrounds with special effects. , Individually or collectively, are further configured to implement the following operations:
    对所述视频流中包括目标对象的每一帧图像进行处理,获得所述目标对象在所述图像中的位置信息和轮廓信息;Processing each frame of image including the target object in the video stream to obtain position information and contour information of the target object in the image;
    根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效。According to the position information and the contour information, a special effect is superimposed on the target object in the image, so that the target object is surrounded by a special effect.
  74. 根据权利要求73所述的装置,其特征在于,所述一个或多个处理器在根据所述位置信息和所述轮廓信息,在所述图像中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 73, wherein the one or more processors superimpose special effects on the target object in the image according to the position information and the contour information, so that all When the target object is surrounded by special effects, it is further configured individually or collectively to implement the following operations:
    根据所述位置信息和所述轮廓信息,将所述图像中的所述目标对象与背景进行分割,获得前景图;Segmenting the target object and background in the image according to the position information and the contour information to obtain a foreground image;
    根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加,以使得所述目标对象环绕有特效;Performing special effect superposition on the target object in the foreground image according to the position information and the contour information, so that the target object surrounds the target object with special effects;
    将特效叠加后的前景图与所述图像进行叠加。The foreground image after the special effect is superimposed and the image are superimposed.
  75. 根据权利要求74所述的装置,其特征在于,所述一个或多个处理器在根据所述位置信息和所述轮廓信息,在所述前景图中对所述目标对象进行特效叠加时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 74, wherein the one or more processors independently superimpose the target object in the foreground image according to the position information and the contour information. Ground or collectively is further configured to perform the following operations:
    根据所述位置信息,确定所述特效叠加在所述前景图中的位置;Determine the position where the special effect is superimposed on the foreground image according to the position information;
    根据所述轮廓信息,确定所述特效叠加在所述前景图中的尺寸大小;Determine the size of the special effect superimposed on the foreground image according to the contour information;
    根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上。According to the superimposed position of the special effect in the foreground image and the size of the special effect superimposed in the foreground image, the special effect is superimposed on the target object in the foreground image.
  76. 根据权利要求75所述的装置,其特征在于,所述一个或多个处理器在根据所述特效叠加在所述前景图中的位置和所述特效叠加在所述前景图中的尺寸大小,将所述特效叠加在所述前景图中的所述目标对象上时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 75, wherein the one or more processors are based on the position of the special effect superimposed in the foreground image and the size of the special effect superimposed in the foreground image, When the special effect is superimposed on the target object in the foreground image, it is separately or collectively further configured to perform the following operations:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系;Determine the pixel occlusion between the special effect and the target object according to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object relation;
    根据所述像素遮挡关系,将所述特效叠加在所述前景图中的所述目标对象上;Superimpose the special effect on the target object in the foreground image according to the pixel occlusion relationship;
    其中,所述目标对象的尺寸大小为根据所述目标对象的轮廓信息确定。Wherein, the size of the target object is determined according to the contour information of the target object.
  77. 根据权利要求76所述的装置,其特征在于,所述一个或多个处理器在根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 76, wherein the one or more processors perform the superimposition of the special effect in the foreground image according to the position of the special effect, the size of the special effect superimposed in the foreground image, and The size of the target object, when determining the pixel occlusion relationship between the special effect and the target object, is separately or collectively further configured to implement the following operations:
    根据所述特效叠加在所述前景图中的位置、所述特效叠加在所述前景图中的尺寸大小以及所述目标对象的尺寸大小,确定所述特效叠加至所述前景图时,所述特效的各像素相对所述目标对象的前后位置关系;According to the position where the special effect is superimposed in the foreground image, the size of the special effect superimposed in the foreground image, and the size of the target object, it is determined that when the special effect is superimposed on the foreground image, the The front and back positional relationship of each pixel of the special effect with respect to the target object;
    根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系。According to the front and rear position relationship, the pixel occlusion relationship between the special effect and the target object is determined.
  78. 根据权利要求77所述的装置,其特征在于,所述一个或多个处理器在根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 77, wherein when the one or more processors determine the pixel occlusion relationship between the special effect and the target object according to the front-to-rear position relationship, individually or collectively The ground is further configured to perform the following operations:
    在所述前景图中,若所述特效的像素位于所述目标对象的后方,则确定所述目标对象对应位置的像素遮挡所述特效的像素。In the foreground image, if the pixel of the special effect is located behind the target object, it is determined that the pixel of the corresponding position of the target object blocks the pixel of the special effect.
  79. 根据权利要求77所述的装置,其特征在于,所述一个或多个处理器在根据所述前后位置关系,确定所述特效与所述目标对象之间的像素遮挡关系时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 77, wherein when the one or more processors determine the pixel occlusion relationship between the special effect and the target object according to the front-to-rear position relationship, individually or collectively The ground is further configured to perform the following operations:
    在所述前景图中,若所述特效的像素位于所述目标对象的前方,则确定所述特效的像素遮挡所述目标对象对应位置的像素。In the foreground image, if the pixel of the special effect is located in front of the target object, it is determined that the pixel of the special effect occludes the pixel at the corresponding position of the target object.
  80. 根据权利要求74所述的装置,其特征在于,所述特效的像素遮挡所述图像的背景的对应位置的像素,所述背景的对应位置为所述特效与所述背景重叠部分的位置。The device according to claim 74, wherein the pixels of the special effect block the pixels at the corresponding position of the background of the image, and the corresponding position of the background is the position of the overlapping portion of the special effect and the background.
  81. 根据权利要求66所述的装置,其特征在于,所述特效的显示内容为根据所述目标对象的状态信息确定。The device according to claim 66, wherein the display content of the special effect is determined according to the status information of the target object.
  82. 根据权利要求81所述的装置,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象的状态信息包括血量、攻击力、防御力和技能中的一个或多个。The device according to claim 81, wherein the video stream is a video stream of a competitive game, and the status information of the target object includes one or more of blood volume, attack power, defense power, and skill.
  83. 根据权利要求81所述的装置,其特征在于,不同类型的所述状态信息对应的特效的显示内容不相同。The device according to claim 81, wherein the display contents of the special effects corresponding to the different types of the state information are different.
  84. 根据权利要求82所述的装置,其特征在于,所述特效的显示内容包括所述特效的图案和颜色中的至少一种。The device according to claim 82, wherein the display content of the special effect includes at least one of a pattern and a color of the special effect.
  85. 根据权利要求73所述的装置,其特征在于,所述一个或多个处理器在对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 73, wherein the one or more processors are processing the video stream to obtain position information and contour information of the target object in each image of the video stream When, individually or collectively, it is further configured to implement the following operations:
    基于实例分割算法对所述视频流进行处理,获得目标对象在所述视频流的每一幅图像中的位置信息和轮廓信息。The video stream is processed based on an instance segmentation algorithm to obtain the position information and contour information of the target object in each image of the video stream.
  86. 根据权利要求66所述的装置,其特征在于,所述视频流为竞技比赛的视频流,所述目标对象包括移动物体和静止物体中的一个或多个。The device according to claim 66, wherein the video stream is a video stream of a competitive game, and the target object includes one or more of a moving object and a stationary object.
PCT/CN2020/077469 2020-03-02 2020-03-02 Video processing method and apparatus WO2021174389A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/077469 WO2021174389A1 (en) 2020-03-02 2020-03-02 Video processing method and apparatus
CN202080004468.1A CN112544070A (en) 2020-03-02 2020-03-02 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/077469 WO2021174389A1 (en) 2020-03-02 2020-03-02 Video processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2021174389A1 true WO2021174389A1 (en) 2021-09-10

Family

ID=75017371

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/077469 WO2021174389A1 (en) 2020-03-02 2020-03-02 Video processing method and apparatus

Country Status (2)

Country Link
CN (1) CN112544070A (en)
WO (1) WO2021174389A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257704A (en) * 2021-12-17 2022-03-29 威创集团股份有限公司 FPGA-based video superposition method, device, equipment and medium
CN114430495A (en) * 2022-01-12 2022-05-03 广州繁星互娱信息科技有限公司 Object display method and device, storage medium and electronic equipment

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278041B (en) * 2021-04-29 2024-02-27 北京字跳网络技术有限公司 Image processing method, device, electronic equipment and readable storage medium
CN113225489B (en) * 2021-04-30 2022-08-26 北京达佳互联信息技术有限公司 Image special effect display method and device, electronic equipment and storage medium
CN113850746A (en) * 2021-09-29 2021-12-28 北京字跳网络技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114025219B (en) * 2021-11-01 2024-06-04 广州博冠信息科技有限公司 Rendering method, device, medium and equipment for augmented reality special effects
CN114693780A (en) * 2022-04-11 2022-07-01 北京字跳网络技术有限公司 Image processing method, device, equipment, storage medium and program product
CN115002359B (en) * 2022-05-23 2024-10-11 北京字跳网络技术有限公司 Video processing method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792078A (en) * 2016-07-12 2017-05-31 乐视控股(北京)有限公司 Method for processing video frequency and device
CN108648139A (en) * 2018-04-10 2018-10-12 光锐恒宇(北京)科技有限公司 A kind of image processing method and device
JP2019009754A (en) * 2017-06-21 2019-01-17 メディアフロント カンパニー リミテッド Image generation server using real-time enhancement synthesis technology, image generation system, and method
CN110536151A (en) * 2019-09-11 2019-12-03 广州华多网络科技有限公司 The synthetic method and device of virtual present special efficacy, live broadcast system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10123069B2 (en) * 2012-11-26 2018-11-06 Saturn Licensing Llc Receiving apparatus, receiving method, and receiving display method for displaying images at specified display positions
CN109840881B (en) * 2018-12-12 2023-05-05 奥比中光科技集团股份有限公司 3D special effect image generation method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792078A (en) * 2016-07-12 2017-05-31 乐视控股(北京)有限公司 Method for processing video frequency and device
JP2019009754A (en) * 2017-06-21 2019-01-17 メディアフロント カンパニー リミテッド Image generation server using real-time enhancement synthesis technology, image generation system, and method
CN108648139A (en) * 2018-04-10 2018-10-12 光锐恒宇(北京)科技有限公司 A kind of image processing method and device
CN110536151A (en) * 2019-09-11 2019-12-03 广州华多网络科技有限公司 The synthetic method and device of virtual present special efficacy, live broadcast system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257704A (en) * 2021-12-17 2022-03-29 威创集团股份有限公司 FPGA-based video superposition method, device, equipment and medium
CN114257704B (en) * 2021-12-17 2023-10-10 威创集团股份有限公司 FPGA-based video superposition method, device, equipment and medium
CN114430495A (en) * 2022-01-12 2022-05-03 广州繁星互娱信息科技有限公司 Object display method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112544070A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
WO2021174389A1 (en) Video processing method and apparatus
WO2022095467A1 (en) Display method and apparatus in augmented reality scene, device, medium and program
US10810791B2 (en) Methods and systems for distinguishing objects in a natural setting to create an individually-manipulable volumetric model of an object
US9728011B2 (en) System and method for implementing augmented reality via three-dimensional painting
JP7566973B2 (en) Information processing device, information processing method, and program
EP3003517B1 (en) Image rendering responsive to user actions in head mounted display
CN110720114B (en) Image processing apparatus, image processing method, and storage medium
KR101251701B1 (en) Stereo video for gaming
Prince et al. 3d live: Real time captured content for mixed reality
US20140240311A1 (en) Method and device for performing transition between street view images
US6945869B2 (en) Apparatus and method for video based shooting game
CN112446939A (en) Three-dimensional model dynamic rendering method and device, electronic equipment and storage medium
US20130329985A1 (en) Generating a three-dimensional image
US20220051469A1 (en) Image processing apparatus, image processing method, and storage medium
KR20180123302A (en) Method and Apparatus for Visualizing a Ball Trajectory
JP2019509526A (en) Optimal spherical image acquisition method using multiple cameras
US10391408B2 (en) Systems and methods to facilitate user interactions with virtual objects depicted as being present in a real-world space
CN116527975A (en) MR fusion display method, fusion system and civil aircraft cockpit fusion system
CN111569414A (en) Flight display method and device of virtual aircraft, electronic equipment and storage medium
RU2606875C2 (en) Method and system for displaying scaled scenes in real time
US20230396748A1 (en) Image processing apparatus, image processing method, and storage medium
US11107276B2 (en) Scaling voxels in a virtual space
JP6799468B2 (en) Image processing equipment, image processing methods and computer programs
KR20210090180A (en) Image processing device, image processing method, program, and display device
WO2023176103A1 (en) Information processing device, information processing method, and program

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

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

Country of ref document: EP

Kind code of ref document: A1