A method, device, equipment and medium for optimizing focus curve

By smoothing the focus curve of the multi-zoom group movement lens and optimizing the automatic focus algorithm, the unnecessary inflection points are eliminated, and the problem of excessive inflection points affecting the motor drive and lens life is solved, and more stable motor drive and extend lens life is achieved. effect.

CN118945471BActive Publication Date: 2025-01-07ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411399021.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-07
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

There are too many inflection points in the focus curve of the multi-zoom group movement lens, which affects the actual driving control of the motor and the lens life.

Method used

By smoothing the received focus curve to be optimized, the first desired focus curve is determined, and an auxiliary zoom curve is obtained based on the curve using the autofocus algorithm, and the focus curve at each typical distance is adjusted to ensure that its smoothness value is greater than that of the The pre-set threshold value removes unnecessary inflection points and verify that the optimized curve is within the imaging clarity of each object distance and the safe range of the motor distance.

Benefits of technology

It effectively solves the problem of too many inflection points in the focus curve, reduces the number of commutation times of motor drive, extends the service life of the lens, and improves the stability of imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945471B_ABST
    Figure CN118945471B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device, equipment and medium for optimizing a focus curve, which removes redundant inflection points of the focus curve to be optimized by smoothing the focus curve to be optimized at a first typical object distance, verifies whether the focus curves at other typical object distances after smoothing also remove redundant inflection points, and verifies the validity of each expected focus curve, and finally determines the optimized focus curve. This effectively solves the problem that there are many inflection points in the focus curve of a multi-zoom group movement lens, which affects the actual drive control of the motor and the life of the lens.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video surveillance technology, and in particular to a method, device, equipment and medium for optimizing a focus curve. Background Art

[0002] With the continuous expansion of the security market, higher and higher requirements are placed on the performance of the front-end camera lens, such as wider focal length, faster speed, higher precision and longer life. In the current technical field, in order to improve the rigid indicators such as focal length under the limited equipment volume, the design scheme of multi-zoom group movement lens will be adopted. The focus curve under this scheme has a greater change compared with the focus curve of the conventional movement lens. In order to give full play to the performance of the lens, it may be necessary to optimize the focus curve.

[0003] In the current field of lens control, the focus curve of the movement lens is simulated or measured by the zoom and focus linkage model, where the zoom and focus linkage model is provided by the supplier based on the optical characteristics. The horizontal axis of the focus curve is the motor movement position of the main zoom group, and the vertical axis is the motor movement position of the focus group. A similar method is used for multi-zoom group movement lenses, that is, the supplier provides multiple auxiliary zoom groups to follow the main zoom group, and on this basis, the focus curve is simulated through the zoom and focus linkage model or the focus curve is measured by the end user.

[0004] The focus curve of a multi-zoom group movement lens may have an inflection point, such as Figure 1 is a schematic diagram of the existing focus curve. Figure 1 The focus curve has only one inflection point, and the existence of an inflection point means that deceleration, reversing and other controls are required during operation. Figure 1 The mid-inflection point exists at the near tele end (telephoto end), which is in line with the telephoto speed limit function generally used in actual use of the movement lens, and has little impact on actual control and use. By providing a method for optimizing the focus curve, it is also hoped that the optimized focus curve can meet Figure 1 trend requirements.

[0005] However, when there are too many turns, it is not conducive to the actual drive control of the motor. For example, multiple reversals are required, which affects the life of the lens. Summary of the invention

[0006] The present application provides a method, device, equipment and medium for optimizing a focus curve, so as to solve the problem that there are too many inflection points in the focus curve, thereby affecting the actual drive control of the motor.

[0007] The present application provides a method for optimizing a focus curve, the method comprising:

[0008] Smoothing the received focus curve to be optimized at a first typical object distance to determine a first expected focus curve at the first typical object distance;

[0009] Based on the first desired focus curve, an automatic focus algorithm is used on the auxiliary zoom group to obtain an auxiliary zoom curve at the first typical object distance;

[0010] Based on the auxiliary zoom curve, an autofocus algorithm is used to obtain a second expected focus curve at each other second typical object distance, and it is determined whether a smoothness value of each second expected focus curve is greater than a preset threshold;

[0011] If so, the first desired focus curve and each second desired focus curve are used as optimized focus curves.

[0012] Furthermore, before smoothing the received focus curve to be optimized at the first typical object distance, the method further includes:

[0013] It is determined whether the smoothness value of the received focus curve to be optimized is greater than a preset threshold value. If not, a subsequent step of smoothing the received focus curve to be optimized at the first typical object distance is performed.

[0014] Furthermore, the method further comprises:

[0015] If the smoothness value of any second expected focus curve is not greater than a preset threshold, the first expected focus curve at the first typical object distance is smoothed and subsequent steps are performed.

[0016] Furthermore, before using the first expected focus curve and each second expected focus curve as an optimized focus curve, the method further includes:

[0017] Verifying the validity of the first expected focus curve and each second expected focus curve;

[0018] If the verification is successful, a subsequent step of using the first expected focus curve and each second expected focus curve as an optimized focus curve is performed.

[0019] Furthermore, verifying the validity of the first expected focus curve and each second expected focus curve includes: verifying whether the clarity of the imaging is within a preset clarity range at each typical object distance; and / or, at each typical object distance, verifying whether the distance between each two motors is within a preset safety range.

[0020] Furthermore, the method further comprises:

[0021] If the verification fails, the first expected focus curve at the first typical object distance is smoothed and subsequent steps are performed.

[0022] An embodiment of the present application provides a device for optimizing a focus curve, the device comprising:

[0023] a processing module, configured to smooth the received focus curve to be optimized at a first typical object distance, and determine a first expected focus curve at the first typical object distance; based on the first expected focus curve, adopt an automatic focus algorithm to obtain an auxiliary zoom curve at the first typical object distance for the auxiliary zoom group; based on the auxiliary zoom curve, adopt an automatic focus algorithm to obtain a second expected focus curve at each other second typical object distance;

[0024] A judging module, used for judging whether the smoothness value of each second expected focus curve is greater than a preset threshold;

[0025] The determination module is configured to use the first expected focus curve and each second expected focus curve as an optimized focus curve if the smoothness value of each second expected focus curve is greater than a preset threshold.

[0026] Further, the judgment module is also used to judge whether the smoothness value of the received focus curve to be optimized is greater than a preset threshold before smoothing the received focus curve to be optimized under the first typical object distance;

[0027] The processing module is specifically configured to perform a subsequent step of smoothing the received focus curve to be optimized at the first typical object distance if the smoothness value of the received focus curve to be optimized is not greater than a preset threshold.

[0028] Furthermore, the processing module is further configured to smooth the first expected focus curve at the first typical object distance and execute subsequent steps if the smoothness value of any second expected focus curve is not greater than a preset threshold.

[0029] Furthermore, the judgment module is further configured to verify the validity of the first expected focus curve and each second expected focus curve before using the first expected focus curve and each second expected focus curve as the optimized focus curve;

[0030] The determination module is specifically configured to, if the verification is passed, perform a subsequent step of using the first expected focus curve and each second expected focus curve as an optimized focus curve.

[0031] Furthermore, the judgment module is specifically used to verify whether the clarity of the imaging is within a preset clarity range at each typical object distance; and / or, at each typical object distance, verify whether the distance between each two motors is within a preset safety range.

[0032] Furthermore, the processing module is further configured to, if the verification fails, smooth the first expected focus curve at the first typical object distance and execute subsequent steps.

[0033] An embodiment of the present application further provides an electronic device, the electronic device comprising a processor, the processor being configured to implement the steps of any of the above-described methods for optimizing a focus curve when executing a computer program stored in a memory.

[0034] An embodiment of the present application further provides a 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 steps of any of the above-mentioned methods for optimizing a focus curve are implemented.

[0035] An embodiment of the present application further provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute any of the steps of the above-mentioned method for optimizing a focus curve.

[0036] In an embodiment of the present application, by smoothing the focus curve to be optimized at a first typical object distance, redundant inflection points of the focus curve to be optimized are removed, and a second expected focus curve at another second typical object distance is obtained through the focus curve to be optimized after removing the inflection points. By verifying the smoothness of the focus curve at other typical object distances, the problem of many inflection points in the focus curve of the multi-zoom group movement lens, which affects the actual drive control of the motor and affects the life of the lens, is effectively solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 is a schematic diagram of an existing focus curve;

[0039] Figure 2 A schematic diagram of a process for optimizing a focus curve provided in an embodiment of the present application;

[0040] Figure 2a The focus curve to be optimized before smoothing provided in the embodiment of the present application;

[0041] Figure 2b The embodiment of the present application provides Figure 2a A focus curve obtained by smoothing the focus curve to be optimized in FIG.

[0042] Figure 2c The original auxiliary zoom curve provided in the embodiment of the present application;

[0043] Figure 2d The embodiment of the present application provides an auxiliary zoom curve at a first typical object distance obtained by performing an autofocus algorithm on the auxiliary zoom group based on the first desired focus curve;

[0044] Figure 3 A schematic diagram of a focus curve verification process provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a process for optimizing a focus curve provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of the overall process of optimizing the focus curve application provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the structure of a device for optimizing a focus curve provided in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] Below, some of the terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art:

[0051] Movement lens: also called integrated movement, integrated movement, etc., is a key component of high-speed ball, mainly used for zoom imaging, directly affecting the quality of the whole machine. Mainly through the stepper motor to drive each group in each lens, to achieve the effect of optical zoom and auto focus.

[0052] Multi-zoom group movement lens: Generally, a movement lens consists of one zoom group and one focus group; while a multi-zoom group movement lens mainly refers to a movement lens that includes multiple zoom groups and one focus group inside the movement.

[0053] Lens curve: Due to the optical characteristics of movement-type lenses, in order to achieve the preset imaging effect at different focal lengths and different object distances, each group in the movement needs to move to a specific position; this specific position is called the lens curve in the corresponding coordinate system. Among them, the lens curve includes the focus curve and the zoom curve.

[0054] Motor: Currently, the movement lens mainly uses stepper motors to drive each group in each lens to achieve the effects of optical zoom and autofocus. Other types of motors are also used in actual applications, which are collectively referred to as "motors" here.

[0055] In order to solve the problem that there are too many inflection points in the focus curve of the multi-zoom group movement lens, which affects the actual drive control of the motor, an embodiment of the present application provides a method for optimizing the focus curve. Embodiment 1:

[0056] Figure 2 A schematic diagram of a process for optimizing a focus curve provided in an embodiment of the present application, the process comprising the following steps:

[0057] S201: Smoothing the received focus curve to be optimized at a first typical object distance to determine a first expected focus curve at the first typical object distance.

[0058] The method for optimizing a focus curve provided in an embodiment of the present application is applied to an electronic device, which may be a computer, a server, an embedded chip of a movement lens, etc.

[0059] In an embodiment of the present application, the multiple zoom groups in the multi-zoom group movement lens include a main zoom group and an auxiliary zoom group. Among them, the auxiliary zoom group can be one or more. The focus curve is a curve mapped at the same time by the actual position of the motor corresponding to the main zoom group and the actual position of the motor corresponding to the focus group at each object distance to ensure clear imaging. The auxiliary zoom curve refers to a curve mapped at the same time by the actual position of the motor corresponding to the main zoom group and the actual position of the motor corresponding to the auxiliary zoom group at each object distance to ensure clear imaging. There are several auxiliary zoom groups and there will be several auxiliary zoom curves.

[0060] The typical object distance refers to a representative object distance among any object distances, for example, 1 meter, 2 meters, INF infinity, etc. The typical object distance can be an integer or a decimal, which is not specifically limited here. The first typical object distance is any object distance among the typical object distances. The first typical object distance can be a preset fixed value (i.e., the same first typical object distance is used each time the optimization task is performed), or a random value (i.e., a different first typical object distance is used each time the optimization task is performed). During the specific implementation process, it can be flexibly set according to actual needs, which is not specifically limited here.

[0061] In a possible implementation, the focus curve to be optimized may be the initial lens control parameters provided by the lens supplier, and may be any focus curve obtained by simulation or actual measurement through a zoom and focus linkage model provided by the supplier.

[0062] The focus curve to be optimized at the first typical object distance is smoothed, and after smoothing, a first desired focus curve at the first typical object distance is obtained. The focus curve smoothing belongs to the prior art, and can be processed by, for example, filter smoothing, spline interpolation, etc., which is not specifically limited here.

[0063] In order to facilitate understanding of the specific purpose of smoothing, the embodiments of the present application will be explained in the form of illustrations. It should be pointed out that: in actual applications, there will also be some situations where the inflection point of the focus curve of the multi-zoom group movement lens is close to the wide end (wide-angle side), which is more in line with the telephoto speed limit function generally used when the movement lens is actually used. Therefore, this application only explains the case of removing the wide end inflection point as an example. In the actual process, the specific removal of redundant inflection points can be adjusted at any time according to the actual situation of the specific movement lens.

[0064] Figure 2a The focus curve to be optimized before smoothing provided in the embodiment of the present application is: Figure 2a As shown, there are two inflection points in the focus curve to be optimized, and the inflection point close to the wide end is not conducive to actual control and lens service life.

[0065] Figure 2b The embodiment of the present application provides Figure 2a The focus curve after smoothing the focus curve to be optimized in the embodiment of the present application is the first desired focus curve. Figure 2a The inflection point at the wide end of the focus curve after smoothing has been removed, and the shape of the curve is close to the focus curve of common lenses. This can effectively solve the problem of the extra inflection point at the wide end of the focus curve to be optimized before smoothing affecting the actual control and reducing the lens life.

[0066] S202: Based on the first expected focus curve, an automatic focus algorithm is used on the auxiliary zoom group to obtain an auxiliary zoom curve at the first typical object distance.

[0067] The autofocus algorithm refers to the process of automatically adjusting the position of each lens group in the lens according to different object distances through the motors corresponding to each lens group in the lens, so that the object is clearly imaged on the imaging plane. Therefore, at the first typical object distance, based on the mapping relationship between the motor corresponding to the focus group and the motor corresponding to the main zoom group in the first expected focus curve, the auxiliary zoom group is subjected to the autofocus algorithm to obtain the mapping relationship between the motor corresponding to each auxiliary zoom group and the motor corresponding to the main zoom group during the focusing process, thereby obtaining each auxiliary zoom curve at the first typical object distance.

[0068] Specifically, the process of using the autofocus algorithm to obtain the mapping relationship between the motor corresponding to each auxiliary zoom group and the motor corresponding to the main zoom group during the focusing process belongs to the prior art and is not specifically limited here.

[0069] There are multiple zoom groups in the multi-zoom group movement lens, and the multiple zoom groups include a main zoom group and an auxiliary zoom group. Among them, the auxiliary zoom group can be one or more. When there is only one auxiliary zoom group in the multi-zoom group movement lens, based on the first expected focus curve, an auxiliary zoom curve can be obtained through the autofocus algorithm; when there are multiple auxiliary zoom groups in the multi-zoom group movement lens, based on the first expected focus curve, multiple auxiliary zoom curves can be obtained through the autofocus algorithm. The auxiliary zoom curve can also be called a linkage zoom curve.

[0070] Figure 2c The original auxiliary zoom curve provided in the embodiment of the present application is: Figure 2d The embodiment of the present application provides an auxiliary zoom curve at a first typical object distance obtained by processing the auxiliary zoom group with an autofocus algorithm based on the first expected focus curve. Because the focus curve to be optimized at the first typical object distance is smoothed, and the redundant inflection points of the focus curve to be optimized are removed to obtain the first expected focus curve at the first typical object distance, the auxiliary zoom curve at the first typical object distance obtained by processing the autofocus algorithm based on the first expected focus curve also changes. However, due to Figure 2d The auxiliary zoom curve in Figure 2c The original auxiliary zoom curve in the same position changes very little, so it has little effect on the lens performance, but it achieves smooth processing of the optimized focus curve.

[0071] S203: Based on the auxiliary zoom curve, an auto-focus algorithm is used to obtain a second desired focus curve at each other second typical object distance.

[0072] During the focusing process, the various groups of the movement lens have a linkage relationship. For example, the movement lens A sets the linkage relationship between the motor of the focus group, the motor of the main zoom group, and the motor of the auxiliary zoom group when it leaves the factory. Because the focus curve to be optimized at the first typical object distance is smoothed, the linkage relationship between the motor of the middle focus group and the motor of the main zoom group of the movement lens is adjusted. And because the auxiliary zoom curve is obtained by using the autofocus algorithm based on the first expected focus curve obtained after smoothing the focus curve to be optimized at the first typical object distance, the linkage relationship between the motor of the main zoom group and the motor of the auxiliary zoom group is also adjusted, thereby adjusting the original linkage relationship.

[0073] Because the original linkage relationship is adjusted, the second expected focus curve at each other second typical object distance can be obtained by using the autofocus algorithm at each other second typical object distance, wherein the other second typical object distance refers to other typical object distances except the first typical object distance.

[0074] S204: Determine whether the smoothness value of each second expected focus curve is greater than a preset threshold.

[0075] If yes, execute S205; if no, execute S206.

[0076] The smoothness value of each second desired focus curve is detected by using a curve smoothness algorithm. Specifically, the process of calculating the curve smoothness value by using the curve smoothness algorithm belongs to the prior art and is not specifically limited here.

[0077] S205: Taking the first desired focus curve and each second desired focus curve as an optimized focus curve.

[0078] S206: If the smoothness value of any second expected focus curve is not greater than a preset threshold, smoothing the first expected focus curve at the first typical object distance and executing subsequent steps.

[0079] If there is any second desired focus curve whose smoothness value is not greater than the preset threshold, it proves that the focus curve pair after one smoothing process cannot reduce the actual driving control such as switching, that is, one smoothing process does not effectively remove the inflection point in the focus curve. The first desired focus curve is smoothed again, and the operation is repeated until the smoothness value of each second desired focus curve is simulated to be greater than the preset threshold.

[0080] In a possible implementation, the system may pre-set the number of loop operations. If the smoothness value of the second desired focus curve is still not greater than a pre-set threshold after the number of loop operations is reached, the system ends the optimization process.

[0081] In an embodiment of the present application, by smoothing the focus curve to be optimized at a first typical object distance, redundant inflection points of the focus curve to be optimized are removed, and a second expected focus curve at another second typical object distance is obtained through the focus curve to be optimized after removing the inflection points. By verifying the smoothness of the focus curve at other typical object distances, the problem of many inflection points in the focus curve of the multi-zoom group movement lens, which affects the actual drive control of the motor and affects the life of the lens, is effectively solved. Embodiment 2:

[0082] Before executing S205 in the above embodiment 1, in order to ensure the effectiveness of the optimization, the present application also verifies the effectiveness of the first expected focus curve and each second expected focus curve.

[0083] After determining that the smoothness value of each second expected focus curve is greater than a preset threshold, the effectiveness of the first expected focus curve and each second expected focus curve is verified to ensure that the optimized multi-zoom group movement lens still has the original benefit while improving lens performance.

[0084] For ease of understanding, the focus curve verification process of the present application is explained below through a specific embodiment. Figure 3 , Figure 3 A schematic diagram of a focus curve verification process provided in Example 3 of the present application, the process includes the following steps:

[0085] S301: Verify the validity of the first expected focus curve and each second expected focus curve.

[0086] If the verification fails, execute S302; if the verification passes, execute S303.

[0087] The specific operation is to perform image focus processing at each typical object distance according to the expected focus curve at each typical object distance, and verify whether the clarity of the image is within a preset clarity range based on the image imaging result; and / or, at each typical object distance, determine the actual position of each group of motors at the same time during the focusing process according to the expected focus curve at each typical object distance, and verify whether the distance between each two motors is within a preset safety range.

[0088] In a possible implementation, the image clarity verification may be to perform image focus processing according to the expected focus curve at each typical object distance, and based on the image imaging result, manually compare it through a line pair card. Specifically, the process of verifying the image clarity belongs to the prior art and is not specifically limited here.

[0089] In a possible implementation, it is verified whether the distance between every two motors is within a preset safety range. The method used may be, based on the expected focus curve at each typical object distance, taking one side of the lens as the origin during the focusing process, and detecting the distances between each motor and the adjacent motor and between the edge motor and the side wall of the lens at the same time under different fixed object distances. If the distances are all within the safety range, it proves that the expected focus curve is valid.

[0090] S302: Smoothing the first expected focus curve at the first typical object distance and executing S202.

[0091] S303: taking the first desired focus curve and each second desired focus curve as an optimized focus curve. Embodiment 3:

[0092] For ease of understanding, the method for optimizing the focus curve of the present application is explained below through a specific embodiment. Figure 4 , Figure 4 A schematic diagram of a process for optimizing a focus curve provided in Example 4 of the present application, the process comprising the following steps:

[0093] S401: Determine whether the smoothness value of the received focus curve to be optimized at a first typical object distance is greater than a preset threshold.

[0094] If yes, execute S409; if no, receive the optimization task and execute S402.

[0095] The specific operation process of this step is as follows: (1) Perform lens evaluation according to the control parameters recommended by the supplier to obtain lens control parameters, such as the main zoom group travel range, the initial auxiliary zoom curve, the initial focus curve, etc. Among them, the initial focus curve is the focus curve to be optimized in the embodiment of the present application.

[0096] (2) Analyze the overall optical characteristics of the movement and the corresponding characteristics of each group. In the embodiment of the present application, the main method is to detect whether the smoothness value of the focus curve to be optimized meets the expected requirements.

[0097] (3) According to the output data of step (2), it is determined whether the focus curve to be optimized needs to be optimized. If so, S402 is executed; otherwise, S409 is executed.

[0098] In the embodiment of the present application, the electronic device can use the optimization method of embodiment 1 to optimize the focus curve to be optimized each time it receives a focus curve to be optimized. However, in some cases, the received focus curve to be optimized may not have multiple inflection points, that is, the smoothness value of the focus curve to be optimized does not meet the optimization conditions. Therefore, in order to improve work efficiency, a smoothness threshold can be pre-set in the embodiment of the present application. After receiving the focus curve to be optimized, the smoothness value of the focus curve to be optimized is determined, and it is judged whether the smoothness value is greater than the preset threshold. If not, subsequent optimization processing is performed. If greater, it can be considered that the focus curve to be optimized does not need to be optimized, and the optimization process ends.

[0099] The system receives multiple focus curves to be optimized, and detects the smoothness value of each focus curve to be optimized through a smoothness algorithm. If the smoothness value of the received focus curve to be optimized is not greater than the preset threshold, the focus curve to be optimized is subjected to subsequent operations. If the smoothness value of the received focus curve to be optimized is greater than the preset threshold, no processing is performed. This reduces the workload of the machine and improves work efficiency.

[0100] Specifically, the process of calculating the curve smoothness value using the curve smoothness algorithm belongs to the prior art and is not specifically limited here.

[0101] In a possible implementation, the received focus curve to be optimized is manually input. The operator can determine whether optimization is needed based on the actual situation of the obtained focus curve to be optimized. For example, the initial lens control parameters provided by the lens supplier, the focus curve a obtained by simulation or actual measurement through the zoom and focus linkage model provided by the supplier, has obvious redundant inflection points at the wide end. In this case, the electronic device does not need to determine whether the focus curve a needs to be optimized through smoothness detection, and the electronic device can be directly controlled to perform subsequent optimization processing on the input focus curve as the curve to be optimized.

[0102] S402: Smoothing the received focus curve to be optimized at the first typical object distance to determine a first expected focus curve at the first typical object distance.

[0103] According to the overall optical characteristics of the movement and the characteristics of each group, the focus curve at a specific object distance is customized, such as INF infinity, that is, under the original overall optical characteristics of the movement and the characteristics of each group, the received focus curve to be optimized at the first typical object distance is smoothed to determine the first expected focus curve at the first typical object distance. The specific object distance is also called the typical object distance, and the specific object distance can be the first typical object distance, the second typical object distance, INF infinity, etc. Among them, customizing the focus curve at a specific object distance means adjusting the focus curve to the form required by itself through smoothing according to actual needs.

[0104] S403: Based on the first expected focus curve, an automatic focus algorithm is used on the auxiliary zoom group to obtain an auxiliary zoom curve at a first typical object distance.

[0105] The first desired focus curve is also called a custom focus curve, and the auxiliary zoom curve at the first typical object distance is also called a custom auxiliary zoom curve. During the processing of the autofocus algorithm, the actual position of the motor corresponding to the focus group in the custom focus curve is used as the actual position control of the motor corresponding to the original auxiliary zoom group, and the actual position of the stepper motor corresponding to the original auxiliary zoom group is used as the actual position control of the stepper motor of the focus group, and the corresponding auxiliary zoom curve is obtained at a specific object distance (such as INF infinity). In short, during the autofocus process, the actual position of the motor corresponding to the focus group and the actual position of the motor corresponding to the main zoom group are clearly defined in the known custom focus curve. In order to calculate the actual position of the motor corresponding to the auxiliary zoom group, the actual position of the motor corresponding to the known focus group and the actual position of the motor corresponding to the main zoom group are used as fixed values, and the motor corresponding to the auxiliary zoom group is adjusted to obtain its corresponding actual position.

[0106] S404: Based on the auxiliary zoom curve, an auto-focus algorithm is used to obtain a second desired focus curve at each other second typical object distance.

[0107] S405: Determine whether the smoothness value of each second expected focus curve is greater than a preset threshold.

[0108] If yes, execute S406; if no, execute S407.

[0109] Verify the focus curve effect corresponding to the customized auxiliary zoom curve at the typical object distance. Verify the focus curve effect corresponding to the customized auxiliary zoom curve at each other second typical object distance; determine whether the focus curve at the second typical object distance meets expectations, and if so, perform the validity verification of the focus curve in S406; if not, smooth the first expected focus curve and execute subsequent steps. Among them, verify the focus curve effect corresponding to the customized auxiliary zoom curve at each other second typical object distance. The method selected in the embodiment of the present application is to determine whether the smoothness value of each second expected focus curve is greater than a preset threshold.

[0110] S406: Verifying the validity of the first expected focus curve and each second expected focus curve.

[0111] If the verification fails, execute S407; if the verification passes, execute S408.

[0112] The first expected focus curve is also called a customized focus curve, and the auxiliary zoom curve at the first typical object distance is also called a customized auxiliary zoom curve. At each typical object distance, image focus processing is performed according to the expected focus curve at each typical object distance, and based on the image imaging result, it is verified whether the imaging clarity is within a preset clarity range; and / or, at each typical object distance, according to the expected focus curve at each typical object distance, the actual position of each group of motors at the same time during the focusing process is determined, and it is verified whether the distance between each two motors is within a preset safety range.

[0113] S407: Smoothing the first expected focus curve at the first typical object distance and executing the subsequent step S402.

[0114] S408: Taking the first expected focus curve and each second expected focus curve as an optimized focus curve.

[0115] S409: Put into practical application and end the optimization processing task.

[0116] In the embodiments of the present application, a focus curve is customized at a specific object distance based on the overall optical characteristics of the movement and the characteristics of each group, and the actual position of the motor corresponding to the focus group in the customized focus curve is used as the actual position control of the motor corresponding to the original auxiliary zoom group, and the actual position of the stepper motor corresponding to the original auxiliary zoom group is used as the actual position control of the stepper motor of the focus group, and the corresponding auxiliary zoom curve is obtained on this basis; the focus curve effect corresponding to the customized auxiliary zoom curve at other typical object distances is verified, so as to realize the customization of the focus curve of the multi-zoom group movement, so as to solve the problem of too many inflection points in the focus curve, which affects the actual drive control of the motor. Embodiment 4:

[0117] For ease of understanding, the overall process of optimizing the focus curve application of the present application is explained below through a specific embodiment. Figure 5 , Figure 5 This is a schematic diagram of the overall process of optimizing the focus curve application provided in Example 5 of the present application. The process includes the following steps:

[0118] S501: Control parameters recommended by lens suppliers: In the current field of lens control, the focus curve of the movement lens is simulated or measured by a zoom and focus linkage model, wherein the zoom and focus linkage model is provided by the supplier based on optical characteristics. A similar method is used for the multi-zoom group movement lens, that is, the supplier provides multiple auxiliary zoom groups with follow-up curves for the main zoom group, and simulates the focus curve through the zoom and focus linkage model or measures the focus curve at the user end. This mainly refers to the lens control parameters initially provided by the lens supplier, specifically the focus curve to be optimized. Based on the acquired focus curve to be optimized, determine the curve to be optimized at the first typical object distance.

[0119] S502: Custom focus curve: Smooth the curve to be optimized at the first typical object distance to obtain the first expected focus curve at the first typical object distance, and use the autofocus algorithm to obtain the auxiliary focus curve at the first typical object distance for the auxiliary zoom group. Then, the expected focus curve at each object distance is obtained through the autofocus algorithm, and the focus curve to be optimized at each object distance is processed. This is the processing process of the focus curve to be optimized in the embodiment of the present application.

[0120] S503: Curve validity verification: The movement lens is precisely controlled, and the relevant parameters are closely related to the optical performance. After customizing the focus curve according to the optical and group characteristics, it is necessary to further verify whether there is a loss in other important parameters of the optical system or whether the relevant losses exceed the benefits brought by the optimized focus curve, and provide feedback on the results. Based on multiple optimization processes, iterative verification is performed. Here, the main verification of imaging clarity and the distance between each two motors in this application is carried out.

[0121] S504: Optimizing the focus curve: By optimizing the focus curve, the initial focus curve is optimized, so as to give full play to the performance of the lens while ensuring the optical performance. Embodiment 5:

[0122] Based on the same application concept, the embodiment of the present application provides a device for optimizing a focus curve. Figure 6 For a schematic diagram of a device structure for optimizing a focus curve provided in an embodiment of the present application, please refer to Figure 6 , the device comprises:

[0123] The processing module 601 is used to smooth the received focus curve to be optimized at the first typical object distance to determine a first expected focus curve at the first typical object distance; based on the first expected focus curve, use an automatic focus algorithm to obtain an auxiliary zoom curve at the first typical object distance for the auxiliary zoom group; based on the auxiliary zoom curve, use an automatic focus algorithm to obtain a second expected focus curve at each other second typical object distance;

[0124] A judging module 602 is used to judge whether the smoothness value of each second desired focus curve is greater than a preset threshold;

[0125] The determination module 603 is configured to use the first expected focus curve and each second expected focus curve as an optimized focus curve if the smoothness value of each second expected focus curve is greater than a preset threshold.

[0126] Further, the judgment module 602 is also used to determine whether the smoothness value of the received focus curve to be optimized is greater than a preset threshold before smoothing the received focus curve to be optimized under the first typical object distance;

[0127] The processing module 601 is specifically configured to perform a subsequent step of smoothing the received focus curve to be optimized at the first typical object distance if the smoothness value of the received focus curve to be optimized is not greater than a preset threshold.

[0128] Furthermore, the processing module 601 is further configured to smooth the first expected focus curve at the first typical object distance and execute subsequent steps if the smoothness value of any second expected focus curve is not greater than a preset threshold.

[0129] Further, the judgment module 602 is further configured to verify the validity of the first expected focus curve and each second expected focus curve before using the first expected focus curve and each second expected focus curve as the optimized focus curve;

[0130] The determination module 603 is specifically configured to perform a subsequent step of using the first expected focus curve and each second expected focus curve as an optimized focus curve if the verification is passed.

[0131] Furthermore, the judgment module 602 is specifically used to verify whether the clarity of the imaging is within a preset clarity range at each typical object distance; and / or, at each typical object distance, verify whether the distance between each two motors is within a preset safety range.

[0132] Furthermore, the processing module 601 is further configured to, if the verification fails, perform smoothing on the first expected focus curve at the first typical object distance and execute subsequent steps. Embodiment 6:

[0133] Based on the same application concept, an embodiment of the present application provides an electronic device, which can implement the steps of the method for optimizing the focus curve discussed above. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7As shown, it includes: a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704;

[0134] The memory 703 stores a computer program. When the program is executed by the processor 701, the processor 701 performs the following steps:

[0135] Smoothing the received focus curve to be optimized at a first typical object distance to determine a first expected focus curve at the first typical object distance;

[0136] Based on the first desired focus curve, an automatic focus algorithm is used on the auxiliary zoom group to obtain an auxiliary zoom curve at the first typical object distance;

[0137] Based on the auxiliary zoom curve, an autofocus algorithm is used to obtain a second expected focus curve at each other second typical object distance, and it is determined whether a smoothness value of each second expected focus curve is greater than a preset threshold;

[0138] If so, the first desired focus curve and each second desired focus curve are used as optimized focus curves.

[0139] In a possible implementation manner, the processor 701 is further configured to, before smoothing the received focus curve to be optimized at the first typical object distance, the method further includes:

[0140] It is determined whether the smoothness value of the received focus curve to be optimized is greater than a preset threshold value. If not, a subsequent step of smoothing the received focus curve to be optimized at the first typical object distance is performed.

[0141] In a possible implementation, the processor 701 is further configured to smooth the first expected focus curve at the first typical object distance and execute subsequent steps if the smoothness value of any second expected focus curve is not greater than a preset threshold.

[0142] In a possible implementation manner, the processor 701 is further configured to, before using the first expected focus curve and each second expected focus curve as an optimized focus curve, the method further includes:

[0143] Verifying the validity of the first expected focus curve and each second expected focus curve;

[0144] If the verification is successful, a subsequent step of using the first expected focus curve and each second expected focus curve as an optimized focus curve is performed.

[0145] In a possible implementation, the processor 701 is further used to verify the validity of the first expected focus curve and each second expected focus curve, including: verifying whether the clarity of the imaging is within a preset clarity range at each typical object distance; and / or, at each typical object distance, verifying whether the distance between each two motors is within a preset safety range.

[0146] In a possible implementation, the processor 701 is further configured to, if the verification fails, smooth the first expected focus curve at the first typical object distance and execute subsequent steps.

[0147] Since the principle of solving the problem by the above electronic device is similar to the method for optimizing the focus curve, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0148] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 702 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0149] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. Embodiment 7:

[0150] Based on the same application concept, the embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program is executed on the processor, the processor executes any of the methods for optimizing the focus curve discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the method for optimizing the focus curve, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.

[0151] Based on the same application concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the methods for optimizing the focus curve discussed above. Since the principle of solving the problem by the above computer program product is similar to that of optimizing the focus curve, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0152] Because in the embodiment of the present application, the electronic device removes redundant inflection points of the focus curve to be optimized by smoothing the focus curve to be optimized at the first typical object distance, and obtains the second expected focus curve at other second typical object distances through the focus curve to be optimized after removing the inflection points. By verifying the smoothness of the focus curve at other typical object distances, the problem of many inflection points in the focus curve of the multi-zoom group movement lens, which affects the actual drive control of the motor and affects the life of the lens, is effectively solved.

[0153] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, MO (magneto-optical disks), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, NAND FLASH (non-volatile memory), SSD (solid state drive), etc.

[0154] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0155] The computer program for performing the operation of the present disclosure may be an assembly instruction, an instruction set architecture (ISA) instruction, a machine instruction, a machine-related instruction, a microcode, a firmware instruction, a state setting data, or a source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0156] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0157] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0158] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0160] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for optimizing a focus curve, characterized in that: The method comprises: Smoothing the received focus curve to be optimized at a first typical object distance to determine a first expected focus curve at the first typical object distance; Based on the first desired focus curve, an automatic focus algorithm is used on the auxiliary zoom group to obtain an auxiliary zoom curve at the first typical object distance; Based on the auxiliary zoom curve, an autofocus algorithm is used to obtain a second expected focus curve at each other second typical object distance, and it is determined whether a smoothness value of each second expected focus curve is greater than a preset threshold; If yes, taking the first desired focus curve and each second desired focus curve as an optimized focus curve; The first typical object distance is a representative object distance among any object distances; and the second typical object distance is a representative object distance other than the first typical object distance.

2. The method according to claim 1, characterized in that Before smoothing the received focus curve to be optimized at the first typical object distance, the method further includes: It is determined whether the smoothness value of the received focus curve to be optimized is greater than a preset threshold value. If not, a subsequent step of smoothing the received focus curve to be optimized at the first typical object distance is performed.

3. The method according to claim 1, characterized in that The method further comprises: If the smoothness value of any second expected focus curve is not greater than a preset threshold, the first expected focus curve at the first typical object distance is smoothed and subsequent steps are performed.

4. The method according to claim 1, characterized in that: Before using the first expected focus curve and each second expected focus curve as an optimized focus curve, the method further includes: Verifying the validity of the first expected focus curve and each second expected focus curve; If the verification is successful, a subsequent step of using the first expected focus curve and each second expected focus curve as an optimized focus curve is performed.

5. The method according to claim 4, characterized in that The verifying the validity of the first expected focus curve and each second expected focus curve includes: Verify that the image clarity is within the preset clarity range at each typical object distance; and / or, At each typical object distance, verify whether the distance between each two motors is within the preset safety range.

6. The method according to claim 4, characterized in that The method further comprises: If the verification fails, the first expected focus curve at the first typical object distance is smoothed and subsequent steps are performed.

7. A device for optimizing a focus curve, characterized in that: The device comprises: a processing module, configured to smooth the received focus curve to be optimized at a first typical object distance, and determine a first expected focus curve at the first typical object distance; based on the first expected focus curve, adopt an automatic focus algorithm to obtain an auxiliary zoom curve at the first typical object distance for the auxiliary zoom group; based on the auxiliary zoom curve, adopt an automatic focus algorithm to obtain a second expected focus curve at each other second typical object distance; A judging module, used for judging whether the smoothness value of each second expected focus curve is greater than a preset threshold; A determination module, configured to use the first expected focus curve and each second expected focus curve as an optimized focus curve if the smoothness value of each second expected focus curve is greater than a preset threshold; wherein the first typical object distance is a representative object distance among any object distances; and the second typical object distance is a representative object distance other than the first typical object distance.

8. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to implement the steps of the method for optimizing the focus curve as claimed in any one of claims 1 to 6 when executing a computer program stored in a memory.

9. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the method for optimizing the focus curve as described in any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises: a computer program code, which, when executed on a computer, enables the computer to execute the steps of the method for optimizing a focus curve as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Camera focus calibration system and focus calibration method

    CN107071243A

  • Synchronous focusing method and device during zoom process, storage medium and electronic terminal

    CN110045562A