# US 12,120,450 B2 · Photographing method and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,120,450 B2
- Document ID: US12120450B2
- Status: Granted
- Kind: B2
- Application number: 17/780,586
- Filed: 2020-11-27
- Published: 2023-08-31
- Granted: 2024-10-15
- Earliest claimed: 2019-11-30
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Bin Xiao; Huanwen Peng; Nan Song; Yuanwen Liu; Yihua Zeng; Congchao Zhu
- Web page: https://patentgrep.com/patent/US12120450B2

## CPC

- H04N 5/2621: {Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability}
- H04N 5/272: Means for inserting a foreground image in a background image, i.e. inlay, outlay
- H04N 5/91: Television signal processing therefor
- H04N 23/62: Control of parameters via user interfaces
- H04N 23/631: {Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters}
- H04N 23/667: Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## 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 ith second video frame in the target video is obtained by fusing a foreground image of the kth first video frame captured by the camera and a background image of the jth 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

### Claim 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 ith second video frame in the M second video frames is obtained by fusing a foreground image of a kth first video frame in the first video frames captured by the camera and a background image of a jth 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.

### Claim 2 (depends on 1)

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.

### Claim 3 (depends on 1)

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

### Claim 4 (depends on 1)

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.

### Claim 5 (depends on 1)

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.

### Claim 6 (depends on 1)

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.

### Claim 7 (depends on 6)

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.

### Claim 8 (depends on 6)

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.

### Claim 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 ith second video frame in the M second video frames is obtained by fusing a foreground image of a kth first video frame in the first video frames captured by the camera and a background image of a jth 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.

### Claim 10 (depends on 9)

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.

### Claim 11 (depends on 9)

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

### Claim 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 ith second video frame in the M second video frames is obtained by superimposing background images of an ith first video frame captured by the camera and r first video frames before the ith first video frame;
a foreground image of the ith second video frame is a foreground image of the ith first video frame captured by the camera; and i>1, and i and r are positive integers.

### Claim 13 (depends on 12)

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.

### Claim 14 (depends on 12)

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 ith second video frame on the display when the camera captures the ith first video frame.

### Claim 15 (depends on 12)

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.

### Claim 16 (depends on 12)

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