Infrared lens imaging defect repairing method and device and readable storage medium thereof

By establishing a linear mathematical relationship between the lens focal length position and the image distortion gradient, obtaining the focal length position in real time and calculating the compensation value, dynamically compensate the infrared image data, solving the problem of lens imaging defects in infrared imaging equipment, and achieving efficient and low-cost image quality improvement.

CN120125480AInactive Publication Date: 2025-06-10SUN CREATIVE ZHEJIANG TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510585057.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-06-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In modern infrared imaging equipment, due to the limitations of optical lens design or processing technology, imaging defects often occur, such as uneven "light spots" or "ghosts", which seriously affect the image quality. The traditional solution is to redesign and process the lens, resulting in high costs and extended project cycles.

Method used

By establishing a linear mathematical relationship between the lens focal length position and the image distortion gradient, the focal length position information is obtained in real time and the compensation value is calculated, the infrared image data is dynamically compensated, and imaging interference caused by lens design defects is eliminated without hardware modification.

Benefits of technology

It realizes the effective reduction or elimination of the impact of lens imaging defects without changing the hardware, significantly improving the image quality of infrared imaging equipment, and reducing costs and R&D cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125480A_ABST
    Figure CN120125480A_ABST
Patent Text Reader

Abstract

The invention provides an infrared lens imaging defect repairing method and device and a readable storage medium. The method comprises the following steps of: calibrating focal length positions when imaging interference starts and is the most serious, acquiring corresponding image data, and calculating a focal length total difference and an image distortion difference; acquiring a current focal length position in real time and calculating a real-time position difference; and according to a linear mapping relation, calculating a compensation value through the real-time position difference, the total difference and the distortion difference, and applying the compensation value to real-time image data to complete restoration. The linear mapping is based on a distortion difference corresponding to the proportion of a focal length real-time position difference and a total difference, and compensation is carried out by subtraction and addition for near-focus and far-focus defects respectively. The uniform radiation scene is constructed by a blackbody radiation source or a uniform diffuse reflection plate, and time sequence reconstruction relates to cache and frame synchronization processing. The method improves the quality of the infrared image by means of software, reduces the cost, shortens the period, and is suitable for various imaging devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of infrared video / image information processing, and particularly to a method, device and readable storage medium for repairing imaging defects of infrared lenses, which are applicable to various imaging devices. Background Art

[0002] In modern infrared imaging devices, due to limitations in optical lens design or processing technology, imaging defects often occur in practical applications. For example, large-aperture infrared optical lenses are prone to introducing distortion problems such as uneven "light spots" or "ghost images" (as shown in Figure 1 ). These imaging defects will seriously affect the image quality. Especially when the lens focal length is at the near-focus or far-focus position, different degrees of imaging interference will occur at different focal length positions (as shown in Figure 2 Figure (b) to Figure 2 Figure (d)). To solve this problem, the traditional method is usually to redesign and process the lens, but this method will lead to a sharp increase in project costs and cause greater losses to the enterprise's human and material resources.

[0003] In addition, with the wide application of infrared imaging technology, the market's demand for low-cost and high-performance imaging devices is increasing day by day. Therefore, how to effectively reduce and even eliminate the influence of lens imaging defects by software means without changing the hardware has become an urgent technical problem to be solved. Summary of the Invention

[0004] Embodiments of the present invention provide a method, device and readable storage medium for repairing imaging defects of infrared lenses, aiming at the problems existing in the current technology that when solving lens imaging defects, it usually relies on redesigning and processing the lens, which not only has high costs but also prolongs the project cycle, and is difficult to meet the requirements of rapid iteration and low costs.

[0005] The core technology of the present invention mainly establishes a linear mathematical relationship between the lens focal length position and the image distortion gradient, obtains the focal length position information in real time and calculates the compensation value, and dynamically compensates the infrared image data, so as to eliminate the imaging interference caused by lens design defects without hardware modification.

[0006] In the first aspect, the present invention provides a method for repairing imaging defects of infrared lenses, and the method includes the following steps: S1. Obtain the focal length position information of the lens defect: Align the device with a uniform radiation scene, and record the focal length position when the imaging interference of the lens starts to appear and the focal length position when the interference is the most serious; S2. Obtain the distortion information of the device image data: At the two focal length positions, record the corresponding image data respectively; S3. Calculate the total information difference: Calculate the difference between the focal length position when the lens imaging interference is the most severe and the focal length position when the imaging interference starts to appear, to obtain the total difference in the focal length position of the lens defect. Calculate the difference between the image data when the imaging interference is the most severe and the image data when the imaging interference starts to appear, to obtain the total difference in image distortion, and store the total difference in the focal length position of the lens defect and the total difference in image distortion; S4. Obtain the real-time position information of the lens focal length: Obtain the current focal length position in real time after the lens imaging interference starts to appear; S5. Calculate the difference in the real-time position information of the lens focal length: Calculate the difference between the current focal length position and the focal length position when the imaging interference starts to appear, to obtain the real-time position difference of the lens focal length; S6. Obtain the real-time image data of the device: Obtain the original image data output by the device in real time, and obtain the input image data through timing reconstruction; S7. Calculate the real-time compensation value: According to the total difference in the focal length position of the lens defect, the total difference in image distortion, and the real-time position difference of the lens focal length, calculate the real-time compensation value of the distorted image data according to the linear mapping relationship; S8. Perform distortion compensation: Apply the real-time compensation value to the input image data to obtain the compensated image data.

[0007] Further, in step S1, obtain the focal length position when the lens imaging interference starts to appear and the focal length position when the interference is the most severe through a potentiometer or an AD chip.

[0008] Further, in step S8, if the lens defect is a long-focus defect, add the real-time compensation value to the input image data; if it is a short-focus defect, subtract the real-time compensation value from the input image data.

[0009] Further, in step S6, the timing reconstruction includes buffering processing and frame synchronization processing of the original image data.

[0010] Further, in step S1, the uniform radiation scene is a scene composed of a blackbody radiation source or a uniform diffuse reflection plate.

[0011] Further, in step S1, the determination condition for the lens imaging interference to start to appear is: Detectable light spots or ghost distortions appear in the image, and the pixel value deviation exceeds a preset threshold.

[0012] Further, in step S7, the linear mapping relationship is: map the ratio of the real-time position difference of the lens focal length to the total difference in the focal length position of the lens defect to the total difference in image distortion to obtain the real-time compensation value.

[0013] In a second aspect, the present invention provides a device for repairing imaging defects of an infrared lens, comprising: A focal length calibration module, configured to obtain the focal length position when the lens imaging interference starts to appear and the focal length position when the interference is most severe; obtain the current focal length position in real time after the lens imaging interference starts to appear; obtain the original image data output by the device in real time, and obtain the input image data through timing reconstruction; An image acquisition module, configured to obtain the image data corresponding to the focal length position when the lens imaging interference starts to appear and the focal length position when the interference is most severe; A data processing module, configured to calculate the difference between the focal length position when the lens imaging interference is most severe and the focal length position when the imaging interference starts to appear, to obtain the total difference of the lens defect focal length position, calculate the difference between the image data when the imaging interference is most severe and the image data when the imaging interference starts to appear, to obtain the total difference of image distortion, and store the total difference of the lens defect focal length position and the total difference of image distortion; calculate the difference between the current focal length position and the focal length position when the imaging interference starts to appear, to obtain the real-time position difference of the lens focal length; calculate the real-time compensation value of the distorted image data according to the total difference of the lens defect focal length position, the total difference of image distortion, and the real-time position difference of the lens focal length according to the linear mapping relationship; A real-time compensation module, which applies the real-time compensation value to the input image data to obtain the compensated image data.

[0014] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned method for repairing imaging defects of an infrared lens.

[0015] In a fourth aspect, the present invention provides a readable storage medium, in which a computer program is stored. The computer program includes program codes for controlling a process to execute the process, and the process includes the above-mentioned method for repairing imaging defects of an infrared lens.

[0016] The main contributions and innovations of the present invention are as follows: 1. Cost and cycle advantages: There is no need to redesign, process, and debug the optical lens with design defects. The imaging defect compensation is directly realized through software algorithms, avoiding the high costs and long development cycles brought by traditional hardware improvement solutions, and effectively reducing the consumption of human and material resources of enterprises.

[0017] 2. Real-time dynamic compensation ability: Based on the linear mathematical relationship between the lens focal length position and the image distortion gradient, the focal length position is obtained in real time and the compensation value is calculated, which can dynamically adapt to the change of the lens focal length, and perform real-time correction on the imaging interference at the near-focus or far-focus position, ensuring that the image quality at different focal lengths is effectively improved.

[0018] 3. Engineering implementation simplicity: By simplifying the calculation model (linear mapping relationship), the complex distortion problem is transformed into quantifiable mathematical operations, without relying on high-precision hardware or complex algorithms, facilitating rapid integration in various imaging devices, and significantly enhancing the engineering practicability and operability of the solution.

[0019] 4. Universality and flexibility: Applicable to various imaging devices such as large-aperture infrared lenses, it can flexibly adjust the compensation strategy (addition / subtraction) by calibrating the focal length positions and corresponding image data of different defect types (near focus / far focus), covering a variety of imaging distortion scenarios, and having a wide range of applications.

[0020] 5. Image quality improvement: By compensating for uneven distortions such as "spot" and "ghost" in real time, the uniformity and clarity of the image are effectively restored. Without hardware modification, the output quality of infrared imaging devices can be significantly improved, providing a more reliable data basis for subsequent applications such as image analysis and recognition.

[0021] In summary, the present invention breaks through the limitation of traditional reliance on hardware improvement, constructs a low-cost, efficient and universal imaging defect repair solution through software real-time compensation, and provides a new engineering solution idea for lens imaging problems.

[0022] Details of one or more embodiments of the present invention are set forth in the following drawings and description to make other features, objects, and advantages of the present invention more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present invention, form a part of the present invention, and the illustrative embodiments and descriptions thereof are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 When facing the uniform surface, it is a typical effect diagram of the interference of lens design defects on the imaging effect.

[0024] Figure 2 In the present invention, it is a comparison diagram of the interference of lens design defects on the imaging effect, where Figure 2 (a) is the imaging effect of a defect-free lens, Figure 2 (b) ~ Figure 2 (d) are defective lenses with imaging interference effect diagrams of different degrees; Figure 3 In the present invention, it is a statistical analysis result diagram of common lens defects, where Figure 3 (a), Figure 3 (b) are two cases of near-focus defects; Figure 3 (c), Figure 3(d) shows two cases of telephoto defects; Figure 4 is a flowchart of a method for repairing imaging defects of an infrared lens according to an embodiment of the present invention; Figure 5 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed implementation manners

[0025] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. On the contrary, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0026] It should be noted that: In other embodiments, the steps of the corresponding methods are not necessarily executed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or fewer than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step for description in other embodiments.

[0027] Next, taking Figure 3 the typical telephoto defect situation shown in (d) as a specific example, the technical solution of the present invention will be further described.

[0028] Embodiment 1 The present invention aims to propose a method for repairing imaging defects of an infrared lens. Through mathematical modeling and real-time compensation, a software solution with low cost and high dynamics is used to replace traditional hardware improvements, saving enterprise resources significantly while ensuring imaging quality, providing an innovative engineering idea for repairing optical lens defects.

[0029] Specifically, an embodiment of the present invention provides a method for repairing imaging defects of an infrared lens. Specifically, referring to Figure 4 , the method includes the following steps: S1. Obtain the focal length position information of the lens defect: Align the device with a uniformly radiating scene, and record the position information of the lens focal length when the imaging interference starts to appear and when the interference is the most severe and ; The specific implementation process is as follows: Align the device with a uniform radiation scene. After the device is powered on, control the lens to adjust the focal length over the full range. When the imaging interference starts to appear and is at its most severe, obtain the position information of the focal length of the lens under the corresponding conditions through a potentiometer. and , and record it. For example, the lens is equipped with a potentiometer (resolution 0.1 mm) to feedback the focal length position, the image sensor is a 320×240 pixel infrared focal plane array, and a 300K blackbody source is used for the uniform radiation scene.

[0030] Preferably, the determination criteria for "the imaging interference starts to appear" and "the interference is at its most severe" are as follows: Determination of the start of appearance: Identify the abnormal pixel value area through an image detection algorithm. When there are spots or ghosts in the image with a local brightness deviation exceeding a preset threshold (such as 5% of the global mean) and they appear stably for 3 consecutive frames, it is determined that the interference starts to appear. Determination of the most severe state: As the focal length changes, when the pixel value deviation in the distorted area of the image reaches the peak (such as exceeding 20% of the global mean) or the coverage area is the largest, it is determined that the interference is at its most severe state.

[0031] S2. Obtain the distortion information of the device image data: Align the device with a uniform radiation scene, and record the image data when the imaging interference starts to appear (i.e., the focal length is at the position) and the image data when the interference is at its most severe (i.e., the focal length is at the position); The specific implementation process is as follows: Align the device with a uniform radiation scene. After the device is powered on, control the lens to adjust the focal length over the full range. When the imaging interference starts to show and is at its most severe, obtain the full-frame image data under the corresponding conditions

[0032] and record it. For example, when scanning from near to far for the focal length, when the potentiometer reading is , a spot (pixel value deviation > 10%) first appears at the image edge; continue scanning to when the coverage area of the spot is the largest (pixel value deviation > 30%), record the corresponding images .

[0033] S3. Obtain the total information difference: Obtain and store the total defect focal length position information difference of the lens and the corresponding total image distortion information difference ; The specific implementation process is as follows: By comparing the position of the lens focal length when the imaging interference is at its most severe with the position of the lens focal length when the imaging interference just starts to appear Perform subtraction operation, ; by subtracting the image data when the imaging interference is the most severe from the image data when the imaging interference just begins to appear for the entire frame, the calculated and respectively represent the difference in the total defective focal length position information of the lens and the corresponding total image distortion information difference.

[0034] S4. Obtain the real-time position information of the lens focal length: Real-time obtain the focal length position information after the imaging interference of the lens begins to appear ; The specific implementation process is as follows: During the normal use of the device, when the lens focal length position is between and , the design defect of the lens will interfere with normal imaging. At this time, the position information of the lens focal length is read in real time through the potentiometer .

[0035] S5. Obtain the real-time position information difference of the lens focal length: Real-time obtain the real-time position information difference of the lens focal length after the imaging interference begins to appear ; The specific implementation process is as follows: During the normal use of the device, subtract the real-time obtained focal length position information after the imaging interference begins to appear from the focal length position information when the imaging interference just begins to appear , and the calculated represents the real-time position information difference of the lens focal length.

[0036] S6. Obtain the real-time image data of the device: Real-time obtain the original image data output by the device and reconstruct the time sequence to obtain new input image data ; The specific implementation process is as follows: Real-time obtain the original image data output by the device, and through cache processing, perform time sequence reconstruction to obtain new input image data .

[0037] In this embodiment, "time sequence reconstruction" refers to performing time series processing on the real-time collected original image data, which specifically includes: Cache processing: Store continuous multiple rows of image data through a FIFO (First In First Out) buffer to avoid misalignment problems caused by data transmission delays; Frame synchronization processing: Based on the synchronization signals of the imaging device (such as VSYNC, HSYNC), timestamp the cached image data to ensure that the input image data and the real-time compensation value of the subsequent calculated distorted image data are strictly synchronized to avoid compensation misalignment.

[0038] S7. Obtain the real-time compensation value: Utilize the difference in focal length position information obtained in real time , and combine it with the total difference in defective focal length position information of the stored lens and the total difference in image distortion information to obtain the real-time compensation value of the distorted image data ; The specific implementation process is as follows: After the device is powered on, the difference in focal length position information obtained in real time is combined with the total difference in defective focal length position information of the stored lens and the total difference in image distortion information , and through mathematical calculation (linear mapping), the real-time compensation value of the distorted image data is obtained , .

[0039] In this embodiment, the specific linear mapping is as follows: Mathematical basis: Through a large number of experimental statistics, it is found that within the defective focal length range ( ≤ ≤ ), the image distortion gradient has an approximately linear relationship with the focal length position (as shown in Figure 3), so a linear interpolation model is adopted:

[0040] where, = ImageData End - ImageDataS tart is the pixel value difference of each pixel point at , focal lengths.

[0041] Scope of application: When the distortion caused by the lens defect shows a monotonic change within the defective focal length range (such as the near-focus defect has increasing distortion as the focal length decreases, and the far-focus defect has increasing distortion as the focal length increases), the linear mapping model is effective; for non-linear distortion scenarios, it can be extended for application through piecewise linearization.

[0042] S8. Perform distortion compensation according to the compensation value: Apply the calculated real-time compensation value of the distorted image data to the input image data for distortion compensation.

[0043] The specific implementation process is as follows: During the normal operation of the device, add the calculated real-time compensation value of the distorted image data to the input image data for distortion compensation: .

[0044] The preferred technical solution of the present invention obtains the lens focal length position information through a potentiometer, or it can also be achieved through other AD chips; the real-time compensation value of the calculated distorted image data and the input image data are added for distortion compensation. A typical case is as shown in Figure 3 (d), or they can be subtracted for distortion compensation. A typical case is as shown in Figure 3 (c). The specific compensation method can be determined by statistically analyzing the correlation between the amount of distortion of the image data and the lens focal length position; when calculating the total defect focal length position information difference and the real-time position information difference of the lens, , , a typical case is as shown in Figure 3 (c) and Figure 3 (d), or it can also be , , a typical case is as shown in Figure 3 (a) and Figure 3 (b).

[0045] In this embodiment, the "uniform radiation scene" mentioned above refers to a scene where the radiation energy is uniformly distributed in space, and it can be specifically constructed in the following ways: Use a blackbody radiation source (such as a constant-temperature blackbody furnace) as the target, whose surface radiation is uniform and the spectrum is stable; Or use a whiteboard with a uniform diffuse reflectance (such as a barium sulfate diffuse reflectance board) in combination with uniform light source illumination to ensure that the incident radiation received by the lens has a consistent response on the pixel plane.

[0046] Function: It is used to calibrate the reference images of the lens when the interference starts to appear and when the interference is the most severe, and to avoid the interference of scene non-uniformity on distortion detection.

[0047] Among them, for the convenience of understanding, the professional terms of the present invention are explained as follows: 1. Infrared lens: An optical lens used for imaging in the infrared band (such as 8 - 14μm long-wave infrared). Due to its large-aperture design, it often causes aberrations (such as spherical aberration and chromatic aberration), introducing distortions such as light spots and ghosts.

[0048] 2. Light spot / ghost: Light spot: A locally over-bright or over-dark area that appears in the image, caused by uneven reflection or refraction on the lens surface; Ghost: A double image formed by multiple reflections between lenses, usually a false image.

[0049] 3. Focal length position: The physical position parameter when the lens is focused. It can be quantified as a numerical value (such as 0 - 1000 scale) through a potentiometer (mechanical feedback) or an AD chip (electrical signal feedback), reflecting the current focusing distance (near focus / far focus) of the lens.

[0050] 4. Near - focus defect: The imaging distortion that occurs when the lens is at a short focal length (close - range focusing), manifested as a spot in the central area or blurring at the edge (such as Figure 3 Figure (a)(b)).

[0051] 5. Far - focus defect: The imaging distortion that occurs when the lens is at a long focal length (long - range focusing), manifested as a spot at the edge or a decrease in central contrast (such as Figure 3 Figure (c)(d)).

[0052] 6. Timing reconstruction: Perform time - series synchronization and caching processing on real - time image data to ensure a one - to - one correspondence between the image frame and the lens focal length position, and avoid compensation misalignment caused by data - processing delay.

[0053] 7. Black - body radiation source: An idealized radiator that can completely absorb and radiate energy. Its radiation spectrum is only related to temperature and is commonly used as a uniform radiation benchmark for infrared device calibration.

[0054] Embodiment 2 Based on the same concept, the present invention also proposes an infrared lens imaging defect repair device, including: A focal length calibration module, used to obtain the focal length position when the lens imaging interference starts to appear and the focal length position when the interference is most severe; obtain the current focal length position in real - time after the lens imaging interference starts to appear; obtain the original image data output by the device in real - time, and obtain the input image data through timing reconstruction; An image acquisition module, used to obtain the image data corresponding to the focal length position when the lens imaging interference starts to appear and the focal length position when the interference is most severe; A data processing module, used to calculate the difference between the focal length position when the lens imaging interference is most severe and the focal length position when the interference starts to appear, to obtain the total difference in the focal length position of the lens defect; calculate the difference between the image data when the interference is most severe and the image data when the interference starts to appear, to obtain the total difference in image distortion, and store the total difference in the focal length position of the lens defect and the total difference in image distortion; calculate the difference between the current focal length position and the focal length position when the interference starts to appear, to obtain the real - time position difference of the lens focal length; calculate the real - time compensation value of the distorted image data according to the total difference in the focal length position of the lens defect, the total difference in image distortion, and the real - time position difference of the lens focal length according to the linear mapping relationship; A real - time compensation module, which applies the real - time compensation value to the input image data to obtain the compensated image data.

[0055] Embodiment 3 This embodiment also provides an electronic device. Refer to Figure 5 , which includes a memory 404 and a processor 402. A computer program is stored in the memory 404, and the processor 402 is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0056] Specifically, the above-mentioned processor 402 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured as one or more integrated circuits implementing the embodiments of the present invention.

[0057] Among them, the memory 404 may include a mass storage 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include removable or non-removable (or fixed) media. In appropriate cases, the memory 404 may be internal or external to the data processing device. In a particular embodiment, the memory 404 is a non-volatile memory. In a particular embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these. In appropriate cases, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0058] The memory 404 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402.

[0059] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the infrared lens imaging defect repair methods in the above embodiments.

[0060] Optionally, the above electronic device may further include a transmission device 406 and an input / output device 408. Among them, the transmission device 406 is connected to the above processor 402, and the input / output device 408 is connected to the above processor 402.

[0061] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above network may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0062] The input / output device 408 is used to input or output information.

[0063] Embodiment 4 This embodiment also provides a readable storage medium, in which a computer program is stored. The computer program includes program codes for controlling a process to execute the process. The process includes the infrared lens imaging defect repair method according to Embodiment 1.

[0064] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.

[0065] Generally, various embodiments can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the present invention can be implemented in hardware, while other aspects can be implemented by firmware or software executed by a controller, a microprocessor, or other computing devices, but the present invention is not limited thereto. Although the various aspects of the present invention can be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, as a non-limiting example, the blocks, devices, systems, technologies, or methods described herein can be implemented in hardware, software, firmware, dedicated circuits or logic, general hardware or a controller, or other computing devices, or some combination thereof.

[0066] Embodiments of the present invention can be implemented by computer software, which can be executed by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. A computer software or program (also referred to as a program product), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product can include one or more computer-executable components configured to execute the embodiments when the program runs. The one or more computer-executable components can be at least one software code or a part thereof. Additionally, in this regard, it should be noted that any box in the logical flow, as Figure 4 shown in [reference], can represent a program step, or interconnected logic circuits, boxes, and functions, or a combination of program steps and logic circuits, boxes, and functions. The software can be stored on physical media such as memory chips or storage blocks implemented within the processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs. The physical media are non-transitory media.

[0067] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope described in this specification.

[0068] The above embodiments merely represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.

Claims

1. A method for repairing infrared lens imaging defects, characterized in that: The following steps are involved: S1. Obtain lens defect focal length position information: Aim the device at a uniformly radiated scene and record the focal position when lens imaging interference begins to appear and the focal position when interference is the most severe; S2. Obtain device image data distortion information: At the two focal length positions, corresponding image data are recorded respectively; S3. Calculate the total information difference: Calculating the difference between the focal position when the imaging interference of the lens is the most serious and the focal position when the imaging interference begins to appear, to obtain the total difference of the focal position of the lens defect, calculating the difference between the image data when the imaging interference is the most serious and the image data when the imaging interference begins to appear, to obtain the total difference of image distortion, and storing the total difference of the focal position of the lens defect and the total difference of image distortion; S4. Get the real-time position information of the lens focal length: Real-time acquisition of the current focal length position after the lens imaging interference begins to appear; S5. Calculate the real-time position information difference of the lens focal length: Calculate the difference between the current focal position and the focal position when imaging interference begins to appear, and obtain the real-time focal position difference of the lens; S6. Obtain real-time image data of the device: The original image data output by the device is acquired in real time, and the input image data is obtained through time series reconstruction; S7, calculate the real-time compensation value: Calculating a real-time compensation value of the distorted image data according to a linear mapping relationship based on the total difference in focal length position of the lens defects, the total difference in image distortion, and the real-time position difference in lens focal length; S8. Perform distortion compensation: The real-time compensation value is applied to the input image data to obtain compensated image data.

2. The method for repairing infrared lens imaging defects according to claim 1, characterized in that: In step S1, the focal position when the lens imaging interference begins to appear and the focal position when the interference is the most serious are obtained through a potentiometer or an AD chip.

3. The method for repairing infrared lens imaging defects according to claim 1, characterized in that: In step S8, if the lens defect is a telefocus defect, the real-time compensation value is added to the input image data; If it is a near-focus defect, the real-time compensation value is subtracted from the input image data.

4. The method for repairing infrared lens imaging defects according to claim 1, characterized in that: In step S6, the time sequence reconstruction includes performing buffering processing and frame synchronization processing on the original image data.

5. The method for repairing infrared lens imaging defects as claimed in claim 1, characterized in that: In step S1, the uniform radiation scene is a scene composed of a black body radiation source or a uniform diffuse reflection plate.

6. The method for repairing infrared lens imaging defects as claimed in claim 5, characterized in that: In step S1, the judgment condition for the lens imaging interference to begin to appear is: Detectable light spots or ghosting distortions appear in the image, and their pixel value deviations exceed a preset threshold.

7. The method for repairing infrared lens imaging defects according to any one of claims 1 to 6, characterized in that: In step S7, the linear mapping relationship is: mapping the ratio of the real-time position difference of the lens focal length to the total difference of the lens defect focal length position to the total difference of the image distortion to obtain a real-time compensation value.

8. An infrared lens imaging defect repair device, characterized in that: include: A focal length calibration module, used to obtain the focal length position when the lens imaging interference begins to appear and the focal length position when the interference is the most serious; The current focal length position after the lens imaging interference begins to appear is obtained in real time; the original image data output by the device is obtained in real time, and the input image data is obtained through time series reconstruction; An image acquisition module is used to obtain image data corresponding to the focal position when the lens imaging interference begins to appear and the focal position when the interference is most serious; A data processing module is used to calculate the difference between the focal position when the imaging interference of the lens is the most serious and the focal position when the imaging interference begins to appear, to obtain the total difference of the focal position of the lens defect, calculate the difference between the image data when the imaging interference is the most serious and the image data when the imaging interference begins to appear, to obtain the total difference of image distortion, and store the total difference of the focal position of the lens defect and the total difference of image distortion; Calculate the difference between the current focal position and the focal position when imaging interference begins to appear, and obtain the real-time focal position difference of the lens; According to the total difference of focal length position of lens defects, the total difference of image distortion and the real-time position difference of lens focal length, a real-time compensation value of distorted image data is calculated according to a linear mapping relationship; The real-time compensation module applies the real-time compensation value to the input image data to obtain compensated image data.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the infrared lens imaging defect repair method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes the infrared lens imaging defect repairing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • PTZ camera field calibration and focus fixing method

    CN108648241A

  • Two-point non-uniformity correction method for infrared thermal image based on scene adaptation

    CN108846805A

  • Ship auxiliary navigation method and system based on infrared video

    CN113450598A

  • FPGA-based infrared image real-time distortion correction method and system

    CN114066759A

  • Geological disaster photography monitoring and early warning method

    CN114067533A