Focus following control method, system and device and storage medium

By using pre-calibrated calibration compensation data to compensate the follow-focus data of the camera movement lens, the follow-focus blur problem caused by thermal loss is solved, and the image clarity is maintained during the operation of the shooting equipment.

CN119767142APending Publication Date: 2025-04-04SUZHOU KEDA TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411936296.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of thermal loss of focus caused by the camera movement lens due to the increase in temperature, especially when the image clarity is affected during the follow-up process.

Method used

The focus data is compensated by pre-calibrated calibration compensation data of each calibration time node, ensuring that the overall running time of the shooting device provides accurate compensation for the overall running time after starting, thereby avoiding the focus blur problem caused by thermal loss of focus.

Benefits of technology

It realizes the accuracy of follow-focus data during the shooting device from start to thermal out of focus, avoids follow-focus blurring, and ensures the sharpness of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767142A_ABST
    Figure CN119767142A_ABST
Patent Text Reader

Abstract

The invention provides a focus following control method, system and device and a storage medium, and the method comprises the steps: determining the current started time of a shooting device after the shooting device is started; when the started time reaches a pre-calibrated key time node, according to the pre-calibrated calibration compensation data of the key time node, updating the calibration focus following data of the previous moment to obtain the calibration focus following data of the current moment; and controlling zooming and focusing of the shooting equipment according to the calibrated focus following data at the current moment. According to the method and the device, the focus following data is compensated through the calibration compensation data of each key time node calibrated in advance, and accurate compensation is provided for the overall operation time after the shooting equipment is started.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Thermal defocus usually occurs more often on projection equipment. After the projection content is formed, the projection equipment projects it onto the screen through a light source. The projection equipment lens is used to emit light. The light has a certain amount of energy and generates heat when passing through the lens. After the projection equipment is used for a period of time, the projection image will gradually begin to blur. This is the thermal defocus phenomenon. During the use of the camera, it was found that some of the movement lenses also have thermal defocus phenomena similar to the above-mentioned projection equipment. After investigation, thermal defocus is generally caused by the increase in lens temperature, which causes its structural parts and optical parts to undergo thermal expansion, thereby affecting the spacing and focus position between the optical parts. Projection equipment and cameras have different treatments for thermal defocus, because there is an essential difference between the use of the movement lens of the camera and the projection equipment. The projection equipment generally only has focus, no zoom, and there is no problem of following focus, so it only needs to compensate the lens focus position according to the current temperature. The camera generally controls the lens following focus based on the following focus curve. The thermal defocus treatment method of the projection equipment is not applicable to the camera.

[0003] In response to the thermal defocus phenomenon, projection equipment usually adds some thermal defocus compensation structures to solve the defocus problem of optical components caused by temperature changes. The movement lens part also reserves some structural margins to ensure the image clarity caused by temperature increase. However, the thermal defocus problem caused by temperature influence on some lenses is more serious. Although the automatic focus will ensure the focus on the clearest position according to the scene scanned each time, the focus function is greatly affected by the focus table of the lens itself. When thermal defocus occurs, it will affect the clarity of the image during the focus process.

[0004] Conventional focus tracking algorithms mainly rely on calibrating the deviation between individual lenses and the basic focus table based on the basic focus table of each object distance provided by the lens factory during the mass production process to generate a calibrated focus tracking table for the corresponding lens, which is referred to as focus tracking calibration here, and then assisted by the object distance tracking algorithm to ensure the clarity of the image acquisition during the zoom process. However, when the lens has a thermal defocus problem, if the focus tracking calibration of the production line is calibrated in a cold machine condition, it will cause the camera equipment to deviate from the actual focus table and the calibrated focus table due to thermal defocus after a certain period of time after powering on, resulting in blurred focus. If the calibration is performed in a hot machine condition, there will be a focus blur problem in the image focus from the cold machine power-on condition to the thermal defocus condition. Summary of the invention

[0005] In response to the problems in the prior art, the purpose of the present application is to provide a focus control method, system, device and storage medium, which compensates the focus data through the calibration compensation data of each pre-calibrated calibration time node, and provides accurate compensation for the overall running time after the shooting device is started.

[0006] The present application provides a focus control method, comprising the following steps:

[0007] After the shooting device is started, the current start time of the shooting device is determined;

[0008] When the started time reaches a pre-calibrated key time node, the calibrated focus data of the previous moment is updated according to the calibration compensation data of the pre-calibrated key time node to obtain the calibrated focus data of the current moment;

[0009] When the started time does not reach the critical time node, the calibration focus data of the previous moment is used as the calibration focus data of the current moment;

[0010] The zoom and focus of the camera are controlled according to the calibration focus data at the current moment.

[0011] In some embodiments, after the photographing device is started, before determining the current start-up time of the photographing device, the following steps are also included:

[0012] Obtain basic focus data, as well as calibration compensation data when the camera is started and calibration compensation data at each key time point after startup;

[0013] The initial calibrated focus data is determined according to the basic focus data and the calibration compensation data when the shooting device is started.

[0014] In some embodiments, the calibration compensation data is obtained by pre-calibration using the following steps:

[0015] Determine multiple preset time nodes after the shooting device is started;

[0016] In the calibration environment, obtain the calibration focus pair of the camera at startup and the calibration focus pair at each preset time node after startup;

[0017] Calculate the calibrated focus deviation of the shooting device at startup and the calibrated focus deviation at each preset time node after startup according to the calibrated focus pair and the basic focus data;

[0018] Using the calibration focus deviation of the shooting device at startup as calibration compensation data of the shooting device at startup;

[0019] Screen and determine key time nodes from various preset time nodes;

[0020] For each key time node, the calibration compensation data of the key time node is calculated according to the calibrated focus deviation of the key time node and the calibrated focus deviation of the previous key time node.

[0021] In some embodiments, calibrating the focus deviation includes the optical coupling focus position deviation; screening and determining the key time node from various candidate time nodes includes the following steps:

[0022] The optical coupler focus position deviation of the shooting device at startup is used as the initial reference deviation;

[0023] For each preset time node, the first difference between the optocoupler focus position deviation at the preset time node and the current benchmark deviation is calculated; if the first difference is greater than or equal to the first difference threshold, the preset time node is taken as a critical time node, and the optocoupler focus position deviation at the preset time node is taken as the current benchmark deviation; if the first difference is less than the first difference threshold, the preset time node is taken as a non-critical time node, and the current benchmark deviation is kept unchanged.

[0024] In some embodiments, calibrating the focus deviation includes the optical coupling focus position deviation; screening and determining the key time node from various candidate time nodes includes the following steps:

[0025] For each preset time node, calculate a second difference between the optical coupler focus position deviation at the preset time node and the optical coupler focus position deviation at the previous preset time node, and if the second difference is greater than or equal to a second difference threshold, clear the counter count; if the second difference is less than the second difference threshold, accumulate the counter count;

[0026] When the counter count value reaches the preset count threshold, the candidate time node is used as the calibration end time node;

[0027] The key time node is determined by screening from various candidate time nodes before the calibration end time node.

[0028] In some embodiments, the calibration compensation data includes an optical coupler position difference and a focus position difference of a focus tracking table;

[0029] Determining initial calibrated focus data according to basic focus data and calibration compensation data when the shooting device is started, including: updating the current lens coordinate system according to the optical coupler position difference when the shooting device is started, and determining the initial lens coordinate system; updating the basic focus table according to the focus position difference of the focus table when the shooting device is started, and obtaining the initial calibrated focus table;

[0030] The calibrated focus data of the previous moment is updated according to the calibration compensation data of the key time node, including: updating the lens coordinate system of the previous moment according to the optical coupler position difference of the key time node to obtain the lens coordinate system of the current moment; updating the calibrated focus table of the previous moment according to the focus position difference of the focus table of the key time node to obtain the calibrated focus table of the current moment.

[0031] In some embodiments, the calibration compensation data includes focus position differences of a focus table corresponding to each zoom position, the basic focus data includes a basic focus table, and the calibration focus data includes a calibration focus table;

[0032] Update the calibration focus data of the previous moment according to the calibration compensation data of the key time node, including:

[0033] Obtaining the weight of the focus position difference of the focus table at the key time node, the weight includes a time difference weight and / or a zoom position weight, the time difference weight is determined according to the time difference between the key time node corresponding to the current moment and the key time node at the previous moment, and the zoom position weight is determined according to the focus position difference between the maximum object distance and the minimum object distance of each zoom position in the basic focus table;

[0034] The focus position differences of the focus table at the key time nodes are weighted, and the calibrated focus table at the previous moment is updated based on the weighted focus position differences of the focus table.

[0035] By adopting the focus control method of the present application, after the device is started, at each moment, the startup time of the shooting device corresponding to the current moment is obtained, and whenever the startup time of the shooting device reaches a key time node, the calibrated focus data is updated according to the calibration compensation data of this key time node obtained in advance to obtain the calibrated focus data that conforms to the device state at the current time node, so that the focus data that conforms to the current state of the shooting device can be obtained from the time the shooting device starts working until the occurrence of thermal defocus, thereby ensuring that the shooting device will not have focus blur issues from power-on startup to the thermal defocus process.

[0036] The embodiment of the present application further provides a focus control system, which is applied to a focus control method, and the system includes:

[0037] A time determination module is used to determine the current startup time of the shooting device after the shooting device is started;

[0038] A focus update module is used to update the calibrated focus data of the previous moment according to the calibration compensation data of the key time node obtained in advance when the start time reaches a pre-calibrated key time node, so as to obtain the calibrated focus data of the current moment; when the start time does not reach the key time node, the calibrated focus data of the previous moment is used as the calibrated focus data of the current moment;

[0039] The focus control module is used to control the zoom and focus of the shooting device according to the calibrated focus data at the current moment.

[0040] By adopting the focus control system provided in the present application, each function can implement the steps of the above-mentioned focus control method when realizing the function, thereby obtaining the beneficial effects of the above-mentioned focus control method.

[0041] The embodiment of the present application also provides a focus control device, including:

[0042] processor;

[0043] a memory storing executable instructions of the processor;

[0044] Wherein, the processor is configured to execute the steps of the focus control method by executing the executable instructions.

[0045] By adopting the focus control device provided in the present application, the processor executes the focus control method when executing the executable instructions, thereby obtaining the beneficial effects of the above-mentioned focus control method.

[0046] An embodiment of the present application also provides a computer-readable storage medium for storing a program, and when the program is executed by a processor, the steps of the focus control method are implemented.

[0047] By adopting the computer-readable storage medium provided in the present application, the program stored therein implements the steps of the focus control method when being executed, thereby obtaining the beneficial effects of the focus control method. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings.

[0049] Figure 1 is a flow chart of a focus control method according to an embodiment of the present application;

[0050] Figure 2 is a schematic diagram of a focus curve corresponding to a basic focus table according to an embodiment of the present application;

[0051] Figure 3 This is a flow chart of focus calibration according to an embodiment of the present application;

[0052] Figure 4 is a schematic diagram of a focus calibration light box according to an embodiment of the present application;

[0053] Figure 5 is a flow chart of calibrating the focus deviation according to an embodiment of the present application;

[0054] Figure 6 is a schematic diagram of a focus control system according to an embodiment of the present application;

[0055] Figure 7 is a structural schematic diagram of a focus control device according to an embodiment of the present application;

[0056] Figure 8 It is a schematic diagram of the structure of a computer storage medium according to an embodiment of the present application. DETAILED DESCRIPTION

[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their repeated description will be omitted. Although "first" or "second" etc. are used in this specification to represent certain features, they are only used to represent the function and are not used as a limitation on the number and importance of specific features.

[0058] like Figure 1 As shown, in one embodiment, the present application provides a focus control method, comprising the following steps:

[0059] S100: After the photographing device is started, the current start-up time of the photographing device is determined;

[0060] Here, the started time is the started time from the moment when the photographing device starts to work normally after the cold start to the current time; steps S100 to S400 are steps that are executed in real time and cyclically after the photographing device starts to work normally, that is, steps S100 to S400 are executed in sequence corresponding to each moment;

[0061] In this embodiment, the current activated time of the shooting device can be determined by: for a shooting device that continuously records video, recording the image acquisition frame rate, performing time integration based on the image acquisition frame rate and the current captured image frame, and obtaining the current activated time; or adding a clock to the shooting device, starting the timing after the shooting device is started, and determining the activated time based on the timing result;

[0062] S200: When the started time reaches a pre-calibrated key time node, the calibrated focus data of the previous moment is updated according to the calibration compensation data of the pre-calibrated key time node to obtain the calibrated focus data of the current moment;

[0063] The calibration compensation data includes the optical coupler position difference and the focus position difference of the focus table. The optical coupler position deviation is used to compensate for the deviation of the lens coordinate system, and the focus position deviation of the focus table is used to compensate for the focus position deviation of the focus curve.

[0064] Here, the key time nodes refer to several key time nodes that are pre-calibrated starting from the cold start of the shooting device. Each key time node corresponds to a set of calibration compensation data, and a corresponding focus curve can be generated according to each key time node.

[0065] That is, whenever the start time of the shooting device reaches a pre-calibrated key time node, the calibration follow-focus data is updated according to the calibration compensation data of the pre-calibrated key time node to obtain the calibration follow-focus data that conforms to the device state at the current time node;

[0066] S300: when the started time does not reach the critical time node, the calibration focus data of the previous moment is used as the calibration focus data of the current moment; that is, at the non-critical time node, the calibration focus data is kept unchanged;

[0067] S400: Controlling zooming and focusing of the shooting device according to the calibrated focus data at the current moment.

[0068] By adopting the focus control method of the present application, after the device is started, steps S100 to S400 are executed in sequence at each moment, and at each moment, the startup time of the shooting device corresponding to the current moment is obtained. Whenever the startup time of the shooting device reaches a key time node, the calibrated focus data is updated according to the calibration compensation data of the key time node to obtain the calibrated focus data that conforms to the device state at the current time node, so that the focus data that conforms to the current state of the shooting device can be obtained from the time the shooting device starts working until the occurrence of thermal defocus, thereby ensuring that the shooting device will not have focus blur issues from power-on to the time of thermal defocus.

[0069] like Figure 2 As shown, in this embodiment, the following steps are also included before step S100: obtaining basic focus data, and obtaining calibration compensation data when the shooting device is started and calibration compensation data of each key time node after startup; determining initial calibration focus data according to the basic focus data and the calibration compensation data when the shooting device is started. The initial calibration focus data is used to set the focus data at the moment when the shooting device is started. The basic focus data is updated according to the calibration compensation data when the shooting device is started to obtain the initial calibration focus data, which is used for focus control from the moment when the device is started to the first key time node.

[0070] The basic focus data is the basic focus data provided by the core lens manufacturer of the shooting device, which is pre-stored in the memory of the shooting device, including the basic focus table and lens coordinate system data provided by the core lens manufacturer; the basic focus table includes focus pairs composed of zoom positions and lens positions at preset object distances, such as Figure 2As shown, according to the basic focus following table, the focus following curves at each preset object distance can be obtained respectively. The horizontal axis of the focus following curve represents the zoom position, and the vertical axis represents the focus position. Figure 2 Different curves correspond to focus curves at different object distances; the lens coordinate system data includes the coordinate origin position of the lens (such as the optical center position of the lens) and the coordinate axis direction (such as the direction parallel to the optical axis and the direction perpendicular to the optical axis as the coordinate axis direction).

[0071] The calibration compensation data is the calibrated tracking compensation data pre-stored in the memory, which is used to compensate the focus data used by the shooting equipment to compensate for deviations caused by lens differences or thermal defocus. Before the equipment is officially put into use, the calibration compensation data at startup and at each key time node is calibrated in the calibration environment (the calibration process is described in detail below), and the calibration data is stored in the memory for processing the focus control algorithm when the equipment is officially used.

[0072] The thermal defocus of the shooting equipment is mainly caused by the heat generated by the sensor circuit board circuit and the power circuit around the lens, which causes the overall movement to be in a high temperature environment, causing the focus blur problem. This application calibrates the lens with thermal defocus to determine the focus position offset caused by the actual focus table and the basic focus table over time due to thermal defocus, and adaptively compensates the actual focus table of the focusing algorithm during the automatic focus process to obtain a new calibrated focus table, thereby ensuring that the image effect of the lens with thermal defocus is fully clear under the focus condition. For a shooting device, starting from the cold machine power-on, during the normal operation process, the temperature change trend over time is basically stable if there is no sudden change in the working environment. After the shooting device is started, the temperature will gradually rise as the working time increases, and then thermal defocus will occur. After working for a period of time, due to the heat dissipation mechanism of the device itself, the temperature of the device will remain in a relatively stable state. During calibration, this application calibrates the focus data of each key time node after the shooting device is powered on and started on the cold machine and obtains calibration compensation data. When the shooting equipment is officially used, after the cold machine is started, when it works to the moment corresponding to each key time node, its thermal defocus state is basically the same as the thermal defocus state of the key time node corresponding to the calibration. Therefore, the calibration compensation data obtained during calibration can be used to compensate and update the focus data of the time node, thereby effectively compensating for thermal failure.

[0073] In this embodiment, before obtaining the calibration compensation data when the shooting device is started and the calibration compensation data at each key time node after the start, a step of calibrating the shooting device is also included to collect the calibration compensation data.

[0074] In one embodiment, the calibration compensation data is collected using the following steps:

[0075] In the calibration environment, obtain the calibration focus pair of the shooting device at startup and the calibration focus pairs at each key time node after startup; each calibrated focus pair is a focus pair consisting of a zoom position and a focus position;

[0076] In this embodiment, a plurality of key time nodes are preset (for example, a time node is selected as a key time node at a preset interval, or other selection rules are used to select the key time node). When the photographing device is started, and at each key time node after the start-up, the focus position of the photographing device is obtained corresponding to each zoom position at the infinite object distance in the basic focus table, so as to obtain the calibrated focus pair corresponding to the infinite object distance. The calibrated focus pair at each time node corresponds to a focus curve with the horizontal axis being the zoom position and the vertical axis being the focus position.

[0077] Calculate the calibrated focus deviation of the shooting device at startup and the calibrated focus deviation at each key time point after startup according to the calibrated focus pair and basic focus data;

[0078] In this embodiment, the calibrated focus deviation includes an optical coupler position deviation and a focus table focus position deviation, and the optical coupler position deviation includes an optical coupler zoom position deviation (position deviation of the zoom optical coupler) and an optical coupler focus position deviation (position deviation of the focus optical coupler). When calculating the calibrated focus deviation, firstly, the infinite object distance focus curve corresponding to the calibrated focus pair at startup and at each key time node is compared with the infinite object distance focus curve in the basic focus table, and the zoom translation amount and the focus translation amount of the focus curve compared with the basic focus curve are determined, which are respectively used as the optical coupler zoom position deviation and the optical coupler focus position deviation, and then the focus curve corresponding to the calibrated focus pair is translated to the corresponding position of the basic focus curve, and then the focus position deviation corresponding to each zoom position is determined, which is used as the focus position deviation of the focus table.

[0079] Using the calibration focus deviation of the shooting device at startup as calibration compensation data of the shooting device at startup;

[0080] For each key time node, calculating calibration compensation data of the key time node according to the calibrated focus deviation of the key time node and the calibrated focus deviation of the previous key time node;

[0081] Therefore, the calibration compensation data of the shooting device at startup includes the optical coupler position deviation and the focus position deviation of the focus table at startup, and the calibration compensation data of each key time node after the shooting device is started includes the difference between the optical coupler position deviation and the focus position deviation of the focus table between the current key time node and the previous key time node.

[0082] In another embodiment, during calibration, multiple preset time nodes can be pre-set as alternatives to key time nodes. After collecting the calibration focus deviations of multiple preset time nodes, a portion of time nodes with large changes in the optical coupler focus position deviations are selected from the multiple preset time nodes as key time nodes. While ensuring good focus compensation for each time, it also avoids updating the focus data too frequently during the use of the device. Figures 2 to 5 The calibration process of this implementation method is introduced in detail.

[0083] like Figure 3 As shown, the following steps are used to collect calibration compensation data:

[0084] S010: Determine multiple preset time nodes after the camera is started, and the preset time nodes are used as candidate key time nodes; for example, first set the time when the camera is started as T0, and then set different preset time nodes T1, T2, T3, T4, etc. according to the preset time interval Toff (set as needed, such as 2 minutes, 5 minutes, etc.), the interval between T1 and T0 is equal to Toff, and the interval between two adjacent preset time nodes is Toff;

[0085] In this embodiment, before the calibration is formally started, a step of determining a calibration zoom position may be further included, such as determining the calibration zoom position according to each zoom position (corresponding to a zoom ratio) in the basic focus table, or selecting some calibration zoom positions that need to be calibrated according to the characteristics of multiple focus curves corresponding to the basic focus table;

[0086] According to the characteristics of multiple focus curves corresponding to the basic focus table, some calibration zoom positions that need to be calibrated are selected, including: if the focus positions of the near object distance and the far object distance are too small before a certain zoom position, the zoom position is set to Zsplit, and more zoom positions can be added before the position for calibration. After the zoom position, due to the increased deviation of the focus positions of the near object distance and the far object distance, fewer zoom positions will be selected to avoid increasing the final calibration error; Figure 2 For example, before the intersection of the curves, the focus position deviations of near and far object distances increase. Before the intersection of the curves, you can select as many zoom positions as possible, that is, the spacing between the calibrated zoom positions is small. After the intersection of the curves, you can select as few zoom positions as possible, that is, the spacing between the calibrated zoom positions is large. For example, according to Figure 2 The selected zoom positions are as follows:

[0087] {100,500,900,1300,1600,1900,2300,2700,3100,3500,3900,4300,4700,5100,5500,5800,6100,6400,6700,7000};

[0088] A specific implementation method may be: determining the intersection of multiple focus curves corresponding to the basic focus table, setting a first spacing of a calibrated zoom position before the intersection of the curves, and setting a second spacing of a calibrated zoom position after the intersection of the curves, wherein the first spacing is smaller than the second spacing.

[0089] S020: In the calibration environment, the calibration focus pairs of the camera at startup and the calibration focus pairs at each preset time node after startup are obtained; the calibration focus pairs of the camera at startup can be summarized to form the infinite object distance actual focus table Table0 of the camera at startup, and the infinite object distance actual focus tables Table1, Table2, Table3, Table4, etc. can be obtained at each preset time node.

[0090] Figure 4 The focus calibration light box used in the calibration environment is shown. The focus calibration light box is provided with a backlight 4 and a transparent calibration paper 1, and a teleconverter 2 for simulating a scene at infinity. The device lens 3 to be calibrated is located at the front side of the light box. After adjusting the backlight in the light box to a suitable brightness, the focus calibration operation is performed on the lens at the current moment;

[0091] like Figure 5 As shown, after the shooting device is powered on, the focus calibration is initialized (the zoom position, focus position, etc. are initialized). After obtaining the basic focus table, the zoom motor and focus motor of the lens need to be stopped at the optical coupling position of the two motors. The purpose is to synchronize the coordinate system of the current focusing algorithm with the coordinate system provided by the lens manufacturer, and on this basis, calibrate the actual focus table of the current lens at infinite object distance;

[0092] S030: Calculating the calibrated focus deviation of the shooting device at startup and the calibrated focus deviation at each preset time node after startup according to the calibrated focus pair and the basic focus data; the calibrated focus deviation includes the optical coupling zoom position deviation and the optical coupling focus position deviation at the corresponding moment and the focus table focus position deviation; the calibrated focus deviation and the corresponding moment are used as thermal defocus calibration data for subsequent calculation of calibration compensation data;

[0093] The calibrated focus deviation is obtained by first reaching the initial zoom position according to the calibrated zoom position above after the lens reaches the physical optical coupling point, scanning the infinite object distance focus clear position, obtaining the focus position at this time, and judging whether the zoom position traversal is completed. If so, the actual infinite focus curve is formed according to the zoom position and the focus position, and then compared with the infinite object distance curve in the basic focus table, and the zoom translation is obtained as the optical coupling zoom position deviation, and the focus translation is obtained as the optical coupling focus position deviation. After translating the actual infinite focus curve to the corresponding position of the basic infinite focus curve, the focus position deviation of the focus table is calculated according to the focus position difference between the two curves, and the calibrated focus deviation corresponding to the moment is obtained; if not, the next calibrated zoom position is updated;

[0094] S040: using the calibrated focus deviation of the camera when it is started as the calibration compensation data of the camera when it is started; that is, the calibration compensation data of the camera when it is started includes the optical coupling zoom position deviation and the optical coupling focus position deviation calculated by the camera when it is started and the focus table focus position deviation; the calibrated focus data of the camera when it is started can be obtained according to the basic focus data and the calibration compensation data of the camera when it is started;

[0095] S050: Screening and determining the key time nodes from various preset time nodes; specifically, step S050 includes the following steps:

[0096] For each preset time node T1, T2, T3, T4, ..., calculate the second difference between the optical coupler focus position deviation of the preset time node and the optical coupler focus position deviation of the previous preset time node (for the first preset time node, calculate the second difference between the optical coupler focus position deviation at startup), if the second difference is greater than or equal to the second difference threshold, clear the counter count, if the second difference is less than the second difference threshold, accumulate the counter count; the second difference threshold here can be set as needed, for example, set to a focus position difference corresponding to a focus motor step length, etc.;

[0097] When the counter count value reaches the preset count threshold, the preset time node is used as the calibration end time node; the preset count threshold n is set as needed, for example, 3, 5, 10, etc., that is, when the optical coupler focus position deviation has basically not changed for n consecutive preset time nodes, it is considered that the thermal defocus change process of the current lens has ended and the lens state tends to be stable, then this moment is used as the calibration end time node, and the deviation data of subsequent preset time nodes are no longer considered;

[0098] Select and determine the key time node from various preset time nodes before the calibration end time node;

[0099] Among them, since thermal defocus is a long-term changing process, when the optical coupler focus position deviates greatly from the reference focus position, it means that the degree of thermal defocus change is large. The deviation data of the preset time nodes obtained are screened, some of the duplicate data are found and removed, and the time nodes where the optical coupler focus position deviates greatly from the reference optical coupler focus position are found as key time nodes, which are used as key time nodes for thermal defocus compensation in subsequent focus control. Some preset time nodes with large degrees of thermal defocus change can be screened out as key time nodes, which can ensure that the calibration focus data is updated in time when the degree of thermal defocus change is large. While avoiding the device from frequently updating the focus data, the deviation between the calibration focus data used by the device and the actual focus data of the device is controlled within a certain deviation threshold range. Therefore, the preset time node where the deviation between the optical coupler focus position and the reference focus position in the preset time node is greater than the preset deviation threshold can be used as the key time node. Specifically, the key time node is screened and determined from each preset time node before the calibration end time node, including the following steps:

[0100] The optical coupler focus position deviation of the shooting device at startup is used as the initial reference deviation;

[0101] For each preset time node, a first difference between the optical coupler focus position deviation at the preset time node and the current reference deviation is calculated; if the first difference is greater than or equal to a first difference threshold, the preset time node is used as a key time node, and the optical coupler focus position deviation at the preset time node is used as the current reference deviation; if the first difference is less than the first difference threshold, the preset time node is used as a non-key time node, and the current reference deviation is kept unchanged;

[0102] The first difference threshold can be set as needed, for example, the first difference threshold can be set to a focus position difference corresponding to a focus motor step length; due to the focus depth problem that may exist when the movement lens is stretched 1x, sometimes even a focus position deviation of one step can lead to a large difference in the focus effect, so when screening the key time nodes, the focus position deviation is 1 step as an interval to confirm the key time nodes to be selected;

[0103] After the key time node is screened, the moment of the key time node, the optical coupler position deviation of the key time node and the focus position deviation of the focus table are stored in the memory to form preliminary data of thermal defocus compensation, which is used for calculation in step S060;

[0104] S060: For each key time node, calculate calibration compensation data of the key time node according to the calibrated focus deviation of the key time node and the calibrated focus deviation of the previous key time node.

[0105] Therefore, the calibration compensation data of each key time node includes the optical coupler zoom position difference between the optical coupler zoom position deviation of the key time node and the optical coupler zoom position deviation of the previous key time node, the optical coupler focus position difference between the optical coupler focus position deviation of the calibration time and the optical coupler focus position deviation of the previous key time node, and the focus table focus position difference between the focus table focus position deviation of the calibration time and the focus table focus position deviation of the previous key time node.

[0106] In this embodiment, the key time nodes are obtained by screening the preset time nodes, and the key time nodes that need to be compensated for thermal defocus are screened out. Furthermore, in order to prevent the presence of some abnormal points in the focus table calculated for thermal defocus compensation between each time node and smooth the deviation of the focus table, after the step S060, the step of obtaining the focus position weight of the focus table in the calibration compensation data is also included. In this embodiment, two weights are set, one is the time difference weight, which is determined according to the time difference between the current corresponding key time node and the key time node at the previous moment, and the other is the zoom position weight, which is determined according to the focus position difference between the maximum object distance and the minimum object distance of each zoom position in the basic focus table.

[0107] Among them, for the time difference weight, the shorter the time difference between the current key time node and the key time node at the previous moment, the greater the corresponding time difference weight. For the zoom position weight, for a zoom position, the smaller the focus position difference Vdiff corresponding to the maximum object distance and the minimum object distance in the basic focus table, the greater the zoom position weight.

[0108] After setting the focus position weight of the focus table in the calibration compensation data, when compensating and updating the calibrated focus table based on the calibration compensation data, the focus position difference of the focus table is multiplied by the corresponding focus position weight of the focus table, and then compensated to the corresponding focus position of the calibrated focus table at the previous moment.

[0109] The focus control method can be implemented in an ARM architecture CPU. During calibration, ensure that the current shooting device is started in a cold state, that is, the body temperature is at room temperature. When the device is powered on and started normally, put the device in a focus calibration light box for calibration.

[0110] The determining of the initial calibration focus data according to the basic focus data and the calibration compensation data when the shooting device is started includes:

[0111] Update the current lens coordinate system according to the optical coupler position difference when the shooting device is started, and determine the initial lens coordinate system;

[0112] According to the focus position difference of the focus table when the shooting device is started and the corresponding focus position weight of the focus table, the basic focus table is updated to obtain an initial calibrated focus table.

[0113] During calibration, the focus position difference in the focus table corresponding to the infinite object distance is calibrated. When the basic focus table is updated, the focus position of the corresponding zoom position in the focus curve of each object distance in the basic focus table is updated according to the corresponding relationship between the focus position difference in the focus table and the zoom position. For example, the focus position corresponding to the zoom position i in the focus curve at an object distance in the basic focus table is a, and the focus position difference in the calibration compensation data at startup is Δa0, and the weight is k0. In the initial focus table, the focus position of the corresponding zoom position i in the focus curve is a+Δa0*k0. In another embodiment, the weight factor may not be considered, and the focus position of the corresponding zoom position i in the focus curve is a+Δa0.

[0114] Specifically, for the device startup moment, the time difference weight can be set to a default value, and the focus position difference in the focus table corresponding to each zoom position is multiplied by the corresponding zoom position weight and added to the focus position corresponding to the zoom position in the basic focus table.

[0115] In the step S200, the calibration focus data at the previous moment is updated according to the calibration compensation data at the key time node, including:

[0116] Update the lens coordinate system at the previous moment according to the optical coupler position difference at the key time node to obtain the lens coordinate system at the current moment;

[0117] Obtaining the weight of the focus position difference of the focus table at the key time node, the weight including the time difference weight and / or the zoom position weight;

[0118] The focus position differences of the focus table at the key time nodes are weighted, and the calibrated focus table at the previous moment is updated based on the weighted focus position differences of the focus table to obtain the calibrated focus table at the current moment.

[0119] Specifically, for each key time node, its time difference weight is obtained, and the focus position difference value in the focus table corresponding to each zoom position is multiplied by the corresponding zoom position weight and the corresponding time difference weight, and then added to the focus position corresponding to the zoom position in the basic focus table.

[0120] During calibration, the focus position difference corresponding to the infinite object distance in the focus table is calibrated. When updating the basic focus table, the focus position corresponding to the zoom position in the focus curve of each object distance in the calibration focus table at the previous moment is updated according to the correspondence between the focus position difference in the focus table and the zoom position. For example, the focus position corresponding to the zoom position i in the focus curve at an object distance in the calibration focus table at the previous moment t-1 is a t-1 , and the focus position difference in the calibration compensation data at startup is Δa t , with weight k t , then in the updated calibration focus table, the focus position corresponding to the zoom position i in the focus curve is a t =a t-1 +Δa t In another embodiment, the weight factor may not be considered, and the focus position corresponding to the zoom position i in the focus curve is a t =a t-1 +Δa t .

[0121] In summary, in this embodiment, by calibrating the core lens in the focus correction light box at different time nodes, the focus position table (calibrated focus pair) of each zoom position of the core lens at infinite object distance at different time nodes is obtained, and the focus position table of each zoom position at infinite object distance of the lens and the basic focus table at different time nodes is compared, and the optical coupling position deviation of the lens and the basic focus table at each corresponding time node and the focus position deviation of the focus table at infinite object distance are calculated, that is, the calibration focus deviation, and the calibration compensation data at the time of device startup and each key time node are calculated according to the calibration focus deviation, so as to calibrate the optical coupling position deviation and the focus position deviation of the focus table at infinite object distance that occur in the whole process from power-on to thermal defocus stabilization of the lens. When the device is powered on and started, the basic focus data is first updated according to the calibration compensation data at startup to obtain the initial calibration compensation data, so as to obtain the calibration focus table specific to the lens as the basis for subsequent focus control compensation. Then, at each moment, the time integral is calculated according to the image acquisition frame rate, and thermal defocus compensation is performed on the calibration compensation data at the moment corresponding to the key time node, thereby ensuring that the shooting equipment will not have focus blur problems during the process from power-on to thermal defocus stabilization.

[0122] At the same time, in the process of batch generation, due to the possible individual differences of lenses, this method can also be used to calibrate the thermal defocus compensation offset (calibration compensation data) suitable for each lens and store it in the memory of the shooting device. Each time the device is powered on, the focus control algorithm will automatically read and load the calibration compensation data at startup and at each key time node, and it will take effect in real time in the calibration focus table at the corresponding moment.

[0123] like Figure 6 As shown, the embodiment of the present application further provides a focus control system, which is applied to the focus control method, and the system includes:

[0124] The time determination module M100 is used to determine the current startup time of the shooting device after the shooting device is started;

[0125] The focus update module M200 is used to update the calibrated focus data of the previous moment according to the calibration compensation data of the key time node obtained in advance when the start time reaches a pre-calibrated key time node, so as to obtain the calibrated focus data of the current moment; when the start time does not reach the key time node, the calibrated focus data of the previous moment is used as the calibrated focus data of the current moment;

[0126] The focus control module M300 is used to control the zoom and focus of the shooting device according to the calibrated focus data at the current moment.

[0127] By adopting the focus control system of the present application, after the shooting device is started, the time determination module M100, the focus update module M300 and the focus control module M400 continue to work. At each moment, the time determination module M100 obtains the startup time of the shooting device corresponding to the current moment. Whenever the startup time of the shooting device reaches a pre-calibrated key time node, the focus update module M300 updates the calibrated focus data according to the calibration compensation data of the key time node obtained in advance, so as to obtain the calibrated focus data that conforms to the device state at the current time node. The focus control module M400 controls the zoom and focus process according to the calibrated focus data at each moment, so that the focus data that conforms to the current state of the shooting device can be obtained from the start of the shooting device until the occurrence of thermal defocus, thereby ensuring that the shooting device will not have focus blur problems from power-on to thermal defocus.

[0128] In the focus control system, the functions of each module can be implemented by using the specific implementation methods of each step in the above-mentioned focus control method, which will not be described in detail here.

[0129] An embodiment of the present application also provides a focus control device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to execute the steps of the focus control method by executing the executable instructions.

[0130] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.

[0131] Refer to the following Figure 7 The electronic device 600 according to this embodiment of the present application is described. Figure 7 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0132] like Figure 7 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0133] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present application described in the above-mentioned focus control method section of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .

[0134] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0135] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0136] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0137] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] By adopting the focus control device provided in the present application, the processor executes the focus control method when executing the executable instructions, thereby obtaining the beneficial effects of the above-mentioned focus control method.

[0139] The embodiment of the present application also provides a computer-readable storage medium for storing a program, and when the program is executed by a processor, the steps of the focus control method are implemented. In some possible implementations, various aspects of the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary implementations of the present application described in the above focus control method section of this specification.

[0140] refer to Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present application is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0141] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0142] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0143] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or cluster. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0144] By adopting the computer-readable storage medium provided in the present application, the program stored therein implements the steps of the focus control method when being executed, thereby obtaining the beneficial effects of the focus control method.

[0145] The above content is a further detailed description of the present application in combination with specific preferred implementation methods, and it cannot be determined that the specific implementation of the present application is limited to these descriptions. For ordinary technicians in the technical field to which the present application belongs, several simple deductions or substitutions can be made without departing from the concept of the present application, which should be deemed to fall within the scope of protection of the present application.

Claims

1. A focus control method, characterized in that: include: After the shooting device is started, the current start time of the shooting device is determined; When the activated time reaches a pre-calibrated key time node, the calibrated focus data of the previous moment is updated according to the calibration compensation data of the pre-calibrated key time node to obtain the calibrated focus data of the current moment; When the started time does not reach the critical time node, the calibration focus data at the previous moment is used as the calibration focus data at the current moment; The zoom and focus of the shooting device are controlled according to the calibrated focus data at the current moment.

2. The focus control method according to claim 1, characterized in that: After the photographing device is started, before determining the current start-up time of the photographing device, the following steps are also included: Obtain basic focus data, as well as calibration compensation data when the camera is started and calibration compensation data at each key time point after startup; Initial calibrated focus data is determined according to the basic focus data and the calibration compensation data when the shooting device is started.

3. The focus control method according to claim 1, characterized in that: The calibration compensation data is obtained by pre-calibration using the following steps: Determine multiple preset time nodes after the shooting device is started; In the calibration environment, obtain the calibration focus pair of the camera at startup and the calibration focus pair at each preset time node after startup; Calculate the calibrated focus deviation of the shooting device at startup and the calibrated focus deviations at each preset time node after startup according to the calibrated focus pair and the basic focus data; Using the calibration focus deviation of the shooting device at startup as calibration compensation data of the shooting device at startup; Screening and determining key time nodes from the various preset time nodes; For each key time node, the calibration compensation data of the key time node is calculated according to the calibrated focus deviation of the key time node and the calibrated focus deviation of the previous key time node.

4. The focus control method according to claim 3, characterized in that: The calibration focus deviation includes the optical coupling focus position deviation; screening and determining the key time node from the various candidate time nodes includes the following steps: Taking the optical coupler focus position deviation of the shooting device when it is started as the initial reference deviation; For each preset time node, calculate a first difference between the optical coupler focus position deviation at the preset time node and the current reference deviation, and if the first difference is greater than or equal to a first difference threshold, use the preset time node as a key time node, and use the optical coupler focus position deviation at the preset time node as the current reference deviation; If the first difference is less than the first difference threshold, the preset time node is used as a non-critical time node, and the current benchmark deviation is kept unchanged.

5. The focus control method according to claim 3, characterized in that: The calibration focus deviation includes the optical coupling focus position deviation; screening and determining the key time node from the various candidate time nodes includes the following steps: For each preset time node, calculate a second difference between the optical coupler focus position deviation at the preset time node and the optical coupler focus position deviation at the previous preset time node, and if the second difference is greater than or equal to a second difference threshold, clear the counter count; if the second difference is less than the second difference threshold, accumulate the counter count; When the counter count value reaches the preset count threshold, the candidate time node is used as the calibration end time node; The key time node is determined by screening from various candidate time nodes before the calibration end time node.

6. The focus control method according to claim 1, characterized in that: The calibration compensation data includes the optical coupler position difference and the focus position difference of the focus table; Determining initial calibrated focus data according to the basic focus data and the calibration compensation data when the shooting device is started, including: updating the current lens coordinate system according to the optical coupler position difference when the shooting device is started, and determining the initial lens coordinate system; updating the basic focus table according to the focus position difference of the focus table when the shooting device is started, and obtaining the initial calibrated focus table; The calibrated focus data of the previous moment is updated according to the calibration compensation data of the key time node, including: updating the lens coordinate system of the previous moment according to the optical coupler position difference of the key time node to obtain the lens coordinate system of the current moment; updating the calibrated focus table of the previous moment according to the focus position difference of the focus table of the key time node to obtain the calibrated focus table of the current moment.

7. The focus control method according to claim 1, characterized in that: The calibration compensation data includes focus position differences of a focus table corresponding to each zoom position, the basic focus data includes a basic focus table, and the calibration focus data includes a calibration focus table; The calibration focus data at the previous moment is updated according to the calibration compensation data at the key time node, including: Obtaining a weight of a focus position difference in the focus tracking table of the key time node, wherein the weight includes a time difference weight and / or a zoom position weight, wherein the time difference weight is determined according to a time difference between a key time node corresponding to the current time node and a key time node at a previous moment, and the zoom position weight is determined according to a focus position difference between a maximum object distance and a minimum object distance at each zoom position in the basic focus tracking table; The focus position difference of the focus table at the key time node is weighted, and the calibrated focus table at the previous moment is updated based on the weighted focus position difference of the focus table.

8. A focus control system, characterized in that: The focus control method according to any one of claims 1 to 7, wherein the system comprises: A time determination module is used to determine the current startup time of the shooting device after the shooting device is started; A focus update module, configured to update the calibrated focus data of the previous moment according to the calibration compensation data of the key time node obtained in advance when the activated time reaches a pre-calibrated key time node, so as to obtain the calibrated focus data of the current moment; and to use the calibrated focus data of the previous moment as the calibrated focus data of the current moment when the activated time does not reach the key time node; The focus control module is used to control the zoom and focus of the shooting device according to the calibrated focus data at the current moment.

9. A focus control device, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to execute the steps of the focus control method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the focus control method described in any one of claims 1 to 7 are implemented.