Optical distortion determination method and image distortion correction method
By acquiring optical imaging parameters at short distances and using the lens's physical properties to predict long-distance distortion, the spatial and cost issues of AR/VR lens distortion detection are solved, achieving efficient and low-cost distortion correction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU HUAXING YUANCHUANG TECH CO LTD
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies, when determining the distortion of optical lenses at long working distances, are limited by the huge space requirements and high testing costs caused by direct measurement methods, making it difficult to achieve effective correction in the actual operation of AR/VR lenses.
By acquiring the optical imaging parameters of the lens at short distances and establishing the correspondence between the working distance and the amount of image plane movement using the physical characteristics of the lens itself, and combining the optical model to predict distortion information at long distances, the accurate determination and correction of distortion can be achieved.
It breaks through the limitations of physical space, lowers the implementation threshold and cost, and enables the accurate determination and correction of lens distortion in a limited space, making it suitable for optical distortion detection and correction of AR/VR lenses.
Smart Images

Figure CN121962280A_ABST
Abstract
Description
Methods for determining optical distortion and methods for correcting image distortion Technical Field
[0001] This invention relates to the field of optical distortion technology, and more particularly to a method for determining optical distortion and a method for correcting image distortion. Background Technology
[0002] Near-eye display (NED) technology is central to augmented reality (AR) and virtual reality (VR) glasses. To ensure a good user experience, NED lenses used in AR / VR must have extremely low image distortion. However, these lenses typically have a wide field of view, making precise distortion correction a critical challenge that must be addressed.
[0003] Currently, mainstream distortion detection and correction methods rely on camera calibration techniques. This method typically involves placing a checkerboard calibration board of known size at the working distance of the camera lens assembly. By photographing the calibration board, the positions of corner points shifted due to lens distortion are located, and then the transformation matrix used for image geometric correction is calculated. While this method is mature, its effectiveness heavily depends on one prerequisite: the ability to physically simulate the lens's actual working conditions in a laboratory environment.
[0004] However, this very premise becomes a major obstacle to testing AR / VR lenses. To seamlessly integrate with the real world, AR lenses typically project their virtual images at optical distances exceeding a considerable distance (e.g., 8 meters); VR lenses, on the other hand, usually operate at infinity. Traditional methods require placing a calibration plate large enough to cover the lens's entire field of view at a distance of 8 meters or even further. This not only demands an exceptionally large testing space, but also incurs extremely high manufacturing, transportation, and maintenance costs for the calibration plate. Furthermore, ensuring alignment accuracy at such long distances is extremely difficult in practice. Therefore, traditional methods inherently suffer from significant practical difficulties, high economic costs, and even impracticality in certain situations when dealing with the long operating distance characteristics of AR / VR lenses. Summary of the Invention
[0005] One of the objectives of this invention is to provide a method for determining optical distortion, thereby solving the technical problem that existing technologies, when determining the distortion of optical lenses at long working distances, are limited by the huge space requirements and high testing costs caused by direct measurement methods.
[0006] One objective of this invention is to provide a method for determining optical distortion, comprising: acquiring optical imaging parameters of a lens to be corrected at a first working distance, the optical imaging parameters including at least principal ray angle information at multiple object angles and a first actual image height; determining the image plane movement of the lens to be corrected at a second working distance based on the correspondence between the working distance and the image plane movement; wherein the first working distance is less than the second working distance; determining the second actual image height of the lens to be corrected at the second working distance based on the principal ray angle information, the first actual image height, and the image plane movement; and determining the distortion information of the lens to be corrected at the second working distance based on the second actual image height.
[0007] As a further improvement of one embodiment of the present invention, before obtaining the optical imaging parameters of the lens to be corrected at the first working distance, the method further includes: generating test signals at different object angles at the first working distance, and passing the test signals through the lens to be corrected; receiving and parsing the signals formed after passing through the lens to be corrected, and determining the optical imaging parameters.
[0008] As a further improvement of one embodiment of the present invention, before the correspondence between the working distance and the image plane movement of the lens to be corrected, the method further includes: obtaining a plurality of image plane movements corresponding to the imaging of the lens to be corrected at a plurality of first working distances; and determining the correspondence using a fitting method based on the plurality of first working distances and the plurality of image plane movements.
[0009] As a further improvement of one embodiment of the present invention, the step of determining the distortion information of the lens to be corrected at the second working distance based on the second actual image height includes: determining discrete distortion values at multiple object angles based on the second actual image height and the ideal image height corresponding to the first working distance; and determining the distortion information of any pixel in the image field of the lens to be corrected by using a fitting method based on the discrete distortion values corresponding to the multiple object angles.
[0010] As a further improvement of one embodiment of the present invention, the step of determining discrete distortion values at multiple object angles based on the second actual image height and the ideal image height corresponding to the first working distance includes: determining whether the current object angle is zero; if the current object angle is zero, then its distortion value is defined as zero; if the current object angle is non-zero, then the distortion value is equal to the negative number of the ratio of the absolute value of the difference between the ideal image height and the second actual image height to the ideal image height.
[0011] As a further improvement of one embodiment of the present invention, before the second actual image height and the ideal image height corresponding to the first working distance are mentioned, the method further includes: obtaining the effective focal length on the optical axis of the lens to be corrected; determining the corresponding ideal image height based on the effective focal length and the object angle, wherein the ideal image height is equal to the product of the effective focal length and the tangent of the object angle, and the product is inverted.
[0012] As a further improvement of one embodiment of the present invention, the step of determining the distortion information of any pixel in the image field of the lens to be corrected by using a fitting method based on the discrete distortion values corresponding to the plurality of object angles includes: determining the continuous distortion distribution on at least one test diameter by using function fitting based on the plurality of distortion values corresponding to the plurality of object angles; and generating distortion information covering any pixel in the entire image field of the lens to be corrected by using difference calculation based on the continuous distortion distribution.
[0013] As a further improvement of one embodiment of the present invention, the step of generating distortion information covering any pixel in the entire image field of the lens to be corrected by difference calculation based on the continuous distortion distribution includes: obtaining any target pixel in the image field that is not on any test diameter, and determining the two adjacent test diameters on the left and right sides of the target pixel; determining the first angle weight and the second angle weight between the target pixel and the center point of the optical axis of the lens to be corrected and the two test diameters, respectively, based on the line connecting the target pixel and the center point of the optical axis of the lens to be corrected; and performing a weighted operation on the distortion values on the two test diameters based on the first angle weight and the second angle weight to determine the distortion value corresponding to the target pixel.
[0014] As a further improvement of one embodiment of the present invention, determining the second actual image height of the lens to be corrected at the second working distance based on the principal ray angle information, the first actual image height, and the image plane movement includes: determining the image height change based on the principal ray angle information and the image plane movement at the second working distance; the image height change is equal to the product of the image plane movement and the tangent of the principal ray angle information; and determining the second actual image height of the correcting lens at the second working distance based on the sum of the first actual image height and the image height change.
[0015] To achieve one of the above-mentioned objectives, one embodiment of the present invention provides an image distortion correction method. Using the aforementioned determination method, distortion information of the lens to be corrected at a second working distance is obtained; a detection image captured by the lens to be corrected is acquired, and a correction operation is performed on the detection image based on the distortion information. Specifically, the correction operation on the detection image based on the distortion information includes: acquiring a blank target image; traversing the target pixels in the target image; performing reverse coordinate mapping based on the distortion information to determine the coordinates of the corresponding distorted pixel in the detection image; and determining the pixel value of the corresponding target pixel in the target image based on the pixel value of the distorted pixel.
[0016] Compared with existing technologies, the embodiments of the present invention have at least one of the following beneficial effects: The present invention employs a method for determining optical distortion. By acquiring the basic optical imaging parameters of the lens to be corrected at an easily achievable short distance (first working distance), and utilizing a pre-established correspondence between the "working distance and image plane movement" of the lens's physical characteristics, the transformation amount of the image plane at a long distance (second working distance) is determined. Finally, by fusing the short-distance parameters with the predicted image plane movement, the distortion information of the lens in a real-world usage environment is accurately determined. This method, through the combination of short-distance measurement and optical model prediction, successfully overcomes the limitations of physical space, transforming direct measurements that previously had to be performed in a large real-world environment into calculations that can be completed in a limited space. This completely avoids the difficulty of building expensive and cumbersome testing environments, significantly reducing the implementation threshold and cost. Attached Figure Description
[0017] Figure 1 is a schematic diagram of the steps of a method for determining optical distortion according to an embodiment of the present invention.
[0018] Figure 2(a) is a schematic diagram of the test data of the object angle in one embodiment of the present invention.
[0019] Figure 2(b) is a schematic diagram of the test data of the principal ray angle in one embodiment of the present invention.
[0020] Figure 2(c) is a schematic diagram of the test data of the effective focal length in one embodiment of the present invention.
[0021] Figure 3 is a schematic diagram of the steps before step S2 in one embodiment of the present invention.
[0022] Figure 4(a) is a schematic diagram showing the relationship between working distance and corresponding image plane movement in one embodiment of the present invention.
[0023] Figure 4(b) is a schematic diagram of the logarithmic relationship between working distance and corresponding image plane movement in one embodiment of the present invention.
[0024] Figure 5 is a schematic diagram of step S3 in one embodiment of the present invention.
[0025] Figure 6(a) is a schematic diagram of step S4 in one embodiment of the present invention.
[0026] Figure 6(b) is a schematic diagram of the test data of six object angles in one embodiment of the present invention.
[0027] Figure 7(a) is a schematic diagram of step S41 in a specific embodiment of the present invention.
[0028] Figure 7(b) is a schematic diagram of step S42 in a specific embodiment of the present invention.
[0029] Figure 8(a) is a schematic diagram of step S422 in a specific embodiment of the present invention.
[0030] Figure 8(b) is a schematic diagram of the structure of the complete distortion field in one embodiment of the present invention.
[0031] Figure 8(c) is a schematic diagram of test data of distortion information at the second working distance in one embodiment of the present invention.
[0032] Figure 9 is a schematic diagram of the steps of an image distortion correction method according to an embodiment of the present invention.
[0033] Figure 10 is a flowchart illustrating a method for determining optical distortion in one embodiment of the present invention. Detailed Implementation
[0034] The present invention will now be described in detail with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.
[0035] It should be noted that the term "comprising" or any other variations thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the description of specific embodiments of the invention, terms such as "upper," "lower," and "vertical" indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, generally with reference to the device or apparatus in its normal operating state, and do not indicate that the indicated position or element must have a specific orientation. Furthermore, terms such as "first," "second," and "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0036] As shown in Figure 1, one embodiment of the present invention provides a method for determining optical distortion, including but not limited to the following steps.
[0037] Step S1: Obtain the optical imaging parameters of the lens to be corrected at the first working distance. The optical imaging parameters include at least the principal ray angle information at multiple object angles and the first actual image height.
[0038] Step S2: Based on the correspondence between the working distance and the image plane movement of the lens to be corrected, determine the image plane movement at the second working distance; wherein the first working distance is less than the second working distance.
[0039] Step S3: Based on the principal ray angle information, the first actual image height, and the image plane movement, determine the second actual image height of the lens to be corrected at the second working distance.
[0040] Step S4: Based on the second actual image height, determine the distortion information of the lens to be corrected at the second working distance.
[0041] Thus, by acquiring the basic optical imaging parameters of the lens to be corrected at an easily achievable short distance (first working distance), and utilizing the pre-established correspondence between "working distance and image plane movement" of the lens's physical characteristics, the transformation of the image plane at a long distance (second working distance) is determined. Finally, by fusing the short-distance parameters with the predicted image plane movement, the distortion information of the lens in a real-world usage environment is accurately determined. This method, through the combination of short-distance measurement and optical model prediction, successfully overcomes the limitations of physical space, transforming direct measurements that previously had to be performed in a large real-world environment into calculations that can be completed in a limited space. This completely avoids the difficulty of building expensive and cumbersome testing environments, significantly reducing the implementation threshold and cost.
[0042] Optical distortion is an aberration of a lens that can cause the geometry of the image to be distorted. The goal of this invention is to measure and correct this geometric distortion.
[0043] In step S1, the lens to be corrected refers to the lens whose optical performance needs to be analyzed, such as the NED lens of AR / VR glasses.
[0044] Working distance refers to the distance between the lens and the plane of the object it observes. The first working distance is a physically achievable experimental condition used for precise measurement; while the second working distance is a practical application condition that the lens to be corrected is designed to meet but cannot be fully reproduced in the laboratory.
[0045] Specifically, the first working distance is a finite physical distance determined by the mechanical structure of the testing equipment (such as a transducer, on which the lens to be corrected is mounted). During testing, the mechanical scanning mechanism of the transducer controls the target generator or relay system so that the test light is incident at a specific object angle. The actual physical distance between the lens to be corrected and the test pattern (as the "object") emitted by the transducer is defined as the first working distance. This distance is a real, precisely controllable, and measurable laboratory parameter designed to establish a known and controllable experimental environment for the lens.
[0046] The second working distance is the theoretical object distance at which the lens to be corrected needs to operate in its final application scenario (such as an AR / VR near-eye display system). For AR / VR lenses, the corresponding physical working distance needs to be several meters (e.g., 8 meters) or even infinitely far. Due to the limitations of laboratory space, it is impossible to place test targets at such a long real physical distance. Therefore, the second working distance represents a target state that needs to be predicted rather than directly measured.
[0047] This invention acquires precise lens data at a first working distance (short distance, measurable) and utilizes the lens's inherent optical laws (the relationship model between working distance and image plane movement) to calculate and predict its optical performance (distortion information) at a second working distance (long distance, difficult to measure). The first working distance is the input data for measurement, and the second working distance is the theoretical target for prediction.
[0048] In one specific embodiment, the first working distance is 1 meter and the second working distance is 8 meters.
[0049] In addition, optical imaging parameters refer to several physical quantities used to describe lens performance, including at least one of the following: object angle, principal ray angle information (or principal ray angle), and actual image height. The object angle is the angle between the line connecting a point on the object plane to the optical center of the lens to be corrected and the optical axis of the lens. This object angle is a known, controlled test condition and can be measured using a transfer function, as shown in Figure 2(a).
[0050] The chief ray angle information refers to the chief ray angle (CRA), which is the angle between the chief ray that passes through the center of the lens to be corrected and the optical axis of the lens.
[0051] The actual image height refers to the straight-line distance of a point object from the center of the image (optical axis) on the photosensitive surface of the image sensor (such as a CMOS or CCD chip) after it is imaged by the lens to be corrected.
[0052] In one embodiment, prior to step S1, the method further includes the following steps.
[0053] Step P11: At the first working distance, a test signal is generated at different object angles, and the test signal is passed through the lens to be corrected.
[0054] Step P12: Receive and analyze the signal formed after passing through the lens to be corrected to determine the optical imaging parameters.
[0055] In this way, by controlling the object angle to establish clear and independent initial conditions for each measurement, other interference factors are eliminated, the actual optical response of the lens to be corrected to the input signal is received and analyzed, thereby extracting the imaging parameters determined by the lens's own physical characteristics, ensuring the completeness and consistency of the obtained data in terms of physical principles.
[0056] In this embodiment, each set of acquired parameters is bound to its specific object angle, thus fully recording the optical characteristics of the lens to be corrected in this state. Specifically, by controlling the mechanical structure of the transducer, the test light is incident on the lens to be corrected at specific, known object angles (such as 30°). After passing through the lens, the transducer's detection system analyzes the light path and measures the actual incident angle of the principal ray on the sensor, i.e., the principal ray angle, as shown in Figure 2(b).
[0057] Simultaneously, the detection system also determines the position of the light spot formed by the beam on the sensor, and the distance from this position to the center of the sensor is the actual image height. The first actual image height is the "actual image height" directly measured at the first working distance (short working distance), and it is a known measurement value. The second actual image height is the "actual image height" predicted at the second working distance (long working distance), and it is an unknown predicted target value, a calculated result.
[0058] In step S2, the image plane movement refers to the distance that the camera sensor (imaging plane) needs to move backward in order to achieve a clear image when the working distance of the lens changes from parallel light (infinity) to a finite distance.
[0059] In one embodiment, the image plane movement is equal to the difference between the image plane position at a finite distance and the image plane position at infinity.
[0060] As shown in Figure 3, in one embodiment, before the correspondence between the working distance of the lens to be corrected and the image plane movement in step S2, the method further includes the following steps.
[0061] Step P21: Obtain several image plane movement amounts corresponding to the imaging of the lens to be corrected at several first working distances.
[0062] Step P22: Based on the plurality of first working distances and the plurality of image plane movement amounts, a fitting method is used to determine the correspondence.
[0063] In this way, by extracting an optical model that can continuously and accurately predict the positional behavior of the lens from discrete and limited measured data, the unique characteristics of the lens are transformed into a computable model, reducing the difficulty of measurement.
[0064] In one specific embodiment, the correspondence is a logarithmic linear relationship.
[0065] For ease of understanding, for example, several image plane movement amounts Δx are collected using a transfer instrument at first working distances D of 500mm, 1000mm, 2000mm, 3000mm and 4000mm, and the logarithmic values of the first working distance D and the image plane movement amount Δx are calculated respectively, as shown in Table 1 below.
[0066] Table 1
[0067] Based on the multiple sets of values recorded in Table 1, the logarithm of the first working distance for several sets was calculated. 10 D and the logarithm of the corresponding image plane shift (log) 10 Linear fitting is performed on Δx, log 10 D and log 10 Δx must at least satisfy: log 10 Δx=K*log 10 D+B, where K and B are fitting coefficients. The corresponding fitting relationships are shown in Figure 4(a) and Figure 4(b).
[0068] As shown in Figure 5, in one embodiment, step S3 may specifically include the following steps.
[0069] Step S31: Based on the principal ray angle information and the image plane movement at the second working distance, determine the image height change; the image height change is equal to the product of the image plane movement and the tangent of the principal ray angle information.
[0070] Step S32: Determine the second actual image height of the corrective lens at the second working distance based on the sum of the first actual image height and the image height change.
[0071] Thus, by decomposing and quantifying the response of a complex optical system into a sum of measurable and computable geometric components, high accuracy and precision in prediction are achieved.
[0072] In step S31, the image height change is a physical offset, which refers to the change in position of the imaging spot of a specific object point on the image plane when the image plane of the optical lens moves due to the change in working distance.
[0073] For example, the height of the first actual image is defined as... If the image plane movement at the second working distance is Δx and the principal ray angle information is CRA, then the second actual image height... At least the following conditions must be met:
[0074] As shown in Figure 6(a), in one embodiment, step S4 may specifically include the following steps.
[0075] Step S41: Based on the second actual image height and the ideal image height corresponding to the first working distance, determine the discrete distortion values at multiple object angles.
[0076] Step S42: Based on the discrete distortion values corresponding to the multiple object angles, a fitting method is used to determine the distortion information of any pixel in the image field of the lens to be corrected.
[0077] In this way, by discretely "sampling" the local characteristics of the lens, its overall imaging performance can be continuously and comprehensively "described", ultimately constructing a "distortion map" that allows precise navigation for each pixel, thereby enabling accurate prediction of the distortion value of any pixel.
[0078] In step S41, the ideal image height is a theoretically calculated value. It refers to the theoretically calculated distance from the image formed by an object point to the center of the image plane (optical axis) in an ideal optical system without any geometric distortion.
[0079] In one specific embodiment, prior to step S41, the method further includes the following steps.
[0080] Step P41: Obtain the effective focal length on the optical axis of the lens to be corrected; Step P42: Based on the effective focal length and the object angle, determine the corresponding ideal image height, where the ideal image height is equal to the product of the effective focal length and the tangent of the object angle, and the product is inverted.
[0081] Thus, based on an ideal optical model, an objective geometric reference benchmark is established for each measured field of view point, independent of the specific working distance, thereby providing a benchmark for quantifying the imaging deviation of real lenses.
[0082] In step P41, the effective focal length refers to the magnification factor of the image formed by the lens to be corrected when ideally imaging an object at infinity. In this invention, the effective focal length can be measured by a transfer function, as shown in Figure 2(c).
[0083] For example, the height of the ideal image is defined as... The object angle is The effective focal length is Then the ideal image is high At least the following conditions must be met:
[0084] In this embodiment, the effective focal length is the reference magnification in the ideal optical model, which determines how large an image of an object will be on the image plane under ideal conditions. It is a constant characterizing the inherent capability of the lens to be corrected.
[0085] In this invention, the object angle This refers to multiple specific object angle test values measured by controlling the transfer instrument. These are coordinate points for sampling and testing the lens field of view. For example, the object angles to be measured can be 0° (optical axis), 30°, 60°, 90°, 120°, and 150°, as shown in Figure 6(b).
[0086] The distortion value is used to quantify the relative deviation rate of the actual imaging position from the ideal imaging position, that is, the degree to which "reality" deviates from "ideal".
[0087] As shown in Figure 7(a), in one specific embodiment, step S41 may specifically include the following steps.
[0088] Step S411: Determine whether the current object angle is zero.
[0089] Step S412: If the current object angle is zero, then its distortion value is defined as zero.
[0090] Step S413: If the current object angle is non-zero, then the distortion value is equal to the negative of the ratio of the absolute value of the difference between the ideal image height and the second actual image height to the ideal image height.
[0091] In this way, an abstract optical problem can be transformed into a series of deterministic data that can be calculated, compared, and directly used for subsequent correction, thus completing the precise conversion from physical phenomena to digital information.
[0092] For example, let's define the distortion value of a pixel as Dis, and the ideal image height as... The second actual image height is Then the distortion value Dis must satisfy at least:
[0093] In this embodiment, for an image point with an object angle of 0, its distortion value is defined as 0, and this is used as the benchmark for calculating the distortion values of all non-zero object angle image points.
[0094] As shown in Figure 7(b), in one specific embodiment, step S42 may specifically include the following steps.
[0095] Step S421: Based on multiple distortion values corresponding to multiple object angles, a function fitting method is used to determine the continuous distortion distribution on at least one test diameter.
[0096] Step S422: Based on the continuous distortion distribution, difference calculation is used to generate distortion information covering any pixel in the entire image field of the lens to be corrected.
[0097] In this way, it is possible to achieve complete information reconstruction from finite samples to infinite image points, providing a data foundation for subsequent geometric correction with pixel-level precision.
[0098] In step S421, the test diameter refers to a straight line drawn along a specific angle within the image field (imaging area) of the lens, with the image center (optical axis) as the origin. For example, the 0° test diameter is the vertical center line of the image (from top to bottom); the 90° test diameter is the horizontal center line (from left to right), as shown in Figure 6(b). The entire image field refers to the two-dimensional region formed by all effective pixels in the image imaging area.
[0099] In this embodiment, based on the discrete distortion values of several test points (corresponding to different image heights and object angles), a mathematical function (such as a quadratic polynomial) is used for fitting to determine a curve formula that can describe the smooth and continuous change of distortion values with image height on that diameter. This means that a continuous function representing a "line" is generated based on discrete data of "points".
[0100] After obtaining the distortion distribution functions for multiple test diameters, the distortion value of any pixel in the image field that is not on a test diameter can be determined by interpolation. By performing this interpolation calculation on each pixel in the two-dimensional image field, a global distortion field covering the entire surface can be generated from the continuous function of the "line".
[0101] As shown in Figure 8(a), in one specific embodiment, step S422 may specifically include the following steps.
[0102] Step S4221: Obtain any target pixel in the image field that is not on any test diameter, and determine the two test diameters adjacent to the target pixel.
[0103] Step S4222: Based on the line connecting the target pixel and the center point of the optical axis of the lens to be corrected, determine the first angle weight and the second angle weight between the target pixel and the two test diameters on the left and right sides.
[0104] Step S4223: Based on the first included angle weight and the second included angle weight, perform a weighted operation on the distortion values on the left and right test diameters to determine the distortion value corresponding to the target pixel.
[0105] In this way, based on the inherent angular continuity of the lens distortion field, appropriate distortion values can be assigned to pixels at any position in the image field, thereby achieving seamless coverage from discrete measurement directions to a continuous two-dimensional image field.
[0106] For example, in acquiring several second actual image heights Then, the quadratic polynomial shown in the following formula (4) is used for fitting to generate multiple corresponding test diameters.
[0107]
[0108] Where A, B, and C are fitting coefficients, which can be obtained by fitting multiple sets of test data. For any pixel on the test diameter, calculate its actual image height to the image center, and substitute it into formula (4) to determine the distortion value of that pixel, thereby obtaining the distortion distribution of all pixels on the entire test diameter.
[0109] It should be noted that due to mechanical adjustment limitations, the center pixel of the image sensor may not coincide with the theoretical optical axis center of the lens. Therefore, before calculating the actual image height, optical center calibration must be performed, and the obtained optical axis center pixel coordinates are used as the new origin in the calculation to ensure that the reference for all image height values is correct.
[0110] As shown in Figure 8(b), following the above process, the distortion values of all pixels on the six angular diameters of 0°, 30°, 60°, 90°, 120°, and 150° can be calculated sequentially to construct the distortion distribution skeleton of the entire image field. For any target pixel not on these six diameters, the following formula (5) is used to perform interpolation calculations based on the distortion information on the nearest test diameters on both sides.
[0111]
[0112] Where Dis is the distortion value of any target pixel not on any test diameter, Dis1 is the distortion value of the pixel corresponding to a 150° test diameter, and Dis2 is the distortion value of the pixel corresponding to a 0° test diameter. and It is the corresponding included angle.
[0113] Specifically, the weight of the target pixel is determined based on the angle between its direction and the test diameters on both sides. The distortion values of pixels at the same image height on both sides of the diameter are then weighted and summed to obtain the distortion value of the target pixel itself. By performing this operation on all pixels in the entire image field, a complete distortion field (i.e., distortion information) covering the entire field and usable for subsequent pixel-by-pixel geometric correction can be generated, as shown in Figure 8(c).
[0114] As shown in Figure 9, one embodiment of the present invention provides an image distortion correction method, including but not limited to the following steps.
[0115] Step M1: Using the optical distortion determination method, obtain the distortion information of the lens to be corrected at the second working distance.
[0116] Step M2: Acquire the detection image captured by the lens to be corrected, and perform a correction operation on the detection image based on the distortion information.
[0117] In this way, abstract distortion information is transformed into image quality improvement that can be intuitively verified and has practical value, achieving end-to-end correction of imaging defects in long working distance lenses.
[0118] In one embodiment, step M2 may specifically include the following steps.
[0119] Step M21: Obtain a blank target image, traverse the target pixels in the target image, perform reverse coordinate mapping based on the distortion information, and determine the coordinates of the corresponding distorted pixel in the detection image; Step M22: Determine the pixel value of the corresponding target pixel in the target image based on the pixel value of the distorted pixel.
[0120] In this way, by tracing back from the "target" to the "source" in reverse thinking, we can ensure that the information of each pixel in the corrected image comes from the most accurate position in the original image, thereby reconstructing an image that conforms to the ideal geometric shape.
[0121] In this embodiment, lens distortion is a forward process of mapping ideal scene coordinates to distorted image sensor coordinates. The reverse coordinate mapping in step M21 is to take the expected ideal pixel coordinates (target pixel) on the corrected image (target image) as input, use the established distortion information as a reference, and reversely calculate the source coordinates that the ideal point actually corresponds to in the original distorted image (detection image).
[0122] The various embodiments, examples, or specific examples provided by this invention can be combined with each other to ultimately form multiple better embodiments.
[0123] Figure 10 shows a flowchart of the determination method of the present invention in a preferred embodiment. The working process of the optical distortion determination method is described below with reference to Figure 10.
[0124] First, a short-distance measurement is performed on the lens to be corrected using a transfer instrument to obtain its basic optical parameters at different object angles.
[0125] Secondly, based on the design or calibration data of the lens to be corrected, a definite relationship between the working distance and the image plane movement is fitted and determined, and the image plane movement Δx at the target long working distance (e.g., 8 meters) is calculated.
[0126] Next, based on short-distance measurement data and the predicted image plane movement Δx, combined with the principal ray angle information, the actual image height of each test point under long working distance is determined, and compared with the ideal image height to determine a series of discrete distortion values.
[0127] Finally, based on discrete distortion values, function fitting is performed to determine the distortion values of the test diameter corresponding to several object angles. Then, the distortion information of the entire image field is determined by interpolation. This distortion information is then used to correct the detection image captured by the lens to be corrected, so as to eliminate geometric deformation.
[0128] In summary, the present invention provides a method for determining optical distortion and a method for correcting image distortion. This method acquires the basic optical imaging parameters of the lens to be corrected at an easily achievable short distance (first working distance), and uses a pre-established correspondence between the working distance and image plane movement based on the lens's physical characteristics to determine the image plane transformation at a long distance (second working distance). Finally, by fusing the short-distance parameters with the predicted image plane movement, the distortion information of the lens in real-world usage environments is accurately determined.
[0129] This method successfully overcomes the limitations of physical space by combining short-range measurement and optical model prediction. It transforms direct measurement, which previously had to be performed in a large real-world environment, into computation that can be completed in a limited space. This completely avoids the problem of building an expensive and cumbersome testing environment and significantly reduces the implementation threshold and cost.
[0130] In addition, a traceable deterministic prediction model was established to ensure high accuracy and reliability. By constructing a mathematical model (such as a logarithmic linear relationship) from the working distance to the image plane movement, and using the key parameter of the principal ray angle, the image plane movement is accurately converted into image point offset, making the entire prediction chain from short-range data to long-range distortion clear and reliable, and the calculation results are repeatable.
[0131] It should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
[0132] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining optical distortion, characterized in that, include: Obtain the optical imaging parameters of the lens to be corrected at a first working distance. The optical imaging parameters include at least the principal ray angle information at multiple object angles and the first actual image height. Based on the correspondence between the working distance and the image plane movement of the lens to be corrected, the image plane movement at the second working distance is determined; wherein, the first working distance is less than the second working distance; based on the principal ray angle information, the first actual image height and the image plane movement, the second actual image height of the lens to be corrected at the second working distance is determined; Based on the second actual image height, the distortion information of the lens to be corrected at the second working distance is determined.
2. The determination method according to claim 1, characterized in that, Before acquiring the optical imaging parameters of the lens to be corrected at the first working distance, the method further includes: generating test signals at different object angles at the first working distance, and passing the test signals through the lens to be corrected; receiving and parsing the signals formed after passing through the lens to be corrected, and determining the optical imaging parameters.
3. The determination method according to claim 1, characterized in that, Before establishing the correspondence between the working distance and the image plane movement of the lens to be corrected, the method further includes: obtaining several image plane movements corresponding to the imaging of the lens to be corrected at several first working distances; and determining the correspondence using a fitting method based on the several first working distances and the several image plane movements.
4. The determination method according to claim 1, characterized in that, The step of determining the distortion information of the lens to be corrected at the second working distance based on the second actual image height includes: determining discrete distortion values at multiple object angles based on the second actual image height and the ideal image height corresponding to the first working distance; and determining the distortion information of any pixel in the image field of the lens to be corrected using a fitting method based on the discrete distortion values corresponding to the multiple object angles.
5. The determination method according to claim 4, characterized in that, The step of determining discrete distortion values at multiple object angles based on the second actual image height and the ideal image height corresponding to the first working distance includes: determining whether the current object angle is zero; if the current object angle is zero, then defining its distortion value as zero; if the current object angle is non-zero, then the distortion value is equal to the negative number of the ratio of the absolute value of the difference between the ideal image height and the second actual image height to the ideal image height.
6. The determination method according to claim 4, characterized in that, Before the second actual image height and the ideal image height corresponding to the first working distance, the method further includes: obtaining the effective focal length on the optical axis of the lens to be corrected; determining the corresponding ideal image height based on the effective focal length and the object angle, wherein the ideal image height is equal to the product of the effective focal length and the tangent of the object angle, and the product is inverted.
7. The determination method according to claim 4, characterized in that, The step of determining the distortion information of any pixel in the image field of the lens to be corrected by using a fitting method based on the discrete distortion values corresponding to the multiple object angles includes: determining the continuous distortion distribution on at least one test diameter by using function fitting based on the multiple distortion values corresponding to the multiple object angles; and generating distortion information covering any pixel in the entire image field of the lens to be corrected by using difference calculation based on the continuous distortion distribution.
8. The determination method according to claim 7, characterized in that, The step of generating distortion information covering any pixel in the entire image field of the lens to be corrected by using difference calculation based on the continuous distortion distribution includes: acquiring any target pixel in the image field that is not on any test diameter, and determining the two adjacent test diameters on the left and right sides of the target pixel; determining the first angle weight and the second angle weight between the target pixel and the center point of the optical axis of the lens to be corrected and the two test diameters on the left and right sides, respectively, based on the line connecting the target pixel and the center point of the optical axis of the lens to be corrected; and performing a weighted operation on the distortion values on the two test diameters on the left and right sides based on the first angle weight and the second angle weight to determine the distortion value corresponding to the target pixel.
9. The determination method according to claim 1, characterized in that, The step of determining the second actual image height of the lens to be corrected at the second working distance based on the principal ray angle information, the first actual image height, and the image plane movement includes: determining the image height change based on the principal ray angle information and the image plane movement at the second working distance; the image height change is equal to the product of the image plane movement and the tangent of the principal ray angle information; and determining the second actual image height of the correcting lens at the second working distance based on the sum of the first actual image height and the image height change.
10. An image distortion correction method, characterized in that, Using the determination method according to any one of claims 1 to 9, the distortion information of the lens to be corrected at the second working distance is obtained; a detection image captured by the lens to be corrected is acquired, and a correction operation is performed on the detection image based on the distortion information. The specific operation is as follows: a blank target image is acquired, the target pixels in the target image are traversed, and a reverse coordinate mapping is performed based on the distortion information to determine the coordinates of the corresponding distorted pixel in the detection image. Based on the pixel value of the distorted pixel, the pixel value of the corresponding target pixel in the target image is determined.