Calibration data generation method, device and calibration data generation system

By obtaining the stepper motor position information in real time and generating calibration data, the problem of low efficiency in obtaining calibration data of the ABF device is solved, automatic calibration data generation is realized, and efficiency is improved.

CN113670201BActive Publication Date: 2024-10-01HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110977279.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2024-10-01
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

The calibration data acquisition efficiency of the existing ABF device is low, and the stepper motor needs to be manually adjusted to move to a preset fixed point to record the encoding value, resulting in low efficiency.

Method used

The position information of the stepper motor is obtained in real time through the position measurement device, the calibration position is determined after determining the specified distance of movement, and the target encoding value generated by the encoding chip is obtained, and calibration data is generated until the stepper motor moves to the maximum movable position.

Benefits of technology

It realizes the automatic generation of calibration data, improves the efficiency of calibration data acquisition, reduces human intervention, and improves the speed of establishing the corresponding relationship between the stepper motor position and the coding value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113670201B_ABST
    Figure CN113670201B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a calibration data generation method, device and calibration data generation system, which relates to the technical field of ABF device calibration, and is applied to a control end, which communicates with a position measurement device and an ABF device to be calibrated respectively, and the position measurement device is used to obtain the position information of a stepper motor in the ABF device, and the scheme includes: controlling the stepper motor to move, and obtaining the position information of the stepper motor in real time through the position measurement device; when it is determined based on the obtained position information that the stepper motor moves a specified distance, determining the position of the stepper motor as a calibration position, and obtaining the target encoding value generated by the encoding chip in the ABF device; based on the calibration position and the target encoding value, generating a pair of calibration data, and returning to execute the step of controlling the stepper motor to move, until the stepper motor moves to the maximum movable position. The above scheme of the embodiment of the present invention can improve the efficiency of obtaining calibration data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ABF device calibration, and in particular to a calibration data generation method, device and calibration data generation system. Background Art

[0002] The ABF (Auto Back Focus) device is a device used to achieve the focusing of the camera. Specifically, the ABF device includes components such as a detector, a sensor, a stepper motor, and an encoding chip, which are photosensitive elements. The movement of the stepper motor drives the movement of the detector and the sensor, thereby achieving automatic focusing. In the focusing process, the encoding chip converts the electrical signal input by the sensor into a corresponding encoding value, determines the current position of the stepper motor according to the encoding value, and then controls the movement of the stepper motor based on the current position to move the detector to the focus position, thereby achieving focusing.

[0003] In order to achieve fast and accurate focusing, the ABF device needs to obtain the current position information of the stepper motor in real time according to the code value output by the encoder chip, which means that the corresponding relationship between the encoder output code value and the position information of the stepper motor needs to be established in advance. Therefore, the ABF device needs to be calibrated before leaving the factory.

[0004] In the related art, the calibration data for calibrating the ABF device is mainly obtained by manual recording. In simple terms, after manually adjusting the stepper motor to move to a preset fixed point with known position information, the code value output by the encoding chip is recorded, thereby generating a set of calibration data including the position information of the fixed point and the output code value. As a result, the calibration data needs to be obtained manually in the related art, which makes the efficiency of obtaining the calibration data low.

[0005] When calibrating the ABF device, it is necessary to manually adjust the stepper motor to move to a preset fixed point in order to obtain the calibration data, which makes the efficiency of obtaining the calibration data for calibrating the ABF device low. Summary of the invention

[0006] The purpose of the embodiment of the present invention is to provide a calibration data generation method to improve the efficiency of obtaining calibration data for calibrating an ABF device. The specific technical solution is as follows:

[0007] In a first aspect, an embodiment of the present invention provides a calibration data generation method, which is applied to a control end, wherein the control end communicates with a position measurement device and an ABF device to be calibrated respectively, wherein the position measurement device is used to measure position information of a stepper motor in the ABF device, and the method comprises:

[0008] Controlling the stepper motor to move, and acquiring position information of the stepper motor in real time through the position measuring device;

[0009] When it is determined based on the acquired position information that the stepper motor moves a specified distance, the position of the stepper motor is determined to be a calibration position, and a target code value generated by the coding chip in the ABF device is acquired; wherein the target code value is a code value converted from a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position;

[0010] Based on the calibration position and the target code value, a pair of calibration data is generated, and the step of controlling the stepper motor to move is returned to be executed until the stepper motor moves to the maximum movable position.

[0011] Optionally, in one embodiment, the specified distance is a minimum adjustable distance of a rear focus of a preset camera lens;

[0012] Optionally, in one embodiment, determining that the stepping motor moves a specified distance based on the acquired position information includes:

[0013] Calculating the distance between the position indicated by the acquired position information and the starting position; wherein the starting position is the position where the stepping motor starts to move;

[0014] If the calculated distance is less than the specified distance, continue to control the stepper motor to move;

[0015] If the calculated distance is greater than the specified distance, controlling the stepping motor to move in the reverse direction;

[0016] If the calculated distance is equal to the specified distance, the stepping motor is stopped from moving.

[0017] Optionally, in one embodiment, before controlling the stepper motor to move and acquiring the position information of the stepper motor in real time through the position measuring device, the method further includes:

[0018] Controlling the stepping motor to move;

[0019] When a zero position signal is received from a zero position detection component in the ABF device, it is determined that the stepping motor has moved to the zero position, and the position information measured by the position measuring device is controlled to return to zero.

[0020] Optionally, in one embodiment, the position measuring device is a height gauge, and a pin of the height gauge is rigidly connected to the stepping motor.

[0021] Optionally, in one embodiment, the acquiring the position information of the stepper motor in real time by the position measuring device includes:

[0022] The altitude value fed back by the altimeter is received in real time as the position information of the stepping motor.

[0023] Optionally, in one embodiment, controlling the stepper motor to move includes:

[0024] The stepper motor is controlled to move by pulse width modulation (PWM).

[0025] Optionally, in one embodiment, after the stepper motor moves to the maximum movable position, the method further comprises:

[0026] Each pair of generated calibration data is written into a storage unit in the ABF device.

[0027] In a second aspect, an embodiment of the present invention provides a calibration data generation system, comprising a control terminal and a position measurement device; the control terminal communicates with the position measurement device and an ABF device to be calibrated;

[0028] The position measuring device is used to measure the position information of the stepping motor in the ABF device and send the measured position information to the control end in real time;

[0029] The control end is used to control the stepper motor to move, and to obtain the position information sent by the position measuring device in real time, and when it is determined that the stepper motor moves a specified distance based on the obtained position information, determine that the position of the stepper motor is a calibration position, and obtain the target code value generated by the coding chip in the ABF device, and generate a pair of calibration data based on the calibration position and the target code value, and return to execute the step of controlling the stepper motor to move until the stepper motor moves to the maximum movable position; wherein the target code value is a code value converted from a target electrical signal, the target electrical signal is an electrical signal generated by the sensor in the ABF device when detecting target information, and the target information is information generated when the information generating component in the ABF device is located at the calibration position.

[0030] Optionally, in one embodiment, the specified distance is a minimum adjustable distance of a rear focus of a preset camera lens;

[0031] Optionally, in one embodiment, the control end is specifically used to calculate the distance between the position indicated by the acquired position information and the starting position; if the calculated distance is less than the specified distance, continue to control the stepper motor to move; if the calculated distance is greater than the specified distance, control the stepper motor to move in the opposite direction; if the calculated distance is equal to the specified distance, stop moving the stepper motor; wherein the starting position is the position where the stepper motor starts to move.

[0032] Optionally, in one embodiment, the control end is also used to control the stepper motor to move before controlling the stepper motor to move and obtaining the position information of the stepper motor in real time through the position measurement device; when receiving the zero position signal sent by the zero position detection component in the ABF device, it is determined that the stepper motor has moved to the zero position, and the position information measured by the position measurement device is controlled to return to zero.

[0033] Optionally, in one embodiment, the position measuring device is a height gauge, and a pin of the height gauge is rigidly connected to the stepping motor.

[0034] Optionally, in one embodiment, the control end is specifically used to receive the altitude value fed back by the altimeter in real time as the position information of the stepping motor.

[0035] Optionally, in one embodiment, the control end is specifically used to control the stepper motor to move through pulse width modulation PWM.

[0036] Optionally, in one embodiment, the control end is specifically configured to write each pair of generated calibration data into a storage unit in the ABF device after the stepper motor moves to the maximum movable position.

[0037] Optionally, in one embodiment, the system further comprises: a display unit;

[0038] The position measuring device is further used to send the acquired position information to the display unit in real time;

[0039] The display unit is used to display the received position information.

[0040] In a third aspect, an embodiment of the present invention provides a calibration data generating device, which is applied to a control end, wherein the control end communicates with a position measuring device and an ABF device to be calibrated respectively, wherein the position measuring device is used to measure position information of a stepping motor in the ABF device, and the method includes:

[0041] An information acquisition module, used to control the stepper motor to move, and to acquire the position information of the stepper motor in real time through the position measurement device;

[0042] A coding value acquisition module, used for determining that the position of the stepper motor is a calibration position when it is determined that the stepper motor moves a specified distance based on the acquired position information, and acquiring a target coding value generated by the coding chip in the ABF device; wherein the target coding value is a coding value obtained by converting a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position;

[0043] The data generation module is used to generate a pair of calibration data based on the calibration position and the target encoding value, and return to execute the step of controlling the stepper motor to move until the stepper motor moves to the maximum movable position.

[0044] Optionally, in one embodiment, the specified distance is a minimum adjustable distance of a rear focus of a preset camera lens;

[0045] Optionally, in one embodiment, the coding value acquisition module is specifically used to calculate the distance between the position indicated by the acquired position information and the starting position; if the calculated distance is less than the specified distance, the stepper motor continues to be controlled to move; if the calculated distance is greater than the specified distance, the stepper motor is controlled to move in the opposite direction; if the calculated distance is equal to the specified distance, the stepper motor is stopped from moving; wherein the starting position is the position where the stepper motor starts to move.

[0046] Optionally, in one embodiment, the device further includes: a zeroing module, used to control the stepper motor to move before the information acquisition module executes the control of the stepper motor to move and obtains the position information of the stepper motor in real time through the position measurement device; when a zero position signal sent by the zero position detection component in the ABF device is received, it is determined that the stepper motor has moved to the zero position, and the position information measured by the position measurement device is controlled to return to zero.

[0047] Optionally, in one embodiment, the position measuring device is a height gauge, and a pin of the height gauge is rigidly connected to the stepping motor.

[0048] Optionally, in one embodiment, the information acquisition module is specifically used to receive the altitude value fed back by the altimeter in real time as the position information of the stepping motor.

[0049] Optionally, in one embodiment, the information acquisition module is specifically used to control the stepper motor to move through pulse width modulation (PWM).

[0050] Optionally, in one embodiment, the device further comprises: a data writing module, configured to write each pair of generated calibration data into a storage unit in the ABF device after the stepper motor moves to the maximum movable position.

[0051] In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0052] Memory, used to store computer programs;

[0053] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.

[0054] In a fifth aspect, an embodiment of the present invention 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 method steps described in the first aspect are implemented.

[0055] Beneficial effects of the embodiments of the present invention:

[0056] A calibration data generation method provided by an embodiment of the present invention is applied to a control end, wherein the control end communicates with a position measurement device and an ABF device to be calibrated respectively, and the position measurement device is used to obtain the position information of the stepper motor in the ABF device. Since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device. Then, when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned until the stepper motor moves to the maximum movable position. It can be seen that through the scheme of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved, until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, thereby improving the efficiency of obtaining calibration data.

[0057] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0059] Figure 1 The result flow chart of the ABF device;

[0060] Figure 2 A flowchart of a method for generating annotation data provided by an embodiment of the present invention;

[0061] Figure 3 Another flow chart of the method for generating annotation data provided by an embodiment of the present invention;

[0062] Figure 4 A schematic diagram of the structure of a system for generating annotation data provided by an embodiment of the present invention;

[0063] Figure 5 The overall framework diagram of the annotation data generation method provided by the embodiment of the present invention;

[0064] Figure 6 A schematic diagram of the structure of a device for generating annotation data provided by an embodiment of the present invention;

[0065] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on the present invention belong to the scope of protection of the present invention.

[0067] In order to solve the problem of low efficiency in acquiring calibration data for ABF device calibration, embodiments of the present invention provide a calibration data generation method, device and calibration data generation system.

[0068] First, let's briefly introduce the ABF device. The ABF device is used to achieve the focusing of the camera. Figure 1 , which is a schematic diagram of the structure of an ABF device. The ABF device includes a zero position detection component, an encoding chip, a structural linkage device, a stepping motor, a flash memory and an information generating component, wherein, except Figure 1In addition to the components shown in the figure, the ABF device also includes a detector which is a photosensitive element and a sensor for detecting the information generated by the information generating component and converting the detected information into an electrical signal.

[0069] Among the above-mentioned components, the information generating component and the detector are connected to the stepper motor through a structural linkage device. When the stepper motor moves within the range of travel by rotation, the information generating component and the detector are driven to move together. The above-mentioned information generating component is used to generate detectable information within the entire travel range. In one example, the information generating component can be a magnetic grating, and the above-mentioned information detected by the sensor is the magnetic field generated by the magnetic grating. The sensor can generate an electrical signal based on the detected information, and input the generated electrical signal to the encoding chip, and the encoding chip can convert the electrical signal input by the sensor into a coding value. Optionally, in one implementation, the sensor and the encoding chip can be combined into one component, for example, the magnetic sensor and the magnetic encoding chip are combined as a magnetic encoding chip. From the above content, it can be seen that there is a one-to-one correspondence between the position of the stepper motor, the position of the detector, the position of the information generating component, the information generated by the information generating component at the sensor, the signal detected by the sensor, the electrical signal generated by the sensor, and the coding value generated by the coding chip. That is to say, in the ABF device, when the position of the stepper motor is fixed, the position of the detector, the position of the information generating component, the signal detected by the sensor, the electrical signal generated by the sensor, and the coding value generated by the coding chip in the ABF device are all unchanged. When the position of the stepper motor changes, the position of the detector, the position of the information generating component, the signal detected by the sensor, the electrical signal generated by the sensor, and the coding value generated by the coding chip in the ABF device also change accordingly.

[0070] Since the position of the detector, the position of the information generating component and the position of the stepper motor correspond one to one, and the relative positions of the detector, the position of the information generating component and the stepper motor will not change, the position of the detector, the position of the information generating component and the position of the stepper motor can be equated, that is, the position of the stepper motor is used as the position of the detector and the information generating component.

[0071] For the ABF device, the process of achieving focusing is essentially the process of adjusting the position of the detector so that the detector is located at the position of the rear focus of the rear end of the lens. For example, in the process of taking photos / videos, it is often necessary to adjust the lens on the camera. Adjusting the lens often means that the focus of the lens inside the camera, that is, the rear focus of the rear end of the lens will be moved. At this time, for the ABF device, after the rear focus of the lens moves, it is necessary to adjust the position of the detector to adjust the detector to the position where the rear focus moves, so as to achieve automatic focusing.

[0072] If the position of the detector is to be adjusted, the position of the detector must be known first. Since the position of the detector is equal to the position of the stepper motor, and the position of the stepper motor corresponds to the code value output by the encoder chip, it is only necessary to establish the corresponding relationship between the position of the stepper motor and the code value output by the encoder chip in advance, and then the position of the stepper motor can be determined at any time according to the code value output by the encoder chip, that is, the position of the detector is determined. Figure 1 The flash memory in the ABF device is used to store the pre-established correspondence between the position of the stepper motor and the code value output by the encoder chip.

[0073] During the focusing process of the ABF device, the sensor detects the information generated by the information generating component at a certain position (equivalent to the position of the detector), generates a corresponding electrical signal, and inputs it into the encoding chip. The encoding chip converts the electrical signal input by the sensor into a corresponding encoding value, and then determines the position corresponding to the encoding value generated by the encoding chip according to the corresponding relationship between the position of the stepper motor stored in the flash memory (equivalent to the position of the detector) and the encoding value output by the encoding chip, as the current position of the detector, and then controls the stepper motor to move based on the current position of the detector, so that the detector moves to the rear focus position, thereby achieving focusing.

[0074] In order to pre-establish the corresponding relationship between the position of the stepper motor and the code value output by the encoder chip, the ABF device needs to be calibrated in advance. In the related art, the calibration data for calibrating the ABF device is mainly obtained by manual recording. Simply put, after manually adjusting the stepper motor to move to a preset fixed point with known position information, the code value output by the encoder chip is recorded to generate a pair of calibration data containing the position information of the fixed point and the output code value. Since the calibration data needs to be obtained manually in the related art, the efficiency of obtaining the calibration data is low.

[0075] Furthermore, for ABF devices, the total stroke of the internal stepper motor is generally small. For example, the total stroke of a general stepper motor is 5mm, and the minimum stroke of a single stepper motor is only 0.001mm. This means that each time the stepper motor is manually adjusted, the error needs to be controlled within a very small range. For example, for a stepper motor with a minimum stroke of 0.001mm, the error of manually adjusting the stepper motor movement needs to be less than 0.001mm, which is obviously very difficult.

[0076] In order to improve the efficiency of obtaining calibration data, an embodiment of the present invention provides a calibration data generation method, which is applied to a control end, and the control end communicates with a position measurement device and an ABF device to be calibrated respectively. The position measurement device is used to obtain position information of a stepper motor in the ABF device. The method includes:

[0077] Control the stepper motor to move, and obtain the position information of the stepper motor in real time through the position measuring device;

[0078] When it is determined based on the acquired position information that the stepper motor moves a specified distance, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is acquired; wherein the target encoding value is the encoding value obtained by converting the target electrical signal, the target electrical signal is the electrical signal generated by the sensor in the ABF device when detecting the target information, and the target information is the information generated when the information generating component in the ABF device is located at the calibration position;

[0079] Based on the calibration position and the target encoding value, a pair of calibration data is generated.

[0080] In the above-mentioned solution provided by the embodiment of the present invention, since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device, and then when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned until the stepper motor moves to the maximum movable position. It can be seen that through the solution of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved, until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, which improves the efficiency of obtaining calibration data.

[0081] It should be noted that the control terminal in the embodiment of the present invention can be any electronic device with data processing capability, such as a personal computer, a server, a mobile phone, etc. Moreover, the calibration data generation method provided in the embodiment of the present invention can be implemented by software, hardware, or a combination of software and hardware.

[0082] The following describes a calibration data generation method, device, and calibration data generation system provided by embodiments of the present invention in conjunction with the accompanying drawings.

[0083] like Figure 2 As shown, a calibration data generation method provided by an embodiment of the present invention is applied to a control end, the control end communicates with a position measurement device and an ABF device to be calibrated respectively, the position measurement device is used to measure the position information of a stepper motor in the ABF device, and the method includes:

[0084] S201, controlling the stepper motor to move, and obtaining position information of the stepper motor in real time through a position measuring device;

[0085] The position information obtained by the position measuring device from measuring the stepper motor may be the distance value of the current position of the stepper motor relative to the zero position of the stepper motor. The zero position is the starting position of the stepper motor movement preset in the ABF device, and the ABF device can determine whether the stepper motor is at the zero position through its internal zero point detection component.

[0086] For example, when the stepper motor is at the zero position, the position information measured by the position measuring device is 0mm; when the stepper motor moves 0.05mm in the forward direction, the position information measured by the position measuring device is 0.05mm; when the stepper motor continues to move 0.05mm in the forward direction, the position information measured by the position measuring device is 0.1mm; when the stepper motor moves 0.02mm in the reverse direction, the position information measured by the position measuring device is 0.08mm. Among them, the forward movement refers to the movement that increases the distance from the zero position, and the reverse movement refers to the movement that reduces the distance from the zero position.

[0087] Optionally, the control end can control the stepper motor to move by pulse width modulation (PWM). Pulse width modulation is a very effective technology that uses the digital output of a microprocessor to control analog circuits. It is widely used in many fields such as measurement, communication, power control and conversion. Pulse width modulation control technology is a technology for modulating the width of a pulse, that is, by modulating the width of a series of pulses, the required waveform is equivalently obtained. In an embodiment of the present invention, the control end can control the duration of a single rotation of the stepper motor by controlling the width of the output pulse, and then control the distance of a single movement of the stepper motor, thereby achieving precise control of the single movement distance of the stepper motor.

[0088] During the movement of the stepper motor, the position measurement device can measure the position information of the stepper motor in real time, and then the control end can obtain the position information of the stepper motor from the position measurement device in real time.

[0089] Optionally, in one implementation, the position measuring device is an altimeter, wherein the altimeter is a high-precision instrument of various ranges designed for many industrial application fields and detection institutions. It is widely used in a variety of applications, including precision workpiece detection, multi-point detection, measurement equipment monitoring, position measurement and many other fields.

[0090] In the embodiment of the present invention, the altimeter ejector pin is rigidly connected to the stepper motor, so that the stepper motor can drive the ejector pin to move when it moves, and the movement of the ejector pin can drive the change of the height value measured by the altimeter. Therefore, each position of the stepper motor corresponds to the height value measured by the altimeter. Therefore, the height value fed back by the altimeter can be received in real time as the position information of the stepper motor.

[0091] S202, when it is determined based on the acquired position information that the stepper motor moves a specified distance, the position of the stepper motor is determined to be a calibration position, and a target code value generated by the coding chip in the ABF device is acquired; wherein the target code value is a code value converted from a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position;

[0092] The specified distance is the distance between the position of the stepper motor before it moves and the position after it moves. The size of the specified distance can be determined according to needs and scenarios. In one implementation, the specified distance can be the minimum adjustable distance of the back focus of the preset camera lens. The preset camera lens can be the camera lens used by the camera that uses the ABF device later, or any camera lens determined according to actual needs. The minimum adjustable distance of the back focus of the preset camera lens is the minimum movable distance of the back focus of the preset camera lens when the preset camera lens is adjusted.

[0093] For example, if the minimum adjustable distance of the rear focus of the preset camera lens is 0.001 mm, the above-mentioned specified distance may be 0.001 mm, that is, after determining based on the acquired position information that the stepper motor moves 0.001 mm, the position of the stepper motor is determined to be the calibration position.

[0094] In one implementation, the calibrated position may be an adjustable position of the back focus of the preset camera lens. The adjustable position of the back focus of the preset camera lens is the position where the back focus of the preset camera lens may be located after the preset camera lens is adjusted. For example, within the entire adjustable stroke of the back focus of the preset camera lens, the entire stroke is divided into a plurality of position points, each of which is a position point to which the back focus of the preset camera lens can be adjusted, and each position point is an adjustable position of the back focus of the preset camera lens.

[0095] In the case where the calibrated position is an adjustable position of a preset rear focus of a camera lens, the above-mentioned specified distance may be a distance between adjacent adjustable positions.

[0096] In one implementation, the calibration position can also be determined one by one according to the minimum range within the total stroke of the stepper motor. For example, if the total stroke of the stepper motor is 5 mm and the minimum range is 0.001 mm, the calibration position can be any position with an accuracy of 0.001 mm within the range of 0 mm-5 mm, such as 0.00 mm, 0.001 mm, 0.002 mm, 0.103 mm, 4.999 mm, and 5 mm.

[0097] From the above introduction of the ABF device, it can be known that the encoding chip in the ABF device generates the encoding value based on the electrical signal input by the sensor in the ABF device, and the electrical signal input by the sensor is the electrical signal generated by the sensor when it detects the information generated by the information generating component. Therefore, when the stepper motor moves to the calibration position (equivalent to the information generating component moving to the calibration position), the sensor will generate a corresponding electrical signal when it detects the information generated when the information generating component is at the calibration position, and input the electrical signal to the encoding chip, which then converts the received electrical signal into the target encoding value.

[0098] When the control end determines that the stepper motor moves to the calibration position based on the acquired position information, the control end can obtain the target code value generated by the encoding chip. Optionally, in one implementation, the control end can obtain the code value generated by the encoding chip in real time. When the control end determines that the stepper motor moves to the calibration position, the code value obtained from the encoding chip at the current moment is used as the target code value. In another implementation, the control end can obtain the code value generated by the encoding chip in a triggering manner. When the control end determines that the stepper motor moves to the calibration position, a code value acquisition request is sent to the ABF device, and the code value fed back by the ABF device is used as the target code value.

[0099] Optionally, the control end can establish communication with the encoding chip directly. In this case, the control end can establish communication with the encoding chip through the SPI (Serial Peripheral Interfac) protocol. Among them, SPI is a high-speed, full-duplex, synchronous communication bus, and only occupies four wires on the chip pins, saving the chip pins, while saving space on the PCB (Printed Circuit Board) layout, providing convenience. Alternatively, the control end can also use the module responsible for communication in the ABF device as a middleware to communicate with the encoding chip. In this case, the control end does not directly connect to the encoding chip, but sends the request to the middleware, and the middleware processes the request / command according to the corresponding processing logic.

[0100] S203, generating a pair of calibration data based on the calibration position and the target code value.

[0101] After the target code value is obtained, a corresponding relationship between the calibration position and the target code value can be established as a pair of calibration data, such as constructing an array {calibration position, target code value} as a pair of calibration data.

[0102] For example, if the calibration position is 0.101 mm and the target code value is 100101, then an array {0.101, 100101} is created as a pair of calibration data.

[0103] S204, determining whether the stepper motor has moved to the maximum movable position, if not, returning to step S201, if yes, ending.

[0104] In order to make the calibration result of the ABF device more accurate, generally speaking, it is necessary to calibrate the ABF device based on multiple pairs of calibration data.

[0105] When it is determined that the stepper motor has not moved to the maximum movable position, it means that the stepper motor can continue to move. At this time, in order to obtain multiple pairs of calibration data, you can continue to return to execute step S201 to control the stepper motor to continue moving. When the stepper motor moves the specified distance again, you can obtain another pair of calibration data until the stepper motor moves to the maximum movable position.

[0106] Optionally, in one implementation, in order to obtain multiple pairs of calibration data within the entire stepper motor stroke, in an embodiment of the present invention, movement can be started from the zero position of the stepper motor until it moves to the maximum movable position of the stepper motor.

[0107] In the above-mentioned solution provided by the embodiment of the present invention, since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device, and then when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned until the stepper motor moves to the maximum movable position. It can be seen that through the solution of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved, until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, which improves the efficiency of obtaining calibration data.

[0108] Optionally, in one embodiment, the step of determining that the stepper motor moves a specified distance based on the acquired position information includes:

[0109] Calculating the distance between the position indicated by the acquired position information and the starting position; wherein the starting position is the position where the stepping motor starts to move;

[0110] If the calculated distance is less than the specified distance, the stepper motor continues to be controlled to move;

[0111] If the calculated distance is greater than the specified distance, the stepper motor is controlled to move in the reverse direction;

[0112] If the calculated distance is equal to the specified distance, the stepper motor stops moving.

[0113] When the stepper motor is to be controlled to move, the position of the stepper motor is the position where the stepper motor starts to move, that is, the starting position.

[0114] In one implementation, the position information obtained from the position measurement device when the stepping motor is located at the starting position can be pre-recorded as the starting position information;

[0115] When the stepper motor starts to move, the real-time position information of the stepper motor can be obtained from the position measurement device in real time, and then the distance between the position indicated by the obtained position information and the starting position can be calculated based on the real-time obtained position information and the starting position information.

[0116] Exemplarily, the starting position information is 0.1 mm, and when the stepper motor starts to move, the acquired position information is 0.12 mm, and the distance between the position indicated by the acquired position information and the starting position is 0.02 mm.

[0117] Since it is necessary to obtain the target encoding value generated by the encoding chip in the ABF device at the calibration position when the stepper motor moves a specified distance, therefore:

[0118] When the calculated distance is less than the specified distance, it is necessary to continue to control the stepper motor to move, that is, to increase the distance between the current position of the stepper motor and the starting position. For example, if the specified distance is 0.005 mm and the calculated distance is 0.001 mm, it is necessary to continue to control the stepper motor to move to increase the distance between the current position of the stepper motor and the starting position.

[0119] If the calculated distance is greater than the specified distance, the stepper motor needs to be controlled to move in the reverse direction, that is, to reduce the distance between the current position of the stepper motor and the starting position. For example, if the specified distance is 0.005 mm and the calculated distance is 0.006 mm, the stepper motor needs to be controlled to move in the reverse direction to reduce the distance between the current position of the stepper motor and the starting position.

[0120] When the calculated distance is equal to the specified distance, the requirement is met at this time, and the stepper motor can be stopped. Exemplarily, the specified distance is 0.005 mm, and the calculated distance is 0.005 mm, and the stepper motor can be stopped at this time.

[0121] The above solution provided by the embodiment of the present invention can automatically generate multiple pairs of calibration data, thereby improving the efficiency of obtaining calibration data. Furthermore, a solution for controlling a stepper motor to move a specified distance is provided, which provides a basis for automatically generating multiple pairs of calibration data.

[0122] based on Figure 2 The embodiment shown, as Figure 3 As shown, the embodiment of the present invention also provides another calibration data generation method, which, before the above step S201, further includes:

[0123] S205, controlling the stepper motor to move;

[0124] In this step, the control end can control the stepper motor to move throughout the total stroke until receiving the zero position signal sent by the zero position detection component in the ABF device. The process of the control end controlling the stepper motor to move is the same as the process of controlling the stepper motor in step S201, which will not be repeated here.

[0125] S206, when receiving the zero position signal sent by the zero position detection component in the ABF device, it is determined that the stepper motor has moved to the zero position, and the position information measured by the position measurement device is controlled to return to zero.

[0126] Among them, the zero position detection component can be an optocoupler zero point monitoring device. The principle is: a light source transmitter is installed on one side of the zero point position of the stepper motor stroke, and a light source receiver is installed on the other side opposite to the stepper motor stroke. The light source transmitter emits a light signal. If it is not blocked by the stepper motor, the light source receiver can receive the light signal, indicating that the current position of the stepper motor is a non-zero point position. When the stepper motor moves to the zero point position, the stepper motor will block the light signal emitted by the light source transmitter, so that the light source receiver cannot receive the light signal. At this time, it indicates that the current position of the stepper motor is the zero point position. At the same time, the light source receiver generates a zero position signal sent to the control end according to the preset processing logic when it cannot receive the light signal, such as the agreed I / O (Input / Output) signal.

[0127] When the control end receives the zero position signal sent by the zero position detection component in the ABF device, it indicates that the stepper motor has moved to the zero position, and then the position information measured by the position measurement device can be controlled to return to zero.

[0128] Optionally, in one implementation, the control end generates a request for manually resetting the position information measured by the position measuring device to zero, and the staff manually resets the position information measured by the position measuring device to zero. Alternatively, the control end may also send a reset instruction to the position measuring device to control the position information measured by the position measuring device to reset to zero.

[0129] The above solution provided by the embodiment of the present invention can automatically generate multiple pairs of calibration data, thereby improving the efficiency of obtaining calibration data. At the same time, by moving the stepper motor to the zero position and controlling the position information measured by the position measurement device to return to zero, it can be ensured that the position information output by the position measurement device can accurately reflect the position of the stepper motor after the movement, thereby providing a basis for automatically generating multiple pairs of calibration data.

[0130] Optionally, in one embodiment, another calibration data generation method is provided, which further includes, after the upper stepper motor moves to the maximum movable position:

[0131] Each pair of generated calibration data is written into a storage unit in the ABF device.

[0132] The storage unit may be a flash memory. When the stepper motor moves to the maximum movable position, each pair of calibration data generated can be written into the storage unit in the ABF device through the SPI protocol. In one implementation, each time a pair of calibration data is generated, the generated pair of calibration data is written into the storage unit in the ABF device. This reduces the storage space required by the control end. In another implementation, after the movement is completed, the generated multiple pairs of calibration data can be simultaneously written into the storage unit in the ABF device to reduce the number of communications between the control end and the ABF device.

[0133] The above solution provided by the embodiment of the present invention can automatically generate multiple pairs of calibration data, thereby improving the efficiency of obtaining calibration data. At the same time, the generated calibration data is written into the storage unit in the ABF device, thereby realizing the calibration of the ABF device.

[0134] Based on the above method, an embodiment of the present invention also provides a calibration data generation system. Figure 4 As shown, a calibration data generation system provided by an embodiment of the present invention may include a control terminal 401 and a position measurement device 402; the control terminal 401 communicates with the position measurement device 402 and the ABF device to be calibrated;

[0135] The position measuring device 402 is used to measure the position information of the stepping motor in the ABF device and send the measured position information to the control end in real time;

[0136] The control terminal 401 is used to control the stepper motor to move, and obtain the position information sent by the position measurement device in real time, and when it is determined that the stepper motor moves a specified distance based on the obtained position information, determine that the position of the stepper motor is the calibration position, and obtain the target code value generated by the coding chip in the ABF device, and generate a pair of calibration data based on the calibration position and the target code value, and return to execute the step of controlling the stepper motor to move until the stepper motor moves to the maximum movable position; wherein, the target code value is the code value converted from the target electrical signal, the target electrical signal is the electrical signal generated by the sensor in the ABF device when detecting the target information, and the target information is the information generated when the information generating component in the ABF device is located at the calibration position.

[0137] The position measuring device 402 may be a height meter. Optionally, the height meter ejector pin is rigidly connected to a stepper motor, so that the stepper motor can drive the ejector pin to move when it moves, and the movement of the ejector pin can drive the change of the height value measured by the height meter. Therefore, each position of the stepper motor corresponds to the height value measured by the height meter, so that the position measuring device 402 can measure the position information of the stepper motor in the ABF device.

[0138] After measuring the position information of the stepper motor in the ABF device, the position measuring device 402 can send the measured position information in real time to the control end 401. Optionally, the position measuring device 402 and the control end 401 can communicate with each other in a wired / wireless manner, and the position measuring device 402 feeds back the measured position information to the control end 401 in real time in a wired / wireless manner.

[0139] The control terminal 401 can be any electronic device with data processing capability, such as a personal computer, a server, a mobile phone, etc. When the ABF device needs to be calibrated, the control terminal 401 can control the stepper motor in the ABF device to move, and receive the position information of the stepper motor fed back by the position measurement device 402 in real time. Optionally, the control terminal 401 can control the stepper motor to move by pulse width modulation PWM.

[0140] In the process of the control end 401 controlling the stepper motor to move, the control end 401 can determine in real time whether the stepper motor moves a specified distance based on the received position information. Optionally, the control end 401 can calculate in real time the distance between the position indicated by the acquired position information and the starting position. If the calculated distance is less than the specified distance, the control end 401 can continue to control the stepper motor to continue to move. If the calculated distance is greater than the specified distance, the control end 401 can control the stepper motor to move in the opposite direction. If the calculated distance is equal to the specified distance, the control end 401 can stop moving the stepper motor, so that the control end 401 can control the stepper motor to move the specified distance.

[0141] After determining that the stepper motor moves a specified distance, the control terminal 401 can determine that the position of the stepper motor is the calibration position, and obtain the target code value generated by the coding chip in the ABF device, and then generate a pair of calibration data based on the calibration position and the target code value. The above-mentioned specified distance is the minimum adjustable distance of the rear focus of the preset camera lens.

[0142] After generating a pair of calibration data, the control end 401 can continue to control the stepper motor to move, and when the stepper motor moves the next specified distance, continue to generate a pair of calibration data, and so on, until the control end 401 determines that the stepper motor moves to the maximum movable position.

[0143] In order to obtain more calibration data, the control end 401 can control the stepper motor to move from the starting position until it moves to the maximum movable position of the stepper motor. At this time, before controlling the stepper motor to move, the control end 401 can also reset the stepper motor and the position measuring device 402. Specifically, the control end 401 can control the stepper motor to move, and when the control end 401 receives the zero position signal sent by the zero position detection component in the ABF device, it is determined that the stepper motor has moved to the zero position, and at this time, the control end 401 controls the position measuring device 402 to return the measured position information to zero.

[0144] After the stepper motor moves to the maximum movable position, the control terminal 401 can write the generated calibration data into the storage unit in the ABF device, so as to realize the calibration of the ABF device. The storage unit can be a storage device such as a flash memory.

[0145] Optionally, the embodiment of the present invention also provides another calibration data generation system, the calibration data generation system further includes: a display unit 403;

[0146] The position measuring device 402 is also used to send the acquired position information to the display unit 403 in real time;

[0147] The display unit 403 is used to display the received position information.

[0148] The display unit 403 may be a display device such as a digital tube or a liquid crystal panel. Since the display unit 403 can display the position information obtained by the position measurement device in real time, it is convenient for staff to observe.

[0149] In the above-mentioned system provided by the embodiment of the present invention, since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device, and then when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned to execute until the stepper motor moves to the maximum movable position. It can be seen that through the scheme of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, which improves the efficiency of obtaining calibration data.

[0150] In order to more clearly explain the technical solution of the embodiment of the present invention, Figure 5 As shown, the embodiment of the present invention also provides an overall framework diagram for generating annotation data. In the figure, the main control module is the control end mentioned in the embodiment of the present invention, the altimeter (thousandths) is the position measuring device mentioned in the embodiment of the present invention, the ABF focusing device is the ABF device mentioned in the embodiment of the present invention, and the position information digital display device is the display unit mentioned in the embodiment of the present invention. The magnetic encoding chip is a combination of the sensor and the encoding chip mentioned in the embodiment of the present invention, FLASH (flash memory) is the storage unit mentioned in the embodiment of the present invention, and the zero position detection (optical coupler) indicates that the embodiment of the present invention is a zero point detection component.

[0151] Among them, the main control module obtains the position information of the stepper motor through the USB, the main control module communicates with the zero point detection through I / O signals, the main control module communicates with the magnetic chip and FLASH through the SPI protocol, and the main control module controls the movement of the stepper motor through PWM. The ejector pin of the altimeter is rigidly connected to the stepper motor.

[0152] The main control module in the figure executes the embodiment of the present invention Figures 1 to 3 The steps of the calibration data generation method mentioned above will not be repeated here.

[0153] In the above-mentioned solution provided by the embodiment of the present invention, since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device, and then when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned until the stepper motor moves to the maximum movable position. It can be seen that through the solution of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved, until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, which improves the efficiency of obtaining calibration data.

[0154] Corresponding to the method provided in the above embodiment, Figure 6 As shown, an embodiment of the present invention further provides a calibration data generating device, which is applied to a control end, and the control end communicates with a position measuring device and an ABF device to be calibrated respectively, and the position measuring device is used to measure the position information of a stepper motor in the ABF device, and the method includes:

[0155] The information acquisition module 601 is used to control the stepper motor to move and obtain the position information of the stepper motor in real time through a position measurement device;

[0156] The coding value acquisition module 602 is used to determine that the position of the stepper motor is the calibration position when it is determined that the stepper motor moves a specified distance based on the acquired position information, and to acquire the target coding value generated by the coding chip in the ABF device; wherein the target coding value is a coding value obtained by converting a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position;

[0157] The data generation module 603 is used to generate a pair of calibration data based on the calibration position and the target code value, and return to execute the step of controlling the stepper motor to move until the stepper motor moves to the maximum movable position.

[0158] Optionally, in one embodiment, the specified distance is a minimum adjustable distance of a back focus of a preset camera lens;

[0159] Optionally, in one embodiment, the coding value acquisition module is specifically used to calculate the distance between the position indicated by the acquired position information and the starting position; if the calculated distance is less than the specified distance, the stepper motor continues to be controlled to move; if the calculated distance is greater than the specified distance, the stepper motor is controlled to move in the opposite direction; if the calculated distance is equal to the specified distance, the stepper motor is stopped from moving; wherein the starting position is the position where the stepper motor starts to move.

[0160] Optionally, in one embodiment, the device further includes: a zeroing module, which is used to control the stepper motor to move before the information acquisition module executes the control of the stepper motor to move and obtains the position information of the stepper motor in real time through the position measurement device; when a zero position signal sent by the zero position detection component in the ABF device is received, it is determined that the stepper motor has moved to the zero position, and the position information measured by the position measurement device is controlled to return to zero.

[0161] Optionally, in one embodiment, the position measuring device is an altimeter, and the ejector pin of the altimeter is rigidly connected to the stepper motor.

[0162] Optionally, in one embodiment, the information acquisition module is specifically used to receive the altitude value fed back by the altimeter in real time as the position information of the stepper motor.

[0163] Optionally, in one embodiment, the information acquisition module is specifically used to control the stepper motor to move through pulse width modulation PWM.

[0164] Optionally, in one embodiment, the device further includes: a data writing module, configured to write each pair of generated calibration data into a storage unit in the ABF device after the stepper motor moves to the maximum movable position.

[0165] In the above-mentioned system provided by the embodiment of the present invention, since the position measurement device can obtain the position information of the stepper motor in the ABF device, when the control end controls the stepper motor to move, the position information of the stepper motor can be obtained in real time through the position measurement device, and then when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target encoding value generated by the encoding chip in the ABF device is obtained, and a pair of calibration data is generated based on the calibration position and the target encoding value, and the step of controlling the stepper motor to move is returned to execute until the stepper motor moves to the maximum movable position. It can be seen that through the scheme of the embodiment of the present invention, a pair of calibration data can be automatically generated based on the calibration position and the target encoding value after each specified distance is moved until the stepper motor moves to the maximum movable position, and multiple pairs of calibration data can be automatically generated, which improves the efficiency of obtaining calibration data.

[0166] The embodiment of the present invention further provides an electronic device, such as 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.

[0167] Memory 703, used for storing computer programs;

[0168] The processor 701 is used to implement the steps of the calibration data generation method mentioned in the above embodiment when executing the program stored in the memory 703.

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

[0170] The communication interface is used for communication between the above electronic device and other devices.

[0171] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0172] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0173] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned calibration data generating methods are implemented.

[0174] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any calibration data generating method in the above embodiments.

[0175] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0176] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0177] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, system, electronic device, computer-readable program, and computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0178] 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, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A calibration data generation method, characterized in that: Applied to a control end, the control end communicates with a position measuring device and an ABF device to be calibrated respectively, the position measuring device is used to measure the position information of a stepper motor in the ABF device, and the method comprises: Controlling the stepper motor to move, and acquiring position information of the stepper motor in real time through the position measuring device; When it is determined based on the acquired position information that the stepper motor moves a specified distance, the position of the stepper motor is determined to be a calibration position, and a target code value generated by the coding chip in the ABF device is acquired; wherein the target code value is a code value obtained by converting a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position; the relative positions among the information generating component, the stepper motor and the detector in the ABF device remain unchanged; Based on the calibration position and the target code value, a pair of calibration data is generated, and the step of controlling the stepper motor to move is returned to be executed until the stepper motor moves to the maximum movable position.

2. The method according to claim 1, characterized in that The specified distance is the minimum adjustable distance of the back focus of the preset camera lens.

3. The method according to claim 1 or 2, characterized in that: The step of determining that the stepping motor moves a specified distance based on the acquired position information includes: Calculating the distance between the position indicated by the acquired position information and the starting position; wherein the starting position is the position where the stepping motor starts to move; If the calculated distance is less than the specified distance, continue to control the stepper motor to move; If the calculated distance is greater than the specified distance, controlling the stepping motor to move in the reverse direction; If the calculated distance is equal to the specified distance, the stepping motor is stopped from moving.

4. The method according to claim 1 or 2, characterized in that: Before controlling the stepper motor to move and acquiring the position information of the stepper motor in real time through the position measuring device, the method further includes: Controlling the stepping motor to move; When a zero position signal is received from a zero position detection component in the ABF device, it is determined that the stepping motor has moved to the zero position, and the position information measured by the position measuring device is controlled to return to zero.

5. The method according to claim 1 or 2, characterized in that: The position measuring device is a height gauge, and the ejector pin of the height gauge is rigidly connected to the stepping motor.

6. The method according to claim 5, characterized in that The step of obtaining the position information of the stepper motor in real time by the position measuring device comprises: The altitude value fed back by the altimeter is received in real time as the position information of the stepping motor.

7. The method according to claim 1 or 2, characterized in that: The stepping motor is controlled to move, comprising: The stepper motor is controlled to move by pulse width modulation (PWM).

8. The method according to claim 1 or 2, characterized in that: After the stepper motor moves to the maximum movable position, the method further comprises: Each pair of generated calibration data is written into a storage unit in the ABF device.

9. A calibration data generation system, characterized in that: It includes a control terminal and a position measuring device; the control terminal communicates with the position measuring device and the ABF device to be calibrated; The position measuring device is used to measure the position information of the stepping motor in the ABF device and send the measured position information to the control end in real time; The control end is used to control the stepper motor to move and obtain the position information sent by the position measuring device in real time; when it is determined that the stepper motor moves a specified distance based on the obtained position information, the position of the stepper motor is determined to be the calibration position, and the target code value generated by the coding chip in the ABF device is obtained; based on the calibration position and the target code value, a pair of calibration data is generated, and the step of controlling the stepper motor to move is returned to execute until it moves to the maximum movable position of the stepper motor; wherein the target code value is a code value converted from a target electrical signal, the target electrical signal is an electrical signal generated by the sensor in the ABF device when detecting target information, and the target information is information generated when the information generating component in the ABF device is located at the calibration position; the relative positions among the information generating component, the stepper motor and the detector in the ABF device remain unchanged.

10. A calibration data generating device, characterized in that: Applied to a control end, the control end communicates with a position measuring device and an ABF device to be calibrated respectively, the position measuring device is used to measure the position information of a stepper motor in the ABF device, and the device comprises: An information acquisition module, used to control the stepper motor to move, and to acquire the position information of the stepper motor in real time through the position measurement device; A coding value acquisition module, used for determining that the position of the stepper motor is a calibration position when it is determined that the stepper motor moves a specified distance based on the acquired position information, and acquiring a target coding value generated by the coding chip in the ABF device; wherein the target coding value is a coding value obtained by converting a target electrical signal, the target electrical signal is an electrical signal generated by a sensor in the ABF device when detecting target information, and the target information is information generated when an information generating component in the ABF device is located at the calibration position; the relative positions among the information generating component, the stepper motor and the detector in the ABF device remain unchanged; The data generation module is used to generate a pair of calibration data based on the calibration position and the target encoding value, and return to execute the step of controlling the stepper motor to move until the stepper motor moves to the maximum movable position.

11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 8 when executing a program stored in a memory.