Automatic Focusing and Distortion Optimization Method Based on Large Target-Plane Industrial Lenses
The automatic focus and distortion optimization method for large-format industrial lenses addresses the limitations of traditional systems by using a dynamic adjustment mechanism and real-time image analysis to improve imaging quality.
Patent Information
- Application Number
- CN202411940091.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-12-26
AI Technical Summary
Traditional lens adjustment technology cannot accurately adjust focal length, resolution and distortion, resulting in limited imaging quality, especially in high-precision industrial applications.
By setting up a dynamic adjustment mechanism between the front focus group and the rear fixed lens group of the large target industrial lens, combining convolutional neural network and image processing technology, the imaging quality index and distortion rate are calculated in real time, and correction instructions are generated to optimize and adjust the lens spacing.
It has achieved significant improvement in the imaging quality of the lens in high-precision industrial applications, ensuring accurate adjustment of focal length, resolution and distortion, achieving high-definition imaging effects, and is suitable for automated detection and object recognition.
Smart Images

Figure CN119620325B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lens distortion optimization, specifically an autofocusing and distortion optimization method based on a large-format industrial lens. Background Art
[0002] With the continuous development of industrial automation and high-precision detection technologies, the demand for industrial lenses in various application scenarios is increasing day by day, especially in the fields of machine vision, automated inspection, object recognition, etc. Large-format industrial lenses, as an important type of high-precision optical element, have broad application prospects in these applications.
[0003] Many traditional lenses rely on manual adjustment or crude autofocusing technologies and cannot meet the high-precision requirements in complex industrial applications. The small spacing changes between optical elements have important effects on focal length, resolution, and distortion, but traditional methods often cannot accurately adjust, resulting in small changes in focal length and resolution not being corrected in a timely manner, thus affecting the final imaging effect. Most traditional optical lens adjustment technologies lack intelligence and adaptability and cannot dynamically adjust parameters such as the focal length, distortion, and brightness distribution of the lens based on real-time acquired image data. Even when using an autofocusing mechanism, it often cannot automatically perform comprehensive quality optimization, resulting in limited imaging quality. Summary of the Invention
[0004] In view of the deficiencies of the prior art, the present invention provides an autofocusing and distortion optimization method based on a large-format industrial lens to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention is realized through the following technical solutions: An autofocusing and distortion optimization method based on a large-format industrial lens, comprising the following steps:
[0006] S1. A dynamic adjustment mechanism is provided between the front focusing group A and the rear fixed lens group B of the lens. The front focusing group A is sequentially composed of a meniscus positive lens, a meniscus negative lens, a doublet lens, and a biconvex positive lens, and the rear fixed lens group B is composed of a meniscus negative lens. In the initial state, the distance between the front focusing group A and the rear fixed lens group B is set as the first initial distance L1;
[0007] S2. Based on the first initial distance L1, the first imaging area image of the lens imaging area is collected, and after in-depth analysis through image analysis technology, the following are calculated and obtained: the focal length F and the effective resolution C effective , and an optical performance data set is established;
[0008] S3. According to the optical performance dataset, use a convolutional neural network to construct and train a spacing optimization prediction model, calculate the imaging quality index Q of the lens in real time, and preset a quality threshold Z. When the imaging quality index Q is lower than the quality threshold Z, generate a first correction instruction to correct the first initial spacing L1 to generate a second spacing L2;
[0009] S4. Collect the second imaging area image of the lens imaging area, and use image processing technology to extract the radial distortion information, tangential distortion information, and coma distortion information of the second imaging area image, construct and identify the offset. When radial distortion, tangential distortion, or coma distortion is identified, calculate in depth to obtain: the coma distortion coefficient HJ, the radial distortion coefficient the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis and obtain the overall distortion rate D by association. Preset a distortion risk threshold X. If the overall distortion rate D exceeds the distortion risk threshold X, generate a second correction instruction to correct the second spacing L2 to generate a third spacing L3;
[0010] S5. Collect the third imaging area image of the lens imaging area, and use image processing technology to extract the central area pixel features and edge area pixel features, construct and evaluate the edge brightness attenuation coefficient E. If the edge brightness attenuation coefficient E is greater than 1, generate a third correction instruction to correct the third spacing L3 to generate a fourth spacing L4 to achieve a high-definition imaging effect with a large target surface and low distortion.
[0011] Preferably, S1 includes:
[0012] S11. The front focusing group A is composed of the following lenses arranged in sequence along the incident light direction, including:
[0013] The first meniscus positive lens A1: used to initially collect and correct the light converging performance;
[0014] The first meniscus negative lens A2 and the second meniscus negative lens A3, used to optimize the light divergence characteristics to control aberrations;
[0015] The second meniscus positive lens A4, the third meniscus positive lens A5, and the fourth meniscus positive lens A6: respectively used to compensate for focus drift and improve imaging resolution;
[0016] The double concave negative lens A7 and the first double convex positive lens A8 are glued together to form a doublet lens, used to suppress compound chromatic aberration and reduce optical distortion;
[0017] The second double convex positive lens A9, used to further converge light to ensure imaging clarity on the image plane;
[0018] Among them, an aperture stop STOP is arranged between the second meniscus positive lens A4 and the third meniscus positive lens A5, and the aperture stop STOP plays a role in restricting the beam angle and optimizing the light transmission in the optical design;
[0019] S12. The rear fixed lens group B includes a third meniscus negative lens A10, which is used to correct the focal length stability of the system and cooperate with the front focusing group A to reduce the imaging distortion;
[0020] S13. In the initial installation state of the lens, through a stepper motor or a piezoelectric actuator, in cooperation with a laser displacement sensor, the initial distance between the front focusing group A and the rear fixed lens group B is determined as the first initial distance L1.
[0021] Preferably, S2 includes:
[0022] The focal length F is acquired by collecting through an optical focal length measuring instrument or a laser interferometer. The specific method is as follows:
[0023] S211. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument;
[0024] S212. Collect the position of the imaging point of the lens on the target surface. The measuring instrument collects and obtains the following parameters by automatically tracking the position of the focal point, including:
[0025] Object distance O d : The distance from the object to the principal plane of the lens, unit: millimeter mm;
[0026] Image distance I d : The distance from the imaging plane to the principal plane of the lens, unit: millimeter mm;
[0027] Image height H i : The actual height of the imaging object, unit: millimeter mm;
[0028] Object height H o : The actual height of the object, unit: millimeter mm;
[0029] S213. In optics, the Gaussian imaging formula describes the relationship between the object and the image. Especially when imaging with a lens, the expression is as follows:
[0030]
[0031] In the formula, F is the focal length. The formula is based on the basic optical principle of the lens, which explains the influence of the positions of the object and the imaging plane on the focal length. The focal length F of the lens depends on the relative distance between the object and the imaging plane;
[0032] Take the reciprocal of both sides of the formula, and calculate and obtain the focal length F through the following formula:
[0033]
[0034] In the formula, the focal length F is the quotient of the product of the object distance O d and the image distance I d divided by their sum;
[0035] S214. The imaging process is regarded as the light rays of the object converging onto the imaging plane after passing through the lens. The ratio of the object distance O d and the image distance I d determines the magnification M. The relationship between the object distance O d and the image distance I d is verified through the magnification M formula:
[0036]
[0037] Preferably, S2 further includes:
[0038] Calculating and obtaining the effective resolution C through a resolution test chart or image processing technology effective , and the specific method is as follows:
[0039] S221. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument;
[0040] S222. Select the first test calibration object to make the first test calibration object parallel to the imaging plane of the lens, and use a high-resolution image acquisition device to collect and obtain the image of the first imaging area:
[0041] S223. Use an image processing algorithm to extract the pixel size in the image of the first imaging area, calculate the number of line pairs P s that can be resolved per millimeter, and in the case of having a magnification, calculate and obtain the effective resolution C through the following formula effective :
[0042]
[0043] In the formula, C represents the resolution, P s represents the number of line pairs that can be resolved per millimeter, W o is the width of the actual object, and W s is the width of the sensor.
[0044] Preferably, S3 includes:
[0045] S31. Use a convolutional neural network to construct an initial convolutional neural network model, train and test the initial convolutional neural network model with an optical performance dataset, and use the trained initial convolutional neural network model as a spacing optimization prediction model. At the same time, use the intermediate layer output of the optical performance dataset as a feature vector to identify feature information, and train and test the spacing optimization prediction model with the obtained feature information. Use the trained spacing optimization prediction model for data operation prediction;
[0046] S32. Extract the focal length F and effective resolution C from the optical performance dataset effective After dimensionless processing, calculate and obtain the imaging quality index Q through the following associated formula:
[0047] Q = F * α + C effective * β;
[0048] In the formula, α and β respectively represent the weight values of the focal length F and the effective resolution C effective 0 < α < 1, 0 < β < 1, and α + β = 1;
[0049] S33. Preset a quality threshold Z, and compare and evaluate the imaging quality index Q with the quality threshold Z to obtain a first evaluation result, including:
[0050] When the imaging quality index Q < the quality threshold Z, it means that the image quality is unqualified, and a first correction instruction is generated to adjust the first initial spacing L1 between the front focusing group A and the rear fixed lens group B, and reduce the current first initial spacing L1 by 3% - 5% to form a second spacing L2;
[0051] When the imaging quality index Q ≥ the quality threshold Z, it means that the image quality is qualified, keep the first initial spacing L1 and generate a first qualified label on the industrial lens.
[0052] Preferably, S4 includes:
[0053] S41. Fix the industrial lens on a high-precision rotary table to ensure that the optical axis is aligned with the measuring instrument beam;
[0054] S42. Select a second test calibration object so that the second test calibration object is parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain an image of a second imaging area:
[0055] S43. Use image processing technology to extract the radial distortion information, tangential distortion information, and comet distortion information of the image of the second imaging area. Set the coordinates of each pixel point (x ideal , y ideal ) in the image of the first imaging area as the coordinates of the x-axis and y-axis in the ideal image, (x distorted , y distorted) are the coordinates of the x-axis and y-axis in the actual image;
[0056] S44. By collecting the coordinate differences between the actual image and the ideal image, obtain the offset and the comet aberration coefficient HJ through the following formula:
[0057] Δx distorted = x distorted - x ideal ;
[0058] Δy distorted = y distorted - y ideal ;
[0059]
[0060] In the formula, Δx distorted represents the offset in the x-axis direction, and Δy distorted represents the offset in the y-axis direction; r represents the distance from the center point of the edge aperture to the image center;
[0061] Preset the first radial distortion threshold X1, the second tangential distortion threshold X2, and the third comet aberration threshold X3;
[0062] When Δx distorted or Δy distorted > the first radial distortion threshold X1, it indicates the existence of radial distortion; when Δx distorted or Δy distorted ≤ the first radial distortion threshold X1, it indicates the non-existence of radial distortion; when Δx distorted or Δy distorted > the second tangential distortion threshold X2, it indicates the existence of tangential distortion; when Δx distorted or Δy distorted ≤ the second tangential distortion threshold X2, it indicates the non-existence of tangential distortion; when the comet aberration coefficient HJ > the third comet aberration threshold X3, it indicates the existence of comet aberration; when the comet aberration coefficient HJ ≤ the third comet aberration threshold X3, it indicates the non-existence of comet aberration.
[0063] Preferably, S44 includes:
[0064] S441. After identifying the existence of radial distortion, for the distance of each pixel point from the image center, calculate the radial distance r distorted in the actual image and the radial distance r ideal in the ideal image in the first imaging area image. The expression is:
[0065]
[0066] In the formula, r idealRepresents the radial distance of each pixel in the ideal image, r distorted Represents the radial distance of each pixel in the actual image;
[0067] S442. Calculate and obtain the radial distortion coefficient through the following radial distortion formula
[0068]
[0069] In the formula, k1 represents the first-order radial distortion weight coefficient, which contributes the most to the total distortion. k2 represents the second-order radial distortion weight coefficient, which is used to correct the high-order influence. k3 represents the third-order radial distortion weight coefficient, which is used to make minor corrections to the extreme edge points; the values of k1, k2, and k3 are obtained through experimental fitting;
[0070] S443. After identifying the presence of tangential distortion, calculate and obtain the radial distance r in the actual image and the radial distance r in the ideal image in the regional image, and calculate and obtain the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis through the following formula distorted and the radial distance r in the ideal image ideal , and calculate and obtain the first tangential distortion coefficient on the x-axis through the following formula and the second tangential distortion coefficient on the y-axis
[0071]
[0072]
[0073] In the formula, p1 and p2 are weight coefficients, which are obtained by fitting through experimental data or image calibration; is the square of the radial distance of each pixel to the image center;
[0074] S444. Extract the radial distortion coefficient calculated in S442 - S443, the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis and combine with the comet distortion coefficient HJ calculated in S44. After dimensionless processing, calculate and obtain the overall distortion rate D through the following formula In the formula, w1, w2, and w3 represent weights, 0 < w1 < 1, 0 < w2 < 1, 0 < w3 < 1, and w1 + w2 + w3 = 1.
[0075]
[0076] Preferably, S4 further includes:
[0077] Preferably, S4 further includes:
[0078] S45. Based on the overall distortion rate D obtained by calculation in S444 and the preset distortion risk threshold X, compare the overall distortion rate D with the distortion risk threshold X to obtain a second evaluation result, including:
[0079] When the overall distortion rate D > the distortion risk threshold X, it indicates abnormal distortion, and a second correction instruction is generated, including: adopting a segmented fine-tuning method to adjust and increase 0.5% - 1% of the current second spacing L2, with each adjustment not exceeding 0.5% - 1%, to form a third spacing L3 until the overall distortion rate D < the distortion risk threshold X;
[0080] When the overall distortion rate D ≤ the distortion risk threshold X, it indicates that the distortion is within the standard threshold range and no correction is required, and a second qualified label is generated on the industrial lens.
[0081] Preferably, S5 includes:
[0082] S51. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the measuring instrument beam;
[0083] S52. Select a third test calibration object to make the third test calibration object parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain an image of the third imaging area:
[0084] S53. Extract the pixel features of the central area and the pixel features of the edge area in the image of the third imaging area, and calculate and obtain the image center brightness L center and the image edge brightness L edge :
[0085]
[0086] In the formula, N center represents the number of pixels in the central area, I center (x, y) is the brightness value of each pixel point in the central area, N edge represents the number of pixels in the edge area; I edge (x, y) is the brightness value of each pixel point in the edge area, (x, y) ∈ center region means only summing the pixels within the "central area" center region; (x, y) ∈ edgeregion means only summing the pixels in the "edge area";
[0087] S54. Based on the image center brightness L center and the image edge brightness L edge , calculate and obtain the edge brightness attenuation coefficient E through the following formula:
[0088]
[0089] S55. When the value of the edge brightness attenuation coefficient E > 1, it indicates that the edge of the image is darker than the center, and brightness attenuation has occurred. Generate a third correction instruction, including: using a segmented fine-tuning method, adjusting and increasing 0.05% - 0.1% of the current third spacing L3 to form a fourth spacing L4;
[0090] When the value of the edge brightness attenuation coefficient E ≤ 1, it indicates that the image brightness distribution is uniform and no brightness attenuation has occurred, so no correction is required, and a third qualified label is generated on this industrial lens.
[0091] Preferably, when the industrial lens generates the first qualified label, the second qualified label, and the third qualified label simultaneously, it indicates that the lens meets the predetermined qualified standards in multiple performance indicators. If any qualified label is missing, repeat the steps S1 - S5 until the first qualified label, the second qualified label, and the third qualified label are generated simultaneously.
[0092] The present invention provides an automatic focusing and distortion optimization method based on a large - target - surface industrial lens, having the following beneficial effects:
[0093] (1) For the automatic focusing and distortion optimization method based on a large - target - surface industrial lens, traditional lenses cannot accurately adjust the focal length and resolution during imaging. However, in the present invention, by setting a dynamic adjustment mechanism between the front focusing group A and the rear fixed lens group B, the distance between these two groups of lenses can be accurately adjusted, thereby optimizing the focal length, resolution, and distortion. Through the step - by - step correction of each step from S3 - S5 (including focal length, distortion, brightness attenuation, etc.), the imaging quality of the lens is improved. Especially in industrial applications with high - precision requirements for large - target - surfaces, the imaging clarity and accuracy can be significantly improved.
[0094] (2) The present invention constructs and trains a spacing optimization prediction model using a convolutional neural network (CNN) model, which can calculate the imaging quality index Q of the lens in real - time and dynamically adjust the focal length and spacing of the lens according to real - time data. Traditional methods usually lack this intelligent adaptive ability, and this feature of the present invention enables the lens to automatically adjust according to the real - time collected image data, timely compensating for the influence of lens quality and manufacturing errors on the lens performance, so as to ensure the best imaging effect under various environmental conditions.
[0095] (3) The present invention extracts and analyzes radial distortion information, tangential distortion information, and coma distortion information in the image of the imaging area, can accurately calculate the overall distortion rate D, and automatically generates a correction instruction according to a preset distortion risk threshold X. Different from traditional image processing algorithms, the present invention can fundamentally reduce the generation of distortion by optimizing and adjusting the optical design, so as to achieve a high-definition imaging effect with low distortion without relying on post-processing. This intelligent distortion optimization technology is particularly suitable for high-precision industrial applications, such as automated inspection and object recognition.
[0096] (4) The calculation and correction of the edge brightness attenuation coefficient E in the present invention can effectively eliminate the phenomenon of edge brightness attenuation. When it is detected that the edge brightness attenuation coefficient E is greater than 1, the system will automatically generate a correction instruction to further adjust the lens spacing to ensure a more uniform brightness distribution within the imaging area and improve the overall imaging effect of the lens. Description of the Drawings
[0097] Figure 1 It is a schematic diagram of the arrangement structure of the front focusing group A and the rear fixed lens group B of the large target surface industrial lens of the present invention;
[0098] Figure 2 It is a schematic diagram of the steps of the automatic focusing and distortion optimization method based on the large target surface industrial lens of the present invention. Detailed Embodiments
[0099] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0100] Embodiment 1
[0101] Please refer to Figure 1-2 , the present invention provides an automatic focusing and distortion optimization method based on a large target surface industrial lens, including the following steps:
[0102] S1. A dynamic adjustment mechanism is arranged between the front focusing group A and the rear fixed lens group B of the lens. The front focusing group A is composed of a meniscus positive lens, a meniscus negative lens, a doublet lens, and a biconvex positive lens in sequence, and the rear fixed lens group B is composed of a meniscus negative lens. In the initial state, the distance between the front focusing group A and the rear fixed lens group B is set to the first initial distance L1;
[0103] S2. Based on the first initial distance L1, the first imaging area image of the lens imaging area is collected, and after in-depth analysis through image analysis technology, the focal length F and the effective resolution C are obtained effective, and establish an optical performance dataset;
[0104] S3. According to the optical performance dataset, use a convolutional neural network to construct and train a spacing optimization prediction model, calculate the imaging quality index Q of the lens in real time, and preset a quality threshold Z. When the imaging quality index Q is lower than the quality threshold Z, generate a first correction instruction to correct the first initial spacing L1 to generate a second spacing L2;
[0105] S4. Collect the second imaging area image of the lens imaging area, and use image processing technology to extract the radial distortion information, tangential distortion information, and coma distortion information of the second imaging area image, construct and identify the offset. When radial distortion, tangential distortion, or coma distortion is identified, perform in-depth calculation to obtain: coma distortion coefficient HJ, radial distortion coefficient the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis and correlate to obtain the overall distortion rate D, and preset a distortion risk threshold X. If the overall distortion rate D exceeds the distortion risk threshold X, generate a second correction instruction to correct the second spacing L2 to generate a third spacing L3;
[0106] S5. After the second correction instruction is executed, collect the third imaging area image of the lens imaging area, and use image processing technology to extract the central area pixel features and edge area pixel features, construct and evaluate the edge brightness attenuation coefficient E. If the edge brightness attenuation coefficient E is greater than 1, generate a third correction instruction to correct the third spacing L3 to generate a fourth spacing L4 to achieve a high-definition imaging effect with a large target surface and low distortion.
[0107] In this embodiment, traditional lenses cannot precisely adjust the focal length and resolution during imaging. However, in the present invention, by setting a dynamic adjustment mechanism between the front focusing group A and the rear fixed lens group B, the spacing between these two groups of lenses can be precisely adjusted, thereby optimizing the focal length, resolution, and distortion. Through the step-by-step correction of each step from S3 to S5 (including focal length, distortion, brightness attenuation, etc.), the imaging quality of the lens is improved, especially in industrial applications with high-precision requirements for large target surfaces, the imaging clarity and precision can be significantly enhanced.
[0108] The present invention uses a convolutional neural network (CNN) model to construct and train a spacing optimization prediction model, which can calculate the imaging quality index Q of the lens in real time and dynamically adjust the focal length and spacing of the lens according to real-time data. Traditional methods usually lack this intelligent adaptive ability, and this feature of the present invention enables the lens to automatically adjust according to the real-time collected image data, timely compensate for the influence of lens quality and manufacturing errors on the lens performance, so as to ensure the best imaging effect under various environmental conditions.
[0109] The present invention extracts and analyzes radial distortion information, tangential distortion information, and coma distortion information in the image of the imaging area, can accurately calculate the overall distortion rate D, and automatically generates a correction instruction according to a preset distortion risk threshold X. Different from traditional image processing algorithms, the present invention can fundamentally reduce the generation of distortion by optimizing and adjusting the optical design, so as to achieve a high-definition imaging effect with low distortion without relying on post-processing. This intelligent distortion optimization technology is particularly suitable for high-precision industrial applications such as automated inspection and object recognition.
[0110] The calculation and correction of the edge brightness attenuation coefficient E in the present invention can effectively eliminate the phenomenon of edge brightness attenuation. When it is detected that the edge brightness attenuation coefficient E is greater than 1, the system will automatically generate a correction instruction to further adjust the lens spacing to ensure a more uniform brightness distribution within the imaging area and improve the overall imaging effect of the lens.
[0111] Embodiment 2
[0112] This embodiment is an explanatory description carried out in Embodiment 1. Please refer to Figure 1 , specifically, S1 includes:
[0113] S11. The front focusing group A is composed of the following lenses arranged in sequence along the incident light direction, including:
[0114] The first meniscus positive lens A1: used to initially collect and correct the light converging performance;
[0115] The first meniscus negative lens A2 and the second meniscus negative lens A3, used to optimize the light divergence characteristics to control aberration;
[0116] The second meniscus positive lens A4, the third meniscus positive lens A5, and the fourth meniscus positive lens A6: respectively used to compensate for focus drift and improve imaging resolution;
[0117] The double concave negative lens A7 and the first double convex positive lens A8 are glued together to form a doublet lens, used to suppress compound chromatic aberration and reduce optical distortion;
[0118] The second double convex positive lens A9, used to further converge light to ensure imaging clarity at the image plane;
[0119] Among them, an aperture stop STOP is arranged between the second meniscus positive lens A4 and the third meniscus positive lens A5. The aperture stop STOP plays a role in restricting the beam angle and optimizing light transmission in the optical design;
[0120] S12. The rear fixed lens group B includes the third meniscus negative lens A10, used to correct the focal length stability of the system and cooperate with the front focusing group A to reduce imaging distortion;
[0121] S13. In the initial installation state of the lens, the initial distance between the front focusing group A and the rear fixed lens group B is determined as the first initial distance L1 by a stepper motor or a piezoelectric driver in cooperation with a laser displacement sensor.
[0122] In this embodiment, in the initial installation state of the lens, the distance between the front focusing group A and the rear fixed lens group B is adjusted by a stepper motor or a piezoelectric driver. This mechanism can be finely adjusted as needed to achieve more precise focal length adjustment. In combination with a laser displacement sensor, the distance can be measured in real time and accurately adjusted to keep the focal length and resolution of the lens in the best state. The precise cooperation between the front focusing group A and the rear fixed lens group B ensures the stability of the focal length and avoids interference and unstable factors inside the system during the focusing process. The third meniscus negative lens (A10) in the rear fixed lens group B is used to correct the focal length stability of the system and cooperate with the adjustment function of the front focusing group A, so as to ensure that the imaging quality will not be affected during long-term use of the system.
[0123] Embodiment 3
[0124] This embodiment is an explanatory description based on Embodiment 1. Please refer to Figure 1 , specifically, S2 includes:
[0125] The focal length F is collected and obtained by an optical focal length measuring instrument or a laser interferometer. The specific method is as follows:
[0126] S211. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument, minimizing the error during the focal length measurement. This step ensures the symmetry of the optical axis throughout the measurement process and avoids measurement errors caused by lens tilt or misalignment.
[0127] S212. Collect the position of the lens imaging point on the target surface. The measuring instrument collects and obtains the following parameters by automatically tracking the position of the focal point, including:
[0128] Object distance O d : The distance from the object to the main plane of the lens, unit: millimeter mm;
[0129] Image distance I d : The distance from the imaging plane to the main plane of the lens, unit: millimeter mm;
[0130] Image height H i : The actual height of the imaging object, unit: millimeter mm;
[0131] Object height H o:The actual height of the object, unit: millimeter (mm); By automatically tracking the position of the focal point, parameters such as object distance, image distance, object height, and image height are automatically collected. These parameters can help accurately calculate the focal length and reduce the error of manual operation, improving the measurement accuracy and efficiency.
[0132] S213. In optics, the Gaussian imaging formula describes the relationship between an object and its image, especially in lens imaging, and the expression is as follows:
[0133]
[0134] In the formula, F is the focal length. Based on the basic optical principle of the lens, it illustrates the influence of the positions of the object and the imaging plane on the focal length. The focal length F of the lens depends on the relative distance between the object and the imaging plane;
[0135] And take the reciprocal of both sides of the formula to calculate and obtain the focal length F through the following formula:
[0136]
[0137] In the formula, the focal length F is the quotient of the product of the object distance O d and the image distance I d divided by their sum;
[0138] S214. The imaging process is regarded as the light rays of the object converging on the imaging plane after passing through the lens. The ratio of the object distance O d and the image distance I d determines the magnification M. Verify the relationship between the object distance O d and the image distance I d through the magnification M formula:
[0139]
[0140] Calculate and obtain the effective resolution C effective through a resolution test chart or image processing technology. The specific method is as follows: The magnification M is used to verify the relationship between the object distance and the image distance, which helps to understand the working characteristics of the lens under different imaging conditions. Through the resolution test, the actual imaging quality of the lens can be further verified.
[0141] S221. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument;
[0142] S222. Select the first test calibration object so that the first test calibration object is parallel to the imaging plane of the lens, and use a high-resolution image acquisition device to collect the image of the first imaging area:
[0143] S223. Use the image processing algorithm to extract the pixel size in the image of the first imaging area, calculate the number of line pairs P that can be resolved per millimeter, and when there is a magnification factor, calculate and obtain the effective resolution C through the following formula s : effective :
[0144]
[0145] In the formula, C represents the resolution, P s represents the number of line pairs that can be resolved per millimeter, W o is the width of the actual object, and W s is the width of the sensor. The sensor width refers to the physical size of the camera image sensor (usually in millimeters). This is a key parameter because the resolution calculation is based on the actual physical size of the sensor. In this formula, the sensor width refers to the actual physical width of the sensor used for imaging. This parameter directly affects the number of line pairs that can be resolved per millimeter, and thus affects the final effective resolution.
[0146] Example 4
[0147] This example is an explanatory note carried out in Example 3. Please refer to Figure 1 , specifically, S3 includes:
[0148] S31. Use the convolutional neural network to build an initial convolutional neural network model, train and test the initial convolutional neural network model with the optical performance data set, and use the trained initial convolutional neural network model as the spacing optimization prediction model. At the same time, use the intermediate layer output of the optical performance data set as the feature vector to identify the feature information, and train and test the spacing optimization prediction model through the obtained feature information, and use the trained spacing optimization prediction model for data operation prediction; through these feature vectors, the convolutional neural network can identify key image feature information, such as factors affecting imaging quality such as focal length change and resolution fluctuation.
[0149] S32. Extract the focal length F and the effective resolution C in the optical performance data set effective . After dimensionless processing, calculate and obtain the imaging quality index Q through the following related formula:
[0150] Q = F * α + C effective * β;
[0151] In the formula, α and β respectively represent the weight values of the focal length F and the effective resolution C effective , 0 < α < 1, 0 < β < 1, and α + β = 1;
[0152] S33. Preset a quality threshold Z, and compare and evaluate the imaging quality index Q with the quality threshold Z to obtain a first evaluation result, including:
[0153] When the imaging quality index Q < the quality threshold Z, it indicates that the image quality is unqualified, and a first correction instruction is generated to adjust the first initial distance L1 between the front focusing group A and the rear fixed lens group B, and reduce the current first initial distance L1 by 3% - 5% to form a second distance L2;
[0154] When the imaging quality index Q ≥ the quality threshold Z, it indicates that the image quality is qualified, the first initial distance L1 is maintained, and a first qualified label is generated on the industrial lens.
[0155] In this embodiment, this process automatically evaluates the imaging quality index Q and generates a first correction instruction, greatly simplifying the lens adjustment process. Without manual intervention, the lens parameters can be automatically optimized according to the imaging quality, improving the imaging accuracy and stability. Through continuous imaging quality assessment and optimization instruction generation, the system can adjust the lens distance in real time to ensure that the lens is always in the best working state.
[0156] Embodiment 5
[0157] This embodiment is an explanatory description based on Embodiment 1. Please refer to Figure 1 , specifically, S4 includes:
[0158] S41. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the measuring instrument beam; by using the high-precision rotating table, more accurate angle adjustment can be achieved, reducing the distortion error caused by inaccurate lens position.
[0159] S42. Select a second test calibration object such that the second test calibration object is parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain an image of the second imaging area:
[0160] S43. Use image processing technology to extract the radial distortion information, tangential distortion information, and comet distortion information of the image of the second imaging area, and set the coordinates of each pixel point (x ideal , y ideal ) in the first imaging area image as the coordinates of the x-axis and y-axis in the ideal image, and (x distorted , y distorted ) as the coordinates of the x-axis and y-axis in the actual image;
[0161] S44. By collecting the coordinate differences between the actual image and the ideal image, obtain the offset and comet distortion coefficient HJ through the following formula:
[0162] Δx distorted = x distorted-x ideal ;
[0163] Δy distorted =y distorted -y ideal ;
[0164]
[0165] In the formula, Δx distorted represents the offset in the x-axis direction, and Δy distorted represents the offset in the y-axis direction; r represents the distance from the center point of the marginal aperture to the image center;
[0166] preset the first radial distortion threshold X1, the second tangential distortion threshold X2, and the third coma distortion threshold X3;
[0167] When Δx distorted or Δy distorted > the first radial distortion threshold X1, it indicates that there is a radial distortion situation; when Δx distorted or Δy distorted ≤ the first radial distortion threshold X1, it indicates that there is no radial distortion situation; when Δx distorted or Δy distorted > the second tangential distortion threshold X2, it indicates that there is a tangential distortion situation; when Δx distorted or Δy distorted ≤ the second tangential distortion threshold X2, it indicates that there is no tangential distortion situation; when the coma distortion coefficient HJ > the third coma distortion threshold X3, it indicates that there is a coma distortion situation; when the coma distortion coefficient HJ ≤ the third coma distortion threshold X3, it indicates that there is no coma distortion situation. In this stage, image processing technology is used to accurately identify different types of distortions (radial, tangential, and coma distortions), making the analysis of distortions more comprehensive.
[0168] 44 includes:
[0169] S441. After identifying that there is a radial distortion situation, for the distance between each pixel point and the image center, calculate the radial distance r distorted in the actual image in the first imaging region image ideal and the radial distance r
[0170]
[0171] In the formula, r ideal represents the radial distance of each pixel in the ideal image, and r distorted represents the radial distance of each pixel in the actual image;
[0172] S442. Obtain the radial distortion coefficient by calculating through the following radial distortion formula
[0173]
[0174] In the formula, k1 represents the first-order radial distortion weight coefficient, which contributes the most to the total distortion; k2 represents the second-order radial distortion weight coefficient, which is used to correct the high-order influence; k3 represents the third-order radial distortion weight coefficient, which is used to make minor corrections to the extreme edge points; the values of k1, k2, and k3 are obtained through experimental fitting.
[0175] S443. After identifying the tangential distortion situation, calculate the radial distance r in the actual image in the region image distorted and the radial distance r in the ideal image ideal , and calculate the first tangential distortion coefficient on the x-axis through the following formula and the second tangential distortion coefficient on the y-axis
[0176]
[0177]
[0178] In the formula, p1 and p2 are weight coefficients, which are obtained by fitting through experimental data or image calibration. is the square of the radial distance of each pixel to the image center;
[0179] S444. Extract the radial distortion coefficients calculated in S442 - S443 the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis Combine with the comet distortion coefficient HJ calculated in S44, and after dimensionless processing, calculate the overall distortion rate D through the following formula:
[0180]
[0181] In the formula, w1, w2, and w3 represent weights, 0 < w1 < 1, 0 < w2 < 1, 0 < w3 < 1, and w1 + w2 + w3 = 1.
[0182] S45. Based on the overall distortion rate D calculated in S444, preset the distortion risk threshold X, and compare the overall distortion rate D with the distortion risk threshold X to obtain the second evaluation result, including:
[0183] When the overall distortion rate D > the distortion risk threshold X, it indicates abnormal distortion, and a second correction instruction is generated, including: adopting a segmented fine-tuning method to adjust and increase 0.5% - 1% of the current second distance L2, with each adjustment not exceeding between 0.5% - 1%, to form a third distance L3 until the overall distortion rate D < the distortion risk threshold X;
[0184] When the overall distortion rate D ≤ the distortion risk threshold X, it indicates that the distortion is within the standard threshold range, and no correction is required, and a second qualified label is generated on the industrial lens.
[0185] In this embodiment, the distortion of the lens is comprehensively analyzed from multiple dimensions (radial, tangential, coma distortion), and different distortion types can be accurately identified, providing accurate data for subsequent optimization and adjustment. Through the detailed radial distortion coefficient the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis Combined with the calculation of the coma distortion coefficient HJ obtained by S44, various distortion situations (radial, tangential, coma distortion) of the lens can be quantified, providing a scientific basis for correction.
[0186] Calculate the overall distortion rate D, compare and evaluate it with the preset distortion risk threshold X to obtain a second evaluation result. If the overall distortion rate D exceeds the distortion risk threshold X, the system will generate a correction instruction, and adjust the lens distance through a segmented fine-tuning method until the overall distortion rate is reduced below the threshold. The generated second correction instruction uses a segmented fine-tuning method, with each fine-tuning of 0.5% - 1%, gradually optimizing the lens parameters to make the adjustment process more precise and stable.
[0187] Embodiment 6
[0188] This embodiment is an explanatory description based on Embodiment 5. Please refer to Figure 1 , specifically, S5 includes:
[0189] S51: Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument;
[0190] S52: Select a third test calibration object such that the third test calibration object is parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain an image of the third imaging area:
[0191] S53: Extract the pixel features of the central area and the pixel features of the edge area in the image of the third imaging area, and calculate and obtain the image center brightness L center and the image edge brightness L edge :
[0192]
[0193] In the formula, N center represents the number of pixels in the central region, and I center (x, y) is the luminance value of each pixel in the central region. N edge represents the number of pixels in the edge region; I edge (x, y) is the luminance value of each pixel in the edge region. (x, y) ∈ center region means that only the pixels within the "central region" center region are summed; (x, y) ∈ edge region means that only the pixels in the "edge region" are summed;
[0194] S54. According to the central luminance L center of the image and the edge luminance L edge of the image, the edge luminance attenuation coefficient E is calculated and obtained through the following formula:
[0195]
[0196] S55. When the value of the edge luminance attenuation coefficient E > 1, it means that the edge of the image is darker than the center, and luminance attenuation has occurred. A third correction instruction is generated, including: adopting a segmented fine-tuning method to adjust and increase 0.05% - 0.1% of the current third spacing L3 to form a fourth spacing L4; until the value of the edge luminance attenuation coefficient E < 1 or = 1;
[0197] When the value of the edge luminance attenuation coefficient E ≤ 1, it means that the image luminance distribution is uniform and no luminance attenuation has occurred, and no correction is required. A third qualified label is generated on this industrial lens.
[0198] In this embodiment, by calculating the edge luminance attenuation coefficient E, the difference between the edge luminance and the center luminance of the image can be quantified, and the attenuation degree of the image luminance can be revealed. The edge luminance attenuation coefficient E provides a standard for subsequent correction to ensure that the image luminance attenuation situation can be scientifically and reasonably identified. Through the segmented fine-tuning method, the lens parameters can be finely adjusted, the luminance uniformity of the image can be improved, and the image quality can be ensured to meet the standard requirements. The method of adjusting the lens spacing by segmented fine-tuning avoids overcorrection and improves the stability and accuracy of the correction process.
[0199] Embodiment 7
[0200] This embodiment is an explanatory description based on Embodiment 1. Please refer to Figure 1 , specifically, when the industrial lens generates the first qualified label, the second qualified label, and the third qualified label at the same time, it means that the lens meets the predetermined qualified standards in multiple performance indicators. If any qualified label is missing, the steps S1 - S5 are repeated until the first qualified label, the second qualified label, and the third qualified label are generated at the same time.
[0201] The following is a marked diagram of the calibration steps and results:
[0202]
[0203]
[0204] In this embodiment, this process ensures that all potential problems (such as focal length, distortion, brightness distribution, etc.) are detected and corrected one by one, thus avoiding the influence that may be brought by unqualified performance indicators. The finally obtained lens performance is comprehensively optimized and applicable to a wider range of application scenarios. If any qualified label is missing, the system will automatically trigger steps S1 - S5 for re - calibration. This feedback mechanism can automatically identify and correct unqualified items. By gradually optimizing and adjusting the lens parameters, it ensures that each performance indicator is within the qualified range, avoiding human intervention and reducing human errors. By repeating the calibration steps, fine - tuning can be carried out in terms of focal length, resolution, distortion, and brightness attenuation, etc., so that the various performances of the lens gradually reach the best state. Each calibration approaches the ideal lens performance through scientific methods, and finally achieves a precise optical effect.
[0205] The setting of the threshold value is for the convenience of comparison. Regarding the size of the threshold value, it depends on the amount of sample data and the base quantity set by those skilled in the art for each group of sample data; as long as it does not affect the proportional relationship between the parameters and the quantized values.
[0206] The above - mentioned formulas are all obtained by collecting a large amount of data for software simulation and selecting a formula close to the true value. The coefficients in the formulas are set by those skilled in the art according to the actual situation. As described above, it is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.
Claims
1. An automatic focusing and distortion optimization method based on a large target surface industrial lens, characterized in that, It includes the following steps: S1. A dynamic adjustment mechanism is set between the front focusing group A and the rear fixed lens group B of the lens. The front focusing group A is successively composed of a meniscus positive lens, a meniscus negative lens, a doublet lens, and a biconvex positive lens. The rear fixed lens group B is composed of a meniscus negative lens. In the initial state, the distance between the front focusing group A and the rear fixed lens group B is set as the first initial distance L1; S2. Based on the first initial spacing L1, collect the first imaging area image of the lens imaging area, and calculate through in-depth analysis by image analysis technology to obtain: focal length F and effective resolution C effective , and establish an optical performance data set; S3. According to the optical performance data set, a distance optimization prediction model is constructed and trained using a convolutional neural network. The imaging quality index Q of the lens is calculated in real time, and a quality threshold Z is preset. When the imaging quality index Q is lower than the quality threshold Z, a first correction instruction is generated to correct the first initial distance L1 to generate a second distance L2; S4. Collect the image of the second imaging area in the imaging area of the lens, and use image processing technology to extract the radial distortion information, tangential distortion information, and comet distortion information of the image of the second imaging area, construct and identify the offset. When radial distortion, tangential distortion, or comet distortion is identified, the following are obtained through depth calculation: the comet distortion coefficient HJ, the radial distortion coefficient the first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis and obtain the overall distortion rate D through association. Preset the distortion risk threshold X. If the overall distortion rate D exceeds the distortion risk threshold X, generate a second correction instruction to correct the second spacing L2 to generate a third spacing L3; S5. The third imaging area image of the lens imaging area is collected, and image processing technology is used to extract the central area pixel features and the edge area pixel features, construct and evaluate the edge brightness attenuation coefficient E. If the edge brightness attenuation coefficient E is greater than 1, a third correction instruction is generated to correct the third distance L3 to generate a fourth distance L4 to achieve a high-definition imaging effect with a large target surface and low distortion.
2. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 1, characterized in that S1 includes: S11. The front focusing group A is composed of the following lenses arranged in the incident light direction, including: The first meniscus positive lens A1: used to initially collect and correct the converging performance of light; The first meniscus negative lens A2 and the second meniscus negative lens A3, used to optimize the divergence characteristics of light to control aberration; The second meniscus positive lens A4, the third meniscus positive lens A5, and the fourth meniscus positive lens A6: respectively used to compensate for focus drift and improve imaging resolution; The doublet lens formed by gluing the biconcave negative lens A7 and the first biconvex positive lens A8 is used to suppress compound chromatic aberration and reduce optical distortion; The second biconvex positive lens A9 is used to further converge light to ensure the imaging clarity of the image plane; Among them, an aperture stop STOP is set between the second meniscus positive lens A4 and the third meniscus positive lens A5. The aperture stop STOP plays a role in restricting the beam angle and optimizing light transmission in optical design; S12. The rear fixed lens group B includes the third meniscus negative lens A10, which is used to correct the focal length stability of the system and cooperate with the front focusing group A to reduce imaging distortion; S13. In the initial installation state of the lens, through a stepper motor or a piezoelectric driver, cooperating with a laser displacement sensor, the initial distance between the front focusing group A and the rear fixed lens group B is determined as the first initial distance L1.
3. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 1, wherein S2 It includes: The focal length F is collected and obtained through an optical focal length measuring instrument or a laser interferometer. The specific method is as follows: S211. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument; S212. Collect the position of the lens imaging point on the target surface. The measuring instrument collects and obtains the following parameters by automatically tracking the position of the focal point, including: Object distance O d : The distance from the object to the principal plane of the lens, unit: millimeter (mm); Image distance I d : The distance from the imaging plane to the principal plane of the lens, unit: millimeter mm; Image height H i : The actual height of the imaging object, unit: millimeter mm; Object height H o : The actual height of the object, unit: millimeter mm; S213. In optics, the Gaussian imaging formula describes the relationship between the object and the image. When imaging with a lens, the expression is as follows: In the formula, F is the focal length. Based on the basic optical principle of the lens, it illustrates the influence of the positions of the object and the imaging plane on the focal length. The focal length F of the lens depends on the relative distance between the object and the imaging plane; Take the reciprocal of both sides of the formula, and calculate to obtain the focal length F through the following formula: In the formula, the focal length F is the quotient of the product of the object distance O d and the image distance I d divided by their sum; S214. The imaging process is regarded as the light rays of an object converging onto the imaging plane after passing through a lens. The object distance O d and the image distance I d The ratio determines the magnification M. Verify the relationship between the object distance O d and the image distance I d through the magnification M formula:
4. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 3, wherein S2 also includes: Obtain the effective resolution C by calculating through a resolution test card or image processing technology effective , and the specific method is as follows: S221. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument; S222. Select the first test calibration object so that the first test calibration object is parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain the first imaging area image: S223. Extract the pixel size in the image of the first imaging area using an image processing algorithm, and calculate the number of line pairs P that can be resolved per millimeter. When there is a magnification factor, obtain the effective resolution C through the following formula s , and when there is a magnification factor, obtain the effective resolution C through the following formula effective : Where C represents the resolution, P s represents the number of line pairs that can be resolved per millimeter, W o is the width of the actual object, W s is the width of the sensor.
5. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 4, wherein S3 including: S31. Use a convolutional neural network to construct an initial convolutional neural network model, train and test the initial convolutional neural network model with an optical performance data set, and use the intermediate layer output of the optical performance data set as a feature vector to identify feature information, and train and test the spacing optimization prediction model with the obtained feature information. Use the trained spacing optimization prediction model for data operation prediction; S32. Extract the focal length F and the effective resolution C from the optical performance dataset effective After dimensionless processing, the imaging quality index Q is calculated through the following associated formula: Q = F * α + C effective * β; Wherein, α and β respectively represent the weight values of the focal length F and the resolution C effective , 0 < α < 1, 0 < β < 1, and α + β = 1; S33. Preset a quality threshold Z, and compare and evaluate the imaging quality index Q with the quality threshold Z to obtain a first evaluation result, including: When the imaging quality index Q < the quality threshold Z, it means that the image quality is unqualified, and a first correction instruction is generated to adjust the first initial spacing L1 between the front focusing group A and the rear fixed lens group B, and adjust and reduce 3%-5% of the current first initial spacing L1 to form a second spacing L2; When the imaging quality index Q ≥ the quality threshold Z, it means that the image quality is qualified, keep the first initial spacing L1 and generate a first qualified label on this industrial lens.
6. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 1, wherein S4 including: S41. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument; S42. Select the second test calibration object so that the second test calibration object is parallel to the lens imaging plane, and use a high-resolution image acquisition device to collect and obtain the second imaging area image: S43. Use image processing technology to extract the radial distortion information, tangential distortion information, and comet distortion information of the second imaging area image, and set the coordinates of each pixel point (x ideal , y ideal ) in the first imaging area image as the coordinates of the x-axis and y-axis in the ideal image, and (x distorted , y distorted ) as the coordinates of the x-axis and y-axis in the actual image; S44. By collecting the coordinate differences between the actual image and the ideal image, obtain the offset and the coma aberration coefficient HJ through the following formula: Δx distorted = x distorted - x ideal ; Δy distorted = y distorted - y ideal ; where, Δx distorted represents the offset in the x-axis direction, and Δy distorted represents the offset in the y-axis direction; r represents the distance from the center point of the marginal aperture to the image center; Preset a first radial distortion threshold X1, a second tangential distortion threshold X2, and a third coma distortion threshold X3; When Δx distorted or Δy distorted > the first radial distortion threshold X1, it indicates that there is a radial distortion situation; when Δx distorted or Δy distorted ≤ the first radial distortion threshold X1, it indicates that there is no radial distortion situation; when Δx distorted or Δy distorted > the second tangential distortion threshold X2, it indicates that there is a tangential distortion situation; when Δx distorted or Δy distorted ≤ the second tangential distortion threshold X2, it indicates that there is no tangential distortion situation; when the comet distortion coefficient HJ > the third comet distortion threshold X3, it indicates that there is a comet distortion situation; when the comet distortion coefficient HJ ≤ the third comet distortion threshold X3, it indicates that there is no comet distortion situation.
7. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 6, characterized in that, S44 includes: S441. After identifying the presence of radial distortion, for the distance between each pixel point and the image center, calculate the radial distance r in the actual image within the first imaging region distorted and the radial distance r in the ideal image ideal . The expression is as follows: where r ideal represents the radial distance of each pixel in the ideal image, and r distorted represents the radial distance of each pixel in the actual image; S442. Obtain the radial distortion coefficient through the following radial distortion formula In the formula, k1 represents the first-order radial distortion weight coefficient, which contributes the most to the total distortion. k2 represents the second-order radial distortion weight coefficient, which is used to correct the high-order influence. k3 represents the third-order radial distortion weight coefficient, which is used to make minor corrections to the extreme edge points; the values of k1, k2, and k3 are obtained through experimental fitting; S443. After identifying the existence of tangential distortion, calculate and obtain the radial distance r in the actual image in the regional image distorted and the radial distance r in the ideal image ideal , and calculate and obtain the first tangential distortion coefficient on the x-axis through the following formula and the second tangential distortion coefficient on the y-axis Wherein, p1 and p2 are weighting coefficients, which are obtained by fitting through experimental data or image calibration; is the square of the radial distance from each pixel to the center of the image; S444. Extract the radial distortion coefficients calculated in S442 - S443 The first tangential distortion coefficient on the x-axis and the second tangential distortion coefficient on the y-axis Combine with the coma distortion coefficient HJ calculated in S44. After dimensionless processing, the overall distortion rate D is calculated through the following formula: In the formula, w1, w2, and w3 represent weights, 0 < w1 < 1, 0 < w2 < 1, 0 < w3 < 1, and w1 + w2 + w3 = 1.
8. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 7, characterized in that S4 also includes: S45. Based on the overall distortion rate D calculated in S444, preset a distortion risk threshold X, and compare the overall distortion rate D with the distortion risk threshold X to obtain a second evaluation result, including: When the overall distortion rate D > the distortion risk threshold X, it indicates abnormal distortion, and a second correction instruction is generated, including: using a segmented fine-tuning method to adjust and increase 0.5% - 1% of the current second spacing L2, with each adjustment not exceeding between 0.5% - 1%, to form a third spacing L3 until the overall distortion rate D < the distortion risk threshold X; When the overall distortion rate D ≤ the distortion risk threshold X, it indicates that the distortion is within the standard threshold range, no correction is required, and a second qualified label is generated on the industrial lens.
9. The automatic focusing and distortion optimization method based on a large-target industrial lens according to claim 1, wherein S5 Including: S51. Fix the industrial lens on a high-precision rotating table to ensure that the optical axis is aligned with the beam of the measuring instrument; S52. Select a third test calibration object such that the third test calibration object is parallel to the imaging plane of the lens, and use a high-resolution image acquisition device to collect and obtain an image of the third imaging area: S53. In the image of the third imaging region, extract the pixel features of the central region and the edge region, and calculate and obtain the central brightness L of the image through the following formula center and the edge brightness L of the image edge : Where N center represents the number of pixels in the central region, and I center (x, y) is the luminance value of each pixel in the central region. N edge represents the number of pixels in the edge region; I edge (x, y) is the luminance value of each pixel in the edge region. (x, y) ∈ centerregion means that the summation is only performed on the pixels within the "central region" center region; (x, y) ∈ edge region means that the summation is only performed on the pixels in the "edge region". S54. According to the central brightness L of the image center and the edge brightness L of the image edge , the edge brightness attenuation coefficient E is calculated and obtained through the following formula: S55. When the value of the edge brightness attenuation coefficient E > 1, it indicates that the edge of the image is darker than the center, and brightness attenuation has occurred. A third correction instruction is generated, including: using a segmented fine-tuning method to adjust and increase 0.05% - 0.1% of the current third spacing L3 to form a fourth spacing L4; When the value of the edge brightness attenuation coefficient E ≤ 1, it indicates that the image brightness distribution is uniform, no brightness attenuation has occurred, no correction is required, and a third qualified label is generated on the industrial lens.
10. The automatic focusing and distortion optimization method based on a large target surface industrial lens according to claim 9, characterized in that When the industrial lens generates the first qualified label, the second qualified label, and the third qualified label at the same time, it indicates that the lens meets the predetermined qualified standards in multiple performance indicators. If any of the qualified labels is missing, repeat steps S1 - S5 until the first qualified label, the second qualified label, and the third qualified label are generated at the same time.
Citation Information
Patent Citations
Image space telecentric lens for imaging spectrometer and imaging spectrometer
CN119087643A
Image capturing lens and image capturing device
JP2017003677A