IP Library › Granted Patent US 12,120,450
Granted Patent B2
US 12,120,450 · App. 17/780,586 · Granted Oct 15, 2024

Photographing method and electronic device

Inventors: Bin Xiao (Shenzhen, CN); Huanwen Peng (Shenzhen, CN); Nan Song (Shenzhen, CN); Yuanwen Liu (Tampere, FI); Yihua Zeng (Shenzhen, CN); Congchao Zhu (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04N5/2621H04N5/272H04N5/91H04N23/631H04N23/667
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 12,120,450
App. No.
17/780,586
Granted
Oct 15, 2024
Kind
B2
Abstract

A photographing method includes: starting a camera in response to a first operation; entering a first video recording mode in response to a second operation; capturing first video frames in response to a third operation; and stopping capturing the first video frames in response to a fourth operation, to obtain a target video. The i th second video frame in the target video is obtained by fusing a foreground image of the k th first video frame captured by the camera and a background image of the j th first video frame captured by the camera, and the (i+1) th second video frame in the target video is obtained by fusing a foreground image of the (k+m) th first video frame captured by the camera and a background image of the (j+n) th first video frame captured by the camera, where m≠n. In this way, the electronic device can record a video with a special effect.

Claims (39)

1. A photographing method, performed by an electronic device having a display and a camera, wherein the method comprises:

starting the camera in response to a first operation input by a user;

entering a first video recording mode of the camera in response to a second operation input by the user;

capturing, by the camera in response to a third operation input by the user, first video frames; and

stopping, by the camera in response to a fourth operation input by the user, capturing the first video frames, to obtain a target video, wherein

the target video comprises M second video frames; an i th second video frame in the M second video frames is obtained by fusing a foreground image of a k th first video frame in the first video frames captured by the camera and a background image of a j th first video frame in the first video frames captured by the camera; an (i+1) th second video frame in the M second video frames is obtained by fusing a foreground image of a (k+m) th first video frame in the first video frames captured by the camera and a background image of a (j+n) th first video frame in the first video frames captured by the camera; and

M>1, m≥1, n≥1, m≠n, and i, j, k, m, n, and M are positive integers.

2. The method according to claim 1 , further comprising:

displaying a dialog box on the display in response to the second operation input by the user, wherein the dialog box prompts the user to select a photographed target from the first video frames captured by the camera, and the photographed target is an object presented in a foreground image of one of the first video frames.

3. The method according to claim 1 , wherein the camera is a dual-camera or a time of flight (TOF) camera.

4. The method according to claim 1 , further comprising performing image segmentation on each video frame of the first video frames to obtain a foreground image and a background image of the video frame.

5. The method according to claim 1 , wherein the first video recording mode of the camera is a special-effect video recording mode or a time-lapse photographing mode.

6. The method according to claim 1 , wherein the target video is obtained using pixel values of at least some of pixels within a foreground image in at least one video frame of the first video frames, and each of pixel values of pixels within at least a portion of a foreground image in each of the first video frames is multiplied by a weight value.

7. The method according to claim 6 , wherein the weight value is larger than or equal to 0.5 and less than and equal to 1.

8. The method according to claim 6 , wherein a pixel value of a pixel closer to a boundary of the foreground image is multiplied by a weight value smaller than that applied to pixels farther from the boundary of the foreground image.

9. An electronic device, comprising a display, one or more processors, a camera, and

a memory storing one or more computer programs that, when executed by the one or more processors, enable the electronic device to perform operations comprising:

starting the camera in response to a first operation input by a user;

entering a first video recording mode of the camera in response to a second operation input by the user;

capturing, by the camera in response to a third operation input by the user, first video frames; and

stopping, by the camera in response to a fourth operation input by the user, capturing the first video frames, to obtain a target video, wherein

the target video comprises M second video frames; an i th second video frame in the M second video frames is obtained by fusing a foreground image of a k th first video frame in the first video frames captured by the camera and a background image of a j th first video frame in the first video frames captured by the camera; an (i+1) th second video frame in the M second video frames is obtained by fusing a foreground image of a (k+m) th first video frame in the first video frames captured by the camera and a background image of a (j+n) th first video frame in the first video frames captured by the camera; and

M>1, m≥1, n≥1, m≠n, and i, j, k, m, n, and M are positive integers.

10. The electronic device according to claim 9 , wherein, when the computer programs are executed by the one or more processors, the electronic device is further enabled to perform operations comprising:

displaying a dialog box on the display in response to the second operation input by the user, wherein the dialog box prompts the user to select a photographed target from the first video frames captured by the camera, and the photographed target is an object presented in a foreground image of one of the first video frames.

11. The electronic device according to claim 9 , wherein the camera is a dual-camera or a time of flight (TOF) camera.

12. An electronic device, comprising a display, one or more processors, a camera, and

a memory storing one or more computer programs that, when executed by the one or more processors, enable the electronic device to perform operations comprising:

starting the camera in response to a first operation input by a user;

entering a first video recording mode of the camera in response to a second operation input by the user;

capturing, by the camera in response to a third operation input by the user, first video frames; and

stopping, by the camera in response to a fourth operation input by the user, capturing the first video frames, to obtain a target video, wherein the target video comprises M second video frames; a background image of an i th second video frame in the M second video frames is obtained by superimposing background images of an i th first video frame captured by the camera and r first video frames before the i th first video frame;

a foreground image of the i th second video frame is a foreground image of the i th first video frame captured by the camera; and i>1, and i and r are positive integers.

13. The electronic device according to claim 12 , wherein a background image of an (i+1) th second video frame in the M second video frames is obtained by superimposing background images of an (i+1)th first video frame captured by the camera and t first video frames before the (i+1)th first video frame; a foreground image of the (i+1)th second video frame is a foreground image of the (i+1)th first video frame captured by the camera; and t/r, and t is a positive integer.

14. The electronic device according to claim 12 , wherein when the computer programs are executed by the one or more processors, the electronic device is further enabled to perform operations comprising:

displaying the i th second video frame on the display when the camera captures the i th first video frame.

15. The electronic device according to claim 12 , wherein, when the computer programs are executed by the one or more processors, the electronic device is further enabled to perform operations comprising:

displaying a dialog box on the display in response to the second operation input by the user, wherein the dialog box prompts the user to select a photographed target from the first video frames captured by the camera, and the photographed target is an object presented in a foreground image of one of the first video frames.

16. The electronic device according to claim 12 , wherein the camera is a dual-camera or a time of flight (TOF) camera.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 8, 2024
From: XIAO, BIN; PENG, HUANWEN; SONG, NAN; LIU, YUANWEN; ZENG, YIHUA; ZHU, CONGCHAO
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 067922/0128 →
Priority Claims (2)
CN 201911208990.7 · Nov 30, 2019 · national
CN 202010055550.9 · Jan 17, 2020 · national
Continuity (1)
Related Publication 20230276014A1 · Aug 31, 2023
Cited By (2)
US 12,567,212 US 12,720,001