Method and apparatus for detecting the properties of optical adhesives based on image processing and wavelength analysis

Through the method based on image processing and wavelength analysis, multi-angle image acquisition and edge detection of optical glue, combined with Gaussian process regression model and spectrometer for refractive index prediction and calculation, and the multi-task classification neural network model using attention mechanism for performance analysis, solving the problem of insufficient comprehensive and accurate performance detection of optical glue in the existing technology, achieving more efficient and accurate detection effects.

CN118501098BActive Publication Date: 2025-02-28SHENZHEN LINGYUEXIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410779338.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2025-02-28
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

The existing optical glue performance detection methods cannot comprehensively and accurately reflect the performance changes of optical glue under different conditions, and the stability and consistency of a single detection method are poor.

Method used

Using a method based on image processing and wavelength analysis, multi-angle image acquisition and image merging of sample optical glue, edge detection and feature recognition are performed, refractive index prediction and calculation are combined with Gaussian process regression model and spectrometer, and finally, performance analysis is performed using a multi-task classification neural network model based on attention mechanism.

Benefits of technology

It improves the accuracy and comprehensiveness of optical glue performance detection, enhances the stability and consistency of detection results, and can more accurately analyze the distribution uniformity and distribution stability of optical glue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118501098B_ABST
    Figure CN118501098B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of optical adhesive performance detection, and discloses an optical adhesive performance detection method and device based on image processing and wavelength analysis. The method includes: performing image preprocessing of sample optical adhesive image acquisition to obtain a target optical adhesive image; performing edge detection and image feature recognition to obtain image feature data; performing optical adhesive refractive index prediction through a Gaussian process regression model to obtain first refractive index distribution data; performing wavelength scanning to obtain optical characteristic data and performing optical adhesive refractive index calculation to obtain second refractive index distribution data; performing feature extraction to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector; inputting the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data. The present application improves the accuracy of optical adhesive performance detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of optical adhesive performance detection, and in particular to an optical adhesive performance detection method and device based on image processing and wavelength analysis. Background Art

[0002] Optical adhesives are used to bond optical components and adjust the optical properties of optical systems. However, the performance of optical adhesives has a direct impact on the overall performance of optical systems. Therefore, accurately testing the performance parameters of optical adhesives is crucial for the design and quality control of optical systems. However, existing optical adhesive performance testing methods have some limitations and cannot fully and accurately reflect the performance changes of optical adhesives under different conditions.

[0003] At present, traditional optical adhesive performance testing methods usually rely on a single measurement method. For example, the refractive index is usually measured by a refractometer, while the transmittance and reflectance are measured by a spectrophotometer. Although these methods can provide certain performance parameters, they cannot comprehensively consider the various properties of optical adhesives in practical applications. In addition, these single detection methods may be affected by environmental conditions, sample preparation and other factors when facing complex optical adhesive materials, resulting in poor stability and consistency of the test results. Summary of the invention

[0004] The present application provides a method and device for detecting optical adhesive properties based on image processing and wavelength analysis, which are used to improve the accuracy of optical adhesive properties detection.

[0005] In a first aspect, the present application provides an optical adhesive performance detection method based on image processing and wavelength analysis, and the optical adhesive performance detection method based on image processing and wavelength analysis includes:

[0006] Performing image preprocessing on the sample optical adhesive image acquisition to obtain the target optical adhesive image;

[0007] Performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data;

[0008] Inputting the image feature data into a preset Gaussian process regression model to predict the refractive index of the optical adhesive to obtain first refractive index distribution data;

[0009] Scanning the wavelength of the sample optical adhesive to obtain optical characteristic data, and calculating the refractive index of the optical adhesive based on the optical characteristic data to obtain second refractive index distribution data;

[0010] Performing feature extraction on the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector;

[0011] The first refractive index distribution feature vector and the second refractive index distribution feature vector are input into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

[0012] In a second aspect, the present application provides an optical adhesive performance detection device based on image processing and wavelength analysis, and the optical adhesive performance detection device based on image processing and wavelength analysis includes:

[0013] A preprocessing module, used for performing image preprocessing on the sample optical glue image acquisition to obtain the target optical glue image;

[0014] A recognition module, used for performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data;

[0015] A prediction module, used for inputting the image feature data into a preset Gaussian process regression model to predict the refractive index of the optical adhesive, and obtaining first refractive index distribution data;

[0016] A calculation module, used for performing wavelength scanning on the sample optical adhesive to obtain optical characteristic data, and performing optical adhesive refractive index calculation on the optical characteristic data to obtain second refractive index distribution data;

[0017] An extraction module, used to perform feature extraction on the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector;

[0018] An analysis module is used to input the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

[0019] The third aspect of the present application provides an optical glue performance detection device based on image processing and wavelength analysis, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the optical glue performance detection device based on image processing and wavelength analysis performs the above-mentioned optical glue performance detection method based on image processing and wavelength analysis.

[0020] A fourth aspect of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the above-mentioned optical adhesive performance detection method based on image processing and wavelength analysis.

[0021] In the technical solution provided by the present application, the target optical glue image is obtained by multi-angle image acquisition and image merging of the sample optical glue. It can effectively reduce noise interference, enhance image contrast, improve image quality, and perform high-precision edge detection and image feature recognition on the target optical glue image. It can accurately extract the edges and feature points of the optical glue, improve the accuracy of the image feature data, and input the image feature data into the Gaussian process regression model to predict the refractive index of the optical glue with high precision, thereby improving the accuracy of the refractive index prediction, thereby generating the first refractive index distribution data. The wavelength of the sample optical glue is scanned by a spectrometer to obtain optical property data, and the refractive index of the optical glue is calculated based on the Kramers-Kronig relationship function to obtain the second refractive index distribution data. It can comprehensively analyze the optical properties of the optical glue at different wavelengths and improve the comprehensiveness and accuracy of the optical glue performance detection. The first refractive index distribution feature vector and the second refractive index distribution feature vector are input into a multi-task classification neural network model based on the attention mechanism to perform optical glue performance analysis. Through the attention mechanism layer and the multi-task classifier of the model, the distribution uniformity and distribution stability indicators of the optical glue can be effectively analyzed, thereby improving the accuracy of the optical glue performance detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0023] Figure 1 A schematic diagram of an embodiment of a method for detecting optical adhesive properties based on image processing and wavelength analysis in an embodiment of the present application;

[0024] Figure 2 This is a schematic diagram of an embodiment of an optical adhesive performance detection device based on image processing and wavelength analysis in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The embodiments of the present application provide a method and device for detecting the properties of optical adhesives based on image processing and wavelength analysis. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 In the embodiment of the present application, an embodiment of the optical adhesive performance detection method based on image processing and wavelength analysis includes:

[0027] Step S101, performing image preprocessing on the sample optical adhesive to obtain a target optical adhesive image;

[0028] It is understandable that the execution subject of the present application can be an optical adhesive performance detection device based on image processing and wavelength analysis, or a terminal or a server, which is not limited here. The present application embodiment is described by taking the server as the execution subject as an example.

[0029] Specifically, the sample optical glue is subjected to multi-angle image acquisition, and the optical glue sample is photographed from multiple different angles to obtain multiple first optical glue images at different angles. The first optical glue images at multiple different angles are subjected to image denoising. During the image acquisition process, due to the influence of various factors such as ambient light and camera equipment, there may be noise in the image, which will affect the image quality and subsequent image processing effects. Through image denoising, the noise is effectively removed to obtain multiple denoised optical glue images. The multiple denoised optical glue images are subjected to standardization. Image standardization refers to adjusting the brightness and contrast of the image to a standard range, thereby eliminating the differences in image brightness and contrast caused by different shooting angles and ambient light, and obtaining multiple standard optical glue images. The multiple standard optical glue images are subjected to contrast enhancement to improve the contrast of the image, make the details in the image clearer and more prominent, thereby facilitating subsequent image feature recognition and analysis, and obtain multiple enhanced optical glue images. The multiple enhanced optical glue images are subjected to image merging. Multiple optical glue images at different angles that have been subjected to denoising, standardization and contrast enhancement are fused to obtain a comprehensive target optical glue image. The merging process can retain the key information in images at various angles and remove the blind spots that may exist in single-angle images, thereby obtaining a more comprehensive and accurate target optical glue image.

[0030] Step S102, performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data;

[0031] Specifically, the target optical adhesive image is subjected to Gaussian filtering to obtain a smoothed optical adhesive image. Gaussian filtering is a denoising method. By smoothing the image, the noise in the image is reduced, so that the subsequent edge detection is more accurate. The smoothed optical adhesive image is subjected to Sobel operator processing to obtain an edge detection optical adhesive image. The Sobel operator is a commonly used edge detection method. By calculating the gradient value of the pixel points in the image, the edge part in the image is highlighted to obtain a clear edge detection result. The edge detection optical adhesive image is subjected to threshold segmentation to obtain a binary edge image. The pixel values ​​in the image are segmented according to a certain threshold, and the pixels above the threshold are set to white and the pixels below the threshold are set to black to obtain a binary image. The binary edge image is subjected to morphological operations to obtain an optimized edge image. Morphological operations include dilation, erosion, opening and closing operations, etc., through which the noise points and small holes generated in the binarization process are removed to make the edge smoother and continuous. The optimized edge image is subjected to contour extraction to obtain optical adhesive contour data. The outer contour of the object is extracted by detecting the connected area in the image to obtain the outer shape information of the optical adhesive. According to the optical adhesive contour data, feature point detection is performed on the optimized edge image to obtain multiple feature point detection vectors. Feature point detection is to identify points with significant features in the image, such as corner points, edge points, etc. By detecting these feature points, the specific features of the optical adhesive are analyzed. Feature descriptors are calculated for multiple feature point detection vectors to obtain feature descriptor data. Feature descriptors are descriptions of the image area around the feature points, which are used to represent the local image structure of the feature points. Commonly used methods include SIFT and SURF. By calculating feature descriptors, the local information of the image is quantified and encoded. Mapping and matching are performed on the feature descriptor data to obtain the image feature data of each feature point. The calculated feature descriptors are matched with the preset feature library to determine the specific feature information of each feature point and convert the local feature data of the image into structured image feature data.

[0032] Step S103, inputting the image feature data into a preset Gaussian process regression model to predict the refractive index of the optical adhesive, and obtaining first refractive index distribution data;

[0033] Specifically, the image feature data of each feature point is input into a preset Gaussian process regression model, and the Gaussian kernel function of the Gaussian process regression model is defined. The Gaussian process regression model is a non-parametric Bayesian regression method. By defining an appropriate Gaussian kernel function, the nonlinear relationship in the image feature data is processed to achieve accurate prediction of the refractive index of the optical adhesive. The covariance matrix of the image feature data is calculated based on the Gaussian kernel function to obtain the target covariance matrix. The calculation of the covariance matrix is ​​one of the key steps of Gaussian process regression, which reflects the similarity and correlation between different feature points. By calculating the covariance matrix of the image feature data, the statistical relationship between the feature points is established. Prior knowledge and observation data are obtained, and the posterior distribution of the image feature data is calculated by Bayesian inference to obtain multiple posterior distribution data of each feature point. Prior knowledge includes the understanding of the properties of optical adhesive materials and previous experimental data, while the observation data is the specific value extracted from the image feature data. Bayesian inference calculates the posterior distribution of each feature point by combining prior knowledge and observation data. The posterior distribution reflects the possible distribution of the refractive index of each feature point under given observation data. The multiple posterior distribution data of each feature point are averaged to obtain the posterior distribution mean of each feature point, and the posterior distribution mean is used as the refractive index prediction data of each feature point. By averaging multiple posterior distribution data, a stable refractive index prediction value is obtained, which represents the most likely value of the refractive index of each feature point under the current observation data and prior knowledge. The first refractive index distribution data of the sample optical adhesive is generated based on the refractive index prediction data of each feature point. The refractive index prediction data of all feature points are integrated to obtain the refractive index distribution map of the entire sample optical adhesive.

[0034] Step S104, scanning the wavelength of the sample optical adhesive to obtain optical characteristic data, and calculating the refractive index of the optical adhesive based on the optical characteristic data to obtain second refractive index distribution data;

[0035] Specifically, the preset spectrometer is initialized and calibrated. Initialization calibration usually includes adjusting the zero point, wavelength accuracy and other key parameters of the spectrometer so that it is in the best working state. The wavelength range of the spectrometer is set to obtain the set wavelength range. The setting of the wavelength range depends on the characteristics of the optical adhesive material and the specific detection requirements. By setting a suitable wavelength range, it is ensured that all important optical characteristic areas of the optical adhesive are covered during the scanning process to obtain comprehensive optical characteristic data. Through the spectrometer, wavelengths are scanned at multiple test points of the sample optical adhesive according to the set wavelength range to obtain initial wavelength scanning data for each test point. The selection of multiple test points should cover different areas of the optical adhesive sample as much as possible so as to fully understand the optical properties of the sample. The initial wavelength scanning data of each test point reflects the optical response characteristics of the point within the set wavelength range. The initial wavelength scanning data is denoised and baseline corrected respectively to obtain the target wavelength scanning data of each test point. The denoising process is to eliminate the random noise that may exist in the measurement process and improve the accuracy of the data. The baseline correction is used to adjust the baseline level of the data to eliminate the systematic deviation caused by the environment or equipment and obtain more accurate target wavelength scanning data. Perform optical characteristic analysis on the target wavelength scanning data of each test point to obtain the optical characteristic data of each test point. Optical characteristic analysis includes calculation of optical characteristics such as absorption, transmission, and reflection. These characteristic data can reflect the response of optical adhesive at different wavelengths. Based on the Kramers-Kronig relationship function, calculate the refractive index of optical adhesive for the optical characteristic data to obtain the refractive index data of optical adhesive at each test point. The Kramers-Kronig relationship is a method for converting optical characteristic data into refractive index data. This method can be used to derive the spectral distribution of the refractive index from the optical characteristic data to obtain the refractive index data of each test point at different wavelengths. Generate the second refractive index distribution data of the sample optical adhesive based on the refractive index data of the optical adhesive at each test point. By integrating the refractive index data of all test points, the refractive index distribution diagram of the entire sample optical adhesive at different positions is obtained.

[0036] Step S105, performing feature extraction on the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector;

[0037] Specifically, the first refractive index distribution data is input into a preset first clustering algorithm to calculate the distribution center, and a plurality of first initial distribution centers are obtained; at the same time, the second refractive index distribution data is input into a preset second clustering algorithm to calculate the distribution center, and a plurality of second initial distribution centers are obtained. The refractive index data is grouped by the clustering algorithm so that the center point of each group of data can represent the characteristics of the group of data. The data point distance calculation is performed on the first refractive index distribution data and the plurality of first initial distribution centers to obtain a plurality of first data point distances of each first initial distribution center; and the data point distance calculation is performed on the second refractive index distribution data and the plurality of second initial distribution centers to obtain a plurality of second data point distances of each second initial distribution center. The data point distance calculation is to measure the distance from each data point to its distribution center, and these distances can reflect the degree of dispersion of the data points in the cluster. The mean operation is performed on the plurality of first data point distances to obtain the mean of the first point distance of each first initial distribution center; and the mean operation is performed on the plurality of second data point distances to obtain the mean of the second point distance of each second initial distribution center. The average distance of each distribution center is obtained by the mean operation, and the average distance can be used as a basis for adjusting the position of the distribution center. According to the first point distance mean, multiple first initial distribution centers are adjusted to obtain multiple first target distribution centers; and according to the second point distance mean, multiple second initial distribution centers are adjusted to obtain multiple second target distribution centers. The position of the distribution center is adjusted to make it more accurately represent the data points it clusters, thereby improving the accuracy and stability of the clustering results. Based on multiple first target distribution centers, the first refractive index distribution data is feature clustered to obtain multiple first refractive index distribution eigenvalues; and based on multiple second target distribution centers, the second refractive index distribution data is feature clustered to obtain multiple second refractive index distribution eigenvalues. The data points are grouped according to their eigenvalues ​​so that the eigenvalues ​​of each group of data can reflect the characteristics of the group of data. Vector encoding conversion is performed on multiple first refractive index distribution eigenvalues ​​to obtain first refractive index distribution eigenvectors; and vector encoding conversion is performed on multiple second refractive index distribution eigenvalues ​​to obtain second refractive index distribution eigenvectors. Vector encoding conversion is to convert eigenvalues ​​into vector form for subsequent processing and analysis. Complex refractive index distribution data is simplified into representative eigenvectors.

[0038] Step S106: Input the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on the attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

[0039] Specifically, the first refractive index distribution feature vector and the second refractive index distribution feature vector are input into a multi-task classification neural network model based on an attention mechanism. The model includes an input layer, an attention mechanism layer, a first task classifier, a second task classifier and an output layer. In the input layer, the first refractive index distribution feature vector and the second refractive index distribution feature vector are vector spliced ​​to obtain a comprehensive spliced ​​vector. The spliced ​​vector is input into the attention mechanism layer for attention weight calculation to obtain an attention vector. By calculating the attention weight, the attention mechanism layer can emphasize the more important part of the feature vector for performance analysis, thereby improving the analysis accuracy and efficiency of the model. The attention vector is respectively input into the first task classifier and the second task classifier for optical adhesive performance analysis. The first task classifier includes a convolution layer, a pooling layer, a fully connected layer and an LSTM layer. Through the processing of these layers, the characteristics of the uniformity of the optical adhesive distribution can be extracted, and finally the optical adhesive distribution uniformity index is output. The convolution layer and the pooling layer are used to extract and reduce the feature dimension, the fully connected layer performs feature integration, and the LSTM layer uses its advantages in processing sequence data to analyze the temporal relationship of the features. At the same time, the attention vector is input into the second task classifier to analyze the optical glue distribution stability index. The second task classifier includes a bidirectional threshold recurrent network and a regression function layer. The bidirectional threshold recurrent network can capture the bidirectional time series information of the feature vector, analyze the distribution stability of the optical glue more comprehensively, and finally output the optical glue distribution stability index through the regression function layer. This network structure can effectively handle complex time series and nonlinear relationships, thereby improving the accuracy of the prediction. Through the output layer, the optical glue distribution uniformity index and the optical glue distribution stability index are used as optical glue performance index data and output. The output layer integrates and outputs the results from the two task classifiers to generate the final performance index data.

[0040] In the embodiment of the present application, the target optical glue image is obtained by performing multi-angle image acquisition and image merging on the sample optical glue. It can effectively reduce noise interference, enhance image contrast, improve image quality, and perform high-precision edge detection and image feature recognition on the target optical glue image. It can accurately extract the edges and feature points of the optical glue, improve the accuracy of the image feature data, and input the image feature data into the Gaussian process regression model to predict the refractive index of the optical glue with high precision, thereby improving the accuracy of the refractive index prediction, thereby generating the first refractive index distribution data. The wavelength of the sample optical glue is scanned by a spectrometer to obtain optical property data, and the refractive index of the optical glue is calculated based on the Kramers-Kronig relationship function to obtain the second refractive index distribution data. It can comprehensively analyze the optical properties of the optical glue at different wavelengths and improve the comprehensiveness and accuracy of the optical glue performance detection. The first refractive index distribution feature vector and the second refractive index distribution feature vector are input into a multi-task classification neural network model based on the attention mechanism to perform optical glue performance analysis. Through the attention mechanism layer and the multi-task classifier of the model, the distribution uniformity and distribution stability indicators of the optical glue can be effectively analyzed, thereby improving the accuracy of the optical glue performance detection.

[0041] In a specific embodiment, the process of executing step S101 may specifically include the following steps:

[0042] (1) Capturing multi-angle images of the sample optical adhesive to obtain a plurality of first optical adhesive images at different angles;

[0043] (2) performing image denoising on a plurality of first optical adhesive images at different angles to obtain a plurality of denoised optical adhesive images;

[0044] (3) performing standardization processing on multiple denoised optical adhesive images to obtain multiple standard optical adhesive images;

[0045] (4) performing contrast enhancement on a plurality of standard optical adhesive images to obtain a plurality of enhanced optical adhesive images;

[0046] (5) Merge multiple enhanced optical adhesive images to obtain a target optical adhesive image.

[0047] Specifically, multi-angle image acquisition is performed on the sample optical glue. By rotating or moving the sample, the camera device captures images of the sample from different angles. Assume that there is a sample optical glue, which is fixed on a rotatable platform, and the platform can rotate at set angle increments. Use a high-resolution camera to capture images from each angle to obtain multiple first optical glue images at different angles. Image denoising is performed on the first optical glue images at multiple different angles to remove noise from the image and improve the image quality. Commonly used methods include Gaussian filtering, median filtering, etc. For example, Gaussian filtering is a linear smoothing filter that performs a convolution operation on an image through a Gaussian function, and its formula is:

[0048] ;

[0049] in, is the output value of the Gaussian function, indicating that The filter value at ; is the standard deviation, which controls the width of the Gaussian function and determines the smoothness of the filter; and is the spatial coordinate of the image. By performing Gaussian filtering on the image, high-frequency noise can be effectively removed. Standardize multiple denoised optical adhesive images. Adjust the brightness and contrast of the image to a uniform range to eliminate the brightness difference between different images. Perform contrast enhancement on multiple standard optical adhesive images to improve the contrast of the image and make the details in the image clearer. Common methods include histogram equalization and adaptive histogram equalization. Histogram equalization enhances the contrast of the image by adjusting the grayscale distribution of the image. Merge multiple enhanced optical adhesive images to obtain the target optical adhesive image. Fusion the image information from multiple different angles to generate a comprehensive target image. Using the image superposition method, all enhanced optical adhesive images are superimposed and the average is taken to obtain the target image. Assume that there is Enhanced optical glue images, superimposed target images It can be calculated by the following formula:

[0050] ;

[0051] in, is the final image after merging; It is Zhang enhanced optical glue image; is the number of images. In this way, the information of all angles is integrated into one image, and the generated target optical glue image has a higher signal-to-noise ratio and richer detail information. For example, if the pixel value of the original image at the coordinate (10, 10) is 150, after Gaussian filtering, assuming Set to 1.0, the output value of the Gaussian function may become 140. Normalization eliminates brightness differences between images. For example, suppose the pixel value range of an image is , the normalized pixel value It can be calculated as:

[0052] ;

[0053] Then the contrast is improved by histogram equalization. For example, after histogram equalization, the grayscale values ​​in the original image may distribute the pixel values ​​more evenly, making the details clearer. All enhanced images are superimposed and averaged. Assume that each enhanced optical glue image is at coordinates The pixel values ​​at , the final merged image is at coordinates The pixel value at It can be calculated as:

[0054] ;

[0055] The resulting target optical adhesive image contains information from multiple angles and has better visual quality and clearer details.

[0056] In a specific embodiment, the process of executing step S102 may specifically include the following steps:

[0057] (1) Perform Gaussian filtering on the target optical adhesive image to obtain a smooth optical adhesive image;

[0058] (2) Performing Sobel operator processing on the smoothed optical glue image to obtain an edge-detected optical glue image;

[0059] (3) Perform threshold segmentation on the edge detection optical glue image to obtain a binary edge image;

[0060] (4) Perform morphological operations on the binary edge image to obtain an optimized edge image;

[0061] (5) Extract the contour of the optimized edge image to obtain the optical glue contour data;

[0062] (6) Performing feature point detection on the optimized edge image according to the optical glue contour data to obtain multiple feature point detection vectors;

[0063] (7) Calculating feature descriptors for multiple feature point detection vectors to obtain feature descriptor data;

[0064] (8) Map and match the feature descriptor data to obtain the image feature data of each feature point.

[0065] Specifically, the target optical adhesive image is subjected to Gaussian filtering to obtain a smoothed optical adhesive image. Gaussian filtering is a linear smoothing filter that performs convolution operation on an image through a Gaussian function, and its formula is:

[0066] ;

[0067] in, is the output value of the Gaussian function, indicating that The filter value at ; is the standard deviation, which controls the width of the Gaussian function and determines the smoothness of the filter; and is the spatial coordinate of the image. By performing Gaussian filtering on the image, high-frequency noise can be effectively removed. For example, if the target optical adhesive image is at coordinate The pixel value at is 150. After Gaussian filtering, it is assumed that Set to 1.0, the output value of the Gaussian function It may become 140. The smoothed optical glue image is processed by the Sobel operator to obtain the edge detection optical glue image. The Sobel operator is an operator used for image edge detection. It highlights the edge part of the image by calculating the gradient value of the pixel points in the image. The Sobel operator calculates the gradient in the horizontal direction and the vertical direction respectively through two 3x3 convolution kernels. By calculating the size of the gradient, the edge detection optical glue image can be obtained:

[0068] ;

[0069] in, and are the gradient images in the horizontal and vertical directions respectively, is a gradient size image. In this way, the edge part of the image is highlighted to obtain an edge detection optical glue image. Threshold segmentation is performed on the edge detection optical glue image to obtain a binary edge image. Threshold segmentation is to segment the pixel values ​​in the image according to a certain threshold value, set the pixels above the threshold value to white, and the pixels below the threshold value to black, to obtain a binary image. For example, the threshold value is set to 128, the pixel values ​​greater than 128 are set to 255 (white), and the pixel values ​​less than 128 are set to 0 (black), to obtain a binary edge image. Morphological operations are performed on the binary edge image to obtain an optimized edge image. Morphological operations include expansion, erosion, opening and closing operations, etc., through which noise and small holes generated in the binarization process are removed to make the edge smoother and continuous. For example, the expansion operation can fill the small holes in the edge, and the erosion operation can remove the small noise on the edge to obtain the optimized edge image. Contour extraction is performed on the optimized edge image to obtain the optical glue contour data. The shape contour of the object is extracted by detecting the connected area in the image to obtain the shape information of the optical glue. For example, the findContours function in OpenCV is used to detect and extract the contours in the image, thereby obtaining the optical adhesive contour data. Feature point detection is performed on the optimized edge image according to the optical adhesive contour data to obtain multiple feature point detection vectors. Feature point detection is to identify points with significant features in the image, such as corner points, edge points, etc., and to analyze the specific features of the optical adhesive by detecting these feature points. For example, the Harris corner point detection algorithm is used to detect the corner points in the image, and the coordinates of these corner points are extracted as feature point detection vectors. Feature descriptors are calculated for multiple feature point detection vectors to obtain feature descriptor data. Feature descriptors are descriptions of the image area around the feature point, which are used to represent the local image structure of the feature point. Commonly used methods include SIFT and SURF. By calculating feature descriptors, the local information of the image is quantified and encoded. For example, the SIFT algorithm is used to extract the 128-dimensional feature vector of each feature point as feature descriptor data. The feature descriptor data is mapped and matched to obtain the image feature data of each feature point. The calculated feature descriptor is matched with the preset feature library to determine the specific feature information of each feature point. For example, using a nearest neighbor matching algorithm, the feature descriptor data is compared with the data in the feature library to find the most similar matching pair, thereby obtaining the image feature data of each feature point.

[0070] In a specific embodiment, the process of executing step S103 may specifically include the following steps:

[0071] (1) Input the image feature data of each feature point into a preset Gaussian process regression model and define the Gaussian kernel function of the Gaussian process regression model;

[0072] (2) Calculate the covariance matrix of the image feature data based on the Gaussian kernel function to obtain the target covariance matrix;

[0073] (3) Obtain prior knowledge and observation data, and calculate the posterior distribution of image feature data through Bayesian inference to obtain multiple posterior distribution data for each feature point;

[0074] (4) Performing mean calculation on multiple posterior distribution data of each feature point to obtain the posterior distribution mean of each feature point, and using the posterior distribution mean as the refractive index prediction data of each feature point;

[0075] (5) Generate first refractive index distribution data of the sample optical adhesive based on the refractive index prediction data of each feature point.

[0076] Specifically, the image feature data of each feature point is input into a preset Gaussian process regression model, and the Gaussian kernel function of the Gaussian process regression model is defined. Gaussian process regression is a non-parametric Bayesian regression method used to deal with prediction problems with uncertainty. The core of the Gaussian process regression model is to use the kernel function to define the similarity between input data points. Using the Gaussian kernel function, its formula is:

[0077] ;

[0078] in, Represents the input data point and similarities between; yes and The Euclidean distance between is the scale parameter of the kernel function, which controls the decay speed of similarity. Based on the Gaussian kernel function, the covariance matrix of the image feature data is calculated to obtain the target covariance matrix. The calculation of the covariance matrix is ​​one of the important steps of the Gaussian process regression model, which reflects the similarity and correlation between different feature points. By calculating the covariance matrix, the statistical relationship between the feature points is established to provide data support for the subsequent refractive index prediction. Prior knowledge and observation data are obtained, and the posterior distribution of the image feature data is calculated by Bayesian inference to obtain multiple posterior distribution data of each feature point. Prior knowledge includes the understanding of the properties of optical adhesive materials and previous experimental data, while the observation data is the specific value extracted from the image feature data. Bayesian inference calculates the posterior distribution of each feature point by combining prior knowledge and observation data. These posterior distributions reflect the possible distribution of the refractive index of each feature point under given observation data. The multiple posterior distribution data of each feature point are averaged to obtain the posterior distribution mean of each feature point, and the posterior distribution mean is used as the refractive index prediction data of each feature point. By calculating the mean of the posterior distribution, the predicted refractive index value of each feature point is obtained. The first refractive index distribution data of the sample optical adhesive is generated according to the predicted refractive index data of each feature point. By integrating the predicted refractive index data of all feature points, the refractive index distribution map of the entire sample optical adhesive at different positions is obtained.

[0079] In a specific embodiment, the process of executing step S104 may specifically include the following steps:

[0080] (1) Initializing and calibrating a preset spectrometer, and setting the wavelength range of the spectrometer to obtain a set wavelength range;

[0081] (2) Using a spectrometer, perform wavelength scanning on multiple test points of the sample optical adhesive according to a set wavelength range to obtain initial wavelength scanning data for each test point;

[0082] (3) De-noising and baseline correction are performed on the initial wavelength scanning data to obtain the target wavelength scanning data of each test point;

[0083] (4) performing optical characteristic analysis on the target wavelength scanning data of each test point to obtain the optical characteristic data of each test point;

[0084] (5) Based on the Kramers-Kronig relationship function, the refractive index of the optical adhesive is calculated for the optical characteristic data to obtain the refractive index data of the optical adhesive at each test point;

[0085] (6) Generate second refractive index distribution data of the sample optical adhesive based on the refractive index data of the optical adhesive at each test point.

[0086] Specifically, the preset spectrometer is initialized and calibrated, and the wavelength range of the spectrometer is set. The initialization calibration includes adjusting the zero point, wavelength accuracy and other key parameters of the instrument. The wavelength range is set according to the characteristics of the optical adhesive sample to be tested to ensure that all key optical characteristic areas are covered during the measurement process. For example, assuming that the wavelength range of the spectrometer is set to 400 nanometers to 700 nanometers, this range can cover the visible spectrum response of most optical adhesives. Through the spectrometer, the wavelengths of multiple test points of the sample optical adhesive are scanned according to the set wavelength range to obtain the initial wavelength scan data of each test point. Assuming that the system selects 10 test points on the optical adhesive sample for scanning, the wavelength scan data of each test point includes optical properties such as reflectivity, transmittance or absorptivity within the set range. For example, after the wavelength is scanned at each test point, a set of data sets including wavelengths and corresponding optical characteristic values ​​is obtained. The initial wavelength scan data is denoised and baseline corrected respectively to obtain the target wavelength scan data of each test point. Denoising is to eliminate random noise that may exist in the measurement process and improve the accuracy of the data. Baseline correction is used to adjust the baseline level of the data to eliminate systematic deviations caused by the environment or equipment. For example, by performing a linear fit on the scan data and subtracting the fitting curve, the baseline-corrected data is obtained. The target wavelength scan data of each test point is optically analyzed to obtain the optical characteristic data of each test point. The optical characteristic analysis includes the calculation of absorption, transmission, reflection and other characteristics. These characteristic data can reflect the response of the optical adhesive at different wavelengths. For example, by calculating the absorbance at different wavelengths, the absorption spectrum of the sample in the entire wavelength range is obtained. Based on the Kramers-Kronig relationship function, the refractive index of the optical adhesive is calculated for the optical characteristic data to obtain the refractive index data of the optical adhesive at each test point. The Kramers-Kronig relationship is a method for converting optical characteristic data into refractive index data. The specific formula is:

[0087] ;

[0088] in, is the refractive index, is the frequency, is at frequency The absorption coefficient at Represents the Cauchy principal value integral. Through this relationship, the refractive index distribution is derived from the absorption spectrum data. The second refractive index distribution data of the sample optical glue is generated according to the refractive index data of the optical glue at each test point. The refractive index data of all test points are integrated to obtain the refractive index distribution diagram of the entire sample at different positions. For example, suppose there is an optical glue sample. The wavelength is scanned at 10 test points in the wavelength range of 400 nanometers to 700 nanometers by a spectrometer to obtain the initial wavelength scan data of each test point. Gaussian filtering is performed on these data to denoise them. Assuming the standard deviation Set to 1.0, reflectance data at a certain wavelength after denoising From 0.6 to 0.55. Perform baseline correction, subtract the baseline deviation through linear fitting, and obtain the target wavelength scanning data. Perform optical property analysis on the target wavelength scanning data, such as calculating the absorbance at different wavelengths to obtain the absorption spectrum of the sample. Based on the Kramers-Kronig relationship, use the absorption spectrum data to calculate the refractive index, assuming that the refractive index calculated at a certain frequency is 1.5. Repeat this process to calculate the refractive index data of all test points. Integrate the refractive index data of all test points to generate the refractive index distribution map of the optical adhesive sample. For example, if the refractive index data of the characteristic points of the sample at different positions are , these values ​​can be arranged according to the spatial positions of the feature points to obtain the second refractive index distribution data of the sample.

[0089] In a specific embodiment, the process of executing step S105 may specifically include the following steps:

[0090] (1) inputting the first refractive index distribution data into a preset first clustering algorithm to calculate the distribution center, thereby obtaining a plurality of first initial distribution centers, and inputting the second refractive index distribution data into a preset second clustering algorithm to calculate the distribution center, thereby obtaining a plurality of second initial distribution centers;

[0091] (2) calculating the data point distance between the first refractive index distribution data and the plurality of first initial distribution centers to obtain a plurality of first data point distances for each first initial distribution center, and calculating the data point distance between the second refractive index distribution data and the plurality of second initial distribution centers to obtain a plurality of second data point distances for each second initial distribution center;

[0092] (3) performing a mean operation on the plurality of first data point distances to obtain a first point distance mean of each first initial distribution center, and performing a mean operation on the plurality of second data point distances to obtain a second point distance mean of each second initial distribution center;

[0093] (4) adjusting the multiple first initial distribution centers according to the first point distance mean to obtain multiple first target distribution centers, and adjusting the multiple second initial distribution centers according to the second point distance mean to obtain multiple second target distribution centers;

[0094] (5) performing feature clustering on the first refractive index distribution data based on the plurality of first target distribution centers to obtain a plurality of first refractive index distribution feature values, and performing feature clustering on the second refractive index distribution data based on the plurality of second target distribution centers to obtain a plurality of second refractive index distribution feature values;

[0095] (6) Performing vector encoding conversion on a plurality of first refractive index distribution characteristic values ​​to obtain a first refractive index distribution characteristic vector, and performing vector encoding conversion on a plurality of second refractive index distribution characteristic values ​​to obtain a second refractive index distribution characteristic vector.

[0096] Specifically, the first refractive index distribution data is input into a preset first clustering algorithm to calculate the distribution center. Assuming that the K-means clustering algorithm is used, the K-means clustering algorithm iteratively calculates the distance from the data point to the cluster center, assigns the data point to the nearest cluster center, and continuously updates the position of the cluster center until convergence. In this way, multiple first initial distribution centers are obtained. Similarly, the second refractive index distribution data is input into a preset second clustering algorithm to calculate the distribution center, and multiple second initial distribution centers are obtained. The data point distance calculation is performed on the first refractive index distribution data and the multiple first initial distribution centers to obtain multiple first data point distances of each first initial distribution center. The calculation of the data point distance can be performed using the Euclidean distance formula, which is as follows:

[0097] ;

[0098] in, Indicates Data points To Distribution Centers The distance is the dimension of the data point, and are the data points and the distribution center in The values ​​in dimensions. Through this calculation method, multiple first data point distances of each first initial distribution center are obtained. Similarly, the data point distances of the second refractive index distribution data and the multiple second initial distribution centers are calculated to obtain multiple second data point distances of each second initial distribution center. The multiple first data point distances are averaged to obtain the first point distance mean of each first initial distribution center. Similarly, the multiple second data point distances are averaged to obtain the second point distance mean of each second initial distribution center. The multiple first initial distribution centers are adjusted according to the first point distance mean to obtain multiple first target distribution centers. Similarly, the multiple second initial distribution centers are adjusted according to the second point distance mean to obtain multiple second target distribution centers. By moving the distribution center to the average position of its data points, the distribution center is made to better represent the data points in its cluster. Based on the multiple first target distribution centers, the first refractive index distribution data is feature clustered to obtain multiple first refractive index distribution characteristic values. Similarly, based on the multiple second target distribution centers, the second refractive index distribution data is feature clustered to obtain multiple second refractive index distribution characteristic values. The result of feature clustering is to group the data points according to their eigenvalues ​​so that the eigenvalues ​​of each group of data can reflect the characteristics of the group of data. Perform vector encoding conversion on multiple first refractive index distribution eigenvalues ​​to obtain the first refractive index distribution eigenvector. Similarly, perform vector encoding conversion on multiple second refractive index distribution eigenvalues ​​to obtain the second refractive index distribution eigenvector. Vector encoding conversion is to convert the eigenvalues ​​into vector form for subsequent processing and analysis. For example, suppose there are two refractive index distribution data sets, representing two different optical adhesive samples. Use the K-means clustering algorithm to cluster the first data set. Assuming that the number of clusters selected is 3, 3 initial distribution centers are obtained. Similarly, cluster the second data set to obtain 3 initial distribution centers. Calculate the distance from each data point in the first data set to its distribution center, assuming that the distance from the first data point to the first distribution center is 2.5, the distance from the second data point to the first distribution center is 3.0, and so on. Calculate the average of these distances, assuming that the average distance of the first distribution center is 2.75. Similarly, calculate the distance from each data point in the second data set to the center of its distribution, and obtain the average distance of each distribution center. Adjust the distribution center according to the calculated average distance. Suppose that the first distribution center is moved to the average position of its data points to obtain the new distribution center position. Use the adjusted distribution center to perform feature clustering on the data set. Suppose the obtained eigenvalues ​​are 1.2, 1.5, and 1.8, and so on. Convert these eigenvalues ​​into vector encoding. Suppose the first eigenvalue is encoded as , the second eigenvalue is encoded as , and so on, the first refractive index distribution feature vector is obtained. Similarly, feature clustering and vector encoding conversion are performed on the second data set to obtain the second refractive index distribution feature vector.

[0099] In a specific embodiment, the process of executing step S106 may specifically include the following steps:

[0100] (1) inputting the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism, wherein the multi-task classification neural network model based on an attention mechanism comprises: an input layer, an attention mechanism layer, a first task classifier, a second task classifier, and an output layer;

[0101] (2) In the input layer, vector concatenation is performed on the first refractive index distribution feature vector and the second refractive index distribution feature vector to obtain a concatenated vector;

[0102] (3) Input the concatenated vector into the attention mechanism layer to calculate the attention weight and obtain the attention vector;

[0103] (4) Inputting the attention vector into the first task classifier and the second task classifier respectively to perform optical adhesive performance analysis, and obtaining the optical adhesive distribution uniformity index of the first task classifier and the optical adhesive distribution stability index of the second task classifier. The first task classifier includes: convolution layer, pooling layer, fully connected layer and LSTM layer, and the second task classifier includes: bidirectional threshold recurrent network and regression function layer;

[0104] (5) Through the output layer, the optical adhesive distribution uniformity index and the optical adhesive distribution stability index are used as optical adhesive performance index data and output.

[0105] Specifically, a multi-task classification neural network model based on the attention mechanism is constructed. The model includes an input layer, an attention mechanism layer, a first task classifier, a second task classifier and an output layer. In the input layer, the first refractive index distribution feature vector and the second refractive index distribution feature vector are vector spliced. Assuming that the length of the first refractive index distribution feature vector is 128, the length of the second refractive index distribution feature vector is 128, and the length of the spliced ​​vector obtained after splicing is 256. The spliced ​​vector is input into the attention mechanism layer for attention weight calculation. By calculating the attention weight, the part of the input vector that is more important for a specific task is identified to improve the performance of the model. The attention mechanism generates an attention vector by applying weights to different parts of the spliced ​​vector, helping the model to better focus on key features. The attention vector is input into the first task classifier and the second task classifier respectively for optical adhesive performance analysis. The goal of the first task classifier is to analyze the distribution uniformity of the optical adhesive. The classifier consists of a convolutional layer, a pooling layer, a fully connected layer and an LSTM layer. The convolutional layer is used to extract local patterns in the input features and extract low-level features by applying multiple filters. The pooling layer reduces the data dimension and computational complexity by downsampling while retaining important features. The fully connected layer integrates the features extracted by the convolutional layer and the pooling layer to generate a feature vector. The LSTM layer is a long short-term memory network used to process sequence data. It captures the temporal relationship of features through the memory and forget mechanism, so as to better analyze the distribution uniformity of optical adhesives. At the same time, the second task classifier aims to analyze the distribution stability of optical adhesives. The classifier consists of a bidirectional threshold recurrent network and a regression function layer. The bidirectional threshold recurrent network can process sequence data from two directions (forward and backward) to capture global feature patterns. By combining bidirectional information, the bidirectional threshold recurrent network can more accurately analyze the temporal characteristics of input data. The regression function layer is used to map the features extracted by the bidirectional threshold recurrent network to specific performance indicators, namely the distribution stability of optical adhesives. Through the output layer, the optical adhesive distribution uniformity index obtained by the first task classifier and the optical adhesive distribution stability index obtained by the second task classifier are output as optical adhesive performance index data. The output layer integrates the results from the two task classifiers and generates the final performance index data.

[0106] The above describes the optical adhesive performance detection method based on image processing and wavelength analysis in the embodiment of the present application. The following describes the optical adhesive performance detection device based on image processing and wavelength analysis in the embodiment of the present application. Figure 2 In the embodiment of the present application, an optical adhesive performance detection device based on image processing and wavelength analysis includes:

[0107] A preprocessing module 201 is used for performing image preprocessing on the sample optical adhesive to obtain a target optical adhesive image;

[0108] The recognition module 202 is used to perform edge detection and image feature recognition on the target optical adhesive image to obtain image feature data;

[0109] Prediction module 203, used for inputting image feature data into a preset Gaussian process regression model to predict the refractive index of the optical adhesive, and obtaining first refractive index distribution data;

[0110] The calculation module 204 is used to perform wavelength scanning on the sample optical adhesive to obtain optical characteristic data, and calculate the refractive index of the optical adhesive based on the optical characteristic data to obtain second refractive index distribution data;

[0111] An extraction module 205 is used to extract features from the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector;

[0112] The analysis module 206 is used to input the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on the attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

[0113] Through the cooperation of the above components, the target optical glue image is obtained by multi-angle image acquisition and image merging of the sample optical glue. It can effectively reduce noise interference, enhance image contrast, improve image quality, and perform high-precision edge detection and image feature recognition on the target optical glue image. It can accurately extract the edges and feature points of the optical glue, improve the accuracy of the image feature data, and input the image feature data into the Gaussian process regression model to predict the refractive index of the optical glue with high precision, thereby improving the accuracy of the refractive index prediction, thereby generating the first refractive index distribution data. The wavelength of the sample optical glue is scanned by a spectrometer to obtain optical property data, and the refractive index of the optical glue is calculated based on the Kramers-Kronig relationship function to obtain the second refractive index distribution data. It can comprehensively analyze the optical properties of the optical glue at different wavelengths, and improve the comprehensiveness and accuracy of the optical glue performance detection. The first refractive index distribution feature vector and the second refractive index distribution feature vector are input into the multi-task classification neural network model based on the attention mechanism to perform optical glue performance analysis. Through the attention mechanism layer and the multi-task classifier of the model, the distribution uniformity and distribution stability indicators of the optical glue can be effectively analyzed, thereby improving the accuracy of the optical glue performance detection.

[0114] The present application also provides an optical adhesive performance detection device based on image processing and wavelength analysis, the optical adhesive performance detection device based on image processing and wavelength analysis includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the optical adhesive performance detection method based on image processing and wavelength analysis in the above-mentioned embodiments.

[0115] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the steps of the optical adhesive performance detection method based on image processing and wavelength analysis.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0118] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting optical adhesive properties based on image processing and wavelength analysis, characterized in that: The optical adhesive performance detection method based on image processing and wavelength analysis includes: Performing image preprocessing on the sample optical adhesive image acquisition to obtain the target optical adhesive image; Performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data; Input the image feature data into a preset Gaussian process regression model to predict the refractive index of the optical glue to obtain the first refractive index distribution data; specifically including: input the image feature data of each feature point into a preset Gaussian process regression model, and define the Gaussian kernel function of the Gaussian process regression model; calculate the covariance matrix of the image feature data based on the Gaussian kernel function to obtain the target covariance matrix; obtain prior knowledge and observation data, and calculate the posterior distribution of the image feature data through Bayesian inference to obtain multiple posterior distribution data of each feature point; perform mean operation on the multiple posterior distribution data of each feature point to obtain the posterior distribution mean of each feature point, and use the posterior distribution mean as the refractive index prediction data of each feature point; generate the first refractive index distribution data of the sample optical glue according to the refractive index prediction data of each feature point; The sample optical adhesive is wavelength scanned to obtain optical characteristic data, and the optical adhesive refractive index is calculated for the optical characteristic data to obtain second refractive index distribution data; specifically comprising: initializing and calibrating a preset spectrometer, and setting a wavelength range for the spectrometer to obtain a set wavelength range; using the spectrometer, wavelength scanning multiple test points of the sample optical adhesive according to the set wavelength range to obtain initial wavelength scan data for each test point; denoising and baseline correction are performed on the initial wavelength scan data to obtain target wavelength scan data for each test point; optical characteristic analysis is performed on the target wavelength scan data for each test point to obtain optical characteristic data for each test point; based on the Kramers-Kronig relationship function, the optical adhesive refractive index is calculated for the optical characteristic data to obtain optical adhesive refractive index data for each test point; and the second refractive index distribution data of the sample optical adhesive is generated according to the optical adhesive refractive index data for each test point; Performing feature extraction on the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector; The first refractive index distribution feature vector and the second refractive index distribution feature vector are input into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

2. The optical adhesive performance detection method based on image processing and wavelength analysis according to claim 1 is characterized in that: The image preprocessing of the sample optical adhesive image acquisition to obtain the target optical adhesive image includes: Capturing multi-angle images of the sample optical adhesive to obtain a plurality of first optical adhesive images at different angles; Performing image denoising on the plurality of first optical adhesive images at different angles to obtain a plurality of denoised optical adhesive images; Performing standardization processing on the multiple denoised optical adhesive images to obtain multiple standard optical adhesive images; performing contrast enhancement on the plurality of standard optical adhesive images to obtain a plurality of enhanced optical adhesive images; The multiple enhanced optical adhesive images are merged to obtain a target optical adhesive image.

3. The optical adhesive performance detection method based on image processing and wavelength analysis according to claim 1 is characterized in that: The performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data includes: Performing Gaussian filtering on the target optical adhesive image to obtain a smoothed optical adhesive image; Performing Sobel operator processing on the smoothed optical glue image to obtain an edge-detected optical glue image; Performing threshold segmentation on the edge detection optical glue image to obtain a binary edge image; Performing morphological operations on the binarized edge image to obtain an optimized edge image; Performing contour extraction on the optimized edge image to obtain optical glue contour data; Performing feature point detection on the optimized edge image according to the optical glue contour data to obtain a plurality of feature point detection vectors; Performing feature descriptor calculation on the plurality of feature point detection vectors to obtain feature descriptor data; Mapping and matching are performed on the feature descriptor data to obtain image feature data of each feature point.

4. The optical adhesive performance detection method based on image processing and wavelength analysis according to claim 1 is characterized in that: The extracting features of the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector comprises: Inputting the first refractive index distribution data into a preset first clustering algorithm to calculate the distribution center to obtain a plurality of first initial distribution centers, and inputting the second refractive index distribution data into a preset second clustering algorithm to calculate the distribution center to obtain a plurality of second initial distribution centers; Performing data point distance calculation on the first refractive index distribution data and the plurality of first initial distribution centers to obtain a plurality of first data point distances of each first initial distribution center, and performing data point distance calculation on the second refractive index distribution data and the plurality of second initial distribution centers to obtain a plurality of second data point distances of each second initial distribution center; Performing a mean operation on the plurality of first data point distances to obtain a first point distance mean of each first initial distribution center, and performing a mean operation on the plurality of second data point distances to obtain a second point distance mean of each second initial distribution center; The multiple first initial distribution centers are adjusted according to the first point distance mean value to obtain multiple first target distribution centers, and the multiple second initial distribution centers are adjusted according to the second point distance mean value to obtain multiple second target distribution centers; Performing feature clustering on the first refractive index distribution data based on the multiple first target distribution centers to obtain multiple first refractive index distribution feature values, and performing feature clustering on the second refractive index distribution data based on the multiple second target distribution centers to obtain multiple second refractive index distribution feature values; The plurality of first refractive index distribution eigenvalues ​​are subjected to vector coding conversion to obtain a first refractive index distribution eigenvector, and the plurality of second refractive index distribution eigenvalues ​​are subjected to vector coding conversion to obtain a second refractive index distribution eigenvector.

5. The optical adhesive performance detection method based on image processing and wavelength analysis according to claim 1 is characterized in that: The step of inputting the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data includes: Inputting the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism, wherein the multi-task classification neural network model based on an attention mechanism comprises: an input layer, an attention mechanism layer, a first task classifier, a second task classifier, and an output layer; In the input layer, vector concatenation is performed on the first refractive index distribution characteristic vector and the second refractive index distribution characteristic vector to obtain a concatenated vector; Input the concatenated vector into the attention mechanism layer to calculate the attention weight, and obtain an attention vector; The attention vector is respectively input into the first task classifier and the second task classifier to perform optical glue performance analysis, and an optical glue distribution uniformity index of the first task classifier and an optical glue distribution stability index of the second task classifier are obtained, wherein the first task classifier includes: a convolutional layer, a pooling layer, a fully connected layer and an LSTM layer, and the second task classifier includes: a bidirectional threshold recurrent network and a regression function layer; Through the output layer, the optical adhesive distribution uniformity index and the optical adhesive distribution stability index are used as optical adhesive performance index data and output.

6. An optical adhesive performance detection device based on image processing and wavelength analysis, characterized in that: The optical adhesive performance detection device based on image processing and wavelength analysis includes: A preprocessing module, used for performing image preprocessing on the sample optical glue image acquisition to obtain the target optical glue image; A recognition module, used for performing edge detection and image feature recognition on the target optical adhesive image to obtain image feature data; A prediction module is used to input the image feature data into a preset Gaussian process regression model to predict the refractive index of the optical adhesive and obtain first refractive index distribution data; specifically comprising: inputting the image feature data of each feature point into a preset Gaussian process regression model, and defining the Gaussian kernel function of the Gaussian process regression model; calculating the covariance matrix of the image feature data based on the Gaussian kernel function to obtain a target covariance matrix; obtaining prior knowledge and observation data, and calculating the posterior distribution of the image feature data through Bayesian inference to obtain multiple posterior distribution data of each feature point; performing mean operation on the multiple posterior distribution data of each feature point to obtain the posterior distribution mean of each feature point, and using the posterior distribution mean as the refractive index prediction data of each feature point; generating the first refractive index distribution data of the sample optical adhesive according to the refractive index prediction data of each feature point; A calculation module is used to perform wavelength scanning on the sample optical glue to obtain optical characteristic data, and perform optical glue refractive index calculation on the optical characteristic data to obtain second refractive index distribution data; specifically comprising: initializing and calibrating a preset spectrometer, and setting a wavelength range for the spectrometer to obtain a set wavelength range; using the spectrometer, performing wavelength scanning on multiple test points of the sample optical glue according to the set wavelength range to obtain initial wavelength scanning data for each test point; performing denoising and baseline correction on the initial wavelength scanning data to obtain target wavelength scanning data for each test point; performing optical characteristic analysis on the target wavelength scanning data of each test point to obtain optical characteristic data for each test point; performing optical glue refractive index calculation on the optical characteristic data based on a Kramers-Kronig relationship function to obtain optical glue refractive index data for each test point; generating second refractive index distribution data of the sample optical glue according to the optical glue refractive index data of each test point; An extraction module, used to perform feature extraction on the first refractive index distribution data and the second refractive index distribution data respectively to obtain a first refractive index distribution feature vector and a second refractive index distribution feature vector; An analysis module is used to input the first refractive index distribution feature vector and the second refractive index distribution feature vector into a multi-task classification neural network model based on an attention mechanism to perform optical adhesive performance analysis to obtain optical adhesive performance index data.

7. An optical adhesive performance detection device based on image processing and wavelength analysis, characterized in that: The optical adhesive performance detection device based on image processing and wavelength analysis includes: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the optical glue performance detection device based on image processing and wavelength analysis performs the optical glue performance detection method based on image processing and wavelength analysis as described in any one of claims 1-5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the optical adhesive performance detection method based on image processing and wavelength analysis as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Nondestructive detection method for rubber composite material based on terahertz time-domain spectral imaging

    CN111442733A

  • Method and system for detecting high and low refractive indexes of glass beads

    CN112710632A