A lens defect detection method based on intelligent image processing

Through intelligent image processing and fuzzy logic algorithms, combined with physical analysis information of the lens production process, the problem of inaccurate defect assessment in the existing technology is solved, a more accurate and dynamic defect severity assessment is achieved, and detection efficiency and cost-effectiveness are improved. .

CN118379525BActive Publication Date: 2024-09-03SHEN ZHEN MICROCYSTAL OPTICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410823071.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-03
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The existing technology relies on two-dimensional image analysis in lens defect detection and fails to fully consider the three-dimensional characteristics and environmental factors of the defect, resulting in inaccurate defect severity assessment and difficulty in handling the ambiguity and uncertainty of defect characteristics.

Method used

Using a method based on intelligent image processing, physical analysis information is obtained by simulating the material heating and cooling phenomenon during the lens production process, and a lens defect identification library and feature identification set are established. A comprehensive evaluation is performed based on fuzzy logic algorithms to generate an optimized identification algorithm configuration. , considering the three-dimensional characteristics of defects and environmental factors.

Benefits of technology

It achieves more accurate defect severity assessment, can dynamically adapt to production conditions and emerging defect types, improves detection efficiency, reduces unnecessary image processing, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379525B
    Figure CN118379525B
Patent Text Reader

Abstract

The present invention relates to the field of image analysis technology, and specifically to a lens defect detection method based on intelligent image processing, comprising the following steps: simulating the material heating and cooling phenomena in the lens production process, including material heating and cooling, pressure changes, and material flow conditions, analyzing the influence of these conditions on defect formation, and obtaining physical analysis information of the lens production process. The present invention, by introducing fuzzy logic algorithms and comprehensively analyzing defect characteristics, including their role, position, size, and shape in the lens optical path, can more accurately evaluate the real impact of defects on lens performance. Compared with traditional technologies that rely on two-dimensional image analysis, it can comprehensively consider the three-dimensional characteristics of defects and provide a more accurate defect severity assessment. It can also identify the potential interactions between different defects and their combined impact.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image analysis, and in particular to a lens defect detection method based on intelligent image processing. Background Art

[0002] The field of image analysis technology is a high-tech field that involves the intersection of multiple disciplines such as computer vision, machine learning, and image processing technology. Image analysis technology is usually used to extract useful information from images, identify patterns, or make decisions. It has a wide range of applications in many fields such as industry, medicine, and security, and is particularly important in automated testing and quality control. The development of the field has benefited from the improvement of computing power, the advancement of algorithms, and the application of big data technology, making image analysis technology more accurate and efficient.

[0003] The lens defect detection method based on intelligent image processing is a method that uses intelligent image processing technology to automatically detect defects (such as scratches, stains, cracks, etc.) in lens products. Its purpose is to improve the quality control efficiency and accuracy of lens production, reduce the subjectivity and labor intensity of manual inspection, and thus ensure the quality of lens products. The effects include improving the speed and accuracy of inspection, reducing production costs, and improving the reliability of the final product and customer satisfaction.

[0004] Although the existing technology has made remarkable achievements in the field of lens defect detection, the following problems still exist: the accuracy of defect severity assessment relies on two-dimensional image analysis, and fails to fully consider the three-dimensional characteristics of defects, such as depth, volume, or the impact on light transmittance. When the impact of the defect is not limited to the surface, it is difficult to accurately assess the actual impact of the defect on the lens performance. As a result, the assessment results are also difficult to fully reflect the true severity of the defect. In the process of evaluating the severity of defects, most defects are regarded as independent events, and the interaction between defects and their relationship with the lens use environment are not comprehensively considered. For example, some defects may have a great impact on lens performance under specific lighting or usage conditions, but have almost no effect under other conditions. As a result, the severity score may not be accurate enough. At the same time, due to the diversity and complexity of defect characteristics, as well as the differences in subjective judgment of their impact, fixed and linear judgment criteria are mostly used in defect severity assessment, which makes it difficult to deal with the ambiguity and uncertainty of defect characteristics. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a lens defect detection method based on intelligent image processing.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a lens defect detection method based on intelligent image processing, comprising the following steps;

[0007] S1: Simulate the material heating and cooling phenomena during the lens production process, analyze the influence of the conditions on defect formation, and obtain physical analysis information of the lens production process;

[0008] S2: using the physical analysis information of the lens production process, collecting images of the lens, identifying and classifying lens defects, and establishing a lens defect identification library;

[0009] S3: Based on the lens defect recognition library, perform image analysis and processing, identify defect features in the image, classify and mark the defects, and construct a feature identification set of lens defects;

[0010] S4: using the characteristic identification set of the lens defects, comprehensively evaluating each defect, assigning a severity score, and generating a scoring index table for lens defects;

[0011] S5: Based on the lens defect scoring index table, adjust the system parameters to generate an optimized recognition algorithm configuration.

[0012] The present invention has improvements in that the physical analysis information of the lens production process includes thermal stress distribution, cooling rate evaluation, and material flow change index; the lens defect recognition library includes defect size classification, surface position marking, and defect morphology description; the feature identification set of the lens defects includes defect boundary accuracy, color variability, and surface roughness index; the lens defect scoring index table includes defect impact degree rating, defect emergency processing priority, and defect visualization impact score; the optimized recognition algorithm configuration includes adjusted image contrast parameters, edge detection algorithm sensitivity coefficient, and defect size recognition threshold.

[0013] The present invention is improved in that the specific steps of simulating the material heating and cooling phenomena in the lens production process, including material heating and cooling, pressure changes, and material flow conditions, analyzing the influence of these conditions on defect formation, and obtaining physical analysis information of the lens production process are as follows;

[0014] S101: By simulating the material heating and cooling phenomenon in the lens production process, recording the thermal expansion or contraction reaction of the material at various temperatures, and controlling the temperature rise and fall rate of the heating device, measuring the physical state change of the material, and obtaining the temperature effect record;

[0015] S102: Based on the temperature effect record, by changing the pressure magnitude and duration of the pressure applying device, monitoring and recording the deformation and stress distribution of the material under pressure, and obtaining the pressure response analysis result;

[0016] S103: Based on the pressure response analysis result, the speed and path of the material flow process are simulated by the Navier-Stokes equation, the flow parameters are adjusted by using the fluid dynamics principle, the internal stress changes caused by the material flow are recorded, and the physical analysis information of the lens production process is obtained;

[0017] The Navier-Stokes equation follows the formula:

[0018] ;

[0019] Simulate the speed and path of material flow;

[0020] in, is the density of the fluid, is the velocity vector of the fluid, indicating the velocity of the fluid in all directions in space, is a time variable, used to represent the changes in speed and pressure in the time dimension. is the gradient of the velocity vector, which is used to calculate the spatial variation of fluid velocity, is the partial derivative of the velocity vector with respect to time, indicating the rate of change of velocity with time, is the pressure gradient, representing the change in pressure in space, is the viscosity coefficient of the fluid, is the Laplace operator of the velocity vector, which is used to describe the second-order derivative of the fluid velocity in space. is the external force vector acting on the fluid.

[0021] The present invention is improved in that the physical analysis information of the lens production process is used to collect images of the lens to identify and classify lens defects, and the specific steps of establishing a lens defect identification library are as follows:

[0022] S201: collecting images from multiple angles under changing lighting conditions on the lens, covering each viewing angle from top to bottom, and generating a comprehensive viewing angle image set;

[0023] S202: selecting images showing defect features, including uneven edges and abnormal color difference, from the comprehensive view image set, defining feature standards for each defect, and obtaining a defect feature definition set;

[0024] S203: According to the defect feature definition set and the physical analysis information of the lens production process, the defects in the image are classified and recorded according to size, shape and position attributes to generate a lens defect recognition library.

[0025] The present invention is improved in that, based on the lens defect recognition library, image analysis and processing are performed to identify defect features in the image, and the defects are classified and marked. The specific steps of constructing a feature identification set of lens defects are as follows:

[0026] S301: using the images in the lens defect recognition library, reviewing the images one by one, identifying defects in the images, including cracks, scratches or bubbles, marking the images with preliminary defect labels, and generating an initial defect image label set;

[0027] S302: Based on the initialized defect image label set, use an edge detection method to analyze the features of each type of defect image again, including the geometric shape, size and position of the defect in the image, and refine the defects by the features to obtain a defect refinement classification set;

[0028] The edge detection method is according to the formula:

[0029] ;

[0030] Analyze the features of each type of defect image to obtain a refined defect classification set;

[0031] in, For the improved edge strength, is the weight coefficient of the horizontal gradient, which is used to adjust the edge detection sensitivity in the horizontal direction. is the weight coefficient of the vertical gradient, which is used to adjust the edge detection sensitivity in the vertical direction. It is the horizontal gradient of the image, which is used to identify the lateral changes of the image in the edge detection algorithm. It is the vertical gradient of the image, which is used to identify the vertical changes of the image in the edge detection algorithm. is the refractive index of the material, which measures the material's ability to refract light. is the hardness of the lens material, is the thickness of the lens, is the depth of the defect;

[0032] S303: According to the defect refinement classification set, a unique identifier is assigned to each defect type, its feature description and classification are recorded, and information is integrated to construct a feature identification set of lens defects.

[0033] The present invention is improved in that the characteristic identification set of the lens defects is used to comprehensively evaluate each defect, and a severity score is assigned to each defect with reference to multiple characteristics of the defect. The specific steps of generating a lens defect scoring index table are as follows;

[0034] S401: using the feature identification set of the lens defect, subdividing the position, shape and size of the defect, using parameters including defect area ratio and defect edge clarity to quantify the defect characteristics, and generating a defect characteristic quantitative index;

[0035] S402: Based on the quantitative indicators of the defect characteristics and the fuzzy logic algorithm, a comprehensive analysis is performed with reference to the degree of influence of the defect on the optical performance, and the potential influence of the defect on the light transmission and imaging quality is evaluated according to the location, size and role of the defect in the optical path of the lens to obtain a basic defect score;

[0036] The fuzzy logic algorithm is performed according to the formula:

[0037] Defect area ratio calculation:

[0038] ;

[0039] in, is the percentage of lens defect area, is the defect area, is the total area of ​​the lens, is the defect depth, is the lens thickness, is the material refractive index;

[0040] Edge clarity calculation:

[0041] ;

[0042] in, is the edge definition, and Represent the gradients of the Sobel algorithm in the horizontal and vertical directions, is the wavelength of light;

[0043] Defuzzification process to determine the base defect score:

[0044] ;

[0045] in, For basic defect scoring, is the membership degree of fuzzy set A at x. Fuzzy set A represents the level of defect severity, including slight, medium, and severe. x is the defect size value. By combining the wavelength of light and the material refractive index Adjust the degree of affiliation;

[0046] S403: In combination with the basic defect score, by comparing the impact of each defect on the overall performance of the lens, and referring to the repair requirements of the defects and the importance of the impact on product performance, iterative adjustments and priority sorting are performed to generate a lens defect scoring index table.

[0047] The present invention is improved in that, based on the lens defect scoring index table, the system parameters are adjusted, including changing the sensitivity parameters of the algorithm or modifying the defect recognition threshold, and the specific steps of generating the optimized recognition algorithm configuration are as follows;

[0048] S501: Based on the lens defect scoring index table, analyzing the corresponding relationship between multiple types of defects and their scores, identifying the defect types that have a key impact on lens performance, including sorting and classifying the scoring data, and obtaining a key defect list;

[0049] S502: Based on the key defect list, a parameter adjustment scheme is designed, including an adjustment range of light intensity and a variation range of image acquisition speed, and image recognition effects under various light and speed conditions are simulated to record changes in key parameters that affect recognition accuracy and obtain experimental parameter adjustment records;

[0050] S503: Based on the experimental parameter adjustment record, the optimal adjustment values ​​of the sensitivity parameter and the recognition threshold are selected, and by comparing the recognition effects before and after the experiment, the refined parameter settings are selected to generate an optimized recognition algorithm configuration.

[0051] Compared with the prior art, the advantages and positive effects of the present invention are:

[0052] In the present invention, by introducing fuzzy logic algorithms and comprehensively analyzing defect characteristics, including their role, position, size and shape in the optical path of the lens, the real impact of defects on lens performance can be more accurately evaluated. Compared with traditional technologies that rely on two-dimensional image analysis, it can comprehensively consider the three-dimensional characteristics of defects and provide a more accurate defect severity assessment. While taking into account changes in environmental factors and usage conditions, the assessment of defect severity is also made more comprehensive and dynamic. By real-time monitoring of physical analysis information during the lens production process and combining fuzzy logic algorithms for dynamic scoring, it can adapt to changing production conditions and emerging defect types. Compared with traditional fixed and linear judgment criteria, it can more effectively handle the ambiguity and uncertainty of defect characteristics. By predicting the possibility of defect occurrence and adjusting the image acquisition device settings in advance, the detection process is optimized and unnecessary image processing is reduced. Not only does it improve detection efficiency, it also helps to reduce waste in the production process, improve material utilization, and reduce production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1A flow chart of a lens defect detection method based on intelligent image processing is proposed for the present invention;

[0054] Figure 2 A schematic diagram of a detailed flow chart of step S1 in a lens defect detection method based on intelligent image processing is proposed in the present invention;

[0055] Figure 3 A schematic diagram of a detailed flow chart of step S4 in a lens defect detection method based on intelligent image processing is proposed in the present invention;

[0056] Figure 4 A schematic diagram of a detailed flow chart of step S5 in a lens defect detection method based on intelligent image processing is proposed in the present invention;

[0057] Figure 5 The present invention proposes a detailed flow chart of step S6 in a lens defect detection method based on intelligent image processing;

[0058] Figure 6 The present invention proposes a detailed flowchart of step S7 in a lens defect detection method based on intelligent image processing. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0060] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0061] Example: See Figure 1 ,The present invention provides a technical solution: a lens defect detection method based on intelligent image processing, comprising the following steps;

[0062] S1: Simulate the material heating and cooling phenomena during the lens production process, analyze the influence of the conditions on defect formation, and obtain physical analysis information of the lens production process;

[0063] S2: Using the physical analysis information of the lens production process, by collecting images of the lens, identifying and classifying lens defects, and establishing a lens defect identification library;

[0064] S3: Based on the lens defect recognition library, perform image analysis and processing, identify defect features in the image, classify and mark the defects, and build a feature identification set of lens defects;

[0065] S4: using the characteristic identification set of lens defects, comprehensively evaluate each defect, assign a severity score, and generate a scoring index table for lens defects;

[0066] S5: Based on the lens defect scoring index table, adjust the system parameters to generate an optimized recognition algorithm configuration.

[0067] The physical analysis information of the lens production process includes thermal stress distribution, cooling rate assessment, and material flow change indicators. The lens defect recognition library includes defect size classification, surface position marking, and defect morphology description. The feature identification set of lens defects includes defect boundary accuracy, color variability, and surface roughness index. The lens defect scoring index table includes defect impact rating, defect emergency processing priority, and defect visualization impact score. The optimized recognition algorithm configuration includes adjusted image contrast parameters, edge detection algorithm sensitivity coefficient, and defect size recognition threshold.

[0068] See also Figure 2 , simulate the material heating and cooling phenomena in the lens production process, including material heating and cooling, pressure changes, and material flow, analyze the influence of its conditions on defect formation, and obtain the physical analysis information of the lens production process. The specific steps are as follows;

[0069] S101: By simulating the material heating and cooling phenomenon during the lens production process, recording the thermal expansion or contraction reaction of the material at various temperatures, controlling the temperature rise and fall rate of the heating device, measuring the physical state change of the material, and obtaining the specific process of temperature effect recording is as follows:

[0070] By simulating the heating and cooling of materials during lens production, the heating device is first set to operate at a specific temperature rise and fall rate, such as a temperature change of 1°C per minute, to ensure uniform heating of the material. Thermistors are used to monitor the material's response to different temperatures, such as expansion or contraction. Each time a preset temperature point is reached (such as every 5°C increase), the material's physical state is recorded, including changes in volume and shape. All data is automatically recorded in a temperature effect record table for subsequent analysis. This process is repeated until the material has gone through a complete cycle from room temperature to the set maximum temperature and back to room temperature.

[0071] S102: Based on the temperature effect record, by changing the pressure size and duration of the pressure applying device, the deformation and stress distribution of the material under pressure are monitored and recorded. The specific process of obtaining the pressure response analysis results is as follows:

[0072] After obtaining a detailed record of the temperature effect, the next step is to adjust the pressure application device to apply different pressure levels and durations to the material. For example, starting from 5Pa, each increase of 5Pa, the duration varies from 1 second to 10 seconds. The deformation and stress distribution of the material are monitored by stress sensors. These data are recorded in real time and annotated with each pressure level and duration. In this way, the reactivity and elasticity of the material under different pressure conditions can be understood in detail. This step is to evaluate the performance of the material under the pressure conditions that may be encountered in actual production.

[0073] S103: Based on the pressure response analysis results, the speed and path of the material flow process are simulated by the Navier-Stokes equation, the flow parameters are adjusted using the principles of fluid dynamics, and the internal stress changes caused by the material flow are recorded to obtain the physical analysis information of the lens production process. The specific process is as follows:

[0074] The material flow process is simulated using the temperature and pressure response analysis results obtained in the first two steps. The fluid dynamics simulation parameters, such as flow rate and path, are set and adjusted according to the specifications of the actual production equipment. Through the simulation, the changes in internal stress generated when the material flows are recorded. These data reflect possible problem areas and potential defect formation during the flow process. Through continuous monitoring, detailed data on the behavior of the material in actual flow can be obtained, providing a basis for the final quality control of the lens.

[0075] The Navier-Stokes equations follow the formula:

[0076] ;

[0077] Simulate the speed and path of materials during flow;

[0078] in, It is the density of the fluid, which affects the fluid dynamics behavior and determines the acceleration of the fluid when subjected to force. is the velocity vector of the fluid, which represents the velocity of the fluid in all directions in space. It is a time variable, which is used to represent the changes of physical quantities such as speed and pressure in the time dimension. It is the gradient of the velocity vector and is used to calculate the spatial variation of fluid velocity. It is important for understanding the flow behavior of the fluid in space. is the partial derivative of the velocity vector with respect to time, which represents the rate of change of velocity with time. It is the pressure gradient, representing the change of pressure in space. The negative value of this gradient points to the direction of increased fluid pressure and is the main force driving fluid flow. It is the viscosity coefficient of the fluid, which determines the magnitude of the internal friction when the fluid flows and affects the fluidity of the fluid. is the Laplace operator of the velocity vector, which is used to describe the second-order derivative of the fluid velocity in space and affects the stability of the fluid flow and the development of turbulence. The external force vector acting on the fluid, such as gravity, is a factor that affects the external conditions of fluid flow.

[0079] The execution process is as follows:

[0080] Fluid density ( )

[0081] Fluid density is affected by temperature, and the adjustment formula is: ,in is the reference density, is the coefficient of thermal expansion, represents the temperature change. During the lens manufacturing process, the material may experience different thermal expansion behaviors due to heating. These parameters are usually obtained experimentally, where and It needs to be obtained from the physical property data of the material or determined through experiments.

[0082] Fluid velocity vector ( ) and velocity gradient ( ) calculation:

[0083] Velocity Vector The velocity gradient can be obtained through fluid dynamics simulation or actual flow velocity measurement. It is calculated from the velocity data by numerical methods (such as the finite difference method).

[0084] Pressure gradient ( ) calculation:

[0085] pressure It can be obtained through fluid mechanics simulation or direct measurement, and its gradient Calculated by numerical methods to describe the spatial variation of pressure in the fluid.

[0086] Viscosity coefficient ( )

[0087] The viscosity coefficient is also affected by temperature and is adjusted to ,in is the reference viscosity, is the coefficient of influence of temperature on viscosity. This reflects the change in the flow characteristics of the material at different temperatures. and It needs to be determined from the material's physical property data or experiments.

[0088] external force( ) calculation:

[0089] External forces generally include gravity, etc. These forces can be directly determined from the experimental conditions or estimated based on the experimental settings.

[0090] Substitute all calculated parameter values ​​into the improved Navier-Stokes equations. Use numerical solutions, such as the finite element method or the finite difference method, to solve the equations and obtain the detailed dynamic behavior of the fluid under specific conditions. The results obtained (such as velocity distribution, pressure field) are used to optimize material processing and quality control during lens production. This helps engineers better understand the behavior of materials under production conditions, predict and reduce the generation of defects, and ensure the quality and performance of the lens. By precisely adjusting production parameters, production efficiency and product quality can be improved.

[0091] See also Figure 3 ,Using the physical analysis information of the lens production process, by collecting images of the lens, lens defects are identified and classified, and the specific steps of establishing a lens defect identification library are as follows;

[0092] S201: The specific process of collecting images from multiple angles under changing lighting conditions for the lens, covering each viewing angle from top to bottom, and generating a comprehensive viewing angle image set is as follows:

[0093] The system controls the light source to illuminate the lens from different angles and automatically adjusts the light intensity and color temperature. The system places the lens on a rotating table and rotates it continuously from 0 to 360 degrees, recording an image every 10 degrees. For each angle, the system captures images under three different lighting conditions (low, medium, and high brightness). In this way, it ensures that every viewing angle from top to bottom is covered, thus forming a comprehensive viewing angle image set containing multiple angles and multiple lighting conditions.

[0094] S202: Screening images showing defect features from the comprehensive view image set, including uneven edges and abnormal color difference, defining feature standards for each defect, and obtaining a defect feature definition set. The specific process is as follows:

[0095] After generating a comprehensive view image set, the next step is to filter out images that show defect features. By setting a baseline image analysis program, the uneven edges and color difference anomalies in the image are identified. In order to accurately define the characteristic standards of each defect, the image recognition system is trained with known defect samples to establish thresholds for defect features, such as edge unevenness exceeding 5 mm and color difference exceeding 20% ​​of the normal range. The system will automatically mark all images that meet these conditions and generate a defect feature definition set. The threshold formula applied here is: Defect recognition threshold = baseline color difference or edge flatness × (1 + set tolerance percentage).

[0096] S203: Based on the defect feature definition set and the physical analysis information of the lens production process, the defects in the image are classified and recorded according to the size, shape and position attributes. The specific process of generating the lens defect recognition library is as follows:

[0097] With the defect feature definition set, the next step is to use these definitions to conduct in-depth analysis of the lens image. Through image processing software, the defects in the image are classified by size, shape and location. For example, defects are classified into small (less than 1 square centimeter), medium (1 to 3 square centimeters), and large (greater than 3 square centimeters); shapes are divided into round, elliptical, and irregular; and locations are divided into center, edge, and corner. These classifications are based on the parameters in the defect feature definition set, and each defect will be recorded in a dedicated database to form a lens defect recognition library.

[0098] See also Figure 4 ,Based on the lens defect recognition library, image analysis and processing are performed, defect features in the image are identified, and defects are classified and marked.,The specific steps of constructing the feature identification set of lens defects are as follows;

[0099] S301: Using the images in the lens defect recognition library, the images are examined one by one to identify defects in the images, including cracks, scratches or bubbles, and preliminary defect labels are added to the images. The specific process of generating an initial defect image label set is as follows:

[0100] In the lens defect recognition library, an automated image review system is first used to check each image one by one to identify various types of defects in the image, such as cracks, scratches or bubbles. The system uses preset image processing technology to automatically detect and mark these defect features. Each identified defect will be marked with a preliminary label, which includes the defect type and possible impact. All this information will be compiled into an initialized defect image label set, which will be used for more detailed analysis and processing later. This process ensures that every defect is accurately recorded and classified.

[0101] S302: Based on the initialized defect image label set, the edge detection method is used to analyze the features of each type of defect image again, including the geometric shape, size and position of the defect in the image, and the defects are refined and classified according to the features. The specific process of obtaining the defect refinement classification set is as follows:

[0102] Based on the initialized defect image label set, each type of defect is further analyzed in depth, focusing on the defect geometry, size and its precise location in the image. Image analysis software is used to refine the classification of each marked defect. For example, cracks are classified according to length and width, and bubbles are distinguished according to their location and size inside the lens. Through these detailed analyses, a defect refinement classification set is generated, which contains more accurate defect description and classification information, providing a basis for the final defect processing.

[0103] The edge detection method is based on the formula:

[0104] ;

[0105] Analyze the features of each type of defect image to obtain a refined defect classification set;

[0106] in, is the improved edge strength, which means the overall strength of the defect edge in the image calculated after specific physical parameter adjustment and weight adjustment. It is the weight coefficient of the horizontal gradient, which is used to adjust the edge detection sensitivity in the horizontal direction to adapt to different types of defect features. It is the weight coefficient of the vertical gradient, which is used to adjust the edge detection sensitivity in the vertical direction and is also suitable for different types of defect features. It is the horizontal gradient of the image and is used to identify lateral changes in the image in the edge detection algorithm. It is the gradient of the image in the vertical direction, which is used to identify the vertical changes of the image in the edge detection algorithm. It is the refractive index of the material, which reflects the material's ability to refract light and affects the accuracy of edge detection. The hardness of the lens material determines the material's ability to resist deformation. Different hardnesses will result in different defect formation and edge characteristics. The thickness of the lens, one of the physical dimensions of the lens, affects defect formation depth and edge detection. The depth of the defect directly affects the appearance of the defect in the lens and the complexity of edge detection.

[0107] The execution process is as follows:

[0108] Calculate image gradient and :

[0109] First, calculate the image in the horizontal direction ( ) and vertical direction ( ). It is calculated by applying the following convolution operation to each pixel of the image: in, and is the Sobel operator in the horizontal and vertical directions, is the input image matrix.

[0110] Determine the weight coefficient and :

[0111] The weight coefficient is determined according to the lens defect type (e.g., crack or bubble). This can be determined by experimental data analysis, for example, by analyzing the edge intensity response of different types of defects in the horizontal or vertical direction. It is assumed that by comparing the standard deviation of the image processing results of different defect types To determine, the weight can be calculated by the following formula: in, and are the standard deviations of edge strength in the horizontal and vertical directions, respectively.

[0112] Applying physics and material parameters , , ,and :

[0113] These parameters need to be obtained from the manufacturing specifications and material property tables of the lens. (refractive index) and (Hardness) Usually provided by the material supplier or obtained through standard physical testing. (thickness) and (Defect depth) is usually obtained through precise physical measurement or imaging techniques.

[0114] Calculate the improved edge strength :

[0115] Substitute all the above calculation results into the improved formula, first calculate and The weighted sum of , then multiplied by the ratio of physical and material parameters;

[0116] Finally, take the square root to get : ;

[0117] Calculated The value is used to evaluate the edge strength of defects in the lens, which is a key indicator for further defect classification and severity assessment. By adjusting the sensitivity and adaptability of the image processing algorithm, the improved formula improves the accuracy and reliability of lens defect detection, making the quality control process more precise, thereby ensuring the final performance and quality of the lens product.

[0118] S303: According to the defect refinement classification set, a unique identifier is assigned to each defect type, its feature description and classification are recorded, and information is integrated to construct a feature identification set of lens defects. The specific process is as follows:

[0119] After completing the detailed classification of defects, the next step is to assign a unique identifier to each defect type. These identifiers help to quickly identify and reference specific defect categories in subsequent processing and analysis. The system will automatically generate a code for each defect, which reflects the main characteristics of the defect, such as type, size and shape. All this information is integrated into a structured database to form the final lens defect feature identification set, which is not only used for internal quality control, but may also be used for comparison and compliance assessment with external standards.

[0120] See also Figure 5 ,Using the characteristic identification set of lens defects, a comprehensive evaluation is performed on each defect, and a severity score is assigned to each defect with reference to multiple characteristics of the defect. The specific steps of generating the scoring index table of lens defects are as follows;

[0121] S401: Using the feature identification set of lens defects, the position, shape and size of the defects are subdivided, and the defect characteristics are quantified using parameters including defect area ratio and defect edge clarity. The specific process of generating defect characteristic quantitative indicators is as follows:

[0122] Using the characteristic identification set of lens defects, we first analyze the location, shape and size of each defect in more detail. Through specially designed software tools, we quantify the area ratio and edge clarity of each defect. The defect area ratio is calculated by the ratio of the area of ​​the defect area to the entire lens area, and the edge clarity is measured by the pixel gradient change at the edge. The calculation of these two parameters is: defect area ratio = defect area / total lens area, edge clarity = sum of gradients of edge pixels / defect boundary length. Through such quantification, we can get a specific numerical description of each defect, and these data are used to generate defect characteristic quantitative indicators to provide basic data for subsequent scoring and analysis.

[0123] S402: Based on the quantitative indicators of defect characteristics and fuzzy logic algorithm, the influence of defects on optical performance is referred to and a comprehensive analysis is performed. According to the location, size and role of the defect in the optical path of the lens, the potential influence on light transmission and imaging quality is evaluated. The specific process of obtaining the basic defect score is as follows:

[0124] Based on the generated defect characteristic quantitative indicators, the next step is to analyze the impact of defects. Fuzzy logic is used to evaluate the specific impact of defects on the optical performance of the lens, such as light transmission and imaging quality. During this analysis, the location, size, and role of the defect in the optical path of the lens are used as input parameters to construct a fuzzy logic system, and the output is a basic score for the defect. This score reflects the degree of impact that the defect may have on the performance of the lens, and is based on a comprehensive analysis of the defect characteristic quantitative indicators and the preset fuzzy logic rules.

[0125] The fuzzy logic algorithm proceeds according to the formula:

[0126] Defect area ratio calculation:

[0127] ;

[0128] in, is the percentage of lens defect area, is the defect area, is the total area of ​​the lens, is the defect depth, is the lens thickness, is the material refractive index;

[0129] The execution process is as follows:

[0130] First, measure the area of ​​the defective area And the area of ​​the entire lens .

[0131] Next, assess the depth of the defect Relative to the total thickness of the lens to take into account the three-dimensional nature of the defect.

[0132] The refractive index of the material Included in the calculation to reflect the effect of the material on the propagation of light.

[0133] Using the formula , calculate the relative area ratio of the defects, and obtain a defect area ratio value that combines the two-dimensional area ratio, three-dimensional depth influence and optical properties.

[0134] Edge sharpness calculation:

[0135] ;

[0136] in, is the edge definition, and Represent the gradients of the Sobel algorithm in the horizontal and vertical directions, is the wavelength of light;

[0137] The execution process is as follows:

[0138] Calculate the horizontal and vertical gradients of the defect edge using the Sobel algorithm , , to assess edge clarity.

[0139] Introduced light wavelength and the material refractive index , to adjust the calculation of edge clarity and reflect the impact of different wavelengths of light on edge detection.

[0140] Using the formula , calculate the adjusted edge clarity and obtain a clarity index that reflects the actual visual effect and optical properties.

[0141] Defuzzification process to determine the base defect score:

[0142] ;

[0143] in, For basic defect scoring, is the membership degree of fuzzy set A at x. Fuzzy set A represents the level of defect severity, including minor, moderate, severe, is the defect size value, which is obtained by combining the light wavelength and the material refractive index Adjust the degree of affiliation.

[0144] The execution process is as follows:

[0145] Determine all possible defect score values ​​that can be output by the fuzzy logic system .

[0146] For each possible rating value, use the fuzzy set membership function Calculate its membership degree to indicate the degree of adaptability of each score value to the severity of the defect.

[0147] Using the weighted average method, according to the formula Perform defuzzification to convert the fuzzy score value into a specific basic defect score .

[0148] The final basic defect score It is a clear numerical value that can be directly used to assess the severity of the defect and guide subsequent repair decisions or quality control processes.

[0149] S403: Combined with the basic defect score, by comparing the impact of each defect on the overall performance of the lens, and referring to the repair requirements of the defects and the importance of the impact on product performance, iterative adjustments and priority sorting are performed to generate the lens defect score index table. The specific process is as follows:

[0150] Finally, based on the basic defect scores obtained, defects are prioritized and adjusted. This step involves comparing the scores of each defect and iteratively adjusting them based on the repair needs and the importance of the defect's impact on lens performance. This process is performed through an iterative decision model that prioritizes defects based on their scores and the urgency and cost-effectiveness of repair. Ultimately, all defects are integrated into a detailed scoring index table that lists the scores and repair priorities of each defect, providing clear action and repair guidelines for production and quality control departments.

[0151] See also Figure 6 ,Based on the lens defect scoring index table, the system parameters are adjusted, including changing the sensitivity parameters of the algorithm or modifying the defect recognition threshold.,The specific steps for generating the optimized recognition algorithm configuration are as follows;

[0152] S501: Based on the lens defect scoring index table, the corresponding relationship between multiple types of defects and their scores is analyzed to identify the defect types that have a key impact on the lens performance, including sorting and classifying the scoring data. The specific process of obtaining the key defect list is as follows:

[0153] First, based on the lens defect scoring index table, a comprehensive analysis is performed to identify the defect types that have a critical impact on lens performance. By sorting and classifying the defect types and their corresponding scores, data analysis tools such as classification statistics and trend analysis are used to determine which defects are most common and which have the most serious impact on optical performance. Through this analysis process, a critical defect list is generated, which includes the main defects that need to be prioritized and addressed.

[0154] S502: Based on the key defect list, design a parameter adjustment plan, including the adjustment range of light intensity and the change range of image acquisition speed. By simulating the image recognition effects under various light and speed conditions, record the changes in key parameters that affect recognition accuracy. The specific process for obtaining the experimental parameter adjustment record is as follows:

[0155] After obtaining the list of key defects, the next step is to design parameter adjustment schemes to optimize the defect recognition process. Determine the optimal range of light intensity and image acquisition speed to improve image quality and recognition accuracy. By simulating the image acquisition effects under different lighting conditions (such as from low to high brightness) and different acquisition speeds (from slow to fast), record and analyze the impact of these changes on the recognition effect. This step involves comprehensively considering factors such as light intensity, exposure time, and image processing speed to determine the most suitable parameter settings for high-precision defect recognition.

[0156] S503: Based on the experimental parameter adjustment records, the optimal adjustment values ​​of the sensitivity parameters and the recognition threshold are selected. By comparing the recognition effects before and after the experiment, the refined parameter settings are selected. The specific process of generating the optimized recognition algorithm configuration is as follows:

[0157] Based on the above experimental parameter adjustment records, the next step is to determine and optimize the sensitivity parameters and thresholds of the recognition algorithm. By comparing the image recognition effects before and after the experiment, the specific impact of different parameter settings on recognition accuracy is evaluated. Parameters that can maximize recognition accuracy while minimizing false alarm rates are selected to refine the recognition algorithm. Finally, an optimized recognition algorithm configuration is generated, which will be applied to the actual lens inspection process to ensure the accuracy and efficiency of defect recognition.

[0158] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A lens defect detection method based on intelligent image processing, characterized in that: The steps include: Simulate the material heating and cooling phenomena during the lens production process, analyze the influence of the conditions on defect formation, and obtain physical analysis information of the lens production process; Using the physical analysis information of the lens production process, by collecting images of the lens, identifying and classifying lens defects, and establishing a lens defect identification library; Based on the lens defect recognition library, image analysis and processing are performed to identify defect features in the image, and the defects are classified and marked. The specific steps of constructing a feature identification set of lens defects are as follows: Using the images in the lens defect recognition library, the images are examined one by one to identify defects in the images, including cracks, scratches or bubbles, and preliminary defect labels are marked on the images to generate an initial defect image label set; Based on the initialized defect image label set, the edge detection method is used to analyze the features of each type of defect image again, including the geometric shape, size and position of the defect in the image, and the defects are refined and classified according to the features to obtain a defect refinement classification set; According to the defect refinement classification set, a unique identifier is assigned to each defect type, its feature description and classification are recorded, and information is integrated to construct a feature identification set of lens defects; The edge detection method is according to the formula: ; Analyze the features of each type of defect image to obtain a refined defect classification set; in, For the improved edge strength, is the weight coefficient of the horizontal gradient, which is used to adjust the edge detection sensitivity in the horizontal direction. is the weight coefficient of the vertical gradient, which is used to adjust the edge detection sensitivity in the vertical direction. It is the horizontal gradient of the image, which is used to identify the lateral changes of the image in the edge detection algorithm. It is the vertical gradient of the image, which is used to identify the vertical changes of the image in the edge detection algorithm. is the refractive index of the material, which measures the material's ability to refract light. is the hardness of the lens material, is the thickness of the lens, is the depth of the defect; The specific steps of using the characteristic identification set of the lens defects to comprehensively evaluate each defect and assign a severity score to generate a scoring index table for lens defects are as follows; Using the feature identification set of the lens defect, the position, shape and size of the defect are subdivided, and the defect characteristics are quantified using parameters including defect area ratio and defect edge clarity to generate defect characteristic quantitative indicators; Based on the quantitative indicators of the defect characteristics and the fuzzy logic algorithm, the influence of the defect on the optical performance is referred to and a comprehensive analysis is performed. According to the location, size and role of the defect in the optical path of the lens, the potential influence on the light transmission and imaging quality is evaluated to obtain a basic defect score. In combination with the basic defect score, by comparing the impact of each defect on the overall performance of the lens, and referring to the repair requirements of the defects and the importance of the impact on product performance, iterative adjustments and priority sorting are performed to generate a lens defect scoring index table; The fuzzy logic algorithm is performed according to the formula: Calculation of defect area ratio: ; in, is the percentage of lens defect area, is the defect area, is the total area of ​​the lens, is the defect depth, is the lens thickness, is the material refractive index; Edge clarity calculation: ; in, is the edge definition, and Represent the gradients of the Sobel algorithm in the horizontal and vertical directions, respectively. is the wavelength of light; Defuzzification process to determine the base defect score: ; in, For basic defect scoring, is the membership degree of fuzzy set A at x. Fuzzy set A represents the level of defect severity, including slight, medium, and severe. x is the defect size value. By combining the wavelength of light and the material refractive index Adjust the degree of affiliation; Based on the lens defect scoring index table, the system parameters are adjusted to generate an optimized recognition algorithm configuration.

2. The lens defect detection method based on intelligent image processing according to claim 1, characterized in that: The physical analysis information of the lens production process includes thermal stress distribution, cooling rate assessment, and material flow change index; the lens defect recognition library includes defect size classification, surface position marking, and defect morphology description; the feature identification set of lens defects includes defect boundary accuracy, color variability, and surface roughness index; the lens defect scoring index table includes defect impact degree rating, defect emergency processing priority, and defect visualization impact score; the optimized recognition algorithm configuration includes adjusted image contrast parameters, edge detection algorithm sensitivity coefficient, and defect size recognition threshold.

3. The lens defect detection method based on intelligent image processing according to claim 1, characterized in that: The specific steps for simulating the material heating and cooling phenomena during the lens production process, including material heating and cooling, pressure changes, and material flow, analyzing the influence of these conditions on defect formation, and obtaining physical analysis information of the lens production process are as follows; By simulating the heating and cooling phenomena of materials during lens production, recording the thermal expansion or contraction reactions of materials at various temperatures, and controlling the temperature rise and fall rates of the heating device, measuring the changes in the physical state of the materials, and obtaining temperature effect records; Based on the temperature effect record, by changing the pressure magnitude and duration of the pressure applying device, the deformation and stress distribution of the material under pressure are monitored and recorded to obtain the pressure response analysis result; Based on the pressure response analysis results, the speed and path of the material flow process are simulated by the Navier-Stokes equation, the flow parameters are adjusted using the principles of fluid dynamics, and the internal stress changes caused by the material flow are recorded to obtain physical analysis information of the lens production process.

4. The lens defect detection method based on intelligent image processing according to claim 3, characterized in that: The Navier-Stokes equation follows the formula: ; Simulate the speed and path of materials during flow; in, is the density of the fluid, is the velocity vector of the fluid, indicating the velocity of the fluid in all directions in space, is a time variable, used to represent the changes in speed and pressure in the time dimension. is the gradient of the velocity vector, which is used to calculate the spatial variation of fluid velocity, is the partial derivative of the velocity vector with respect to time, indicating the rate of change of velocity with time, is the pressure gradient, representing the change in pressure in space, is the viscosity coefficient of the fluid, is the Laplace operator of the velocity vector, which is used to describe the second-order derivative of the fluid velocity in space. is the external force vector acting on the fluid.