A method and system for measuring lens distortion

By combining template matching algorithm and tilted edge method, the problem of not being able to measure lens distortion and MTF index at the same time is solved, realizing efficient synchronous measurement, simplifying the operation process and reducing costs.

CN116754186BActive Publication Date: 2026-03-17WUHAN GUIDE SENSMART TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-21
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously measure lens distortion and MTF, resulting in time-consuming and labor-intensive measurements that cannot be obtained synchronously.

Method used

By combining template matching algorithm and tilted edge method, the simultaneous measurement of lens distortion and MTF index is achieved through target alignment determination, distortion calculation and MTF value calculation.

Benefits of technology

It enables simultaneous measurement of lens distortion and MTF, saving measurement time, improving efficiency, and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116754186B_ABST
    Figure CN116754186B_ABST
Patent Text Reader

Abstract

A kind of method for measuring lens distortion, comprising: judging whether target is aligned;According to the focal length of lens, the distance between device and target, distortion measurement value is obtained using template matching algorithm;Wherein, target sets crosshair for calculating distortion lens distortion.The present application combines the measurement method of infrared lens distortion and MTF measurement method, and can measure infrared lens distortion and MTF index simultaneously.Compared with prior art, it can be completed simultaneously, and the operation is simple;By measuring MTF value using tilt edge method, different spatial frequency grating target is not needed, and cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of infrared imaging system technology, and in particular to a method and system for measuring lens distortion. Background Technology

[0002] As infrared thermal imaging technology matures, the requirements for imaging quality in thermal imagers are becoming increasingly stringent. Lens distortion, caused by manufacturing inaccuracies and assembly process deviations, leads to image distortion. MTF (Modular Tolerance) reflects image sharpness and is used to assess a lens's ability to reproduce object contrast. Lens distortion and MTF directly reflect the imaging performance of a thermal imager. Existing measurement methods can typically measure lens distortion and MTF separately; however, current technologies cannot simultaneously acquire both. When obtaining both lens distortion and MTF, measurements must be taken twice. Therefore, current technologies for acquiring lens distortion and MTF are not only time-consuming and labor-intensive but also cannot measure both simultaneously. Summary of the Invention

[0003] In view of the above problems, the present invention is proposed to provide a method and system for simultaneously measuring lens distortion and MTF indexes to overcome or at least partially solve the above problems.

[0004] A method for measuring lens distortion includes:

[0005] S100. Determine if the target is aligned;

[0006] S200. Based on the lens focal length and the distance between the device and the target, a template matching algorithm is used to obtain the distortion measurement value; wherein, a crosshair cursor is set on the target to calculate the distortion of the lens.

[0007] Furthermore, S200 also includes: calculating the distortion value of a single crosshair point based on the theoretical distance and actual distance between the center point of the crosshair and the center of the target surface.

[0008] Furthermore, the method for calculating the distortion value of a single crosshair point based on the theoretical and actual distances between the center point of the crosshair and the center of the target surface includes:

[0009] Calculate the theoretical distance between the center point of the crosshair and the center of the target surface based on the lens focal length, object distance, actual target length, and pixel size.

[0010] Using a template matching algorithm, the actual coordinates of the crosshair cursor in the infrared image are calculated, and the actual distance between the center point of the crosshair cursor and the center point of the target surface is calculated based on the actual coordinates.

[0011] Furthermore, S200 also includes: using the average of the absolute values ​​of all crosshair distortion variables as the final distortion measurement value.

[0012] Furthermore, S100 includes:

[0013] S101. After fixing the distance between the device and the target surface, calculate the theoretical values ​​of the slope and offset of the two perpendicular sides of the central square of the target surface;

[0014] S102. Perform line detection on the thermal imager image and calculate the actual values ​​of the slope and offset of the two perpendicular sides of the square in the image;

[0015] S103. Determine whether the target is close enough based on the difference between the theoretical and actual values ​​of the slope and offset. If the difference between the theoretical and actual values ​​is less than a preset threshold, the target is aligned. If the difference between the theoretical and actual values ​​is greater than the preset threshold, the target is not aligned.

[0016] Further, the specific method of S102 is as follows: acquire the infrared image of the target from the thermal imager, perform threshold segmentation on the infrared image to separate the foreground and background, extract the edges of the two vertical sides of the central square of the target surface, and use the edge points to calculate the actual values ​​of slope and offset.

[0017] Furthermore, the method for calculating the actual distance between the center point of the crosshair and the center point of the target surface based on the actual coordinates is as follows: establish coordinate axes, use template matching algorithm to calculate the actual coordinates of the crosshair in the infrared image, and if the coordinates of the center point of the image are known, then the actual distance is the spatial distance between the actual coordinates and the coordinates of the center point.

[0018] Furthermore, in S203, the distortion value of a single crosshair cursor point is calculated as follows: the actual distance between the center point of the crosshair cursor and the center of the target surface is subtracted from the theoretical distance, and the difference is calculated as a percentage of the theoretical distance to obtain the distortion value of a single crosshair cursor point.

[0019] This invention also discloses a method for simultaneously measuring lens distortion and MTF index, comprising: the method for measuring lens distortion, and further comprising:

[0020] S300. Calculate the MTF value using the tilted edge method, wherein a tilted square target is set in the target to calculate the MTF index.

[0021] The present invention also discloses a system for measuring lens distortion, comprising:

[0022] Target alignment determination module, distortion calculation module; among which:

[0023] The target alignment determination module is used to determine whether the target is aligned and to align the center of the infrared thermal imager with the center of the target.

[0024] The distortion calculation module is used to obtain distortion measurement values ​​based on the lens focal length, the distance between the device and the target, and a template matching algorithm.

[0025] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:

[0026] This invention discloses a method and system for measuring lens distortion, which combines infrared lens distortion measurement methods with MTF measurement methods, enabling simultaneous measurement of both infrared lens distortion and MTF parameters. Compared to existing technologies, this method can simultaneously perform distortion and MTF measurements, saving measurement time and improving measurement efficiency; the entire testing process only requires target alignment, simplifying operation; and the use of the tilted edge method to measure MTF values ​​eliminates the need for grating targets with different spatial frequencies, saving costs.

[0027] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0028] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0029] Figure 1 This is a flowchart of a method for simultaneously measuring lens distortion and MTF index in Embodiment 1 of the present invention;

[0030] Figure 2 This is a schematic diagram of the target in Embodiment 1 of the present invention;

[0031] Figure 3 This is a schematic diagram of distortion measurement in Embodiment 1 of the present invention;

[0032] Figure 4 This is a flowchart illustrating step S100 in Embodiment 1 of the present invention.

[0033] Figure 5 This is a flowchart illustrating step S200 in Embodiment 2 of the present invention.

[0034] Figure 6 This is a flowchart of step S300 in Embodiment 2 of the present invention. Detailed Implementation

[0035] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0036] To address the problem that distortion and MTF indicators cannot be obtained simultaneously in existing technologies, embodiments of the present invention provide a method and system for simultaneously measuring lens distortion and MTF indicators.

[0037] Example 1

[0038] This embodiment discloses a method for simultaneously measuring lens distortion and MTF (Mean Transformer Factor) index, such as... Figure 1 ,include:

[0039] S100. Determine if the target is aligned. Align the center of the infrared thermal imager with the center of the target and use the two vertical sides of the central square to determine if the target is aligned.

[0040] Specifically, the targets for distortion testing and MTF testing are as follows: Figure 2 As shown, the black area in the target is the cutout portion, and the white area is the baffle. A blackbody is placed in the cutout black area, and the blackbody temperature is set to 55℃, which is higher than the temperature of the white baffle area. The four tilted square targets in the target are used to calculate the MTF index, and C1, C2, C3, and C4 are used to calculate the distortion of the lens.

[0041] Before measuring distortion, the center of the infrared thermal imager must be aligned with the center of the target. Use the two perpendicular sides A1 and A2 of the central square to determine if the target is aligned.

[0042] In this embodiment, S100 specifically includes:

[0043] S101. After fixing the distance between the device and the target surface, calculate the theoretical values ​​of the slope and offset of the two perpendicular sides of the central square. Specifically, such as... Figure 2 Establish a coordinate system with the top left corner as the origin, the positive x-axis pointing horizontally to the right, and the positive y-axis pointing vertically downwards. Based on the target design values, the theoretical coordinates of the four corners of the central rectangle can be determined. From these theoretical coordinates, the slopes and offsets of the two hypotenuses, A1 and A2, can be calculated.

[0044] S102. Perform Hough line detection on the thermal imager image, and calculate the actual values ​​of the slope and offset of the two perpendicular sides of the square in the image; specifically, acquire the infrared image of the target from the thermal imager, and perform threshold segmentation on the infrared image to separate the foreground ( Figure 2 (Bold body area) and background ( Figure 2 (In the white area), Canny edge detection is used to extract the edges of A1 and A2, and the actual values ​​of slope and offset are calculated using the edge points.

[0045] S103. Determine whether the target is close enough based on the difference between the theoretical and actual values ​​of the slope and offset. If the difference between the theoretical and actual values ​​is less than a preset threshold, the target is aligned. If the difference between the theoretical and actual values ​​is greater than the preset threshold, the target is not aligned.

[0046] In some preferred embodiments, if the target is not aligned, the tooling device is used to align the target without changing the distance.

[0047] S200. Based on the lens focal length and the distance between the device and the target, a template matching algorithm is used to obtain the distortion measurement value.

[0048] Distortion measurement principle as follows Figure 3 As shown in the figure, gray circles represent theoretically undistorted points, and black circles represent actual distorted points. The distortion value is calculated as follows: the actual distance AD ​​between the center point of the crosshair and the center of the target surface is calculated, and the theoretical distance PD is calculated. The difference is then divided by the theoretical distance as a percentage to obtain the distortion value of a single crosshair point. The closer the theoretical value PD is to the actual value AD, the smaller the distortion measurement value.

[0049] In this embodiment, S200 includes:

[0050] S201. Calculate the theoretical distance between the center point of the crosshair and the center of the target surface based on the lens focal length, object distance, actual target length, and pixel size. Specifically, assuming the lens focal length is λ, the object distance is d, the actual target length is l, and the pixel size is σ, the theoretical distance PD is the product of the lens focal length λ and the actual target length l divided by the product of the object distance d and the pixel size σ.

[0051] S202. Using a template matching algorithm, calculate the actual coordinates of the crosshair cursor in the infrared image, and then calculate the actual distance between the center point of the crosshair cursor and the center point of the target surface based on the actual coordinates. Specifically, the method for calculating the actual distance between the center point of the crosshair cursor and the center point of the target surface is as follows: establish a coordinate axis with the upper left corner as the origin, the horizontal direction to the right as the positive x-axis, and the vertical direction downward as the positive y-axis. Use the template matching algorithm to calculate the actual coordinates of the crosshair cursor in the infrared image. Given the coordinates of the image center point, the actual distance is the spatial distance between the actual coordinates and the center point coordinates.

[0052] S203. Calculate the distortion value of a single crosshair point based on the theoretical and actual distances between the center point of the crosshair and the center of the target surface. The method for calculating the distortion value has been introduced in the principle of distortion measurement. The distortion value of a single crosshair point can be calculated based on the theoretical and actual distances between the center point of the crosshair and the center of the target surface.

[0053] S204. Use the average of the absolute values ​​of all crosshair distortion variables as the final distortion measurement value.

[0054] S300. Calculate MTF values ​​using the slanted edge method. The slanted edge method for calculating MTF is characterized by its simplicity and ease of operation. It eliminates the need to photograph grating targets of different spatial frequencies; a single black and white slanted edge (blade edge) is sufficient to calculate values ​​approximately equal to all spatial frequencies.

[0055] In this embodiment, S300 includes:

[0056] S301. Oversample the hypotenuse region to obtain a black-and-white transform edge spread function;

[0057] S302. The line diffusion function is obtained by differentiating the edge diffusion function;

[0058] S303. Perform a fast Fourier transform on the line spread function to obtain the spatial frequency domain response values ​​at each frequency.

[0059] Theoretically, the MTF measurement value is highest in the center of the image and lower around the edges. Since the MTF values ​​differ across regions, the MTF values ​​are calculated using the hypotenuses of ten different regions in the infrared image, such as... Figure 2 As shown, the MTF value is calculated by taking ten hypotenuses, B1-B8, A1, and A2.

[0060] The MTF (Mean Transformation Factor) metric measures the sharpness of an image. The higher the MTF value, the sharper the image, meaning the clearer it is.

[0061] This embodiment discloses a method for simultaneously measuring lens distortion and MTF (Mean Transmission Factor) parameters. It combines infrared lens distortion measurement methods with MTF measurement methods, enabling simultaneous measurement of both infrared lens distortion and MTF parameters. Compared to existing technologies, this method can simultaneously perform distortion and MTF measurements, saving measurement time and improving efficiency. The entire testing process only requires target alignment, simplifying operation. Furthermore, by measuring MTF values ​​using the tilted edge method, it eliminates the need for grating targets with different spatial frequencies, saving costs.

[0062] Example 2

[0063] This embodiment also discloses a system for simultaneously measuring lens distortion and MTF index, including:

[0064] Target alignment determination module, distortion calculation module, MTF value calculation module; among which:

[0065] The target alignment determination module is used to determine whether the target is aligned. The center of the infrared thermal imager is aligned with the center of the target, and the two vertical sides of the central square are used to determine whether the target is aligned.

[0066] Specifically, the target alignment determination module works as follows: S101. After fixing the distance between the device and the target surface, calculate the slope and theoretical value of the offset of the two perpendicular sides of the central square;

[0067] S102. Perform Hough line detection on the thermal imager image and calculate the actual values ​​of the slope and offset of the two perpendicular sides of the square in the image;

[0068] S103. Determine whether the target is close enough based on the difference between the theoretical and actual values ​​of the slope and offset. If the difference between the theoretical and actual values ​​is less than a preset threshold, the target is aligned. If the difference between the theoretical and actual values ​​is greater than the preset threshold, the target is not aligned.

[0069] The distortion calculation module is used to obtain distortion measurement values ​​based on the lens focal length, the distance between the device and the target, and a template matching algorithm.

[0070] Specifically, the distortion calculation module works as follows: S201. Calculate the theoretical distance between the center point of the crosshair and the center of the target surface based on the lens focal length, object distance, actual target length, and pixel size;

[0071] S202. Using a template matching algorithm, calculate the actual coordinates of the crosshair cursor in the infrared image, and convert the actual distance between the center point of the crosshair cursor and the center point of the target surface based on the actual coordinates.

[0072] S203. Calculate the distortion value of a single crosshair point based on the theoretical and actual distances between the center point of the crosshair and the center of the target surface;

[0073] S204. Use the average of the absolute values ​​of all crosshair distortion variables as the final distortion measurement value.

[0074] The MTF value calculation module is used to calculate the MTF value using the slanted edge method. Specifically, the MTF value calculation module works as follows:

[0075] S301. Oversample the hypotenuse region to obtain a black-and-white transform edge spread function;

[0076] S302. The line diffusion function is obtained by differentiating the edge diffusion function;

[0077] S303. Perform a fast Fourier transform on the line spread function to obtain the spatial frequency domain response values ​​at each frequency.

[0078] This embodiment discloses a system for simultaneously measuring lens distortion and MTF (Mean Transmission Factor) parameters. It combines infrared lens distortion measurement methods with MTF measurement methods, enabling simultaneous measurement of both infrared lens distortion and MTF parameters. Compared to existing technologies, it can simultaneously perform distortion and MTF measurements, saving measurement time and improving measurement efficiency. The entire testing process only requires target alignment, simplifying operation. Furthermore, by measuring MTF values ​​using the tilted edge method, it eliminates the need for grating targets with different spatial frequencies, saving costs.

[0079] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.

[0080] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, with each claim representing a separate preferred embodiment of the invention.

[0081] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.

[0082] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.

[0083] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.

[0084] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."

Claims

1. A method of measuring lens distortion, characterized by, The method comprises the following steps: S100. judging whether the target is aligned; S100 comprises: S101. calculating the slope and offset of two vertical sides of the center square of the target surface after fixing the distance between the device and the target surface; S102. performing straight line detection on the thermal imager picture to calculate the actual slope and offset of two vertical sides of the center square in the picture; S103. judging whether the target is close enough according to the difference between the theoretical value and the actual value of the slope and offset, if the difference is less than a preset threshold, the target is aligned, if the difference is greater than the preset threshold, the target is not aligned; S200. obtaining a distortion measurement value by using a template matching algorithm according to the focal length of the lens and the distance between the device and the target, wherein the target is provided with a crosshair for calculating the distortion of the lens.

2. A method of measuring lens distortion as claimed in claim 1, wherein, The S200 further comprises: calculating the distortion value of a single crosshair point according to the theoretical distance and the actual distance between the center point of the crosshair and the center of the target surface.

3. A method of measuring lens distortion as claimed in claim 2, wherein, The method for calculating the distortion value of a single crosshair point according to the theoretical distance and the actual distance between the center point of the crosshair and the center of the target surface comprises: calculating the theoretical distance between the center point of the crosshair and the center of the target surface according to the focal length of the lens, the object distance, the actual length of the target and the pixel size; calculating the actual coordinates of the crosshair in the infrared image by using the template matching algorithm, and converting the actual distance between the center point of the crosshair and the center point of the target surface according to the actual coordinates.

4. A method of measuring lens distortion as claimed in claim 2, wherein, The S200 further comprises: taking the average value of the absolute values of all crosshair distortion values as the final distortion measurement value.

5. A method of measuring lens distortion as claimed in claim 1, wherein, The specific method of S102 is: obtaining the infrared image of the target from the thermal imager, separating the foreground and the background by threshold segmentation, extracting the edges of two vertical sides of the center square of the target surface, and calculating the actual slope and offset by using the edge points.

6. A method of measuring lens distortion as claimed in claim 3, wherein, The method for converting the actual distance between the center point of the crosshair and the center point of the target surface according to the actual coordinates is: establishing a coordinate axis, calculating the actual coordinates of the crosshair in the infrared image by using the template matching algorithm, and knowing the center point coordinate of the image, so the actual distance is the spatial distance between the actual coordinates and the center point coordinate.

7. A method of measuring lens distortion as claimed in claim 3, wherein, The method for calculating the distortion value of a single crosshair point is: subtracting the actual distance from the theoretical distance between the center point of the crosshair and the center of the target surface, and calculating the percentage of the difference value to the theoretical distance to obtain the distortion value of a single crosshair point.

8. A method of simultaneously measuring lens distortion and MTF metrics, the method comprising: The method for measuring the lens distortion according to any one of claims 1-7 further comprises: S300. calculating the MTF value by using the inclined edge method, wherein an inclined square is arranged in the target for calculating the MTF index. The method for measuring the lens distortion according to any one of claims 1-7 further comprises:

9. A system for measuring lens distortion, the system comprising: The target alignment judgment module is used for judging whether the target is aligned, and the infrared thermal imager center is aligned with the target center; the specific steps comprise: S101. calculating the slope and offset of two vertical sides of the center square of the target surface after fixing the distance between the device and the target surface; S102. performing straight line detection on the thermal imager picture to calculate the actual slope and offset of two vertical sides of the center square in the picture; ​ ​ S103. judging whether the target is close enough according to the difference between the theoretical value and the actual value of the slope and the offset, if the difference is less than a preset threshold, the target is aligned, if the difference is greater than the preset threshold, the target is not aligned; a distortion calculation module, configured to obtain a distortion measurement value by using a template matching algorithm according to a focal length of the lens and a distance between the device and the target.

Citation Information

Patent Citations

  • Optical system distortion measurement method and device

    CN110879136A

  • Single-image distortion detection processing method

    CN111263137A

  • On-vehicle lens integrated measuring equipment

    CN201438143U