Method for detecting surface smoothness of optical lens required by display device
By combining machine learning models with the optical lens surface defect library, intelligent detection of optical lens surface finish is achieved, solving the problems of low efficiency and poor accuracy of traditional detection methods, and providing detailed defect information and quality control support.
Patent Information
- Application Number
- CN202510925109.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional optical lens surface finish inspection methods are inefficient and easily affected by human factors, making it difficult to meet the high-precision and high-efficiency requirements of modern optical lens production. Existing inspection technologies based on image processing and machine learning have problems such as complex image processing algorithms, large model training data requirements, and insufficient model generalization capabilities, and are unable to provide detailed defect information.
A surface finish detection model based on machine learning or deep learning is used. By generating enhanced prompt information of detection parameter characters, the pre-trained model is input for detection, and defect information is queried in combination with the optical lens surface defect library. Image gradient analysis and roughness calculation are used for quantitative evaluation. An optical lens surface defect library is constructed and an associated query mechanism is established with the detection results.
It realizes the intelligent identification and classification of optical lens surface defects, improves the accuracy and reliability of detection results, provides detailed defect information, supports process optimization and quality control, and solves the problems of low efficiency and subjective judgment bias of traditional detection methods.
Smart Images

Figure CN120594047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display, and more particularly, to a method for detecting the surface finish of an optical lens required for a display device. Background Art
[0002] In the display device inspection system, the surface finish of the optical lens directly affects the imaging quality. If there are scratches, pitting, coating defects or contamination on the lens surface, it will cause blurred imaging, scattered light interference or reduced contrast in the inspection system, thereby affecting the recognition accuracy of display screen defects.
[0003] Traditionally, the inspection of optical lens surface finish has relied primarily on manual visual inspection or simple optical measurement tools. These methods are not only inefficient but also susceptible to human influence, making it difficult to ensure the accuracy and consistency of test results. With the advancement of optical technology, the precision requirements for optical lenses are becoming increasingly stringent. Traditional inspection methods can no longer meet the high-precision, high-efficiency, and automated surface finish inspection requirements of modern optical lens production.
[0004] There are at least the following problems or defects in the existing technology: First, traditional detection methods are inefficient and easily affected by human factors, making it difficult to meet the high-precision and high-efficiency requirements of modern optical lens production; second, although existing detection technologies based on image processing and machine learning have improved detection efficiency to a certain extent, there are still problems such as complex image processing algorithms, large model training data requirements, and insufficient model generalization capabilities; finally, existing detection methods cannot provide detailed defect information and cannot meet the needs for detailed defect analysis in optical lens production and quality control. Summary of the Invention
[0005] The present invention provides a method for detecting the surface finish of an optical lens required for a display device, comprising: In response to receiving a surface detection request corresponding to a target optical lens, generating surface detection enhancement prompt information corresponding to the detection parameter characters according to the detection parameter characters corresponding to the surface detection request; Inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table; Displaying the surface finish test result table on a test interface, and in response to detecting a click operation on any surface finish test result in the surface finish test result table, querying a surface defect information set corresponding to the clicked surface finish test result in a pre-built optical lens surface defect library; The surface defect information set is displayed on a detection interface.
[0006] Furthermore, before inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table, the method further includes: Training the first initial surface finish detection model based on the acquired optical lens detection data set corresponding to the optical lens surface detection field to obtain a second initial surface finish detection model; The second initial surface finish detection model is trained according to a preset surface detection enhancement prompt information sample set to obtain a third initial surface finish detection model, wherein the surface detection enhancement prompt information sample includes: a plurality of surface detection feature information; In response to determining that the model training effect corresponding to the third initial surface finish detection model reaches the expected effect, determining the third initial surface finish detection model as the trained surface finish detection model; In response to determining that the model training effect does not achieve the expected effect, training the third initial surface finish detection model according to the surface detection enhancement prompt information test sample set corresponding to the model training effect to obtain a trained third initial surface finish detection model; The trained third initial surface finish detection model is used as the third initial surface finish detection model, and the third initial surface finish detection model is trained again.
[0007] Furthermore, the first initial surface finish detection model is trained based on the acquired optical lens detection dataset corresponding to the optical lens surface detection field to obtain the second initial surface finish detection model, including: For each optical lens detection data in the optical lens detection data set, extracting surface image information and surface defect type information from the optical lens detection data; Preprocessing the obtained surface image information set and surface defect type information set to generate a preprocessed image information set and a preprocessed defect type information set; Acquire a general optical lens data set corresponding to the optical lens surface detection field; Adjusting the data proportions of the preprocessed image information set, the preprocessed defect type information set, and the optical lens general data set to obtain a proportion data set; The first initial surface finish detection model is trained according to the proportion data set to obtain a second initial surface finish detection model.
[0008] Furthermore, before searching for a surface defect information set corresponding to the clicked surface finish test result in a pre-built optical lens surface defect library based on the clicked surface finish test result, the method further includes: Acquire a surface detection dataset of each surface area of a target optical lens; generating, based on the surface inspection data set, surface area association maps corresponding to the target optical lens, wherein each surface area association map has a corresponding surface defect query element; Performing graph verification on each of the surface area association graphs to generate a graph verification result; In response to determining that the image verification result is correct, the surface area association images and the corresponding surface defect query elements are stored in a predetermined format in a pre-set database as an optical lens surface defect library.
[0009] Furthermore, the obtained surface image information set and surface defect type information set are preprocessed to generate a preprocessed image information set and a preprocessed defect type information set, including: performing image denoising processing on the surface image information set to generate a denoised image information set; performing type standardization processing on the surface defect type information set to generate a standardized defect type information set; The denoised image information set and the standardized defect type information set are combined as a preprocessed image information set and a preprocessed defect type information set.
[0010] Furthermore, before responding to the surface detection request for the target optical lens, the method further includes: capturing a surface image of a target optical lens using a high-resolution optical imaging device; storing the captured surface image in a surface image database; The surface detection request includes identification information of the surface image.
[0011] Furthermore, the surface finish detection model determines the surface average roughness by calculating the average value of height deviation values of surface image sampling points.
[0012] Furthermore, the height deviation value is obtained by calculating the gradient components of the surface image in the horizontal and vertical directions.
[0013] Furthermore, performing graph verification on each surface area association graph to generate a graph verification result includes: Calculate the connectivity index of each surface area association graph; comparing the connectivity indicator with a preset connectivity threshold; In response to the connectivity index of all surface area association graphs being less than or equal to a preset connectivity threshold, generating a graph verification result as being correct in the representation; In response to a connectivity index of any surface region association graph being greater than a preset connectivity threshold, a graph verification result is generated as representing an error.
[0014] Furthermore, after displaying the surface defect information set on the detection interface, the method further includes: generating a surface finish inspection report based on the surface defect information set; The surface finish inspection report is output to a quality monitoring system.
[0015] The above embodiments of the present invention have at least the following beneficial effects: 1. By converting detection parameter characters into enhanced prompt information and inputting it into a pre-trained model, intelligent recognition and classification of optical lens surface defects are achieved, effectively solving the problems of low efficiency and subjective judgment bias in traditional manual detection methods, making the detection process more standardized and automated, and improving the accuracy and reliability of detection results.
[0016] 2. By building an optical lens surface defect database and establishing an associated query mechanism with the test results, a deep integration of test data and defect characteristics is achieved, solving the problem of isolated defect information and difficulty in tracing in the traditional test process, and providing complete data support and technical basis for subsequent process optimization and quality control.
[0017] 3. A mathematical model based on image gradient analysis and roughness calculation is used to quantitatively evaluate surface finish, breaking through the limitation of traditional visual inspection that cannot accurately characterize surface quality. It achieves an objective and scientific evaluation of the surface state of optical lenses and provides a solid theoretical basis and technical means for product quality grading and process improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings: Figure 1 A schematic flow chart of a method for detecting the surface finish of an optical lens required for a display device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.
[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use such solutions.
[0021] Reference below Figure 1 , Figure 1 The following is a flow chart of a method for detecting the surface finish of an optical lens required for a display device according to one embodiment of the present invention. Figure 1 As shown, a method for detecting the surface finish of an optical lens required for a display device includes: S1. In response to receiving a surface detection request corresponding to a target optical lens, generating surface detection enhancement prompt information corresponding to the detection parameter characters according to the detection parameter characters corresponding to the surface detection request; S2. Inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table; S3. Displaying the surface finish test result table on a test interface, and in response to detecting a click operation on any surface finish test result in the surface finish test result table, querying a pre-built optical lens surface defect library for a surface defect information set corresponding to the clicked surface finish test result; S4. Displaying the surface defect information set on a detection interface.
[0022] It should be noted that the core of this method is to evaluate the surface finish of optical lenses through an intelligent inspection process. First, when a surface inspection request for a target optical lens is received, corresponding surface inspection enhancement prompt information is generated based on the inspection parameter characters contained in the inspection request. The inspection parameter characters here refer to parameters related to optical lens surface inspection, such as inspection accuracy and inspection area, which are used to guide the subsequent inspection process. Subsequently, the surface inspection enhancement prompt information is input into a pre-trained surface finish inspection model, which can output a surface finish inspection result table based on the prompt information. This result table contains assessment information on the optical lens surface finish, such as surface roughness level. The inspection result table is then displayed on the inspection interface. When the user clicks on any inspection result, the system queries the corresponding surface defect information set in the pre-built optical lens surface defect library and displays this information on the inspection interface. The surface defect library here is a database that stores information on various possible defects of optical lenses and is used to provide users with detailed defect analysis.
[0023] Specifically, the inspection parameter string is a set of parameters entered by the user when initiating an inspection request. These parameters define the inspection scope, accuracy, and key areas. For example, the inspection parameter string includes the dimensions of the optical lens, the coordinate range of the inspection area, and the desired inspection accuracy. Surface inspection enhancement prompts are generated based on these parameters to guide the inspection model on how to perform inspections. The surface finish inspection model is a machine learning or deep learning-based model that assesses surface finish by learning the relationship between a large number of optical lens surface images and finish. The model's input is the surface inspection enhancement prompts, and its output is a surface finish inspection results table. This results table contains a quantitative assessment of the optical lens surface finish, such as metrics like average roughness. The optical lens surface defect library is a database containing information on various defect types, locations, and severity levels, used to store and query defect information on optical lens surfaces. When a user clicks an item in the inspection results table, the system searches the defect library for detailed defect information based on the corresponding defect type and location, and displays it on the inspection interface.
[0024] Preferably, a convolutional neural network (CNN) architecture, a deep learning framework, can be used when building a surface finish inspection model. The model input is surface inspection enhancement information, which undergoes preprocessing and is converted into a format suitable for model input. Preprocessing includes image normalization, resizing, and other operations. The model training process involves a large amount of optical lens surface image data, which must be annotated to indicate the surface finish grade or defect type within the image. During training, the model learns how to predict surface finish based on the input image features. Quantitative assessment of surface finish can be performed using a surface roughness formula. This formula evaluates surface roughness by calculating the height deviation of sampling points in a surface image. Specifically, the average roughness in the formula is calculated by averaging the height deviation values of all sampling points, while the height deviation value is calculated from the gradient of the surface image. In practical applications, the height deviation value for each sampling point can be obtained by grayscale-processing the optical lens surface image and then calculating the horizontal and vertical gradient components of the image. This method effectively quantifies the surface finish of an optical lens, providing accurate data support for subsequent quality assessment.
[0025] In some embodiments, before inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table, the method further includes: Training the first initial surface finish detection model based on the acquired optical lens detection data set corresponding to the optical lens surface detection field to obtain a second initial surface finish detection model; The second initial surface finish detection model is trained according to a preset surface detection enhancement prompt information sample set to obtain a third initial surface finish detection model, wherein the surface detection enhancement prompt information sample includes: a plurality of surface detection feature information; In response to determining that the model training effect corresponding to the third initial surface finish detection model reaches the expected effect, determining the third initial surface finish detection model as the trained surface finish detection model; In response to determining that the model training effect does not achieve the expected effect, training the third initial surface finish detection model according to the surface detection enhancement prompt information test sample set corresponding to the model training effect to obtain a trained third initial surface finish detection model; The trained third initial surface finish detection model is used as the third initial surface finish detection model, and the third initial surface finish detection model is trained again.
[0026] It should be noted that before performing surface finish detection, this method first needs to train the detection model to ensure that the model can accurately evaluate the surface finish of the optical lens. Specifically, the training process is divided into two stages: first, the first initial surface finish detection model is trained using the optical lens detection data set to obtain the second initial surface finish detection model; then, the second initial model is further trained using the surface detection enhanced prompt information sample set, and finally the trained surface finish detection model is obtained. The optical lens detection data set here refers to a data set containing optical lens surface images and their corresponding defect types, while the surface detection enhanced prompt information sample set refers to a sample set containing a variety of surface detection feature information, which is used to enhance the model's understanding and execution capabilities of the detection task. Through this staged training method, the performance of the model can be gradually improved to ensure that it can achieve the expected results in actual detection.
[0027] Specifically, the first initial surface finish inspection model is a basic machine learning or deep learning model, typically using a convolutional neural network (CNN) architecture, to process image data and identify surface finish features. The optical lens inspection dataset contains image data of optical lens surfaces and corresponding defect type labels. These images are collected, annotated, and preprocessed for model training. Preprocessing includes image denoising, resizing, and normalization to improve model training. The second initial surface finish inspection model, obtained after the first stage of training, already possesses certain surface finish inspection capabilities but requires further optimization. The surface inspection enhanced prompt information sample set contains various surface inspection feature information, such as image texture and edge features. This information is used to enhance the model's understanding of complex inspection tasks. Training the model in the second stage can further improve its performance, enabling it to more accurately assess surface finish. If, during training, the model performance does not meet expectations, it will be adjusted and optimized based on a test sample set corresponding to the model's training results until the model performance meets the requirements.
[0028] Preferably, when constructing the first initial surface finish detection model, a convolutional neural network architecture from deep learning can be employed, such as classic network structures like ResNet or VGG. The model's input is image data of the optical lens surface. This image data requires preprocessing before input into the model, such as by removing image noise through Gaussian filtering and resizing the image to meet the model's input requirements. During training, image data from the optical lens detection dataset is fed into the model, and the model learns how to identify surface finish based on the image's features. To further improve model performance, data augmentation techniques can be employed, such as rotating, flipping, and cropping the images to increase the diversity of the training data. In the second phase of training, feature information from the surface detection enhancement prompt information sample set is used to optimize the model's detection capabilities. This feature information can be extracted using image processing algorithms, such as edge detection algorithms to extract edge features and texture analysis algorithms to extract texture features. By using this feature information as additional input, the model can better understand the complex characteristics of the optical lens surface, thereby improving detection accuracy. If you find that the model performance does not meet expectations during training, you can optimize the model performance by adjusting the model's hyperparameters, such as learning rate, batch size, etc., or increasing the amount and diversity of training data.
[0029] In some embodiments, the training of the first initial surface finish detection model based on the acquired optical lens detection dataset corresponding to the optical lens surface detection field to obtain the second initial surface finish detection model includes: For each optical lens detection data in the optical lens detection data set, extracting surface image information and surface defect type information from the optical lens detection data; Preprocessing the obtained surface image information set and surface defect type information set to generate a preprocessed image information set and a preprocessed defect type information set; Acquire a general optical lens data set corresponding to the optical lens surface detection field; Adjusting the data proportions of the preprocessed image information set, the preprocessed defect type information set, and the optical lens general data set to obtain a proportion data set; The first initial surface finish detection model is trained according to the proportion data set to obtain a second initial surface finish detection model.
[0030] It should be noted that the core of this method lies in preprocessing and model training of optical lens surface inspection data to improve the accuracy and efficiency of surface finish inspection. Specifically, surface image information and surface defect type information are first extracted from the optical lens inspection dataset, and then this information is preprocessed to generate a preprocessed image information set and a preprocessed defect type information set. Next, the data ratio is adjusted in combination with the general optical lens dataset to obtain a ratio dataset, and the first initial surface finish inspection model is trained based on this dataset to obtain a second initial surface finish inspection model. This process aims to improve the inspection model's ability to evaluate the surface finish of optical lenses by optimizing the data processing and model training processes.
[0031] Specifically, an optical lens inspection dataset refers to a data set containing surface images of optical lenses and their corresponding defect types. These data are usually collected by high-resolution imaging equipment and are annotated for model training. Surface image information refers to the grayscale or color image data of the optical lens surface, while surface defect type information refers to the category and location information of the defects in the image. The preprocessing process includes operations such as image denoising, resizing, and normalization, with the aim of improving image quality and consistency and reducing the impact of noise on the inspection results. An optical lens general dataset refers to a data set containing general features of optical lenses, which is used to supplement the information in the inspection dataset and enhance the generalization ability of the model. Data proportion adjustment refers to adjusting the data distribution based on the proportional relationship between image information, defect type information, and general data in the dataset to make it more suitable for model training. The first initial surface finish detection model is usually a basic machine learning or deep learning model, such as a convolutional neural network (CNN), which is used to process image data and identify surface finish features.
[0032] Preferably, when extracting surface image information and surface defect type information, high-resolution optical imaging equipment can be used to ensure image clarity and detail. For preprocessing, Gaussian filtering can be used to remove image noise, and bilinear interpolation can be used to adjust the image size to meet the model input requirements. When adjusting the data ratio, the proportion of different data sets can be adjusted according to the actual application scenario of the optical lens. For example, the proportion of general data sets can be increased to improve the generalization ability of the model. During the model training stage, data enhancement techniques such as image rotation and flipping can be used to increase the diversity of training data and further improve the performance of the model.
[0033] In some embodiments, before querying a pre-built optical lens surface defect library based on the clicked surface finish test result to obtain a surface defect information set corresponding to the surface finish test result, the method further includes: Acquire a surface detection dataset of each surface area of a target optical lens; generating, based on the surface inspection data set, surface area association maps corresponding to the target optical lens, wherein each surface area association map has a corresponding surface defect query element; Performing graph verification on each of the surface area association graphs to generate a graph verification result; In response to determining that the image verification result is correct, the surface area association images and the corresponding surface defect query elements are stored in a predetermined format in a pre-set database as an optical lens surface defect library.
[0034] It should be noted that the core of this method lies in acquiring inspection data from various surface areas of the target optical lens, generating corresponding surface area association maps, and verifying and storing these association maps to construct an optical lens surface defect library. This process not only systematically records defect information on the optical lens surface but also provides support for subsequent defect query and analysis. Specifically, the surface area association map is a graphical representation that divides the optical lens surface into multiple areas and records the defect information for each area, while the surface defect query element is a key identifier for quickly retrieving defect information.
[0035] Specifically, the surface inspection data set of each surface area of the target optical lens refers to the optical lens surface image data obtained by a high-resolution imaging device. These data contain information such as the texture and defects of the optical lens surface. The surface area association map is generated based on these inspection data. It divides the optical lens surface into multiple areas and assigns a unique identifier to each area for subsequent defect queries. The map verification is completed by calculating the connectivity index of each surface area association map. The connectivity index is used to evaluate the integrity and accuracy of the association map. If the connectivity index of all association maps is less than or equal to the preset connectivity threshold, the map verification result is considered to be correct; otherwise, it is considered to be an error. The preset connectivity threshold is a parameter set according to the surface characteristics and inspection requirements of the optical lens, and is used to judge the quality of the association map.
[0036] Preferably, when generating a surface area association map, image segmentation technology can be used to divide the optical lens surface into multiple areas, and the size and shape of each area can be adjusted according to actual needs. For example, the optical lens surface can be divided into square areas of equal size, or a custom division can be made according to the shape and functional area of the optical lens. During the graph verification process, the calculation of the connectivity index can be achieved by analyzing the connection relationship between the various areas in the association map. For example, the connectivity between adjacent areas can be calculated, or the topological structure of the entire association map can be evaluated. If the connectivity index of a certain area is found to be abnormal, the area needs to be re-tested or corrected. In addition, in order to improve the efficiency and accuracy of graph verification, a machine learning algorithm can be introduced to automatically identify and mark areas with abnormal connectivity by learning from a large number of verified association maps.
[0037] In some embodiments, the preprocessing of the obtained surface image information set and surface defect type information set to generate a preprocessed image information set and a preprocessed defect type information set includes: performing image denoising processing on the surface image information set to generate a denoised image information set; performing type standardization processing on the surface defect type information set to generate a standardized defect type information set; The denoised image information set and the standardized defect type information set are combined as a preprocessed image information set and a preprocessed defect type information set.
[0038] It should be noted that the core of this method lies in preprocessing optical lens surface inspection data and generating and verifying image correlation maps to ensure the accuracy and reliability of the inspection results. Specifically, the preprocessed image information set and preprocessed defect type information set are generated by performing image denoising and type standardization on the optical lens surface image information set and the surface defect type information set. This process effectively reduces noise interference, improves image quality, and provides high-quality data support for the subsequent generation and verification of surface area correlation maps.
[0039] Specifically, the surface image information set refers to the image data of the optical lens surface, which is usually obtained through high-resolution imaging equipment and contains information such as the texture and defects of the optical lens surface. Image denoising is to remove noise from the image through algorithms, such as Gaussian filtering and other methods, to improve the clarity of the image. The surface defect type information set refers to the classification information of defects in the image, and type standardization is to unify these classification information into a standard format for subsequent processing. The preprocessed image information set and the preprocessed defect type information set are data sets that have been denoised and standardized, and are used for subsequent model training and analysis. In the image denoising process, Gaussian filtering is a commonly used algorithm, which smoothes the image by calculating the weighted average of each pixel in the image, thereby removing noise.
[0040] Preferably, a Gaussian filter algorithm can be used for image denoising. This algorithm smoothes the image by calculating the weighted average of each pixel in the image, thereby removing noise. The denoised image can more clearly display the details of the optical lens surface, facilitating subsequent defect detection. In type standardization, defect type information can be uniformly encoded, for example, scratches can be marked as 1, pits as 2, and so on, to facilitate model recognition and processing. Furthermore, to further improve image quality, contrast enhancement can be performed on the image after denoising. This adjustment of the image's brightness and contrast makes the defect features more distinct.
[0041] In some embodiments, before responding to receiving a surface detection request corresponding to the target optical lens, the method further includes: capturing a surface image of a target optical lens using a high-resolution optical imaging device; storing the captured surface image in a surface image database; The surface detection request includes identification information of the surface image.
[0042] It should be noted that in optical lens surface finish inspection methods, capturing surface images of the target optical lens using high-resolution optical imaging equipment and storing these images in a surface image database are crucial steps in achieving automated inspection. Surface image acquisition is fundamental to the inspection process, and high-quality images provide reliable data support for subsequent defect detection and analysis. The surface image identification information included in the surface inspection request is used to quickly locate and retrieve the corresponding image data from the database, ensuring the efficiency and accuracy of the inspection process.
[0043] Specifically, high-resolution optical imaging equipment refers to equipment that can capture images of the surface of an optical lens at a relatively high resolution, such as a high-resolution microscope or industrial camera. These devices can provide clear images, so that even tiny defects on the surface of the optical lens can be clearly recorded. The surface image database is a system used to store these high-resolution images. It can be a local storage device or a cloud storage service. Its main function is to securely store image data and allow users to quickly retrieve and retrieve images through identification information. The surface image identification information is a unique identifier associated with each image. It can be the image's file name, number, or other form of label, which is used to distinguish different images in the database.
[0044] Preferably, when capturing an image of the optical lens surface, multi-angle imaging technology can be used to photograph the optical lens from different directions to obtain more comprehensive surface information. For example, an imaging device combining a ring light source and a microscope lens can be used to photograph the optical lens from multiple angles, ensuring that every area of the surface is clearly recorded. In addition, during the image storage process, the image can be pre-processed, such as removing background noise and adjusting contrast, to improve image quality and the efficiency of subsequent processing. For example, a Gaussian filter algorithm can be used to denoise the image to remove Gaussian noise, thereby improving image clarity.
[0045] In some embodiments, the surface finish detection model calculates the surface finish using a surface roughness formula, where the surface roughness formula is:
[0046] in, is the average roughness, in microns; is the number of sampling points of the surface image; For the The height deviation value of each sampling point.
[0047] It should be noted that this method uses the surface roughness formula to calculate the surface finish of an optical lens, an effective means of quantitatively assessing surface quality. Surface finish is a key performance indicator for optical lenses, directly impacting the imaging quality of optical systems and the service life of optical components. The surface roughness formula can assess the flatness of an optical lens surface by calculating the height deviation of surface image sampling points, thus providing a scientific basis for quality control.
[0048] Specifically, the surface roughness formula is a mathematical expression used to quantify the microscopic roughness of a surface. The parameters in the formula include the average roughness , which is a quantitative indicator of surface roughness, measured in microns, used to measure the flatness of the surface; the number of sampling points Refers to the number of points selected in the surface image for calculating the roughness; height deviation value This refers to the vertical deviation of each sampling point from an ideally flat surface. These parameters together determine the surface roughness calculation. The number of sampling points and height deviation values for the surface image are typically obtained by scanning the optical lens surface with a high-resolution imaging device and analyzing it using image processing algorithms.
[0049] Preferably, when calculating surface roughness, the following steps can be employed: first, scan the optical lens surface using a high-resolution optical imaging device to obtain a grayscale image of the surface; then, extract height information from the image using an image processing algorithm to obtain the height deviation value for each sampling point; finally, calculate the average roughness according to the surface roughness formula. In practical applications, the accuracy and efficiency of the calculation can be improved by adjusting the number and distribution of sampling points. For example, increasing the number of sampling points can more accurately reflect the microscopic features of the surface, but this also increases the computational complexity. Therefore, in actual operation, a trade-off needs to be made based on specific needs.
[0050] In some embodiments, the height deviation value is obtained by calculating the gradient components of the surface image in the horizontal and vertical directions.
[0051] Height deviation value It is obtained by surface image gradient calculation, and the surface image gradient calculation formula is:
[0052] in, is the grayscale value of the surface image; For the image Directional gradient component; For the image Directional gradient component.
[0053] It's important to note that in optical lens surface finish testing, height deviation values are calculated using surface image gradients, a critical step in surface finish assessment. Surface image gradients reflect the variations in pixel grayscale values within an image and can reveal the microscopic undulations of the optical lens surface. By calculating the horizontal and vertical gradient components of the image and combining this information to derive height deviation values, this provides crucial quantitative data for subsequent surface roughness calculations. This method leverages image processing technology to efficiently convert image information into numerical values useful for surface finish assessment.
[0054] Specifically, the surface image gradient calculation is based on the grayscale value of the image. The grayscale value refers to the brightness value of each pixel in the image, usually a value between 0 and 255. The horizontal gradient component and the vertical gradient component of the image represent the degree of change of the grayscale value of the image in the x-direction and y-direction respectively. These gradient components can be calculated by a differential algorithm or a specific convolution kernel, such as the Sobel operator. The height deviation value is obtained by comprehensively processing the horizontal and vertical gradient components, which reflects the relative height change of each sampling point relative to the surrounding pixels. This calculation method can effectively capture the microscopic unevenness characteristics of the optical lens surface and provide a basis for the quantitative evaluation of surface roughness.
[0055] Preferably, when calculating the surface image gradient, the Sobel operator can be used for convolution operation. The Sobel operator is a commonly used edge detection method that can calculate the gradient components of the image in the horizontal and vertical directions respectively. The specific operation steps are as follows: First, apply the Sobel operator to the grayscale image of the optical lens surface to calculate the gradient components in the horizontal and vertical directions respectively. Then, take the square root of the sum of the squares of these two gradient components to obtain the height deviation value of each sampling point. For example, for a grayscale image, the horizontal gradient component can be obtained by convolution with the Sobel horizontal operator, and the vertical gradient component can be obtained by convolution with the Sobel vertical operator. Finally, the height deviation value is obtained by taking the square root of the sum of the squares of the two gradient components. This method can effectively extract edge information in the image, thereby providing an accurate height deviation value for the calculation of surface roughness.
[0056] In some embodiments, performing graph verification on the respective surface area association graphs to generate a graph verification result includes: Calculate the connectivity index of each surface area association graph; comparing the connectivity indicator with a preset connectivity threshold; In response to the connectivity index of all surface area association graphs being less than or equal to a preset connectivity threshold, generating a graph verification result as being correct in the representation; In response to a connectivity index of any surface region association graph being greater than a preset connectivity threshold, a graph verification result is generated as representing an error.
[0057] It should be noted that this method determines whether the association map contains errors by calculating the connectivity index of each surface region association map and comparing it with a preset connectivity threshold. The connectivity index is a quantitative parameter used to assess the structural integrity and coherence of an image or graph. It reflects whether the connection relationships between regions in the image meet expectations. By setting a reasonable connectivity threshold, potential errors or anomalies in the surface region association map can be effectively identified, thereby ensuring the accuracy and reliability of the optical lens surface defect library.
[0058] Specifically, a surface area association graph refers to a graph that graphically displays the connection relationship and defect information between regions after the optical lens surface is divided into multiple regions. The connectivity index is a quantitative parameter to measure this connection relationship, which can be calculated by analyzing the connectivity between the regions in the graph. For example, the connectivity index can be obtained by calculating the connectivity ratio between adjacent regions, or by evaluating the topological structure of the entire graph. The preset connectivity threshold is a parameter set according to the surface characteristics and detection requirements of the optical lens, and is used to determine whether the quality of the association graph meets the standards. If the connectivity index of all surface area association graphs is less than or equal to the preset connectivity threshold, the graph verification result is considered to be correct; otherwise, it is considered to be an error.
[0059] Preferably, when calculating the connectivity index, the following steps can be adopted: First, a topological analysis is performed on the surface area association graph to identify the connection relationship between each area. For example, the adjacency matrix or graph traversal algorithm can be used to determine which areas are adjacent and which areas are isolated. Then, the connectivity index is calculated based on these connection relationships. For example, the number of connections between each area and the adjacent areas can be counted, and the proportion of the total number of connections can be calculated. If the number of connections in a certain area is significantly lower than the expected value, it may indicate that there is an error or abnormality in the area. The preset connectivity threshold can be adjusted according to the actual application scenario and detection accuracy requirements of the optical lens. For example, for high-precision optical lenses, a lower connectivity threshold can be set to ensure the strictness of the detection results; for ordinary precision optical lenses, the threshold can be appropriately relaxed. In this way, the detection requirements of different optical lenses can be flexibly adapted to improve the accuracy and efficiency of detection.
[0060] In some embodiments, after displaying the surface defect information set on the inspection interface, the method further includes: generating a surface finish inspection report based on the surface defect information set; The surface finish inspection report is output to a quality monitoring system.
[0061] It should be noted that, based on the detection of optical lens surface defects, this method further generates a surface finish inspection report and outputs it to the quality monitoring system. This process not only provides detailed inspection results for the production of optical lenses, but also enables real-time feedback and optimization of the production process through the quality monitoring system. The surface finish inspection report is a document generated based on the inspection results. It records in detail the surface finish of the optical lens, including information such as defect type, location, and severity. The quality monitoring system is a platform for monitoring and managing production quality. It can receive inspection reports and analyze and process them according to preset quality standards.
[0062] Specifically, the generation of a surface finish inspection report is based on the analysis of an optical lens surface defect information set. This defect information set contains detailed information such as the type, location, and size of defects on the optical lens surface. This information is obtained through image processing and analysis of image data captured by high-resolution imaging equipment. The quality monitoring system is an integrated management platform that receives inspection reports and monitors and optimizes the optical lens production process according to preset quality standards. For example, based on the defect information in the inspection report, the system can determine whether the optical lens meets quality requirements and decide whether the production process needs to be adjusted or further inspection is required.
[0063] Preferably, the process of generating a surface finish inspection report may include the following steps: first, extract defect information from the optical lens surface defect library, including the type, location, size, etc. of the defect. Then, generate detailed report content based on this information, such as a defect distribution map, a defect type statistical table, etc. The report may also include an assessment of the impact of the defect, such as the degree of impact on optical performance. Finally, the generated inspection report is output to the quality monitoring system in the form of an electronic document. In the quality monitoring system, quality standard thresholds can be set, such as the maximum allowable size or number of defects. When the defect information in the inspection report exceeds these thresholds, the system will trigger an alarm or automatically adjust the production parameters to ensure that the quality of the optical lens meets the requirements.
[0064] The above embodiments of the present invention have the following beneficial effects: 1. By converting detection parameter characters into enhanced prompt information and inputting it into a pre-trained model, intelligent recognition and classification of optical lens surface defects are achieved, effectively solving the problems of low efficiency and subjective judgment bias in traditional manual detection methods, making the detection process more standardized and automated, and improving the accuracy and reliability of detection results.
[0065] 2. By building an optical lens surface defect database and establishing an associated query mechanism with the test results, a deep integration of test data and defect characteristics is achieved, solving the problem of isolated defect information and difficulty in tracing in the traditional test process, and providing complete data support and technical basis for subsequent process optimization and quality control.
[0066] 3. A mathematical model based on image gradient analysis and roughness calculation is used to quantitatively evaluate surface finish, breaking through the limitation of traditional visual inspection that cannot accurately characterize surface quality. It achieves an objective and scientific evaluation of the surface state of optical lenses and provides a solid theoretical basis and technical means for product quality grading and process improvement.
[0067] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or a terminal device such as a computer, server, mobile phone, or tablet.
[0068] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0069] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0070] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0071] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0072] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0073] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0074] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0075] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0076] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for detecting the surface finish of an optical lens required for a display device, characterized in that: Methods include: In response to receiving a surface detection request corresponding to a target optical lens, generating surface detection enhancement prompt information corresponding to the detection parameter characters according to the detection parameter characters corresponding to the surface detection request; Inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table; Displaying the surface finish test result table on a test interface, and in response to detecting a click operation on any surface finish test result in the surface finish test result table, querying a surface defect information set corresponding to the clicked surface finish test result in a pre-built optical lens surface defect library; The surface defect information set is displayed on a detection interface.
2. The method according to claim 1, characterized in that Before inputting the surface inspection enhancement prompt information into a pre-trained surface finish inspection model to obtain a surface finish inspection result table, the method further includes: Training the first initial surface finish detection model based on the acquired optical lens detection data set corresponding to the optical lens surface detection field to obtain a second initial surface finish detection model; The second initial surface finish detection model is trained according to a preset surface detection enhancement prompt information sample set to obtain a third initial surface finish detection model, wherein the surface detection enhancement prompt information sample includes: a plurality of surface detection feature information; In response to determining that the model training effect corresponding to the third initial surface finish detection model reaches the expected effect, determining the third initial surface finish detection model as the trained surface finish detection model; In response to determining that the model training effect does not achieve the expected effect, training the third initial surface finish detection model according to the surface detection enhancement prompt information test sample set corresponding to the model training effect to obtain a trained third initial surface finish detection model; The trained third initial surface finish detection model is used as the third initial surface finish detection model, and the third initial surface finish detection model is trained again.
3. The method according to claim 2, characterized in that The method of training the first initial surface finish detection model based on the acquired optical lens detection data set corresponding to the optical lens surface detection field to obtain the second initial surface finish detection model includes: For each optical lens detection data in the optical lens detection data set, extracting surface image information and surface defect type information from the optical lens detection data; Preprocessing the obtained surface image information set and surface defect type information set to generate a preprocessed image information set and a preprocessed defect type information set; Acquire a general optical lens data set corresponding to the optical lens surface detection field; Adjusting the data proportions of the preprocessed image information set, the preprocessed defect type information set, and the optical lens general data set to obtain a proportion data set; The first initial surface finish detection model is trained according to the proportion data set to obtain a second initial surface finish detection model.
4. The method according to claim 1, wherein Before searching a pre-built optical lens surface defect database for a surface defect information set corresponding to the clicked surface finish test result, the method further includes: Acquire a surface detection dataset of each surface area of a target optical lens; generating, based on the surface inspection data set, surface area association maps corresponding to the target optical lens, wherein each surface area association map has a corresponding surface defect query element; Performing graph verification on each of the surface area association graphs to generate a graph verification result; In response to determining that the image verification result is correct, the surface area association images and the corresponding surface defect query elements are stored in a predetermined format in a pre-set database as an optical lens surface defect library.
5. The method according to claim 3, characterized in that The preprocessing of the obtained surface image information set and surface defect type information set to generate a preprocessed image information set and a preprocessed defect type information set includes: performing image denoising processing on the surface image information set to generate a denoised image information set; performing type standardization processing on the surface defect type information set to generate a standardized defect type information set; The denoised image information set and the standardized defect type information set are combined to form a preprocessed image information set and a preprocessed defect type information set.
6. The method according to claim 1, wherein Before responding to the surface detection request of the target optical lens, the method further includes: capturing a surface image of a target optical lens using a high-resolution optical imaging device; storing the captured surface image in a surface image database; The surface detection request includes identification information of the surface image.
7. The method according to claim 1, characterized in that The surface finish detection model determines the average surface roughness by calculating the average value of the height deviation values of the surface image sampling points.
8. The method according to claim 7, characterized in that The height deviation value is obtained by calculating the gradient components of the surface image in the horizontal and vertical directions.
9. The method according to claim 4, wherein: The performing graph verification on the respective surface area association graphs to generate a graph verification result includes: Calculate the connectivity index of each surface area association graph; comparing the connectivity indicator with a preset connectivity threshold; In response to the connectivity index of all surface area association graphs being less than or equal to a preset connectivity threshold, generating a graph verification result as representing the correctness of the representation; In response to a connectivity index of any surface region association graph being greater than a preset connectivity threshold, a graph verification result is generated as representing an error.
10. The method according to claim 1, wherein After displaying the surface defect information set on the detection interface, the method further includes: generating a surface finish inspection report based on the surface defect information set; The surface finish inspection report is output to a quality monitoring system.