Focusing precision detection method and device of imaging equipment and computer program product
By detecting the motor stepping speed and running stroke of the focus module of the imaging equipment, the problem of insufficient accuracy detection of the focus module in the prior art is solved, and a comprehensive evaluation and adjustment of focus accuracy is achieved, which significantly improves the accuracy and stability of the focus system.
Patent Information
- Application Number
- CN202510046385.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-02
AI Technical Summary
Existing imaging equipment has shortcomings in the accuracy detection of the focus module, and cannot fully feedback the accuracy of the focus module, affecting the accuracy and stability of the focus system.
By obtaining the running data of the focus module, calculate the motor step speed and the running stroke of the focus module, and determine whether it meets the predetermined requirements. If it is not met, adjust it to improve the focus accuracy.
It realizes a comprehensive evaluation of focus accuracy, can effectively guide focus adjustment, significantly improve the accuracy and stability of the focus system, simplify the construction process of the detection platform, and reduce technical thresholds and cost investment.
Smart Images

Figure CN119922298A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of imaging technology, and in particular to a focusing accuracy detection method and device for an imaging device, and a computer program product. Background Art
[0002] Existing imaging devices generally use a host computer to control the stepper motor to move the movable platform of the focus module back and forth, and detect whether the movable platform has moved to the specified position by detecting the number of motor steps or ranging. If it can move to the specified position, the focus module is considered normal, otherwise it is abnormal.
[0003] The above method only detects the final position of the focus movable platform, and cannot accurately control the movement process of the focus movable platform only through the motor steps or ranging results, and cannot fully feedback the accuracy of the focus module. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device and computer program product for detecting the focus accuracy of an imaging device, so as to accurately evaluate the operating performance of a focus module and guide the optimization adjustment of the focus accuracy.
[0005] In order to solve the above technical problems, the present invention provides a focusing accuracy detection method of an imaging device, comprising:
[0006] Step S1, obtaining operation data of a focus module of an imaging device;
[0007] Step S2, calculate the motor stepping speed and the focusing module operation stroke according to the operation data of the focusing module, and determine whether both meet the predetermined requirements. If so, the focusing accuracy meets the requirements, otherwise the focusing accuracy does not meet the requirements.
[0008] Preferably, the operation data of the focus module includes: the current position of the focus module movable platform and the motor operation time;
[0009] The motor stepping speed is calculated based on the operation data of the focus module, and it is determined whether it meets the predetermined requirements, including:
[0010] The motor stepping speed is calculated according to the current position of the focus module active platform and the motor running time, and it is determined whether the difference between the motor stepping speed and the set stepping speed is less than a certain threshold. If so, the motor stepping speed meets the predetermined requirements.
[0011] Preferably, obtaining the operation stroke of the focusing module according to the operation data of the focusing module, and judging whether the operation stroke of the focusing module meets the predetermined requirements specifically includes:
[0012] The focus module operation stroke is determined according to the current position of the focus module active platform measured by the Hall sensor, and it is judged whether the current detection value of the Hall sensor is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements.
[0013] Preferably, the method further comprises:
[0014] The motor stepping speed adjustment value and the focusing module operating stroke adjustment value are calculated according to the difference between the motor stepping speed and the set stepping speed and the difference between the focusing module operating stroke and the predetermined operating stroke, and the motor stepping speed and the focusing module operating stroke are adjusted in the next focusing process.
[0015] Preferably, the method further comprises:
[0016] Receive focus accuracy detection instructions from the user, and display the corresponding focus accuracy detection results on the host computer interface according to the user instructions.
[0017] The present invention also provides a focusing accuracy detection device for an imaging device, comprising:
[0018] A focus module controller is connected to the focus module to control the operation of the motor in the focus module and collect the operation data of the focus module and send it to the serial port conversion module;
[0019] A serial port conversion module is connected to the focus module controller and the host computer, and is used to send the operation data of the focus module collected by the focus module controller to the host computer, and to send the instructions of the host computer to the focus module controller;
[0020] The host computer is used to obtain the motor step speed and the focus module operation stroke according to the operation data of the focus module, and judge whether the focus accuracy meets the predetermined requirements, and send the focus module operation instruction to the serial port conversion module.
[0021] Preferably, the host computer includes a motor stepping speed judgment module, and the motor stepping speed processing module is used to calculate the motor stepping speed according to the current position of the focusing module active platform and the motor running time, and determine whether the difference between the motor stepping speed and the set stepping speed is less than a certain threshold. If so, the motor stepping speed meets the predetermined requirements.
[0022] Preferably, the host computer includes a focus module operation stroke judgment module, which is used to determine the focus module operation stroke according to the current position of the focus module active platform measured by the Hall sensor, and to determine whether the current Hall sensor detection value is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements.
[0023] The present invention also provides a focusing accuracy detection device for an imaging device, comprising:
[0024] one or more processors;
[0025] Memory;
[0026] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the focus accuracy detection method.
[0027] The present invention also provides a computer program product, comprising computer instructions, wherein the computer instructions instruct a computer device to execute operations corresponding to the method.
[0028] The implementation of the present invention has the following beneficial effects: the present invention realizes a comprehensive evaluation of the focusing accuracy by comprehensively detecting the motor stepping speed and the actual running stroke of the focusing module. The present invention not only detects comprehensive data and covers the key factors affecting the focusing accuracy, but also can effectively guide the subsequent focusing adjustment, significantly improving the accuracy and stability of the focusing system. In addition, the implementation of the present invention only requires basic hardware, which greatly simplifies the construction process of the detection platform, reduces the technical threshold and cost investment. This design enables the detection work to be started in a very short time, improves the detection efficiency, and provides strong support for quickly locating the focusing problem and optimizing the focusing performance. In general, the present invention solves the key problems in focusing accuracy detection with a concise and efficient solution, provides important technical support for photography, machine vision and other fields, and has significant practical value and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] 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 described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 It is a flow chart of a method for detecting focusing accuracy of an imaging device according to an embodiment of the present invention.
[0031] Figure 2 It is a structural schematic diagram of a focusing accuracy detection device for an imaging device according to a second embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following descriptions of the embodiments refer to the accompanying drawings to illustrate specific embodiments in which the present invention may be implemented.
[0033] The imaging devices such as visible light cameras and infrared thermal imagers in the embodiments of the present invention generally include a focus module and a focus module controller, wherein the focus module includes a focus lens, a movable platform, and a stepper motor, etc. The focus module controller is used to control the operation of the stepper motor to drive the movable platform to move and drive the focus lens to move, thereby achieving focusing. The present invention aims to detect the focus accuracy of these imaging devices.
[0034] Please refer to Figure 1 As shown, an embodiment of the present invention provides a method for detecting the focusing accuracy of an imaging device, comprising:
[0035] Step S1, obtaining operation data of a focus module of an imaging device;
[0036] Step S2, calculate the motor stepping speed and the focusing module operation stroke according to the operation data of the focusing module, and determine whether both meet the predetermined requirements. If so, the focusing accuracy meets the requirements, otherwise the focusing accuracy does not meet the requirements.
[0037] Specifically, in an embodiment of the present invention, after the focus module completes focusing, the focus accuracy detection can be performed, and the operation data of the focus module must first be obtained. Preferably, the operation data of the focus module includes the current position of the focus module movable platform and the motor running time, and may also include the number of motor steps, etc. These data are all detected and recorded in real time during the focusing process, wherein the current position of the focus module movable platform can be obtained by detecting the Hall sensor, and the operation stroke of the focus module can be determined through the current position of the focus module movable platform, that is, the operation stroke of the focus module movable platform or the motor.
[0038] Whether the motor stepping speed meets the predetermined requirements is determined by whether the motor stepping speed matches the set stepping speed, and whether the focus module operation stroke meets the predetermined requirements is determined by whether the focus module operation stroke meets the focus stroke requirements. Only when both meet the predetermined requirements, the focus accuracy meets the requirements. If one of the two does not meet the predetermined requirements, it means that the focus accuracy does not meet the requirements.
[0039] In one embodiment, the method of obtaining the motor stepping speed according to the operation data of the focus module and determining whether it meets the predetermined requirements is as follows:
[0040] The motor step speed is calculated according to the current position of the focus module movable platform and the motor running time. The current position of the focus module movable platform is specifically obtained according to the Hall value measured by the Hall sensor, and then the motor running stroke can be obtained. The motor running stroke is divided by the motor running time to obtain the motor step speed, and then it is determined whether the difference between the motor step speed and the set step speed is less than a certain threshold. If so, the motor step speed meets the predetermined requirements. It can be understood that the above motor step speed refers to the average motor step speed.
[0041] In one embodiment, a method for obtaining the operation stroke of the focus module according to the operation data of the focus module and determining whether the operation stroke of the focus module meets the predetermined requirements is as follows:
[0042] The focus module operation stroke is determined according to the current position of the focus module movable platform measured by the Hall sensor, and it is judged whether the current detection value of the Hall sensor is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements. Among them, the focus module operation stroke refers to the total operation stroke of the focus module movable platform or motor from the start of focusing to the end of focusing. The predetermined Hall value can be manually set according to the focusing distance, or it can be automatically calculated by the focus module controller according to the defocus amount of the image. The purpose is to enable the focus module to obtain the best focusing effect under the operation stroke corresponding to this Hall value.
[0043] Preferably, the motor stepping speed adjustment value and the focusing module operating stroke adjustment value can be calculated respectively according to the difference between the motor stepping speed and the set stepping speed and the difference between the focusing module operating stroke and the predetermined operating stroke, and fed back to the focusing module controller to adjust the motor stepping speed and the focusing module operating stroke in the next focusing process, thereby improving the focusing accuracy.
[0044] Preferably, the method further includes: receiving a focus accuracy detection instruction from the user, and displaying the corresponding focus accuracy detection result on the upper computer interface according to the user instruction. Specifically, the user can issue a generator step speed detection instruction or a focus module operation stroke detection instruction, or an instruction to detect both at the same time as needed, and the upper computer calculates the corresponding detection result and displays it on the upper computer interface. Further preferably, the method further includes: receiving a focus module operation instruction issued by the user, and controlling the focus module movement to focus according to the user instruction.
[0045] like Figure 2 As shown, corresponding to the focus accuracy detection method of an imaging device in the first embodiment of the present invention, the second embodiment of the present invention further provides a focus accuracy detection device for an imaging device, including:
[0046] The focus module controller is connected to the focus module, specifically to the motor in the focus module, and is used to control the operation of the motor in the focus module, and collect the operation data of the focus module and send it to the serial port conversion module; wherein the operation data of the focus module includes information such as the number of motor steps, the current position of the focus module active platform detected by the Hall sensor, and the motor operation time. The focus module controller collects this information and packages it and sends it to the serial port conversion module.
[0047] The serial port conversion module is connected to the focus module controller and the host computer, and serves as a communication bridge between the focus module controller and the host computer, and is used to send the operation data of the focus module collected by the focus module controller to the host computer, and send the instructions of the host computer to the focus module controller;
[0048] The host computer is used to obtain the motor stepping speed and the focusing module running stroke according to the running data of the focusing module, and judge whether both meet the predetermined requirements. If so, the focusing accuracy meets the requirements; if not, the focusing accuracy does not meet the requirements.
[0049] Preferably, the host computer includes a motor stepping speed judgment module, and the motor stepping speed processing module is used to calculate the motor stepping speed according to the current position of the focusing module active platform and the motor running time, and determine whether the difference between the motor stepping speed and the set stepping speed is less than a certain threshold. If so, the motor stepping speed meets the predetermined requirements.
[0050] Preferably, the host computer includes a focus module operation stroke judgment module, which is used to determine the focus module operation stroke according to the current position of the focus module active platform measured by the Hall sensor, and to determine whether the current Hall sensor detection value is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements.
[0051] Preferably, the host computer is also used to calculate the motor stepping speed adjustment value and the focus module operating stroke adjustment value according to the difference between the motor stepping speed and the set stepping speed and the difference between the focus module operating stroke and the predetermined operating stroke, and feed them back to the focus module controller to adjust the motor stepping speed and the focus module operating stroke in the next focusing process, thereby improving the focusing accuracy.
[0052] Preferably, the host computer further includes an instruction receiving module and a display module, wherein the instruction receiving module is used to receive a user focus accuracy detection instruction, and the display module is used to display the corresponding focus accuracy detection result according to the user instruction. Further preferably, the instruction receiving module is also used to receive a focus module operation instruction issued by the user, and the host computer forwards the focus module operation instruction to the focus module controller through the serial port conversion module, thereby controlling the focus module movement for focusing.
[0053] Specifically, the host computer has a visual human-computer interaction interface, through which the user can issue instructions such as controlling the movement of the focus module and focus accuracy detection, which can be achieved by clicking the corresponding buttons. The human-computer interaction interface can display the corresponding focus accuracy detection results, and can also present the operation status of the focus module in the form of tables and graphs.
[0054] The upper computer software interface of the present invention is concise, the function button description is clear, it supports one-button fool-style detection, and also supports step-by-step detection. The detection results can be displayed in real time and dynamically in a graphical manner. After the detection is completed, the software will prompt the detection results, and if it is unqualified, the basis for the unqualified will be displayed. In addition to the detection function, the software also supports saving operation data, exporting the data in a table form, which can be saved as historical data of the detection.
[0055] The specific operation method of the focus accuracy detection device can refer to the above-mentioned focus accuracy detection method embodiment, which will not be repeated here.
[0056] Corresponding to the focus accuracy detection method of an imaging device in the first embodiment of the present invention, the third embodiment of the present invention further provides a focus accuracy detection device for an imaging device, comprising:
[0057] one or more processors;
[0058] Memory;
[0059] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the focus accuracy detection method of the imaging device described in the aforementioned embodiment 1 of the present invention.
[0060] Corresponding to the focus accuracy detection method of the imaging device described in the aforementioned embodiment 1 of the present invention, embodiment 4 of the present invention also provides a computer program product, including computer instructions, and the computer instructions instruct the computer device to perform operations corresponding to the focus accuracy detection method of the imaging device described in the aforementioned embodiment 1 of the present invention.
[0061] Preferably, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the device, and various parts of the device are connected using various interfaces and lines.
[0062] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.
[0063] It should be noted that the above-mentioned device may include but is not limited to a processor and a memory, which can be understood by those skilled in the art.
[0064] For the working principle and process of this embodiment, please refer to the description of the aforementioned embodiment 1 of the present invention, which will not be repeated here.
[0065] Compared with the prior art, the beneficial effect brought by the embodiments of the present invention is that the present invention realizes a comprehensive evaluation of the focusing accuracy by comprehensively detecting the motor stepping speed and the actual running stroke of the focusing module. The present invention not only detects comprehensive data and covers the key factors affecting the focusing accuracy, but also can effectively guide subsequent focusing adjustments, significantly improving the accuracy and stability of the focusing system. In addition, the implementation of the present invention only requires basic hardware, which greatly simplifies the construction process of the detection platform and reduces the technical threshold and cost investment. This design enables the detection work to be started in a very short time, improves the detection efficiency, and provides strong support for quickly locating focusing problems and optimizing focusing performance. In general, the present invention solves the key problems in focusing accuracy detection with a simple and efficient solution, provides important technical support for photography, machine vision and other fields, and has significant practical value and broad application prospects.
[0066] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for detecting the focusing accuracy of an imaging device, characterized in that: include: Step S1, obtaining operation data of a focus module of an imaging device; Step S2, calculate the motor stepping speed and the focusing module operation stroke according to the operation data of the focusing module, and determine whether both meet the predetermined requirements. If so, the focusing accuracy meets the requirements, otherwise the focusing accuracy does not meet the requirements.
2. The method according to claim 1, characterized in that The operation data of the focusing module includes: the current position of the focusing module movable platform and the motor operation time; The motor stepping speed is calculated based on the operation data of the focus module, and it is determined whether it meets the predetermined requirements, including: The motor stepping speed is calculated according to the current position of the focus module active platform and the motor running time, and it is determined whether the difference between the motor stepping speed and the set stepping speed is less than a certain threshold. If so, the motor stepping speed meets the predetermined requirements.
3. The method according to claim 2, characterized in that Obtaining the focus module operation stroke according to the operation data of the focus module, and judging whether the focus module operation stroke meets the predetermined requirements, specifically including: The focus module operation stroke is determined according to the current position of the focus module active platform measured by the Hall sensor, and it is judged whether the current detection value of the Hall sensor is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements.
4. The method according to claim 1, characterized in that: Also includes: The motor stepping speed adjustment value and the focusing module operating stroke adjustment value are calculated according to the difference between the motor stepping speed and the set stepping speed and the difference between the focusing module operating stroke and the predetermined operating stroke, and the motor stepping speed and the focusing module operating stroke are adjusted in the next focusing process.
5. The method according to claim 1, characterized in that Also includes: Receive focus accuracy detection instructions from the user, and display the corresponding focus accuracy detection results on the host computer interface according to the user instructions.
6. A focusing accuracy detection device for an imaging device, characterized in that: include: A focus module controller is connected to the focus module to control the operation of the motor in the focus module and collect the operation data of the focus module and send it to the serial port conversion module; A serial port conversion module is connected to the focus module controller and the host computer, and is used to send the operation data of the focus module collected by the focus module controller to the host computer, and to send the instructions of the host computer to the focus module controller; The host computer is used to obtain the motor step speed and the focus module operation stroke according to the operation data of the focus module, and judge whether the focus accuracy meets the predetermined requirements, and send the focus module operation instruction to the serial port conversion module.
7. The focusing accuracy detection device according to claim 6, characterized in that: The host computer includes a motor stepping speed judgment module, and the motor stepping speed processing module is used to calculate the motor stepping speed according to the current position of the focusing module active platform and the motor running time, and judge whether the difference between the motor stepping speed and the set stepping speed is less than a certain threshold. If so, the motor stepping speed meets the predetermined requirements.
8. The focusing accuracy detection device according to claim 6, characterized in that: The host computer includes a focus module operation stroke judgment module, which is used to determine the focus module operation stroke according to the current position of the focus module active platform measured by the Hall sensor, and to judge whether the current Hall sensor detection value is consistent with the predetermined Hall value. If so, the focus module operation stroke meets the predetermined requirements.
9. A focusing accuracy detection device for an imaging device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more applications are configured to execute the focus accuracy detection method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computer device to execute operations corresponding to the method according to any one of claims 1 to 5.