US 12,243,561 B2
Method and apparatus for generating video with 3D effect, method and apparatus for playing video with 3D effect, and device
Zhenwei Zhang, Shenzhen (CN)
Assigned to Tencent Technology (Shenzhen) Company Limited, Shenzhen (CN)
Filed by Tencent Technology (Shenzhen) Company Limited, Guangdong (CN)
Filed on Oct. 4, 2022, as Appl. No. 17/959,649.
Application 17/959,649 is a continuation of application No. PCT/CN2021/122662, filed on Oct. 8, 2021.
Claims priority of application No. 202011158075.4 (CN), filed on Oct. 26, 2020.
Prior Publication US 2023/0021533 A1, Jan. 26, 2023
Int. Cl. G11B 27/031 (2006.01); G06T 7/12 (2017.01); G06T 7/215 (2017.01); G06T 7/60 (2017.01); G06T 7/70 (2017.01); G06T 7/90 (2017.01); G06V 20/40 (2022.01)
CPC G11B 27/031 (2013.01) [G06T 7/12 (2017.01); G06T 7/215 (2017.01); G06T 7/60 (2013.01); G06T 7/70 (2017.01); G06T 7/90 (2017.01); G06V 20/41 (2022.01); G06V 20/48 (2022.01); G06T 2207/10016 (2013.01); G06T 2207/10024 (2013.01); G06T 2207/30196 (2013.01)] 11 Claims
OG exemplary drawing
 
1. A method for generating a video having a three-dimensional (3D) effect, the method being performed by a server and comprising:
obtaining an original video, the original video comprising at least one frame of a raw image;
segmenting the raw image to obtain a foreground image comprising a moving object to obtain a foreground image sequence, the foreground image sequence comprising at least one frame of the foreground image;
determining, based on a moving track of the moving object in the foreground image sequence, a target raw image, included in the original video, in which a target occlusion image is to be placed and an occlusion method of the target occlusion image in the target raw image, wherein the occlusion method includes an occlusion location, an occlusion size, and an occlusion color, and wherein the occlusion method is determined, from a plurality of occlusion methods, based on a pixel width or pixel length of the target raw image, wherein determining the target raw image and the occlusion method comprises:
determining a type of the moving object and the moving track of the moving object based on the foreground image sequence;
determining, in an occlusion material library, the target occlusion image matching the type of the moving object, the occlusion material library comprising at least one occlusion image; and
determining the occlusion size and the occlusion color of the target occlusion image based on the target raw image;
adding the target occlusion image to the target raw image based on the occlusion method to obtain a modified target raw image; and
replacing the target raw image in the original video with the modified target raw image, and generating a target video having a 3D effect.