Automatic calibration method, device and computer storage medium for movement lens return difference

By obtaining the ADC value of the PI output end of the movement lens in real time, and using the motor position and PI level change characteristics to automatically calibrate the backhaul difference, solving the problem of low accuracy in the previous technology, and realizing that it does not rely on specific environments and High accuracy calibration of camera acquisition.

CN118628585BActive Publication Date: 2024-12-17FUJIAN STAR NET JUANFENG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411100303.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-17
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

The existing backhaul difference measurement method for movement lenses depends on image sharpness values, is not very accurate and is greatly affected by environmental factors, and needs to be calibrated in a specific environment, and requires a camera to acquire images.

Method used

By obtaining the ADC value of the PI output end of the movement lens in real time, using the motor position and PI level change characteristics, the backhaul difference is automatically calibrated, avoiding the use of image sharpness values, and realizing calibration that does not depend on specific environments.

Benefits of technology

The accuracy of the measurement of the return difference is improved, the need for calibration and camera images is avoided in specific environments, and the reliability of the method is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628585B_ABST
    Figure CN118628585B_ABST
Patent Text Reader

Abstract

An automatic calibration method, device and computer storage medium for the return difference of a movement lens, the method comprising: connecting the PI output end of the movement lens to the ADC acquisition port of the device end, obtaining the ADC value of the PI in real time, rotating the motor to point C; driving the motor from point C to point D, recording the ADC value D_adc of point D; reversing the direction of the motor; collecting the current ADC value Cur_adc for each step of the motor; if the current ADC value Cur_adc is less than D_adc twice in a row, the number of steps back_steps‑2 taken from the time the motor direction is reversed is the return difference. The present invention does not require calibration in a specific environment, nor does it require a camera to collect images, and the accuracy is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of optical device detection, and specifically refers to an automatic calibration method and device for the return difference of a movement lens, and a computer storage medium. Background Art

[0002] Compared with mechanical lenses, electric lenses are favored by users due to their low cost and are widely used. However, the use of electric lenses introduces a problem: the gap between the lens gear and the motor gear is large, resulting in the lens not being able to turn immediately after the motor turns, and the lens needs to continue to move for several steps before turning. This phenomenon is called return error. The existence of return error may cause unclear focus because it is difficult for the lens to return to the position with the maximum clarity evaluation value.

[0003] In the existing methods for measuring the return difference of movement lenses, the object distance difference is calculated by calculating the image clarity value (Focus Value, hereinafter referred to as FV) at a specific position and the FV value of the image at the return position, thereby calculating the return difference. Since the FV value is strongly correlated with the measured image and is greatly affected by environmental factors, and the return difference is an extremely small step, the accuracy of the return difference calculated by this method is not high. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method, device and computer storage medium for automatic calibration of the return difference of a movement lens, which does not require calibration in a specific environment, does not require a camera to collect images, and has greatly improved accuracy.

[0005] In a first aspect, the present invention provides a method for automatically calibrating the return difference of a movement lens, comprising the following steps:

[0006] Step S1: Connect the PI output end of the movement lens to the ADC acquisition port of the device end, obtain the ADC value of PI in real time, and rotate the motor to point C;

[0007] Step S2: driving the motor from point C to point D, and recording the ADC value D_adc at point D;

[0008] Step S3: turning the direction of the motor;

[0009] Step S4: Every time the motor runs one step, the current ADC value Cur_adc is collected;

[0010] Step S5: If the current ADC value Cur_adc is less than D_adc twice in succession, the number of steps back_steps - 2 taken from the moment the motor direction is turned around is the return error.

[0011] In a second aspect, the present invention provides an automatic calibration device for a movement lens return difference, which is used to implement the method according to the first aspect, and specifically comprises:

[0012] The starting point ADC value acquisition module is used to connect the PI output end of the movement lens to the ADC acquisition port of the device end, obtain the ADC value of PI in real time, and rotate the motor to point C;

[0013] The end point ADC value acquisition module is used to drive the motor from point C to point D and record the ADC value D_adc of point D;

[0014] The motor direction reversing module is used to achieve the reversal of the motor running direction;

[0015] The current ADC value acquisition module is used to collect the current ADC value Cur_adc every time the motor runs one step;

[0016] The module for judging the return difference is as follows: if the current ADC value Cur_adc is less than D_adc twice in a row, then the number of steps back_steps - 2 taken since the motor direction is turned around is the return difference.

[0017] In a third aspect, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0018] The advantages of the present invention are that the inherent characteristics of the movement lens are used for calibration, and the use of FV value as a basis is avoided. Therefore, this method does not need to be calibrated in a specific environment, does not require a camera to collect images, and the accuracy is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0020] Figure 1 It is a relationship diagram between the motor position and the PI level in the present invention.

[0021] Figure 2 This is a diagram showing how GPIO collects PI levels.

[0022] Figure 3 Schematic diagram of the ADC method for collecting PI levels.

[0023] Figure 4 It is a diagram of the calibration algorithm of the present invention.

[0024] Figure 5 It is the algorithm flow chart of the present invention. DETAILED DESCRIPTION Embodiment 1

[0025] This embodiment provides an automatic calibration method for the return difference of a movement lens. Before describing the method, the optical coupling characteristics of the movement lens are briefly explained. The movement lens includes two motors, Zoom and Focus, each with an optical coupler (PI). The motors are in different positions, and the levels of their PI outputs are different, such as Figure 1 As shown, the ZPI output of the Zoom motor is low level in the first 812 steps, and high level in the last 184 steps; the FPI output of the Focus motor is low level in the first 329 steps, and high level in the last 196 steps. The present invention utilizes the characteristics of the PI level change in the movement lens to automatically calibrate the return difference. Taking the Zoom motor as an example, the following calibration method is obtained. An automatic calibration method for the return difference of the movement lens includes the following steps:

[0026] Step S1: Connect the PI output of the movement lens to the ADC acquisition port of the device. The reason for using ADC acquisition is that the GPIO method only has high and low levels (such as Figure 2 As shown), the ADC can collect the process of level from high to low (as shown Figure 3 As shown in the figure, the relationship between the ADC value and the motor position can be established in the middle changing area from low to high. The return error can be accurately calibrated using the interval with the largest rate of change. The ADC value of PI can be obtained in real time, and the motor can be rotated to point C (as shown in the figure). Figure 4 shown);

[0027] Step S2: Drive the motor from point C to point D (the purpose of this step is to determine the direction of the movement, and the measured return difference is the opposite direction of the current movement direction, that is, the return difference from direction B to direction A), and record the ADC value D_adc at point D;

[0028] Step S3: Turn the direction of the motor. Due to the return difference, the gears of the motor will not engage before the return difference is completed, that is, the actual position of the Zoom motor does not change, and the ADC value at this time will not change;

[0029] Step S4: Every time the motor runs one step, the current ADC value Cur_adc is collected;

[0030] Step S5: If the current ADC value Cur_adc is less than D_adc twice in succession, it means that the back-stroke difference has been completed. At this time, starting from turning the motor direction, the number of steps back_steps - 2 is the back-stroke difference.

[0031] Figure 5 It is a schematic diagram of the algorithm flow of the present invention.

[0032] Use the same method to locate the initial point at point E, move from E to point D, then reverse the direction and measure the number of movement steps when the ADC starts to change, and you can get the return difference from A to B.

[0033] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details. Embodiment 2

[0034] The present invention provides an automatic calibration device for the return difference of a movement lens, comprising:

[0035] The starting point ADC value acquisition module is used to connect the PI output end of the movement lens to the ADC acquisition port of the device end, obtain the ADC value of PI in real time, and rotate the motor to point C;

[0036] The end point ADC value acquisition module is used to drive the motor from point C to point D and record the ADC value D_adc of point D;

[0037] The motor direction reversing module is used to achieve the reversal of the motor running direction;

[0038] The current ADC value acquisition module is used to collect the current ADC value Cur_adc every time the motor runs one step;

[0039] The module for judging the return difference is as follows: if the current ADC value Cur_adc is less than D_adc twice in a row, then the number of steps back_steps - 2 taken since the motor direction is turned around is the return difference.

[0040] Based on the same inventive concept, the present application provides a computer-readable storage medium corresponding to Embodiment 1, see Embodiment 3 for details. Embodiment 3

[0041] The present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the first embodiment is implemented.

[0042] The present invention utilizes the inherent characteristics of the movement lens for calibration, avoiding the use of FV value as a basis. Therefore, this method does not need to be calibrated in a specific environment, does not require a camera to collect images, and has a greatly improved accuracy.

[0043] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take 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 code.

[0044] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. 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.

[0045] 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.

[0046] 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.

[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for automatically calibrating the return difference of a movement lens, characterized in that : It includes the following steps: Step S1: Connect the PI output end of the movement lens to the ADC acquisition port of the device end, obtain the ADC value of PI in real time, and when the ADC value starts to increase rapidly, rotate the motor to a certain point C; Step S2: The motor is driven to continue rotating from point C, and stops when the ADC value change rate reaches the maximum. At this time, the motor rotates to point D, and the ADC value D_adc of point D is recorded; Step S3: turning the direction of the motor; Step S4: Every time the motor runs one step, the current ADC value Cur_adc is collected; Step S5: If the current ADC value Cur_adc is less than D_adc twice in succession, the number of steps back_steps - 2 taken from the moment the motor direction is turned around is the return error.

2. An automatic calibration device for the return difference of a movement lens, realizing the automatic calibration method for the return difference of a movement lens as claimed in claim 1, characterized in that :include: The starting point ADC value acquisition module is used to connect the PI output end of the movement lens to the ADC acquisition port of the device end, obtain the ADC value of PI in real time, and rotate the motor to a certain point C when the ADC value starts to increase rapidly; The end point ADC value acquisition module is used to drive the motor to continue rotating from point C, stop when the ADC value change rate is the largest, and then rotate to point D to record the ADC value D_adc of point D; The motor direction reversing module is used to achieve the reversal of the motor running direction; The current ADC value acquisition module is used to collect the current ADC value Cur_adc every time the motor runs one step; The module for judging the return difference is as follows: if the current ADC value Cur_adc is less than D_adc twice in a row, then the number of steps back_steps - 2 taken since the motor direction is turned around is the return difference.

3. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for automatically calibrating the return difference of a movement lens as claimed in claim 1 is implemented.

Citation Information

Patent Citations

  • Focusing method of simple electric lens

    CN105245781A

  • Detection device and detection method of electric zoom lens return stroke difference

    CN107991065A