IP Library Granted Patent US 12701319
Granted Patent B2
US 12701319 · App. 18/721,750 · Granted Aug 4, 2026

Method for capturing image in video recording and electronic device

Inventor: Jirun Xu (Shenzhen, CN)
Assignee: HONOR DEVICE CO., LTD.
H04N23/632H04N5/772
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 12701319
App. No.
18/721,750
Filed
Jun 19, 2024
Granted
Aug 4, 2026
Kind
B2
Examiner
DANG, HUNG Q
Art Unit
2484
USPC
386/224
Abstract

This application discloses a method for capturing an image in video recording and an electronic device, and relates to the field of photographing technologies. In response to a first operation, the electronic device collects a first image and displays a first interface; buffers, in a first buffer queue, n frames of first images collected by a camera; selects, based on additional information of the first image and in response to a second operation performed by a user on a snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue; and performs first image processing on m frames of first images including the second image, to obtain a captured image, where the first image processing includes cropping processing performed based on a cropping manner and a cropping parameter of a target preview image.

Claims (72)

1 . A method for capturing an image in video recording, applied to an electronic device, wherein the method comprises:

receiving, by the electronic device, a first operation of a user, wherein the first operation is used to trigger the electronic device to start to record a video;

collecting, by a camera of the electronic device, a first image in response to the first operation, and displaying, by the electronic device, a first interface, wherein the first interface is a viewfinder interface in which the electronic device is recording the video, a preview stream is displayed in the viewfinder interface, the preview stream comprises a preview image obtained based on the first image, the first interface further comprises a snapshot shutter, and the snapshot shutter is configured to trigger the electronic device to capture an image to obtain a photo;

buffering, by the electronic device in a first buffer queue, the first image collected by the camera, wherein n frames of first images collected by the camera are buffered in the first buffer queue, n≥1, and n is an integer;

selecting, by the electronic device based on additional information of the first image in response to a second operation performed by the user on the snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue, wherein the additional information of the first image comprises at least one of a contrast of the first image, an angular velocity at which the camera collects the first image, or a timestamp of the first image; and

performing, by the electronic device, first image processing on m frames of first images comprising the second image, to obtain a captured image, wherein the first image processing comprises cropping processing performed based on a cropping manner and a cropping parameter of a target preview image, the target preview image is a frame of image that is in the preview stream and that is collected by the camera when the electronic device receives the second operation, m≥1, and m is an integer, wherein the cropping parameter of the target preview image comprises center point coordinates of a cropping area of the target preview image and cropping size information and wherein the first image processing further comprises:

collecting current temperature of the electronic device,

in response to the current temperature of the electronic device being greater than a preset temperature threshold, performing the first image processing on only the second image to obtain a third image,

in response to the current temperature of the electronic device being less than or equal to the preset temperature threshold, performing image fusion on a plurality of the m frames of first images to obtain the third image, and

determining the captured image based on the third image.

2 . The method according to claim 1 , wherein the cropping manner of the target preview image comprises a center cropping manner.

3 . The method according to claim 1 , wherein determining the captured image based on the third image comprises

performing, by the electronic device, cropping processing on the third image based on the cropping manner and the cropping parameter of the target preview image to obtain a fourth image; and

performing, by the electronic device, second image processing on the fourth image to obtain the captured image, wherein the second image processing comprises at least one of picture noise reduction, brightness and color correction, and picture beautification processing.

4 . The method according to claim 3 , wherein the method further comprises:

obtaining, by the electronic device, a logical identifier of the target preview image, wherein the logical identifier of the target preview image is used to identify a camera that collects the target preview image; and

determining, by the electronic device from the n frames of first images based on the logical identifier of the target preview image, the m frames of first images comprising the second image; wherein

a logical identifier of the m frames of first images is the same as the logical identifier of the target preview image.

5 . The method according to claim 3 , wherein the m frames of first images are m consecutive frames of images comprising the second image that are in the n frames of first images; or

the m frames of first images comprise the second image and m−1 frames of first images that are in the n frames of first images and whose resolution is greater than a preset resolution threshold; or

the m frames of first images comprise the second image and m−1 frames of first images that are in the n frames of first images and whose high dynamic range (HDR) parameters meet a preset HDR condition.

6 . The method according to claim 3 ,

wherein in response to the current temperature of the electronic device being greater than the preset temperature threshold, the m frames of first images comprise only the second image, and m=1; or in response to if the current temperature of the electronic device being less than or equal to the preset temperature threshold, m≥2.

7 . The method according to claim 1 , wherein the additional information of the first image comprises the contrast of the first image, and the contrast of the first image is used to represent definition of the first image; and

the second image is a first image with a highest contrast in the n frames of first images buffered in the first buffer queue.

8 . The method according to claim 1 , wherein the additional information of the first image comprises the angular velocity at which the camera collects the first image, and the angular velocity is used to represent a jitter situation existing when the camera collects the first image; and

the second image is a first image with a minimum angular velocity in the n frames of first images buffered in the first buffer queue.

9 . The method according to claim 1 , wherein the additional information of the first image further comprises the timestamp of the first image, each frame of first image comprises a timestamp, and the timestamp records time at which an image sensor of the electronic device outputs a corresponding first image;

a clock of an upper-layer application in the electronic device is synchronized with a clock used by the image sensor to record image output of the first image, or the clock of the upper-layer application in the electronic device and the clock used by the image sensor to record image output of the first image are a same system clock; and

the second image is a first image that is in the n frames of first images buffered in the first buffer queue and whose time recorded by a timestamp is closest to time at which the electronic device receives the second operation.

10 . An electronic device, comprising:

a touchscreen, a memory, a camera, a display, a temperature sensor, and a processors, wherein the touchscreen, the memory, the camera, and the display are coupled to the processor, the memory stores computer program code, the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device is enabled to perform a method, the method comprising:

receiving a first operation of a user, wherein the first operation is used to trigger the electronic device to start to record a video;

collecting, with the camera, a first image in response to the first operation, and displaying a first interface, wherein the first interface is a viewfinder interface in which the electronic device is recording the video, a preview stream is displayed in the viewfinder interface, the preview stream comprises a preview image obtained based on the first image, the first interface further comprises a snapshot shutter, and the snapshot shutter is configured to trigger the electronic device to capture an image to obtain a photo;

buffering, in a first buffer queue, the first image collected by the camera, wherein n frames of first images collected by the camera are buffered in the first buffer queue, n≥1, and n is an integer;

selecting, based on additional information of the first image in response to a second operation performed by the user on the snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue, wherein the additional information of the first image comprises at least one of contrast of the first image, an angular velocity at which the camera collects the first image, or a timestamp of the first image; and

performing first image processing on m frames of first images comprising the second image, to obtain a captured image, wherein the first image processing comprises cropping processing performed based on a cropping manner and a cropping parameter of a target preview image, the target preview image is a frame of image that is in the preview stream and that is collected by the camera when the electronic device receives the second operation, m≥1, and m is an integer, wherein the cropping parameter of the target preview image comprises center point coordinates of a cropping area of the target preview image and cropping size information and wherein the first image processing further comprises:

collecting current temperature of the electronic device,

in response to the current temperature of the electronic device being greater than a preset temperature threshold, performing the first image processing on only the second image to obtain a third image,

in response to the current temperature of the electronic device being less than or equal to the preset temperature threshold, performing image fusion on a plurality of the m frames of first images to obtain the third image, and

determining the captured image based on the third image.

11 . The electronic device according to claim 10 , wherein the cropping manner of the target preview image comprises a center cropping manner.

12 . The electronic device according to claim 10 , wherein to determine the captured image based on the third image comprises to:

perform cropping processing on the third image based on the cropping manner and the cropping parameter of the target preview image to obtain a fourth image; and

perform second image processing on the fourth image to obtain the captured image, wherein the second image processing comprises at least one of picture noise reduction, brightness and color correction, and picture beautification processing.

13 . The electronic device according to claim 12 , wherein the electronic device is further to:

obtain a logical identifier of the target preview image, wherein the logical identifier of the target preview image is used to identify a camera that collects the target preview image; and

determine, from the n frames of first images based on the logical identifier of the target preview image, the m frames of first images comprising the second image; wherein

a logical identifier of the m frames of first images is the same as the logical identifier of the target preview image.

14 . The electronic device according to claim 12 , wherein the m frames of first images are m consecutive frames of images comprising the second image that are in the n frames of first images; or

the m frames of first images comprise the second image and m−1 frames of first images that are in the n frames of first images and whose resolution is greater than a preset resolution threshold; or

the m frames of first images comprise the second image and m−1 frames of first images that are in the n frames of first images and whose high dynamic range, HDR parameters meet a preset HDR condition.

15 . The electronic device according to claim 12 , wherein

in response to the current temperature of the electronic device being greater than the preset temperature threshold, the m frames of first images comprise only the second image, and m=1; or in response to the current temperature of the electronic device being less than or equal to the preset temperature threshold, m≥2.

16 . The electronic device according to claim 10 , wherein the additional information of the first image comprises the contrast of the first image, and the contrast of the first image is used to represent definition of the first image; and

the second image is a first image with highest contrast in the n frames of first images buffered in the first buffer queue.

17 . The electronic device according to claim 10 , wherein the additional information of the first image comprises the angular velocity at which the camera collects the first image, and the angular velocity is used to represent a jitter situation existing when the camera collects the first image; and

the second image is a first image with a minimum angular velocity in the n frames of first images buffered in the first buffer queue.

18 . The electronic device according to claim 10 , wherein the additional information of the first image further comprises the timestamp of the first image, each frame of first image comprises a timestamp, and the timestamp records time at which an image sensor of the electronic device outputs a corresponding first image;

a clock of an upper-layer application in the electronic device is synchronized with a clock used by the image sensor to record image output of the first image, or the clock of the upper-layer application in the electronic device and the clock used by the image sensor to record image output of the first image are a same system clock; and

the second image is a first image that is in the n frames of first images buffered in the first buffer queue and whose time recorded by a timestamp is closest to time at which the electronic device receives the second operation.

19 . A non-transitory computer-readable storage medium, comprising computer instructions, wherein when the computer instructions are run on an electronic device, the electronic device is enabled to:

receive a first operation of a user, wherein the first operation is used to trigger the electronic device to start to record a video;

collect, with a camera, a first image in response to the first operation, and displaying a first interface, wherein the first interface is a viewfinder interface in which the electronic device is recording the video, a preview stream is displayed in the viewfinder interface, the preview stream comprises a preview image obtained based on the first image, the first interface further comprises a snapshot shutter, and the snapshot shutter is configured to trigger the electronic device to capture an image to obtain a photo;

buffer, in a first buffer queue, the first image collected by the camera, wherein n frames of first images collected by the camera are buffered in the first buffer queue, n≥1, and n is an integer;

select, based on additional information of the first image in response to a second operation performed by the user on the snapshot shutter, a second image from the n frames of first images buffered in the first buffer queue, wherein the additional information of the first image comprises at least one of a contrast of the first image, an angular velocity at which the camera collects the first image, or a timestamp of the first image; and

perform first image processing on m frames of first images comprising the second image, to obtain a captured image, wherein the first image processing comprises cropping processing performed based on a cropping manner and a cropping parameter of a target preview image, the target preview image is a frame of image that is in the preview stream and that is collected by the camera when the electronic device receives the second operation, m≥1, and m is an integer, wherein the cropping parameter of the target preview image comprises center point coordinates of a cropping area of the target preview image and cropping size information and wherein the first image processing further comprises to:

collect current temperature of the electronic device,

in response to the current temperature of the electronic device being greater than a preset temperature threshold, perform the first image processing on only the second image to obtain a third image,

in response to the current temperature of the electronic device being less than or equal to the preset temperature threshold, perform image fusion on a plurality of the m frames of the first images to obtain the third image, and

determine the captured image based on the third image.

20 . The computer-readable storage medium according to claim 19 , wherein the cropping manner of the target preview image comprises a center cropping manner.