Method and device for processing video, and storage medium
AssigneeBeijing Xiaomi Pinecone Electronics Co., Ltd.
InventorsBinglin Chang, Kailun Ma, Zhenghui Shi, Qingmin Wang
Life of this patent
Estimating the term…
Abstract
A method, apparatus, and a non-transitory computer-readable storage medium for processing a video are provided. A terminal determines a subject region of a video frame in a video and a background region. A target object is located in the subject region. The background region is a region of the video frame other than the subject region. The terminal overlays the subject region in at least one of a first video frame having the target object on at least one of a second video frame having the target object and generates a special effect frame including at least two subject regions in each of which the target object is located.
Claims18
A method for processing a video, the method applied to a terminal, and comprising:
- determining a subject region and a background region of a video frame in a video, wherein a target object is located in the subject region, and wherein the background region is a region of the video frame other than the subject region;
- and
- overlaying the subject region in at least one of a first video frame having the target object on at least one of a second video frame having the target object, and generating a special effect frame that comprises at least two subject regions in each of which the target object is located,
- wherein overlaying the subject region in the at least one of the first video frame having the target object on the at least one of the second video frame having the target object, and generating the special effect frame that comprises the at least two subject regions in each of which the target object is located, comprises:
- determining an alignment parameter of the subject region of the first video frame according to a location of the target object in the first video frame, wherein the alignment parameter is used to determine a target location of the subject region of the first video frame in the special effect frame, and
- overlaying, according to the alignment parameter, the subject region of the first video frame at the target location on at least one video frame other than the first video frame in which the target object is located, and generating the special effect frame that comprises two subject regions in each of which the target object is located.
A device, comprising:
- one or more processors and a non-transitory computer-readable storage medium for storing executable instructions executable on the one or more processors,
- wherein the one or more processors are configured to:
- determine a subject region of a video frame in a video and a background region, wherein a target object is located in the subject region, and wherein the background region is a region of the video frame other than the subject region;
- and
- overlay the subject region in at least one of a first video frame having the target object on at least one of a second video frame having the target object, and generating a special effect frame that comprises at least two subject regions in each of which the target object is located,
- wherein the one or more processors are further configured to:
- determine an alignment parameter of the subject region of the first video frame according to a location of the target object in the first video frame, wherein the alignment parameter is used to determine a target location of the subject region of the first video frame in the special effect frame, and
- overlay, according to the alignment parameter, the subject region of the first video frame at the target location on at least one video frame other than the first video frame in which the target object is located, and generate the special effect frame that comprises two subject regions in each of which the target object is located.
A non-transitory computer-readable storage medium having stored therein computer-executable instructions for execution by a computing device having one or more processors, wherein the computer-executable instructions, when executed by a computing device having one or more processors, cause the computing device to perform acts comprising:
- determining a subject region of a video frame in a video and a background region, wherein a target object is located in the subject region, and wherein the background region is a region of the video frame other than the subject region;
- and
- overlaying the subject region in at least one of a first video frame having the target object on at least one of a second video frame having the target object, and generating a special effect frame that comprises at least two subject regions in each of which the target object is located,
- wherein overlaying the subject region in the at least one of the first video frame having the target object on the at least one of the second video frame having the target object, and generating the special effect frame that comprises the at least two subject regions in each of which the target object is located, comprises:
- determining an alignment parameter of the subject region of the first video frame according to a location of the target object in the first video frame, wherein the alignment parameter is used to determine a target location of the subject region of the first video frame in the special effect frame, and
- overlaying, according to the alignment parameter, the subject region of the first video frame at the target location on at least one video frame other than the first video frame in which the target object is located, and generating the special effect frame that comprises two subject regions in each of which the target object is located.
Dependencies are inferred from the claim text.