Focusing method and related product

文档序号:1672296 发布日期:2019-12-31 浏览:29次 中文

阅读说明:本技术 对焦方法及相关产品 (Focusing method and related product ) 是由 卓世杰 *** 于 2017-05-24 设计创作,主要内容包括:本发明实施例公开了一种对焦方法及相关产品,包括:获取对焦值FV采样参数组集合以及相位差Defocus采样参数组集合;根据FV采样参数组集合和第一预设拟合策略确定步距角与FV之间的第一映射关系,根据Defocus采样参数组集合和第二预设拟合策略确定步距角与Defocus之间的第二映射关系;根据第一映射关系确定第一步距角集合内的第一步距角,根据第二映射关系确定第二步距角集合内的第二步距角;根据第一步距角与第二步距角完成对焦。本发明实施例有利于提高移动终端的对焦速度,以及延长对焦相关硬件的使用寿命。(The embodiment of the invention discloses a focusing method and a related product, comprising the following steps: acquiring a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set; determining a first mapping relation between the step angle and the FV according to the FV sampling parameter set and a first preset fitting strategy, and determining a second mapping relation between the step angle and the Defocus according to the Defocus sampling parameter set and a second preset fitting strategy; determining a first step angle in the first step angle set according to the first mapping relation, and determining a second step angle in the second step angle set according to the second mapping relation; and finishing focusing according to the first step angle and the second step angle. The embodiment of the invention is beneficial to improving the focusing speed of the mobile terminal and prolonging the service life of focusing related hardware.)

1. A focusing method, comprising:

acquiring a focus value FV sampling parameter set;

determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a first step angle in a first step angle set according to the first mapping relation, wherein an FV value corresponding to the first step angle is larger than an FV value corresponding to a step angle in the first step angle set except the first step angle;

and determining the focusing point of the camera module according to the first step angle and finishing focusing.

2. The method according to claim 1, wherein said obtaining a set of focus values FV sampling parameter sets comprises:

and controlling the camera module to execute a second scanning process according to a fourth step angle set, and acquiring the FV sampling parameter set, wherein each FV sampling parameter set in the FV sampling parameter set comprises one step angle in the fourth step angle set and an FV corresponding to the step angle.

3. A focusing method, comprising:

acquiring a phase difference Defocus sampling parameter set;

determining a second mapping relation between a step angle and the Defocus according to the Defocus sampling parameter set and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a second step angle in a second step angle set according to the second mapping relation, wherein the Defocus corresponding to the second step angle is zero;

and determining the focusing point of the camera module according to the second step angle and finishing focusing.

4. The method of claim 3, wherein obtaining the set of phase difference Defocus sampling parameter sets comprises:

and controlling the camera module to execute a second scanning process according to a fourth step angle set, and acquiring the Defocus sampling parameter set, wherein each Defocus sampling parameter set in the Defocus sampling parameter set comprises one step angle in the fourth step angle set and the corresponding Defocus.

5. A focusing method, comprising:

acquiring a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set;

determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy, and determining a second mapping relation between the step angle and a Defocus according to the Defocus sampling parameter set and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a first step angle in a first step angle set according to the first mapping relation, determining a second step angle in a second step angle set according to the second mapping relation, wherein an FV value corresponding to the first step angle is larger than an FV value corresponding to a step angle except the first step angle in the first step angle set, and a Defocus corresponding to the second step angle is zero;

and finishing focusing according to the first step angle and the second step angle.

6. The method of claim 5, wherein said completing focusing according to said first pitch angle and said second pitch angle comprises:

determining a difference between the first step angle and the second step angle as a first reference value;

and finishing focusing according to the first reference value.

7. The method of claim 5 or 6, wherein said completing focusing according to said first step angle and said second step angle comprises:

determining a difference between the first step angle and the second step angle as a second reference value;

judging whether the second reference value is smaller than or equal to a preset threshold value or not;

when the second reference value is judged to be smaller than or equal to the preset threshold value, determining the mean value of the first step angle and the second step angle;

and finishing focusing according to the average value.

8. The method of claim 5 or 6, wherein said completing focusing according to said first step angle and said second step angle comprises:

determining a difference between the first step angle and the second step angle as a third reference value;

judging whether the third reference value is larger than the preset threshold value or not;

when the third reference value is judged to be larger than the preset threshold value, determining a third step pitch angle set of the first scanning process according to the mean value of the first step pitch angle and the second step pitch angle;

controlling the camera module to execute a first scanning process according to the third step distance angle set, and determining a third step distance angle in the third step distance angle set;

and finishing focusing according to the third step pitch angle.

9. The method according to any one of claims 5 to 8, wherein the obtaining of the set of focus values FV sampling parameter sets and the set of phase difference Defocus sampling parameter sets comprises:

controlling the camera module to execute a second scanning process according to a fourth step angle set, and acquiring the FV sampling parameter set and the Defocus sampling parameter set, where each FV sampling parameter set in the FV sampling parameter set includes one step angle in the fourth step angle set and a FV corresponding thereto, and each Defocus sampling parameter set in the Defocus sampling parameter set includes one step angle in the fourth step angle set and a Defocus corresponding thereto.

10. A focusing apparatus, comprising:

an obtaining unit, configured to obtain a set of focus value FV sampling parameter sets;

the fitting unit is used for determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set acquired by the acquisition unit and a first preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

a determining unit, configured to determine, according to the first mapping relationship determined by the fitting unit, a first step angle in a first step angle set, where an FV value corresponding to the first step angle is greater than an FV value corresponding to a step angle in the first step angle set other than the first step angle;

and the processing unit is used for determining the focusing point of the camera module according to the first step angle determined by the determining unit and finishing focusing.

11. A focusing apparatus, comprising:

the acquisition unit is used for acquiring a phase difference Defocus sampling parameter set;

the fitting unit is used for determining a second mapping relation between a step angle and the Defocus according to the Defocus sampling parameter set acquired by the acquiring unit and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in the camera module;

a determining unit, configured to determine a second pitch angle in a second pitch angle set according to the second mapping relationship determined by the fitting unit, where a Defocus corresponding to the second pitch angle is zero;

and the processing unit is used for determining the focusing point of the camera module according to the second step angle determined by the determining unit and finishing focusing.

12. A focusing apparatus, comprising:

an obtaining unit, configured to obtain a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set;

the fitting unit is used for determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy acquired by the acquisition unit, and determining a second mapping relation between the step angle and a Defocus according to the Defocus sampling parameter set and a second preset fitting strategy acquired by the acquisition unit, wherein the step angle is the step angle of a camera driving device in a camera module;

a determining unit, configured to determine a first step angle in a first step angle set according to the first mapping relationship determined by the fitting unit, determine a second step angle in a second step angle set according to the second mapping relationship determined by the fitting unit, where FV values corresponding to the first step angle are greater than FV values corresponding to step angles in the first step angle set other than the first step angle, and Defocus corresponding to the second step angle is zero;

and the processing unit is used for finishing focusing according to the first step angle and the second step angle determined by the determining unit.

13. A mobile terminal, comprising: the device comprises a processor, a camera module, a camera driving device and a memory; and one or more programs; the one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method as described in any of claims 1-9.

14. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-9.

Technical Field

The invention relates to the technical field of mobile terminals, in particular to a focusing method and a related product.

Background

With the rapid development of electronic technology, mobile terminals such as mobile phones, IPADs, cameras, etc. have become necessities of people, and a shooting function has become one of the indispensable functions of these mobile terminals, and with the improvement of fast-paced living speed and quality of life of people, the requirements of people on the shooting function are increasing, wherein a focusing technology is a key factor determining shooting efficiency and quality.

At present, the mobile terminal mostly adopts a phase focusing method, a contrast focusing method or a hybrid focusing method of the phase focusing method and the contrast focusing method to perform intelligent focusing, wherein the hybrid focusing method generally includes performing a pre-scanning once through the phase focusing method and the contrast focusing method, roughly determining a larger focusing area, and then finding a correct focusing position in the larger focusing area through an accurate scanning again.

Disclosure of Invention

The embodiment of the invention provides a focusing method and a related product, aiming at improving the focusing speed of a mobile terminal and prolonging the service life of focusing related hardware.

In a first aspect, an embodiment of the present invention provides a focusing method, where the method includes:

acquiring a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set;

determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy, and determining a second mapping relation between the step angle and a Defocus according to the Defocus sampling parameter set and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a first step angle in a first step angle set according to the first mapping relation, determining a second step angle in a second step angle set according to the second mapping relation, wherein an FV value corresponding to the first step angle is larger than an FV value corresponding to a step angle except the first step angle in the first step angle set, and a Defocus corresponding to the second step angle is zero;

and finishing focusing according to the first step angle and the second step angle.

In a second aspect, an embodiment of the present invention provides a focusing method, where the method includes:

acquiring a focus value FV sampling parameter set;

determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a first step angle in a first step angle set according to the first mapping relation, wherein an FV value corresponding to the first step angle is larger than an FV value corresponding to a step angle in the first step angle set except the first step angle;

and determining the focusing point of the camera module according to the first step angle and finishing focusing.

In a third aspect, an embodiment of the present invention provides a focusing method, where the method includes:

acquiring a phase difference Defocus sampling parameter set;

determining a second mapping relation between a step angle and the Defocus according to the Defocus sampling parameter set and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

determining a second step angle in a second step angle set according to the second mapping relation, wherein the Defocus corresponding to the second step angle is zero;

and determining the focusing point of the camera module according to the second step angle and finishing focusing.

In a fourth aspect, an embodiment of the present invention provides a focusing apparatus, including:

an obtaining unit, configured to obtain a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set;

the fitting unit is used for determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set and a first preset fitting strategy acquired by the acquisition unit, and determining a second mapping relation between the step angle and a Defocus according to the Defocus sampling parameter set and a second preset fitting strategy acquired by the acquisition unit, wherein the step angle is the step angle of a camera driving device in a camera module;

a determining unit, configured to determine a first step angle in a first step angle set according to the first mapping relationship determined by the fitting unit, determine a second step angle in a second step angle set according to the second mapping relationship determined by the fitting unit, where FV values corresponding to the first step angle are greater than FV values corresponding to step angles in the first step angle set other than the first step angle, and Defocus corresponding to the second step angle is zero;

and the processing unit is used for finishing focusing according to the first step angle and the second step angle determined by the determining unit.

In a fifth aspect, an embodiment of the present invention provides a focusing apparatus, including:

an obtaining unit, configured to obtain a set of focus value FV sampling parameter sets;

the fitting unit is used for determining a first mapping relation between a step angle and an FV according to the FV sampling parameter set acquired by the acquisition unit and a first preset fitting strategy, wherein the step angle is the step angle of a camera driving device in a camera module;

a determining unit, configured to determine, according to the first mapping relationship determined by the fitting unit, a first step angle in a first step angle set, where an FV value corresponding to the first step angle is greater than an FV value corresponding to a step angle in the first step angle set other than the first step angle;

and the processing unit is used for determining the focusing point of the camera module according to the first step angle determined by the determining unit and finishing focusing.

In a sixth aspect, an embodiment of the present invention provides a focusing apparatus, including:

the acquisition unit is used for acquiring a phase difference Defocus sampling parameter set;

the fitting unit is used for determining a second mapping relation between a step angle and the Defocus according to the Defocus sampling parameter set acquired by the acquiring unit and a second preset fitting strategy, wherein the step angle is the step angle of a camera driving device in the camera module;

a determining unit, configured to determine a second pitch angle in a second pitch angle set according to the second mapping relationship determined by the fitting unit, where a Defocus corresponding to the second pitch angle is zero;

and the processing unit is used for determining the focusing point of the camera module according to the second step angle determined by the determining unit and finishing focusing.

In a seventh aspect, an embodiment of the present invention provides a mobile terminal, including: the device comprises a processor, a camera module, a camera driving device and a memory; and one or more programs; the one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps described in the method of any of the first to third aspects of embodiments of the invention.

In an eighth aspect, the embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program specifically includes instructions for executing some or all of the steps described in any one of the methods in the first aspect to the third aspect of the embodiment of the present invention.

In a ninth aspect, the present invention provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in any of the methods of the first to third aspects of the embodiments of the present invention. The computer program product may be a software installation package.

It can be seen that, in the embodiment of the present invention, the mobile terminal first obtains a focus value FV sampling parameter set and a phase difference Defocus sampling parameter set, determines a first mapping relationship between a step angle and a FV according to the FV sampling parameter set and a first preset fitting policy, determines a second mapping relationship between the step angle and a Defocus according to the Defocus sampling parameter set and a second preset fitting policy, determines a first step angle in a first step angle set according to the first mapping relationship, determines a second step angle in a second step angle set according to the second mapping relationship, and finally completes focusing according to the first step angle and the second step angle. Therefore, after obtaining the FV sampling parameter set and the Defocus sampling parameter set, the mobile terminal determines the first step distance angle and the second step distance angle according to the first fitting strategy and the second fitting strategy algorithm without multiple scanning processes, and then completes focusing, so that the situation that the terminal consumes a long time to execute multiple scanning processes to complete focusing is avoided, time consumption and hardware cost of the focusing process are reduced, the focusing speed of the mobile terminal is improved, and the service life of related hardware is prolonged.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1A is a schematic flow chart illustrating a focusing method according to an embodiment of the present invention;

FIG. 1B is a distribution diagram of an exemplary FV sampling parameter set according to the disclosure of the present invention;

fig. 1C is a distribution diagram of an exemplary set of Defocus sampling parameters according to an embodiment of the present invention;

FIG. 2 is a flow chart of another focusing method disclosed in the embodiment of the present invention;

FIG. 3 is a flow chart of another focusing method disclosed in the embodiments of the present invention;

FIG. 4 is a schematic structural diagram of a focusing device according to an embodiment of the disclosure;

fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;

fig. 6 is a schematic structural diagram of another mobile terminal disclosed in the embodiment of the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种激光直接成像系统中最佳焦面的查找方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!