Focusing method, device and storage medium
AssigneeBeijing Xiaomi Mobile Software Co., Ltd.
InventorsXiaolong Chen, Hui Du, Yihan Wu
Life of this patent
Estimating the term…
Abstract
A focusing method includes acquiring a current frame image through a camera; performing through an image stabilization algorithm a uttering compensation on the current frame image acquired by the camera to form a compensated image, wherein the image stabilization algorithm is used to perform electronic anti-jittering processing; performing through a statistic value algorithm a statistic value operation on the compensated image, to obtain statistic value information of the compensated image; determining focusing data to be used to move the camera to a focus position, according to the statistic value information; and adjusting a position of the camera according to the focusing data, to achieve focusing.
Claims14
A focusing method, comprising:
- acquiring a current frame image through a camera;
- performing through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, wherein the image stabilization algorithm is used to perform electronic anti-jittering processing;
- performing through a statistic value algorithm a statistic value operation on the compensated image, to obtain statistic value information of the compensated image;
- determining focusing data to be used to move the camera to a focus position, according to the statistic value information;
- and
- adjusting a position of the camera according to the focusing data, to achieve focusing;
- wherein said performing through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, further comprises:
- determining an optimal motion vector for indicating a jittering direction of the camera and a jittering displacement amount of the camera in a three-dimensional space;
- and
- performing the jittering compensation on the current frame image acquired by the camera, according to the optimal motion vector;
- and
- wherein said determining an optimal motion vector further comprises:
- obtaining output information of a gyroscope, wherein the output information comprises the jittering direction of the camera and the displacement amount of the camera in a three-dimensional space;
- determining a motion vector corresponding to the output information;
- and
- determining the optimal motion vector according to the motion vector corresponding to the output information.
A focusing device, comprising:
- a processor;
- and
- memory for storing instructions executable by the processor,
- wherein the processor is configured execute the instructions to:
- acquire a current frame image through a camera;
- perform through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, wherein the image stabilization algorithm is used to perform electronic anti-jittering processing;
- perform through a statistic value algorithm a statistic value operation on the compensated image, to obtain statistic value information of the compensated image;
- determine focusing data to be used to move the camera to a focus position, according to the statistic value information;
- and
- adjust a position of the camera according to the focusing data, to achieve focusing;
- wherein the processor, configured to perform through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, is further configured to:
- determine an optimal motion vector for indicating a jittering direction of the camera and a jittering displacement amount of the camera in a three-dimensional space;
- and
- perform the jittering compensation on the current frame image acquired by the camera, according to the optimal motion vector;
- and
- wherein the processor, configured to determine the optimal motion vector, is further configured to:
- obtain output information of a gyroscope, wherein the output information comprises a jittering direction of the camera and a displacement amount of the camera in a three-dimensional space;
- determine a motion vector corresponding to the output information;
- and
- determine the optimal motion vector according to the motion vector corresponding to the output information.
A non-transitory computer readable storage medium having stored thereon instructions that, when being executed by a processor, cause the processor to:
- acquire a current frame image through a camera;
- perform through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, wherein the image stabilization algorithm is used to perform electronic anti-jittering processing;
- perform through a statistic value algorithm a statistic value operation on the compensated image, to obtain statistic value information of the compensated image;
- determine focusing data to be used to move the camera to a focus position, according to the statistic value information;
- and
- adjust a position of the camera according to the focusing data, to achieve focusing;
- wherein the processor, configured to perform through an image stabilization algorithm a jittering compensation on the current frame image acquired by the camera to form a compensated image, is further configured to:
- determine an optimal motion vector for indicating a jittering direction of the camera and a jittering displacement amount of the camera in a three-dimensional space;
- and
- perform the jittering compensation on the current frame image acquired by the camera, according to the optimal motion vector;
- and
- wherein the processor, configured to determine the optimal motion vector, is further configured to:
- obtain output information of a gyroscope, wherein the output information comprises a jittering direction of the camera and a displacement amount of the camera in a three-dimensional space;
- determine a motion vector corresponding to the output information;
- and
- determine the optimal motion vector according to the motion vector corresponding to the output information.
Dependencies are inferred from the claim text.