IP Library Granted Patent US 12671902
Granted Patent B2
US 12671902 · App. 18/547,570 · Granted Jun 30, 2026

Image anti-shake method and electronic device

Inventors: Zhiqi Li (Shenzhen, CN); Yu Wang (Shenzhen, CN); Congchao Zhu (Shenzhen, CN)
Assignee: Honor Device Co., Ltd.
H04N23/687H04N23/6812H04N23/683
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 12671902
App. No.
18/547,570
Granted
Jun 30, 2026
Kind
B2
Abstract

The present application relates to an image anti-shake method and an electronic device. The method includes: enabling a camera application; receiving a first operation; acquiring a first image stream in response to the first operation, where the first image stream is an image stream collected by the camera in real time, the first image stream is an image stream that has been subjected to first anti-shake processing, and the first anti-shake processing includes anti-shake processing performed by the three-axis optical image stabilization controller; and processing the first image stream based on a first parameter and a second parameter to obtain a second image stream, where the first parameter is obtained based on the first anti-shake processing, the first parameter is used for restoring the first anti-shake processing, the second parameter is used for second anti-shake processing, and the first anti-shake processing is different from the second anti-shake processing.

Claims (50)

1 . An image anti-shake method, applied to an electronic device, wherein the electronic device comprises a camera and a three-axis optical image stabilization controller, and the method comprises:

enabling a camera application;

receiving a first operation;

acquiring a first image stream in response to the first operation, wherein the first image stream is an image stream collected by the camera in real time, the first image stream is an image stream that has been subjected to first anti-shake processing, and the first anti-shake processing comprises anti-shake processing performed by the three-axis optical image stabilization controller, wherein the three-axis optical image stabilization controller controls an image sensor to move on an X-axis and a Y-axis, and rotate on a Z-axis; and

processing the first image stream based on a first parameter and a second parameter to obtain a second image stream, wherein the first parameter is obtained based on the first anti-shake processing, the first parameter is used for restoring the first anti-shake processing through a camera intrinsic parameter matrix of the three-axis optical image stabilization controller, the second parameter is used for second anti-shake processing, and the first anti-shake processing is different from the second anti-shake processing, wherein the camera intrinsic parameter matrix comprises at least one element that is a function of a focal length of the camera and an angle between an optical center of the image sensor and a rotated Z-axis.

2 . The image anti-shake method according to claim 1 , wherein the processing the first image stream based on a first parameter and a second parameter to obtain a second image stream comprises:

restoring the first anti-shake processing on the first image stream based on the first parameter, to obtain a third image stream; and

performing the second anti-shake processing on the third image stream based on the second parameter, to obtain the second image stream.

3 . The image anti-shake method according to claim 1 , wherein the electronic device comprises a gyroscope sensor, the second parameter is obtained based on shake information collected by the gyroscope sensor, and the shake information is used for representing a pose change of the electronic device during photographing.

4 . The image anti-shake method according to claim 3 , wherein the second parameter is obtained based on the shake information and a constraint condition, and the constraint condition means that each image frame in the second image stream meets a preset image range.

5 . The image anti-shake method according to claim 3 , wherein the shake information comprises: rotation data and/or translation data on an X-axis and a Y-axis and rotation data on a Z-axis of the electronic device.

6 . The image anti-shake method according to claim 1 , wherein the electronic device further comprises a Hall sensor, the Hall sensor is configured to collect data of the first anti-shake processing, and the image anti-shake method further comprises:

converting the data of the first anti-shake processing into a three-axis offset, wherein the three-axis offset comprises an offset in an X-axis direction, an offset in a Y-axis direction, and a rotation angle in a Z-axis direction; and

obtaining the first parameter according to the three-axis offset.

7 . The image anti-shake method according to claim 6 , wherein the first image stream comprises N image frames, N is a positive integer greater than 1, and the converting the data of the first anti-shake processing into a three-axis offset comprises:

performing feature point detection on an (N−1) th image frame and an N th image frame, to obtain a feature pair, wherein the feature pair comprises a first feature point in the (N−1) th image frame and a second feature point in the N th image frame, and the first feature point corresponds to the second feature point; and

obtaining the three-axis offset according to the feature pair and the data of the first anti-shake processing.

8 . An electronic device, wherein the electronic device comprises one or more processors, a memory, and a display screen, the memory is coupled to the one or more processors, the memory is configured to store computer program code, the computer program code comprises computer instructions, and the one or more processors invoke the computer instructions to cause the electronic device to perform the following steps:

enabling a camera application;

receiving a first operation;

acquiring a first image stream in response to the first operation, wherein the first image stream is an image stream collected by a camera in real time, the first image stream is an image stream that has been subjected to first anti-shake processing, and the first anti-shake processing comprises anti-shake processing performed by a three-axis optical image stabilization controller, wherein the three-axis optical image stabilization controller controls an image sensor to move on an X-axis and a Y-axis, and rotate on a Z-axis, and

processing the first image stream based on a first parameter and a second parameter to obtain a second image stream, wherein the first parameter is obtained based on the first anti-shake processing, the first parameter is used for restoring the first anti-shake processing through a camera intrinsic parameter matrix of the three-axis optical image stabilization controller, the second parameter is used for second anti-shake processing, and the first anti-shake processing is different from the second anti-shake processing, wherein the camera intrinsic parameter matrix comprises at least one element that is a function of a focal length of the camera and an angle between an optical center of the image sensor and a rotated Z-axis.

9 . The electronic device according to claim 8 , wherein the processing the first image stream based on a first parameter and a second parameter to obtain a second image stream comprises:

restoring the first anti-shake processing on the first image stream based on the first parameter, to obtain a third image stream; and

performing the second anti-shake processing on the third image stream based on the second parameter, to obtain the second image stream.

10 . The electronic device according to claim 8 , wherein the electronic device comprises a gyroscope sensor, the second parameter is obtained based on shake information collected by the gyroscope sensor, and the shake information is used for representing a pose change of the electronic device during photographing.

11 . The electronic device according to claim 10 , wherein the second parameter is obtained based on the shake information and a constraint condition, and the constraint condition means that each image frame in the second image stream meets a preset image range.

12 . The electronic device according to claim 10 , wherein the shake information comprises: rotation data and/or translation data on an X-axis and a Y-axis and rotation data on a Z-axis of the electronic device.

13 . The electronic device according to claim 8 , wherein the electronic device further comprises a Hall sensor, the Hall sensor is configured to collect data of the first anti-shake processing, and wherein the one or more processors invoke the computer instructions to cause the electronic device to perform:

converting the data of the first anti-shake processing into a three-axis offset, wherein the three-axis offset comprises an offset in an X-axis direction, an offset in a Y-axis direction, and a rotation angle in a Z-axis direction; and

obtaining the first parameter according to the three-axis offset.

14 . The electronic device according to claim 13 , wherein the first image stream comprises N image frames, N is a positive integer greater than 1, and the converting the data of the first anti-shake processing into a three-axis offset comprises:

performing feature point detection on an (N−1) th image frame and an N th image frame, to obtain a feature pair, wherein the feature pair comprises a first feature point in the (N−1) th image frame and a second feature point in the N th image frame, and the first feature point corresponds to the second feature point; and

obtaining the three-axis offset according to the feature pair and the data of the first anti-shake processing.

15 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform following steps:

enabling a camera application;

receiving a first operation;

acquiring a first image stream in response to the first operation, wherein the first image stream is an image stream collected by a camera in real time, the first image stream is an image stream that has been subjected to first anti-shake processing, and the first anti-shake processing comprises anti-shake processing performed by a three-axis optical image stabilization controller, wherein the three-axis optical image stabilization controller controls an image sensor to move on an X-axis and a Y-axis, and rotate on a Z-axis; and

processing the first image stream based on a first parameter and a second parameter to obtain a second image stream, wherein the first parameter is obtained based on the first anti-shake processing, the first parameter is used for restoring the first anti-shake processing through a camera intrinsic parameter matrix of the three-axis optical image stabilization controller, the second parameter is used for second anti-shake processing, and the first anti-shake processing is different from the second anti-shake processing, wherein the camera intrinsic parameter matrix comprises at least one element that is a function of a focal length of the camera and an angle between an optical center of the image sensor and a rotated Z-axis.

16 . The non-transitory computer-readable storage medium according to claim 15 , wherein the processing the first image stream based on a first parameter and a second parameter to obtain a second image stream comprises:

restoring the first anti-shake processing on the first image stream based on the first parameter, to obtain a third image stream; and

performing the second anti-shake processing on the third image stream based on the second parameter, to obtain the second image stream.

17 . The non-transitory computer-readable storage medium according to claim 15 , wherein the second parameter is obtained based on shake information collected by a gyroscope sensor, and the shake information is used for representing a pose change during photographing.

18 . The non-transitory computer-readable storage medium according to claim 17 , wherein the second parameter is obtained based on the shake information and a constraint condition, and the constraint condition means that each image frame in the second image stream meets a preset image range.

19 . The non-transitory computer-readable storage medium according to claim 15 , wherein a hall sensor is configured to collect data of the first anti-shake processing, and when the computer program is executed by a processor, the processor is caused to perform:

converting the data of the first anti-shake processing into a three-axis offset, wherein the three-axis offset comprises an offset in an X-axis direction, an offset in a Y-axis direction, and a rotation angle in a Z-axis direction; and

obtaining the first parameter according to the three-axis offset.

20 . The non-transitory computer-readable storage medium according to claim 19 , wherein the first image stream comprises N image frames, N is a positive integer greater than 1, and the converting the data of the first anti-shake processing into a three-axis offset comprises;

performing feature point detection on an (N−1) th image frame and an N th image frame, to obtain a feature pair, wherein the feature pair comprises a first feature point in the (N−1) th image frame and a second feature point in the N th image frame, and the first feature point corresponds to the second feature point; and

obtaining the three-axis offset according to the feature pair and the data of the first anti-shake processing.