CPC G06T 7/215 (2017.01) [G06T 5/70 (2024.01); G06T 7/13 (2017.01); G06T 2207/10016 (2013.01)] | 20 Claims |
1. A video data processing method performed by a computer device, the method comprising:
obtaining a first video and a second video;
identifying a target sub-image defined by a photo frame within each of a plurality of video frames of the first video;
determining region movement information of the target sub-image between every two adjacent video frames in the plurality of video frames of the first video, the region movement information comprising movement distances and movement directions of at least three corners of the target sub-image between every two adjacent video frames and being used for defining position movement of the target sub-image between every two adjacent video frames in the plurality of video frames of the first video;
performing motion blur processing on a plurality of first video frames of the second video based on the region movement information of the target sub-image between every two adjacent video frames in the plurality of video frames of the first video, to obtain a plurality of second video frames of the second video, further comprising:
determining at least three groups of convolution parameters based on the movement distances and movement directions of the at least three corners of the target sub-image between the ith frame and the (i-1)th frame of the first video, wherein the convolution parameters are used for indicating a size of a convolution region in one convolution operation and a movement direction of a convolution kernel, and i is an integer greater than 1;
selecting, from a plurality of candidate convolution kernels of different sizes, a candidate convolution kernel whose size matches the size of the convolution region in each group of convolution parameters as a third convolution kernel;
performing a convolution operation on a first video frame of the second video corresponding to the ith frame according to a movement direction in the corresponding convolution parameters by using the third convolution kernel corresponding to each group of convolution parameters, to obtain at least three intermediate video frames; and
superimposing the at least three intermediate frames to obtain a second video frame of the second video corresponding to the ith frame of the first video; and
embedding the second video into the first video by replacing the target sub-image in the plurality of video frames of the first video with the corresponding second video frames of the second video to obtain a target video.
|