Camera provided with non-confocal lens, rapid focusing method and medium
By recording the focus coordinate offset and temperature changes of the non-confocal lens, the automatic focus failure caused by inconsistent focus during day and night switching is solved, and a fast and accurate focus effect is achieved.
Patent Information
- Application Number
- CN202411769998.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the prior art, when the non-confocal lens is switched day and night, the automatic focus fails due to inconsistency in focus, and there is a lack of high-magnification day and night confocal lens.
By collecting and recording the corresponding focal coordinate offsets of the non-confocal lens at different magnifications and object distances, and correcting the focal coordinates with temperature changes, we can achieve rapid focus to infrared focal points.
It avoids the problem of failed focus after day and night switching, and quickly and accurately focus on the infrared focus, shortening the target missed detection time caused by the focus process.
Smart Images

Figure CN119620324A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of camera technology, and in particular to a camera equipped with a non-confocal lens, a fast focusing method and a medium. Background Art
[0002] The focus of a non-confocal lens in visible light and infrared light scenes is not at the same position. In daytime scenes, the lens filter will filter out infrared light, so there is only one focus of visible light in the daytime; but in nighttime scenes, the lens will not filter any light to allow the sensor to receive more light, so there will be two focuses in nighttime scenes, one for visible light and one for infrared light. Since the focus of the license plate at night is on the infrared focus, if the autofocus technology is used, the focus may be on the visible light focus, resulting in blurred infrared focus, such as recognizing the license plate under infrared light.
[0003] Currently, the confocal lenses on the market are basically low-magnification lenses, and there are currently no high-magnification day and night confocal lenses. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a camera equipped with a non-confocal lens, a fast focusing method and a medium.
[0005] The specific plan is as follows:
[0006] A non-confocal lens fast focusing method comprises the following steps:
[0007] S1: Collect and record the first coordinate offset corresponding to the non-confocal lens at different magnifications and different object distances; the first coordinate offset is the difference between the focal coordinate of the non-confocal lens under visible light and the focal coordinate under infrared light;
[0008] S2: Collect and record the focal coordinates of the non-confocal lens at different magnifications and object distances at two different temperatures;
[0009] S3: At the initial moment when the non-confocal lens is installed, focusing is adjusted, and the temperature, focus coordinates, magnification and object distance corresponding to the initial moment are recorded; at the initial moment, the non-confocal lens is in a visible light focus mode;
[0010] S4: collecting the temperature at different moments, and calculating the second coordinate offset of the focal coordinate required at each moment relative to the focal coordinate at the initial moment according to the difference between the temperature at each moment and the temperature at the initial moment, combined with the focal coordinates at two different temperatures corresponding to the magnification and object distance recorded at the initial moment;
[0011] S5: when the non-confocal lens is in the visible light focus mode, adjusting the focus coordinate at the current moment by the sum of the focus coordinate at the initial moment and the second coordinate offset corresponding to the current moment;
[0012] S6: When the non-confocal lens is switched to the infrared light focus mode, the focus coordinate at the current moment is adjusted by the sum of the focus coordinate at the initial moment, the second coordinate offset corresponding to the current moment, and the first coordinate offset corresponding to the magnification and object distance recorded at the initial moment.
[0013] Furthermore, the method also includes: enabling the AutoHome function in the gimbal of the camera where the lens is installed, and recording the temperature, focus coordinates, magnification and object distance corresponding to the initial moment through the AutoHome function.
[0014] A camera equipped with a non-confocal lens comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described above in the embodiment of the present invention when executing the computer program.
[0015] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described above in an embodiment of the present invention are implemented.
[0016] The present invention adopts the above technical solution and has the following beneficial effects:
[0017] (1) Avoid focusing failure due to different focus points after switching between day and night;
[0018] (2) According to the measured first coordinate offset of visible light and infrared light, the infrared light can be quickly focused, thus shortening the problem of missed detection of the target due to the focusing process;
[0019] (3) Based on the detected temperature deviation, the focus difference caused by temperature can be quickly corrected. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention. DETAILED DESCRIPTION
[0021] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0022] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0023] Embodiment 1:
[0024] The embodiment of the present invention provides a non-confocal lens fast focusing method, such as Figure 1 As shown, the method comprises the following steps:
[0025] S1: Collect and record the first coordinate offset corresponding to the non-confocal lens at different magnifications and different object distances; the first coordinate offset is the difference between the focal coordinate of the non-confocal lens under visible light and the focal coordinate under infrared light.
[0026] Lenses can be divided into confocal lenses and non-confocal lenses. Confocal lenses refer to lenses where the focal points are at the same position or very close positions in visible light and infrared light scenes. Short focal length lenses are generally confocal lenses. Non-confocal lenses refer to lenses where the focal points are not at the same position in visible light and infrared light scenes. Long focal length lenses are generally non-confocal lenses. If you want to make a long focal length lens into a confocal lens, you need to perform special optical processing, which increases the cost. Experimental verification shows that there is a difference between the focal coordinates of a non-confocal lens under visible light and infrared light, and the difference is a fixed value, namely the first coordinate offset. Therefore, you only need to test the first coordinate offset of the non-confocal lens at different magnifications, and you can quickly and accurately run to the infrared focus according to the obtained first coordinate offset after the non-confocal lens switches from visible light to infrared light.
[0027] S2: Collect and record the focal coordinates of the non-confocal lens at different magnifications and object distances at two different temperatures.
[0028] The lens includes some physical components in the middle, there are gaps between these physical components, and the physical components themselves have the phenomenon of thermal expansion and contraction, so after the temperature changes, these physical components will affect the light due to the thermal expansion and contraction phenomenon, thereby affecting the focal position. According to experimental tests, the effect of temperature on the focal position is relatively fixed, so it is necessary to test the relationship between the focal position and temperature changes under different magnifications. It should be noted that since the focal coordinates collected in step S2 are only related to temperature changes, the environments corresponding to different temperatures must be the same, such as all under visible light. In addition, it is obtained through experiments that the relationship between the change of the focal coordinates with respect to the temperature is a linear change, therefore, it is only necessary to collect the focal coordinates at two different temperatures to realize the calculation of the focal coordinates at other temperatures.
[0029] The temperature can be collected by a temperature sensor built into the camera or by a temperature sensor arranged in the environment, and there is no limitation here.
[0030] S3: At the initial moment when the non-confocal lens is installed, focus adjustment is performed on it, and the temperature, focus coordinates, magnification and object distance corresponding to the initial moment are recorded; at the initial moment, the non-confocal lens is in a visible light focus mode.
[0031] Focus adjustment is to make the picture clear through adjustment.
[0032] In addition, in order to prevent the lens from being misoperated after installation, resulting in the displacement of the pan-tilt position or incorrect adjustment of the focal length, and to achieve an unattended function, the present embodiment also enables the AutoHome function in the pan-tilt of the camera where the lens is installed, and records the temperature, focal coordinates, magnification, and object distance corresponding to the initial moment through the AutoHome function. The AutoHome function means that the camera always remains in the set position, and even if there is a user operation, the device will automatically return to the position after a certain period of time.
[0033] S4: collecting the temperature at different moments, and calculating the second coordinate offset of the focal coordinate required at each moment relative to the focal coordinate at the initial moment based on the difference between the temperature at each moment and the temperature at the initial moment, combined with the focal coordinates at two different temperatures corresponding to the magnification and object distance recorded at the initial moment.
[0034] In the calculation of the second coordinate offset, the following formula is used:
[0035]
[0036] Among them, ΔFS represents the second coordinate offset, Temp now Indicates the current temperature, Temp save represents the temperature at the initial moment, Temp1 and Temp2 represent two different temperatures (such as 70° and -30°) corresponding to the magnification and object distance recorded at the initial moment, FS1 represents the focal coordinate at temperature Temp1, and FS2 represents the focal coordinate at temperature Temp2.
[0037] S5: When the non-confocal lens is in the visible light focus mode, the focus coordinate at the current moment is adjusted by the sum of the focus coordinate at the initial moment and the second coordinate offset corresponding to the current moment.
[0038] S6: When the non-confocal lens is switched to the infrared light focus mode, the focus coordinate at the current moment is adjusted by the sum of the focus coordinate at the initial moment, the second coordinate offset corresponding to the current moment, and the first coordinate offset corresponding to the magnification and object distance recorded at the initial moment.
[0039] The embodiment of the present invention can quickly correct the focus difference caused by temperature and day-night switching.
[0040] Embodiment 2:
[0041] The present invention also provides a camera equipped with a non-confocal lens, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiment of the first embodiment of the present invention when executing the computer program.
[0042] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0043] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A non-confocal lens fast focusing method, characterized in that: The following steps are involved: S1: Collect and record the first coordinate offset corresponding to the non-confocal lens at different magnifications and different object distances; the first coordinate offset is the difference between the focal coordinate of the non-confocal lens under visible light and the focal coordinate under infrared light; S2: Collect and record the focal coordinates of the non-confocal lens at different magnifications and object distances at two different temperatures; S3: At the initial moment when the non-confocal lens is installed, focusing adjustment is performed on it, and the temperature, focal coordinates, magnification and object distance corresponding to the initial moment are recorded; Initially, the non-confocal lens is in a visible light focus mode; S4: collecting the temperature at different moments, and calculating the second coordinate offset of the focal coordinate required at each moment relative to the focal coordinate at the initial moment according to the difference between the temperature at each moment and the temperature at the initial moment, combined with the focal coordinates at two different temperatures corresponding to the magnification and object distance recorded at the initial moment; S5: when the non-confocal lens is in the visible light focus mode, adjusting the focus coordinate at the current moment by the sum of the focus coordinate at the initial moment and the second coordinate offset corresponding to the current moment; S6: When the non-confocal lens is switched to the infrared light focus mode, the focus coordinate at the current moment is adjusted by the sum of the focus coordinate at the initial moment, the second coordinate offset corresponding to the current moment, and the first coordinate offset corresponding to the magnification and object distance recorded at the initial moment.
2. The non-confocal lens fast focusing method according to claim 1, characterized in that: Also includes: The AutoHome function is enabled in the gimbal of the camera where the lens is installed, and the temperature, focus coordinates, magnification, and object distance corresponding to the initial moment are recorded through the AutoHome function.
3. A camera equipped with a non-confocal lens, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 2 when executing the computer program.
4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Optical filter day-and-night switching device and night vision photography instrument
CN105467721A
Focusing processing method and device
CN111273504A
Confocal microscope and method of generating focused color image
JP2007102102A
Imaging device and control method of the same
JP2015184518A