IP Library › Granted Patent US 11,700,417
Granted Patent B2
US 11,700,417 · App. 17/204,237 · Granted Jul 11, 2023

Method and apparatus for processing video

Inventor: Zhaomin Zhu (Beijing, CN)
Assignee: Beijing Baidu Netcom Science and Technology Co., Ltd.
H04N21/4316H04N21/2187
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,700,417
App. No.
17/204,237
Granted
Jul 11, 2023
Kind
B2
Abstract

A method and an apparatus for processing a video are provided technology. The method may include: separating a foreground image and a background image from a video frame in the target video stream, in response to acquiring a target video stream; adding a to-be-displayed content at a target display position in the background image to obtain a processed background image; and combining the foreground image and the processed background image to obtain a target video frame. The present disclosure may directly render the to-be-displayed content in the background, so that the content displayed in the background does not block a body in the foreground, such as person.

Claims (65)

1. A method for processing a video, the method comprising:

receiving a scene image, and recognizing at least one alternative display position in the scene image, wherein the scene image is a single image or a video stream;

determining a target display position in the scene image based on the at least one alternative display position, wherein the target display position is for displaying a to-be-displayed content;

wherein after determining the target display position in the scene image, the method further comprises,

acquiring a target video stream;

determining that a scene in the target video stream and a scene in the scene image are a same scene, and separating a foreground image and a background image from a video frame in the target video stream;

adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image; and

combining the foreground image and the processed background image to obtain a target video frame.

2. The method according to claim 1 , wherein the determining that a scene in the target video stream and a scene in the scene image are a same scene comprises:

in response to determining that there are at least some same objects between the scene image and the target video stream, determining that the scene in the scene image and the scene in the target video stream are the same scene.

3. The method according to claim 1 , wherein the determining the target display position in the scene image based on the at least one alternative display position, comprises:

acquiring adjustment information for the at least one alternative display position, wherein the adjustment information comprises position selection information and/or position movement information; and

adjusting the at least one alternative display position based on the adjustment information, and using an adjustment result as the target display position.

4. The method according to claim 1 , wherein the recognizing at least one alternative display position in the scene image, comprises:

recognizing a position of a preset shape as an alternative display position of the to-be-displayed content in the scene image.

5. The method according to claim 4 , wherein the adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image, comprises:

adjusting a size of the to-be-displayed content to a size of the target display position, in response to determining that the size of the to-be-displayed content does not match the size of the target display position; and

adding an adjusted to-be-displayed content to the target display position in the background image to obtain the processed background image.

6. The method according to claim 1 , wherein the receiving a scene image, comprises:

receiving the scene image and recognizing the target display position in the scene image before acquiring the target video stream, in response to determining that a pre-recognition function is in an on status, wherein a shooting time interval between the scene image and the target video stream is smaller than a specified interval threshold.

7. The method according to claim 1 , wherein the scene image and the target video stream are shoot at different times.

8. The method according to claim 7 , wherein the scene image and the target video stream are shoot by a same device at different times, an image of a person is in the foreground image, and the image of the person is not in the scene image and the background image.

9. An electronic device, comprising:

one or more processors; and

a storage device, for storing one or more programs,

wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform operations comprising:

receiving a scene image, and recognizing at least one alternative display position in the scene image, wherein the scene image is a single image or a video stream;

determining a target display position in the scene image based on the at least one alternative display position, wherein the target display position is for displaying a to-be-displayed content;

wherein alter determining the target display position in the scene image, the method further comprises,

acquiring a target video stream;

determining that a scene in the target video stream and a scene in the scene image are a same scene, and separating a foreground image and a background image from a video frame in the target video stream;

adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image; and

combining the foreground image and the processed background image to obtain a target video frame.

10. The electronic device according to claim 9 , wherein the determining that a scene in the target video stream and a scene in the scene image are a same scene comprises:

in response to determining that there are at least some same objects between the scene image and the target video streams determining that the scene in the scene image and the scene in the target video stream are the same scene.

11. The electronic device according to claim 9 , wherein the determining the target display position in the scene image based on the at least one alternative display position, comprises:

acquiring adjustment information for the at least one alternative display position, wherein the adjustment information comprises position selection information and/or position movement information; and

adjusting the at least one alternative display position based on the adjustment information, and using an adjustment result as the target display position.

12. The electronic device according to claim 9 , wherein the recognizing at least one alternative display position in the scene image, comprises:

recognizing a position of a preset shape as an alternative display position of the to-be-displayed content in the scene image.

13. The electronic device according to claim 12 , wherein the adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image, comprises:

adjusting a size of the to-be-displayed content to a size of the target display position, in response to determining that the size of the to-be-displayed content does not match the size of the target display position; and

adding an adjusted to-be-displayed content to the target display position in the background image to obtain the processed background image.

14. The electronic device according to claim 9 , wherein the receiving a scene image, comprises:

receiving the scene image and recognizing the target display position in the scene image before acquiring the target video stream, in response to determining that a pre-recognition function is in an on status, wherein a shooting time interval between the scene image and the target video stream is smaller than a specified interval threshold.

15. A non-transitory computer readable storage medium, storing a computer program thereon, the program, when executed by a processor, causes the processor to perform operations comprising:

receiving a scene image, and recognizing at least one alternative display position in the scene image, wherein the scene image is a single image or a video stream;

determining a target display position in the scene image based on the at least one alternative display position, wherein the target display position is for displaying a to-be-displayed content;

wherein after determining the target display position in the scene image, the method further comprises,

acquiring a target video stream;

determining that a scene in the target video stream and a scene in the scene image are a same scene, and separating a foreground image and a background image from a video frame in the target video stream;

adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image; and

combining the foreground image and the processed background image to obtain a target video frame.

16. The storage medium according to claim 15 , wherein the determining that a scene in the target video stream and a scene in the scene image are a same scene comprises:

in response to determining that there are at least some same objects between the scene image and the target video stream, determining that the scene in the scene image and the scene in the target video stream are the same scene.

17. The storage medium according to claim 15 , wherein the determining the target display position in the scene image based on the at least one alternative display position, comprises:

acquiring adjustment information for the at least one alternative display position, wherein the adjustment information comprises position selection information and/or position movement information; and

adjusting the at least one alternative display position based on the adjustment information, and using an adjustment result as the target display position.

18. The storage medium according to claim 15 , wherein the recognizing at least one alternative display position in the scene image, comprises:

recognizing a position of a preset shape as an alternative display position of the to-be-displayed content in the scene image.

19. The storage medium according to claim 18 , wherein the adding the to-be-displayed content at a position in the background image corresponding to the target display position in the scene image, to obtain a processed background image, comprises:

adjusting a size of the to-be-displayed content to a size of the target display position, in response to determining that the size of the to-be-displayed content does not match the size of the target display position; and

adding an adjusted to-be-displayed content to the target display position in the background image to obtain the processed background image.

20. The storage medium according to claim 15 , wherein the receiving a scene image, comprises:

receiving the scene image and recognizing the target display position in the scene image before acquiring the target video stream, in response to determining that a pre-recognition function is in an on status, wherein a shooting time interval between the scene image and the target video stream is smaller than a specified interval threshold.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 12, 2022
From: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 062053/0507 →
EMPLOYMENT AGREEMENT Recorded Dec 12, 2022
From: ZHU, ZHAOMIN
To: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) CO., LTD.
Reel/Frame 062114/0825 →
Priority Claims (1)
CN 202010460106.5 · May 27, 2020 · national
Continuity (1)
Related Publication 20210203859A1 · Jul 1, 2021