Optical Film Detection Method, Device and Equipment Based on Image Processing
By collecting multi-frame images for preprocessing and feature fusion, multi-scale defect features are extracted, and combining the spectral response features and wavelength-film thickness mapping relationship, the precise identification and classification of defects of multi-layer optical films is achieved, and the problem of insufficient sensitivity of traditional detection methods under complex lighting conditions is solved, the optimization of manufacturing parameters and closed-loop control is achieved, and the detection accuracy of optical films and the adaptability of production lines is improved.
Patent Information
- Application Number
- CN202510686709.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The prior art is difficult to effectively identify the tiny defects in multi-layer optical films. Especially under complex lighting conditions, traditional detection methods lack sensitivity and lack the adaptability of multi-layer film characteristics, and lack closed-loop control for defect detection and manufacturing parameter optimization.
By collecting multi-frame images for pre-processing, calculating the feature value response matrix, performing multi-frame image feature fusion, extracting multi-scale defect features, combining the spectrum response features and wavelength-film thickness mapping relationship, autoregressive prediction and processing control parameters optimization, and realizing closed-loop control.
The precise identification and classification of defects of multi-layer optical films is achieved, the detection accuracy is improved, the defect resolution ability of each layer of films that are adapted to light of different wavelengths is reduced, the computing resource requirements are reduced, real-time detection and manufacturing parameters are achieved, and the yield and consistency of the optical film is improved.
Smart Images

Figure CN120219382B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to an optical film detection method, device and equipment based on image processing. Background Art
[0002] Since sunlight is composed of light with different wavelengths, the design of multilayer optical films requires the thickness of each layer to be precisely matched to a specific wavelength to obtain the best optical effect. However, during the manufacturing process of optical films, due to the influence of factors such as materials, processes, and environments, tiny defects such as bubbles, scratches, and uneven thickness are likely to occur in each layer. These defects often have extremely small sizes, low contrasts, and are distributed in different film layers, making it difficult for traditional single-frame image detection methods to effectively identify them.
[0003] Currently, there are mainly three challenges in optical film defect detection technology: First, it is difficult to distinguish tiny defects from background noise, especially under complex lighting conditions, and the detection sensitivity of a single image processing algorithm is limited; second, the multilayer film structure makes the defect characteristics corresponding to light with different wavelengths vary, and existing general detection algorithms lack the adaptive ability for the characteristics of multilayer films; third, there is a lack of effective connection between defect detection and manufacturing parameter optimization, and a closed-loop quality control system cannot be formed. Traditional image processing methods such as edge detection and region segmentation have poor effects when dealing with low-contrast and multi-level optical film defects, while basic deep learning methods, although having strong feature extraction capabilities, are insufficient in adapting to the detection of small-sample and small-target defects. Summary of the Invention
[0004] The main object of the present invention is to provide an optical film detection method, device and equipment based on image processing. The present invention realizes the precise identification and classification of defects in different film layers, and further realizes the closed-loop control of the defect detection result and manufacturing parameter optimization.
[0005] To achieve the above object, the present invention provides an optical film detection method based on image processing, including the following steps:
[0006] Collect multiple frames of images of a multilayer optical film under different lighting conditions, and perform preprocessing and eigenvalue calculation on the multiple frames of images to obtain an eigenvalue response matrix;
[0007] Calculate the optimal weight coefficient of each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficient to obtain an integrated feature representation;
[0008] Perform multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions;
[0009] Extract spectral response features based on the defect candidate regions, and calculate the matching degree between the spectral response features and a preset wavelength-thickness mapping relationship matrix to obtain a multi-layer film defect distribution map;
[0010] Perform autoregressive prediction and processing control parameter optimization on the multi-layer film defect distribution map to obtain a closed-loop control scheme.
[0011] The present invention also provides an optical film detection device based on image processing, including:
[0012] An acquisition module, configured to acquire multiple frames of images of a multi-layer optical film under different illumination conditions, and perform preprocessing and eigenvalue calculation on the multiple frames of images to obtain an eigenvalue response matrix;
[0013] A feature fusion module, configured to calculate the optimal weight coefficient of each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficient to obtain an integrated feature representation;
[0014] A feature extraction module, configured to perform multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions;
[0015] A matching degree calculation module, configured to extract spectral response features based on the defect candidate regions, and calculate the matching degree between the spectral response features and a preset wavelength-thickness mapping relationship matrix to obtain a multi-layer film defect distribution map;
[0016] A parameter optimization module, configured to perform autoregressive prediction and processing control parameter optimization on the multi-layer film defect distribution map to obtain a closed-loop control scheme.
[0017] The present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0018] In summary, the technical solution provided by the present invention uses a multi-frame image fusion technology based on the maximum eigenvalue. This method fully utilizes the image information under different lighting conditions and realizes high-sensitivity detection of micro-defects. The eigenvalue response matrix effectively captures local structural changes, and the calculation of weight coefficients optimized by dynamic programming ensures the optimality of multi-frame fusion, significantly improving the detection accuracy. Through the calculation of the matching degree between the wavelength-thickness mapping relationship matrix and the spectral response characteristics, precise identification and classification of defects in different film layers are achieved. The self-adjusting graph convolutional UNet network can automatically learn the topological relationships of defect regions and extract multi-scale features, enabling the system to effectively detect defects in each layer of the film that adapts to different wavelengths of light, especially having strong resolution ability for micro-defects in multi-layer stacked structures. The use of a lightweight network structure reduces the computational resource requirements. Through the optimized design of eigenvalue calculation and dynamic programming algorithms, the algorithm complexity is reduced, enabling the system to achieve real-time detection under limited hardware resources and meeting the online detection requirements of industrial production lines. Based on the exogenous input autoregressive model and the hybrid parameter identification algorithm of multi-variable radial basis functions, a closed-loop control of defect detection results and manufacturing parameter optimization is achieved. The system can automatically adjust manufacturing process parameters according to the defect distribution of the film layer corresponding to different wavelengths of light, significantly improving the yield and consistency of optical films. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic diagram of the steps of an optical film detection method based on image processing in an embodiment of the present invention;
[0020] Figure 2 is a block diagram of the structure of an optical film detection device based on image processing in an embodiment of the present invention;
[0021] Figure 3 is a schematic block diagram of the structure of a computer device in an embodiment of the present invention.
[0022] The implementation, functional characteristics, and advantages of the objectives of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0024] Referring to Figure 1 , this embodiment provides an optical film detection method based on image processing, including the following steps:
[0025] S1, collect multiple frames of images of a multi-layer optical film under different lighting conditions, perform preprocessing and eigenvalue calculation on the multiple frames of images, and obtain an eigenvalue response matrix;
[0026] Among them, the angle and intensity of the light source are dynamically adjusted to ensure sufficient information is obtained under different incident angles and different light intensities, so as to comprehensively reflect the characteristics of the optical film. During the process of changing the lighting conditions, a high-resolution industrial camera is used to synchronously capture multiple frames of images. These images cover different lighting conditions such as from low angles to high angles, and from weak light to strong light, to ensure that the influence of light on the film layer characteristics is fully considered during subsequent feature analysis. Geometric correction is performed on the captured original images to eliminate the distortion error brought by the camera system. The geometric correction adopts a correction algorithm based on perspective transformation to make the pixel points in the image correspond to the correct positions in the standardized coordinate system. Adaptive histogram equalization operation is performed on the corrected images. The gray distribution is adaptively adjusted within the local area, making the overall brightness distribution of the image more uniform, thereby weakening the influence of uneven lighting on subsequent feature extraction. Through the equalization process, the contrast of the image is enhanced while maintaining the detail information of the original image, improving the visibility of film layer defects. After completing the light equalization, a bilateral filtering algorithm is applied to suppress noise while retaining edge information. Bilateral filtering is a non-linear filtering method that combines spatial distance weights and pixel intensity similarity weights, effectively removing noise while maintaining edge sharpness, and is suitable for application scenarios that require retaining film layer details during the optical film detection process. Contrast Limited Adaptive Histogram Equalization (CLAHE) is performed on the images processed by bilateral filtering. By adaptively adjusting the local contrast, the over-enhancement phenomenon caused by traditional histogram equalization is effectively avoided. The image sequence with enhanced details is integrated into a preprocessing image sequence. In order to quantify the feature response of the optical film under different lighting conditions, a Hermitian positive definite matrix is constructed based on this preprocessing image sequence. The Hermitian positive definite matrix is a matrix with excellent mathematical properties, reflecting the statistical characteristics of image data and providing stable calculation results during the feature analysis process. When constructing the Hermitian positive definite matrix, each frame of image is used as part of the input data, and the statistical correlation between pixel points is calculated to form a matrix representing the characteristics of the optical film. The maximum eigenvalue of the Hermitian positive definite matrix is calculated and normalized. The maximum eigenvalue represents the amount of information in the main feature direction of the matrix. The normalization process ensures that the eigenvalues under different lighting conditions are compared within the same scale range, improving the stability of feature fusion. All the calculated normalized maximum eigenvalues form an eigenvalue response matrix.
[0027] Set a sliding window of fixed size for the preprocessed image to ensure capturing the detailed features of the optical film in the local area. During this process, each frame of the image is divided into multiple local neighborhood windows, with each pixel point as the center of the window, enabling the window to slide smoothly across the entire image range to ensure coverage of all pixel areas and extract the local pixel data therein. Subtract the local mean from the pixel data within the local neighborhood window to eliminate the influence of global brightness or contrast, making the calculation process more focused on the relative change relationship of the pixels. Perform an inner product operation on the processed local pixel data, that is, calculate the inner product between the pixel values within each local neighborhood window and their adjacent pixel values to construct a Hermitian positive definite matrix. Perform eigenvalue decomposition on the Hermitian positive definite matrix to extract the information that can best characterize the local structural changes of the image. And select the maximum eigenvalue to reflect the main change direction of the pixel data within the local neighborhood window, effectively capturing the significant features of the optical film defects. Rearrange the maximum eigenvalue data according to the pixel position correspondence to construct an eigenvalue matrix containing the maximum eigenvalues corresponding to all pixel positions. Perform normalization processing on this eigenvalue matrix to ensure stable data distribution. Through methods such as linear transformation or non-linear scaling, map all eigenvalues to a fixed numerical range to eliminate the influence of dimensions and improve the comparability of the data. Based on the normalized eigenvalue matrix, calculate the detection statistic for each pixel position to reflect the feature distribution of the local area of the optical film. These detection statistics are calculated based on the spatial distribution pattern of the maximum eigenvalue, such as using local variance, mean deviation, or adaptive weight calculation methods, making the statistics highlight the abnormal areas of the film layer. All the calculated detection statistics are arranged according to the pixel positions to form an eigenvalue response matrix.
[0028] S2. Calculate the optimal weight coefficients for each frame of the image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficients to obtain an integrated feature representation;
[0029] Specifically, an integration framework is defined for the eigenvalue response matrix. This framework utilizes the different information weights of multiple frames of images and combines them into a single representation, such that the final fused features retain the key information of the optical film to the greatest extent and enhance the detectability of defects. Within this framework, the eigenvalue response of each frame of image is regarded as an independent input and adjusted by specific weight coefficients, enabling different images to play their best roles in the overall fusion process. When calculating the weight coefficients, a quality assessment mechanism is introduced to ensure that high-quality images play a greater role during the fusion process, while the influence of low-quality images is appropriately weakened. A quality assessment method is established within the integration framework, which measures the contribution degree of an image by analyzing the gradient information and clarity level of each frame of image. The calculation of the gradient information is based on the Sobel operator or Laplacian transform to quantify the clarity of the image edges, while the clarity level is evaluated using local contrast or frequency domain analysis methods based on Fourier transform. Through these assessment methods, a quality assessment index is assigned to each frame of image to measure the weight that should be assigned to this frame of image during the final fusion process. The relationship between the quality assessment index and weight assignment is transformed into a dynamic programming problem, so as to determine the final fusion scheme through an optimal decision-making method. After modeling the relationship between quality assessment and weight assignment as a dynamic programming problem, the entire optimization process is divided into multiple quantization levels, enabling the entire optimization calculation to progress step by step according to a phased decision-making process. Dynamic programming decomposes the global optimal problem into a series of sub-problems, each sub-problem corresponding to a specific weight assignment scheme. Through forward calculation, the optimal weight coefficient at the current stage is obtained for each stage and stored in the dynamic programming table. To ensure the efficiency of the calculation, the dynamic programming process calculates the optimal solution of each sub-problem step by step from front to back and stores these solutions in a structured data table. By backtracking through the entire dynamic programming table, the globally optimal weight assignment scheme is obtained, thereby determining the optimal weight coefficients for each frame of image. The optimal weight coefficients are applied to the eigenvalue response matrix of each frame of image, and linear weighted combination is performed to generate a fused feature matrix. Edge-preserving filtering is performed on the fused feature matrix, such that the final integrated feature representation will not result in the loss of edge information due to the fusion process, obtaining a multi-frame integrated feature representation.
[0030] S3. Perform multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions;
[0031] It should be noted that based on the integrated feature representation, the mapping relationship between pixel points and graph nodes is established, so that each pixel point is regarded as a node in the graph structure. At the same time, the spatial proximity between pixel points is used to construct the initial graph structure to ensure that the spatial topological information of pixel points is reflected in the graph model. In this process, in order to ensure the connectivity of the graph, the connection strength between nodes is calculated according to the similarity of pixel values, and the graph adjacency relationship is generated, so that the correlation information between pixels can be effectively utilized in subsequent calculations. Self-connections are added to the adjacency relationship of the graph, so that each node retains its own feature contribution during the information transmission process, and the adjacency matrix is normalized by the degree matrix to obtain a normalized adjacency matrix to avoid the problem of feature distortion caused by uneven degree distribution during numerical calculations. On the basis of the normalized adjacency matrix, a modulation matrix is introduced, and a self-modulating graph convolutional layer is constructed by matrix multiplication. This self-modulating mechanism dynamically adjusts the feature influence degree of different regions to enhance the adaptability of the model in the complex optical film feature environment. A UNet network with an encoder-decoder structure is built based on the self-modulating graph convolutional layer. This network realizes the efficient recognition of the defective area of the optical film through layer-by-layer feature extraction and multi-scale information fusion. In the encoder part of the UNet, preliminary graph convolutional operations are performed on the input integrated feature representation to extract local spatial information. At the same time, pooling operations are combined to gradually reduce the size of the feature map and capture hierarchical features with different receptive fields. After multiple layers of graph convolution and pooling, feature maps of different scales are formed. The deeper feature maps capture large-scale defect information, while the shallower feature maps retain more fine-grained texture features. In the decoder part of the UNet network, upsampling operations are performed on these feature maps with different receptive fields to gradually restore the resolution of the feature map to the size of the original input. And during each upsampling process, the corresponding encoder layer feature map is concatenated and fused with the current decoder layer feature map to ensure that high-level structural information is retained while restoring image details. After concatenation, the self-modulating graph convolutional layer is used to perform feature extraction and enhancement processing on the fused feature map to obtain the target feature map. Classification decisions are made on the target feature map to generate a defective probability distribution map, which is a probability heat map, where the value of each pixel point represents the probability of its belonging to the defective area. In order to determine the specific location of the defect, the threshold segmentation method is used to binarize the defective probability distribution map, that is, by setting a suitable threshold, the pixel points higher than the threshold are determined as the defective area, while the pixel points lower than the threshold are considered as the normal area. The defective candidate areas are accurately extracted from the defective probability distribution map.
[0032] S4. Extract spectral response features based on the defective candidate areas, and calculate the matching degree between the spectral response features and the preset wavelength-thickness mapping relationship matrix to obtain a multi-layer film defect distribution map;
[0033] Specifically, optical modeling and analysis are performed on the multi-layer optical film structure to construct a wavelength-film thickness mapping relationship matrix that includes reflectivity, transmittance, and absorptance. This mapping relationship matrix establishes a correspondence between the film thickness of each layer of the optical film and the optical responses at different incident angles and wavelengths. During the modeling process, the thin-film interference theory, Fresnel equations, and transfer matrix method are used to calculate the spectral response characteristics of the multi-layer film under different optical parameters. This process takes into account the influence of the thickness change of the film layer on the spectral characteristics, as well as the corresponding changes at different incident angles, enabling the mapping matrix to be used for subsequent feature matching and defect analysis. Extract the spectral characteristics of the defect candidate regions. Since optical film defects often involve tiny structural changes, and these changes generate complex spectral responses under different lighting conditions, in order to extract spectral characteristics more precisely, local region Fourier transform and wavelet decomposition are applied in the defect regions. Analyze the spectral information of the defect regions through Fourier transform, extract the main spatial frequency distribution therefrom, and perform multi-scale analysis in combination with wavelet decomposition, so that the frequency characteristics and phase information of the defect regions at different spectral resolutions can be completely captured. Through multi-scale frequency domain analysis, a high-dimensional spectral response feature vector is obtained, which reflects the spectral change patterns of the defect regions at different wavelengths and lighting conditions. Perform non-linear dimensionality reduction and feature optimization on the multi-dimensional spectral response feature vector to form a more compact discriminative spectral fingerprint feature. Deep learning methods such as kernel principal component analysis or autoencoders are used for feature dimensionality reduction to remove redundant dimensions while retaining key information. Through feature optimization methods, such as linear discriminant analysis or maximum information coefficient, the distinguishability of the spectral features is enhanced, so that different types of defect spectral patterns can be more clearly distinguished in the feature space. Input the discriminative spectral fingerprint feature into the kernel function mapper to improve the non-linear separability of the features. The kernel function mapper projects the spectral features into a higher-dimensional feature space, making it easier to linearly separate the originally indistinguishable defect categories in the new feature space. Calculate the Mahalanobis distance between the feature space representation output by the kernel function mapper and the wavelength-film thickness mapping relationship matrix to measure the similarity between the feature space representation and the mapping relationship matrix, construct a hierarchical matching metric value, and provide a quantitative spectral similarity index for each pixel point, thereby determining whether the region belongs to a specific film layer defect. Establish a decision model based on the hierarchical matching metric value to determine the film layer attribution of the defect. During the decision-making process, in order to improve the accuracy of classification, Bayesian prior constraints are introduced to optimize the classification results by combining prior knowledge. Since optical film defects have spatial consistency, that is, the spectral characteristics of adjacent regions are often correlated, a spatial consistency regularization term is added to the decision model to ensure that the decision results are smooth in space and reduce misclassification caused by random noise. Generate the film layer attribution label with the optimal classification confidence through the method of maximum a posteriori probability estimation. Fuse the film layer attribution label with the defect morphological features.Since the defects have a certain spatial distribution pattern, such as edge characteristics, connectivity, etc., a conditional random field model is used for context optimization. The conditional random field model ensures that the morphological features of the defect area are consistent with its spectral features through a global optimization method, thereby reducing misclassification and boundary blurring. A defect distribution map of the multilayer film is generated to reflect the defect positions and severity levels of different film layers.
[0034] S5. Perform autoregressive prediction and optimization of processing control parameters on the defect distribution map of the multilayer film to obtain a closed-loop control scheme.
[0035] Among them, an exogenous input autoregressive model of multivariate radial basis function is constructed for the multi-layer film defect distribution map. In this model, the defect index in the multi-layer film defect distribution map is used as the output variable of the system, and at the same time, the processing control parameters are used as the control input variables to establish a prediction model reflecting the characteristics and evolution trend of the multi-layer optical film. During the modeling process, the radial basis function method is adopted to enhance the nonlinear fitting ability of the model, so that it can better adapt to the complex film defect distribution characteristics. By analyzing the spatio-temporal evolution trend of the defect area, key defect indexes are extracted, including defect size, defect distribution density, spectral feature offset, etc., and these indexes are used as the output vector of the model. At the same time, key processing control parameters, such as deposition rate, temperature, air pressure, sputtering power, etc., are used as the input variables of the model. Through this modeling method, the dynamic characteristics of defect formation in the optical film manufacturing process are effectively characterized. A hybrid parameter identification algorithm is applied to the prediction model, which includes two stages: particle swarm iteration identification and multivariate hierarchical multi-innovation stochastic gradient identification. In the first stage, the particle swarm optimization algorithm is used to globally search for the model parameters. By simulating the random movement of particles in the search space, the model can jump out of the local optimal solution and obtain a better initial parameter estimate. Since the particle swarm algorithm has strong global search ability, the optimal region of the model parameters can be quickly determined. In the second stage, the multivariate hierarchical multi-innovation stochastic gradient identification algorithm is applied to finely adjust the initial parameters to improve the prediction accuracy of the model. In this process, a multi-level gradient calculation method is used to make the parameter optimization process more stable and effectively avoid optimization failure caused by local oscillations. After optimization in these two stages, an optimized model parameter that accurately describes the parameter-defect relationship is obtained. Based on the optimized model parameters, a nonlinear model predictive control framework is established to achieve the optimal control of the processing process. In this framework, the prediction horizon and the control horizon are set. The prediction horizon determines the prediction range of the future defect evolution trend of the system, while the control horizon determines the time window for control adjustment. To ensure the stability of the control scheme, a multi-objective cost function including the output error and the control input is constructed. The core objective of this cost function is to minimize the deviation between the film defects and the target specifications, and at the same time minimize the drastic fluctuations of the processing control parameters to avoid process instability caused by over-adjustment. In this process, each index in the cost function is adjusted by a weight factor to make it more in line with the actual production requirements. For example, a higher weight is given to the uniformity of the defect distribution to ensure that the film quality is given priority during the optimization process. After establishing the multi-objective cost function, the sequential quadratic programming optimization algorithm is introduced to solve the optimal control input sequence. Sequential quadratic programming is an efficient algorithm for solving constrained optimization problems. Under the premise of satisfying the control input range limit and output constraints, a set of optimal processing control parameters is found to minimize the impact of film defects to the greatest extent.During the solution process, the gradient information is used to perform a local quadratic approximation on the cost function, and a quadratic programming sub-problem is constructed. Then, the control variables are gradually optimized through an iterative solution method to make them gradually approach the global optimal solution. During the entire optimization process, the adjustment of the control input needs to comply with physical constraint conditions. For example, the change in the deposition rate cannot exceed the tolerance range of the equipment, and the temperature adjustment must be maintained within a reasonable process window. These constraint conditions need to be strictly considered during the solution to ensure that the final control scheme is feasible in actual production. According to the film thickness and defect distribution corresponding to different wavelengths of light, the optimized control parameters are adjusted in real time to ensure that the optical performance of the film meets the design requirements. Since the spectral characteristics of the film are related to its thickness distribution, the shift of the spectral response is continuously monitored during the optimization process, and the key parameters such as the deposition rate and process temperature are dynamically adjusted according to the feedback information. Through a closed-loop control scheme, the intelligent optimization of the optical film manufacturing process is realized, so that the film defects are effectively suppressed, and the stability and consistency of the product quality are ensured.
[0036] In one example, multiple frames of images of a multi-layer optical film under different lighting conditions are collected, and the multiple frames of images are preprocessed and eigenvalue calculations are performed to obtain an eigenvalue response matrix, including:
[0037] Adjust the light source angle and intensity, and collect multiple frames of images of the multi-layer optical film under different lighting conditions;
[0038] Perform geometric correction on the multiple frames of images to obtain the corrected images, and perform an adaptive histogram equalization operation on the corrected images to obtain images with equalized lighting;
[0039] Apply a bilateral filtering algorithm to the images with equalized lighting to obtain smoothed images that suppress noise and retain edge information;
[0040] Perform contrast-limited adaptive histogram equalization on the smoothed images to obtain images with enhanced details, and integrate the image sequences with enhanced details into a preprocessed image sequence;
[0041] Construct a Hermitian positive definite matrix based on each frame of image in the preprocessed image sequence, calculate the maximum eigenvalue of the Hermitian positive definite matrix and standardize it to obtain an eigenvalue response matrix.
[0042] In this example, a controllable light source system is established so that the light source can irradiate the optical film at different angles and different intensities to obtain the reflection, transmission, and scattering characteristics under different optical conditions. Set the light source angle and the light intensity as two control variables, where represents the incident angle of the light source relative to the surface of the optical film, and represents the radiation intensity of the light source. Different will affect the reflection and transmission paths of light, and different will affect the spectral response of the optical film. Under different illumination conditions, the defects of the film layer exhibit different visibilities. Set a group of illumination combinations, and use a high-resolution camera to collect corresponding multiple frames of images to form a complete data set. After collecting multiple frames of images, due to the risk of perspective distortion, lens distortion, or optical offset in the camera system, geometric correction is performed to map the original images to the corrected images in the standard coordinate system through a transformation function . Use the perspective transformation matrix for correction, and its general form is: ;
[0043] ;
[0044] where is a 3×3 matrix, and its parameters are calculated through the matching of calibration points, so that the geometric distortion of the transformed image is corrected. Perform an adaptive histogram equalization operation on the corrected image to adjust the local contrast of the image. Let the gray histogram of the corrected image be , where represents the gray level, then the transformation function of histogram equalization is expressed as:
[0045] ;
[0046] where is the equalized gray value, is the total number of pixels in the image. To avoid the over-enhancement problem caused by global equalization, an adaptive method is adopted to divide the image into multiple local regions, and histogram equalization is calculated independently for each region to maintain the contrast adaptability of different regions. To reduce noise and at the same time retain the edge features of the optical film, bilateral filtering is applied to the illumination equalized image. Bilateral filtering is a non-linear smoothing algorithm that combines spatial distance weights and pixel similarity weights, so that the pixels in the edge region will not be blurred. Its filtering formula is:
[0047] ;
[0048] where is the spatial weight function, is the pixel similarity weight function, controls the degree of spatial expansion, controls the influence of intensity change on the weight, is a normalization factor such that the sum of all weights equals 1. After noise suppression, in order to enhance the contrast of optical film defects, contrast-limited adaptive histogram equalization is performed on the smoothed image. Let the cumulative distribution function of the histogram of the local window be , then the defined transformation function is expressed as:
[0049] ;
[0050] where is the set contrast limit threshold, ensuring that the enhancement does not over-amplify the brightness of certain regions, so that the image details are enhanced without distortion. All enhanced images are integrated into a preprocessed image sequence , which is used for subsequent feature extraction. Based on each frame image in the preprocessed image sequence, a Hermitian positive definite matrix is constructed to extract the local features of the film layer. In this process, each image frame is divided into multiple local windows, and each window forms a pixel feature matrix , and then the covariance matrix is calculated:
[0051] ;
[0052] where is a Hermitian positive definite matrix, and its eigenvalues are used to analyze the local feature distribution of the image. Calculate the maximum eigenvalue of this matrix:
[0053] ;
[0054] where represents the set of eigenvalues of matrix , and the maximum value among them is selected as the main eigenvalue of the local region. To ensure that the range of eigenvalues is suitable for subsequent calculations, normalization is performed. The normalization formula is as follows:
[0055] ;
[0056] where is the mean of all maximum eigenvalues, is the standard deviation, so that all eigenvalues are normalized to the same scale range. Organize all the calculated normalized maximum eigenvalues into an eigenvalue response matrix , which effectively reflects the characteristic changes of the optical film in different regions.
[0057] In one example, based on each frame image in the preprocessed image sequence, a Hermitian positive definite matrix is constructed, the maximum eigenvalue of the Hermitian positive definite matrix is calculated and normalized to obtain an eigenvalue response matrix, including:
[0058] Set a sliding window of a fixed size for each frame of the preprocessed image sequence, construct a local neighborhood window centered on each pixel point in each frame of the image, and extract the pixel data within the local neighborhood window;
[0059] Perform an inner product operation on the pixel data within the local neighborhood window after subtracting the local mean to construct a Hermitian positive definite matrix;
[0060] Perform eigenvalue decomposition on the Hermitian positive definite matrix and select the largest eigenvalue to form the largest eigenvalue data characterizing the local structure change of the image;
[0061] Rearrange the largest eigenvalue data according to the pixel position correspondence relationship to construct an eigenvalue matrix containing the largest eigenvalues at all positions;
[0062] Perform normalization processing on the eigenvalue matrix to obtain a normalized feature matrix, calculate the detection statistic at each pixel position based on the normalized feature matrix, and organize the detection statistics into an eigenvalue response matrix.
[0063] In this example, a sliding window of a fixed size is set for each frame of the image, and a local neighborhood window is constructed centered on each pixel point, and the pixel data within the window is extracted. Let the preprocessed image be , and the size of the sliding window is set to , then the local neighborhood window at the pixel point is expressed as:
[0064] ;
[0065] where represents the local window centered on the pixel point and contains all pixel values within this area. Perform mean normalization processing on the pixel data within the local neighborhood window to remove the influence of global brightness, so that subsequent calculations only focus on local structure changes. Let the mean of the pixel data within this window be:
[0066] ;
[0067] Then the normalized pixel data is:
[0068] ;
[0069] Use the normalized local pixel data to perform an inner product operation to construct the Hermitian positive definite matrix , and its calculation method is:
[0070] ;
[0071] where is the normalized pixel column vector within the window, is its transpose, and the matrix reflects the covariance structure of this local area. Perform eigenvalue decomposition on the Hermitian positive definite matrix to obtain the main eigenvalues of this area. Let the set of eigenvalues of be , then select the largest eigenvalue among them:
[0072] ;
[0073] This largest eigenvalue reflects the main direction of local structure changes and can highlight the abnormality of the defective area of the optical film. Arrange the largest eigenvalues of all pixel points according to their original positions to form a complete eigenvalue matrix :
[0074] ;
[0075] To ensure the scale consistency in the calculation of eigenvalues, normalize the eigenvalue matrix . Let the mean and standard deviation of the eigenvalue matrix be and , respectively. Then the normalized eigenvalue matrix is calculated as follows:
[0076] ;
[0077] The normalized eigenvalue matrix can eliminate the scale differences between different images and make the comparison of eigenvalues more stable. Calculate the detection statistic at each pixel position based on the standardized eigenvalue matrix, through local mean deviation or spatial gradient calculation, for example:
[0078] ;
[0079] This detection statistic reflects the feature deviation between the current pixel point and its local area and can highlight the defective area of the optical film. Organize all detection statistics according to pixel positions into an eigenvalue response matrix :
[0080] ;
[0081] This matrix is used for subsequent defect detection and analysis, so as to effectively identify the abnormal area of the film layer during the optical film detection process.
[0082] In one example, calculate the optimal weight coefficients for each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficients to obtain an integrated feature representation, including:
[0083] Define an integration framework for the eigenvalue response matrix, and combine multiple frames of images into a single representation through weight coefficients;
[0084] Introduce a quality assessment mechanism into the integration framework. By evaluating the gradient information and clarity level of each frame of image, establish a quality assessment index for measuring the contribution degree of the image;
[0085] Convert the quality assessment index and the weight assignment relationship into a dynamic programming problem, divide the dynamic programming problem into multiple quantization levels, and establish a phased decision-making process;
[0086] Based on the phased decision-making process, calculate the optimal solution of each sub-problem from front to back, store it in the dynamic programming table, and determine the optimal weight coefficients of each frame of image through backtracking;
[0087] Apply the optimal weight coefficients to the eigenvalue response matrix of each frame of image, perform linear weighted combination to generate a fused feature matrix, and perform edge-preserving filtering on the fused feature matrix to obtain a multi-frame integrated feature representation.
[0088] In this example, define a mathematical framework so that the eigenvalue response matrices of all frames can be combined into a single representation through weight coefficients. Let the eigenvalue response matrix of the th frame of image be , where represents the pixel position, and
[0089] ;
[0090] Among them, represents the weight coefficient of the th frame, satisfying the normalization constraint condition:
[0091] ;
[0092] In order to reasonably allocate to ensure that the fused feature matrix optimally describes the characteristics of the optical film, introduce a quality assessment mechanism. The core of quality assessment lies in measuring the clarity and gradient information of each frame of image, so that high-quality images contribute larger weights, while low-quality images have smaller weights. Let the local gradient matrix of the th frame of image be
[0093] ;
[0094] In order to obtain a global quality metric, calculate the gradient mean of the entire image:
[0095] ;
[0096] in, Representative Frame quality assessment metrics, and are the number of rows and columns of the image respectively. Introducing the clarity metric based on Laplace transform :
[0097] ;
[0098] in, Is the Laplace operator, used to calculate the local second-order variation of the image. and clarity index Combined into a comprehensive quality assessment function:
[0099] ;
[0100] in, and is a weight parameter that ensures that the influence of gradient information and clarity information on quality assessment is properly balanced. In order to ensure that the fusion process has global optimality, the quality assessment index Transformed into a dynamic programming problem of weight allocation. Define a staged decision process to decompose the entire weight allocation problem into multiple levels, each level corresponds to a different image frame, and optimize the weight allocation layer by layer according to the optimal strategy. In dynamic programming, let Representative The optimal weight function of the frame, the goal is to find the optimal weight distribution Make the quality of the final fusion matrix optimal, that is, maximize:
[0101] ;
[0102] To solve this optimization problem, a dynamic programming table is constructed and forward calculation is used to calculate all possible subproblem solutions and store them in the table. Then, the optimal weight distribution scheme is found through backtracking:
[0103] ;
[0104] The calculated optimal weight coefficient Applied to the eigenvalue response matrix of all image frames and weighted summed to obtain the final fused feature matrix :
[0105] ;
[0106] To improve the optical feature fidelity of the fusion matrix, edge-preserving filtering is performed on it to ensure that boundary information will not be blurred during the fusion process. The guided filtering method is adopted, and its filtering model is as follows:
[0107] ;
[0108] where, and are determined by minimizing the following energy function:
[0109] ;
[0110] where, is the smoothing factor, which is used to control the degree of edge preservation. By solving this optimization problem, the multi-frame integrated feature representation after edge-preserving filtering is obtained. This matrix effectively retains the detailed information of the optical film while reducing noise interference.
[0111] In this embodiment, the method further includes an autonomous model order selection process after obtaining the integrated feature representation and before performing multi-scale defect feature extraction, including: constructing a state space model for the integrated feature representation, forming an initial state equation describing the dynamic characteristics of the optical film layer by taking the image feature sequence as the system output and the change of illumination conditions as the system input; calculating the system observation matrix and control matrix based on the initial state equation, and performing singular value decomposition on the system observation matrix to obtain a diagonal matrix containing different singular values and the corresponding left and right singular vectors; arranging the singular values in the diagonal matrix in descending order, calculating the ratio sequence of adjacent singular values, and determining the initial model order by setting a gradient threshold to construct a candidate set of model orders; for each order in the candidate set of model orders, using the subspace method to identify the system parameter matrix corresponding to the order and establishing a series of system models with different orders; calculating the state estimation cross Gramian matrix for the system models with different orders, and the cross Gramian matrix is obtained by calculating the inner product between different state vectors, reflecting the mutual relationship between system states; calculating the energy error ratio between the state estimation energy and the system observation energy for each model based on the cross Gramian matrix, and using the energy error ratio as the model evaluation index; selecting the model with the smallest energy error ratio from the system models with different orders as the optimal order model to determine the optimal state space dimension of the optical film layer system; using the optimal order model to perform state estimation and prediction on the integrated feature representation, and suppressing noise interference through the Kalman filtering algorithm to generate an enhanced integrated feature representation as the input data for subsequent multi-scale defect feature extraction.
[0112] In one example, multi-scale defect feature extraction is performed on the integrated feature representation to obtain defect candidate regions, including:
[0113] Establish the mapping relationship between pixel points and graph nodes based on integrated feature representation, construct the initial graph structure based on the spatial proximity between pixel points, and calculate the connection strength between nodes according to pixel value similarity to generate the adjacency relationship of the graph;
[0114] Add self-connections to the adjacency relationship of the graph and perform degree matrix normalization to obtain the normalized adjacency matrix. Multiply the normalized adjacency matrix by the adjustment matrix to construct a self-adjusting graph convolutional layer;
[0115] Construct a UNet network with an encoder-decoder structure based on the self-adjusting graph convolutional layer. Extract multi-level features from the integrated feature representation through graph convolution and pooling operations in the encoder part to form feature maps with different receptive fields;
[0116] In the decoder part of the UNet network, perform upsampling operations on the feature maps with different receptive fields, splice and fuse them with the feature maps of the corresponding layers in the encoder, and process the fused features through the self-adjusting graph convolutional layer to obtain the target feature map;
[0117] Perform classification judgment on the target feature map to generate a defect probability distribution map, and extract defect candidate regions from the defect probability distribution map according to the threshold segmentation method.
[0118] In this example, establish the mapping relationship between pixel points and graph nodes. Let the integrated feature representation be , where represents the pixel position in the image, and the mapping relationship is defined as a graph , where is the set of nodes corresponding to pixels, is the set of edge connections between pixel points. To construct the graph structure, define the initial adjacency relationship based on the spatial proximity of pixel points, that is, if two pixel points and satisfy the following in Euclidean distance:
[0119] ;
[0120] then there is an edge connection between them, where is the preset neighborhood range. Calculate the connection strength between nodes according to pixel value similarity. Let the feature vectors of two pixel points be and , then their similarity weight is defined as:
[0121] ;
[0122] where represents the weight between nodes and , is a hyperparameter that controls the range of similarity metric. Constructing the adjacency matrix ,Right now:
[0123] ;
[0124] In order to ensure the stability of information dissemination, the adjacency matrix Add self-connection in so that each node retains its own feature contribution, that is, construct ,in Is the identity matrix. Calculate the degree matrix , whose diagonal elements are:
[0125] ;
[0126] And perform normalization to obtain the normalized adjacency matrix:
[0127] ;
[0128] In order to enhance the model's adaptability to different regional characteristics, the adjustment matrix is introduced , which represents the importance of features in different regions, and finally constructs a self-regulating graph convolution layer:
[0129] ;
[0130] in, It is The feature matrix of the layer, is the weight matrix of graph convolution, Is a nonlinear activation function. On this basis, a UNet network based on the encoder-decoder structure of the self-regulating graph convolution layer is constructed. The encoder part of the UNet network represents the integrated features of the input Perform multi-layer graph convolution, using graph convolution operations in each layer Perform feature extraction and combine it with pooling operation:
[0131] ;
[0132] The feature map extracted at each layer has a larger receptive field, while reducing redundant information to form a multi-level feature representation. After layer encoding, feature maps of different scales are formed. In the decoder part, the feature maps generated by the encoder are upsampled to restore them to their original size. Each upsampling layer is spliced with the corresponding encoder feature map to fuse low-level and high-level information. The spliced features are further processed by the self-adjusting graph convolution layer:
[0133] ;
[0134] Among them, represents a splicing operation, which integrates information of different scales and finally forms a target feature map. Classify and judge the target feature map, and calculate the defect probability distribution map , where the value of each pixel represents the probability that it belongs to a defect:
[0135] ;
[0136] Among them, is the weight of the classification layer, is an activation function, such as Sigmoid or Softmax. Extract defect candidate regions through threshold segmentation method:
[0137] ;
[0138] Among them, is the set threshold, such that forms a binary defect region identification matrix to obtain defect candidate regions.
[0139] In one example, spectral response features are extracted based on defect candidate regions, and the matching degree between the spectral response features and a preset wavelength-thickness mapping relationship matrix is calculated to obtain a multi-layer film defect distribution map, including:
[0140] Perform optical modeling analysis on the multi-layer optical film structure, construct a wavelength-thickness mapping relationship matrix including reflectivity, transmittance and absorptance, and the mapping relationship matrix associates the thickness of each layer with the optical responses at different incident angles and wavelengths;
[0141] Apply local region Fourier transform and wavelet decomposition to the defect candidate regions, extract the spectral features and phase information of the defect regions under different illumination conditions from multi-scale frequency domain analysis, and generate a multi-dimensional spectral response feature vector;
[0142] Perform non-linear dimensionality reduction and feature optimization on the multi-dimensional spectral response feature vector to form discriminative spectral fingerprint features;
[0143] Input the discriminative spectral fingerprint features into a kernel function mapper, calculate the Mahalanobis distance between the feature space representation output by the kernel function mapper and the wavelength-thickness mapping relationship matrix, and construct a hierarchical matching metric value;
[0144] Based on the hierarchical matching metric value, establish a decision model, introduce Bayesian prior constraints and spatial consistency regularization terms into the decision model, and generate a film layer attribution label with the maximum posterior probability;
[0145] Fuse the film layer attribution label with the defect morphological features, and perform context optimization through a conditional random field model to generate a multi-layer film defect distribution map.
[0146] In this example, a wavelength-thickness mapping relationship matrix including reflectivity, transmittance, and absorptance is established to correlate the optical responses at different incident angles, wavelengths, and film thicknesses. Let the incident angle of the light wave be , the wavelength be , and the film thickness be , where represents the number of different film layers. Then, the optical response is calculated by the Fresnel formula. The reflectivity and transmittance of the film layer are respectively expressed as:
[0147] ;
[0148] ;
[0149] where, is the refractive index of the film layer , is the refraction angle inside the film layer. According to Snell's law, there is:
[0150] ;
[0151] At the same time, the absorptance of the light is obtained from the law of conservation of energy:
[0152] ;
[0153] The optical response data of all layers are combined into a wavelength-thickness mapping relationship matrix , and each element of it corresponds to the optical parameters at a certain wavelength-thickness and incident angle. The defect candidate area is analyzed in the frequency domain to extract spectral features. In order to analyze the response characteristics of the defect area under different illumination conditions, the spectral signal of the defect area is subjected to a local Fourier transform, and the Fourier transform is defined as follows:
[0154] ;
[0155] where, is the spectral information, represents the frequency domain coordinate. At the same time, in order to obtain spectral features at different scales, wavelet decomposition is adopted to decompose the signal into different frequency components, and the wavelet transform is defined as:
[0156] ;
[0157] where, is the wavelet basis function, is the scale parameter, is the translation parameter, and the multi-scale spectral features formed are expressed as:
[0158] ;
[0159] Among them, is the Fourier transform feature, is the wavelet transform feature, which constitutes a multi-dimensional spectral response feature vector. Nonlinear dimensionality reduction and feature optimization are performed on the spectral feature vector to extract key information. Let the spectral feature matrix be , and kernel principal component analysis is used for dimensionality reduction. Define the mapping function to project it onto a high-dimensional feature space:
[0160] ;
[0161] Extract the most discriminative feature dimensions through principal component analysis:
[0162] ;
[0163] Among them, is the dimensionality reduction projection matrix, forming discriminative spectral fingerprint features. In order to match with the wavelength-thickness mapping relationship matrix, calculate the Mahalanobis distance of the spectral fingerprint features in the feature space, and define the matching metric value as:
[0164] ;
[0165] Among them, is the covariance matrix, which measures the correlation between features. The smaller the distance, the higher the matching degree. Based on the matching metric value, establish a decision model to determine the film layer attribution of the defect area. Introduce Bayesian prior constraints to ensure that the matching results conform to physical laws. Let the prior probability of the defect area be , then the maximum a posteriori probability estimate is:
[0166] ;
[0167] At the same time, in order to enhance spatial continuity, introduce a spatial consistency regularization term to make the film layer classification results of adjacent pixels consistent. The optimization objective function is:
[0168] ;
[0169] Among them, represents the pixel neighborhood, controls the spatial smoothness, and finally generates the film layer attribution label. Fuse the film layer attribution label with the defect morphological features and perform context optimization through a conditional random field model. Define the energy function:
[0170] ;
[0171] wherein, is the observation probability of a single pixel, is the neighborhood constraint, and optimizing this energy function gives the final multi-layer film defect distribution map.
[0172] In this embodiment, before extracting the spectral response features of the defect candidate region, the following steps are further included: performing regional division on the defect candidate region, dividing the defect candidate region into multiple sub-regions according to the defect morphological features and spatial distribution, and establishing a sub-region index table; extracting the original image blocks corresponding to the sub-region index table to form a high-resolution reconstruction data set including the defect and its surrounding regions; constructing a memory-efficient super-resolution enhancement network structure, where the super-resolution enhancement network includes a feature extraction module, a non-linear mapping module, and an image reconstruction module; designing a residual channel attention unit for the non-linear mapping module of the super-resolution enhancement network, introducing skip connections and a channel re-weighting mechanism to enhance the expression ability of defect texture features; applying a frequency-domain transform to the high-resolution reconstruction data set, analyzing the interference fringes and high-frequency noise features unique to the multi-layer optical film, and establishing a frequency-domain suppression filter; integrating the frequency-domain suppression filter into the feature extraction module of the super-resolution enhancement network, and adaptively suppressing the film layer artifacts through a learnable frequency-domain mask; constructing an objective function based on the contrast loss and the structural similarity loss, training the super-resolution enhancement network to eliminate the film layer artifacts while retaining the defect features in the reconstructed image; quantifying and optimizing the computational graph of the trained super-resolution enhancement network to obtain a lightweight model suitable for real-time processing, and applying the lightweight model to the defect candidate region; remapping the enhanced defect candidate region back to the original image space to form an optical film defect region with high-resolution details and low artifact interference as the input for subsequent spectral response feature extraction.
[0173] In one example, performing autoregressive prediction and processing control parameter optimization on the multi-layer film defect distribution map to obtain a closed-loop control scheme, including:
[0174] Constructing an exogenous input autoregressive model of a multi-variable radial basis function for the multi-layer film defect distribution map, using the defect index in the multi-layer film defect distribution map as the system output and the processing control parameters as the control input to establish a prediction model reflecting the characteristics of the multi-layer optical film;
[0175] Applying a hybrid parameter identification algorithm to the prediction model, where the hybrid parameter identification algorithm includes two stages: particle swarm iterative identification and multi-variate hierarchical multi-innovation stochastic gradient identification, to obtain optimized model parameters characterizing the relationship between parameters and defects;
[0176] Based on the optimized model parameters, establishing a non-linear model predictive control framework, setting the prediction horizon and the control horizon, and constructing a multi-objective cost function including the output error and the control input;
[0177] Introduce the sequential quadratic programming optimization algorithm for the multi-objective cost function, solve the optimal control sequence under the control input range limit and output constraint conditions, and adjust the processing control parameters in real time according to the film thickness and defect distribution corresponding to different wavelengths of light to form a closed-loop control scheme.
[0178] In this example, an exogenous input autoregressive model of multi-variable radial basis function is constructed for the multi-layer film defect distribution map, and the defect index is used as the system output, and the processing control parameter is used as the control input to establish a prediction model reflecting the change of optical film characteristics. Define the input-output relationship of the system. Let the defect index of each pixel or region in the defect distribution map be represented by and the processing control parameter be represented by , both of which change with time . When constructing the model, the radial basis function is used to describe the nonlinear characteristics of the system, and the model is expressed as:
[0179] ;
[0180] where represents the system state vector, is the th center vector, is the radial basis function, and the Gaussian function is adopted, that is:
[0181] ;
[0182] Here represents the Euclidean distance between the state and the center, is the expansion parameter, is the weight parameter, is the proportional coefficient of the control input on the system output, is the modeling error, is the number of basis functions. This model establishes a connection between the defect index in the multi-layer film defect distribution map and the processing parameters, reflecting the change trend of film layer characteristics under different processing conditions. Parameter identification is carried out on the prediction model to obtain the optimal model parameters characterizing the relationship between parameters and defects. Apply the hybrid parameter identification algorithm, which includes two stages: using particle swarm iteration identification to globally search for model parameters. The particle swarm algorithm seeks the global optimal solution through the iterative update of multiple candidate solutions in the group, and its update formula is:
[0183] ;
[0184] ;
[0185] where represents the current th candidate parameter vector, represents the velocity vector, is the historical optimal solution of the current individual, is the global optimal solution, is the inertia weight, and are the learning factors, and are random numbers within [0, 1]. This stage provides a better initial parameter set. In the second stage, multivariate hierarchical multi-innovation stochastic gradient identification is used to refine and optimize the initial parameters. Let the cost function be:
[0186] ;
[0187] where represents the parameter vector to be optimized, including all and parameters, represents the model prediction output. The multivariate stochastic gradient method updates the parameters with a hierarchical strategy. Each layer adjusts the parameters according to the gradient information, and its update formula is:
[0188] ;
[0189] where is the learning rate. The update process combines the multi-innovation strategy, that is, the gradients are calculated in parallel at multiple initial points, and the parameters are updated according to the weighted average of multiple innovation gradients, thereby improving the convergence speed and accuracy. After two stages of identification, a set of optimal parameters is obtained, such that the prediction model accurately reflects the nonlinear relationship between the processing control parameters and the defect indicators. After obtaining the optimized model parameters , a nonlinear model predictive control framework is constructed based on this prediction model. Under the nonlinear model predictive control framework, the prediction horizon and the control horizon are set, where represents the prediction range of the system state within the future time instants, while represents the duration of the actual control input update. A multi-objective cost function is constructed to balance the output error and the control input change, and the cost function is expressed as:
[0190] ;
[0191] where is the predicted system output, is the desired output, that is, the target defect indicator, represents the change in the control input, is the weight factor for controlling input changes, which is used to limit the input adjustment range. This cost function reflects the need to adjust the processing parameters as smoothly as possible while ensuring that the defect index is as close to the desired target as possible, so as to avoid excessive interference with process stability. In order to solve the above multi-objective cost function, the sequential quadratic programming optimization algorithm is introduced in the actual control process. The sequential quadratic programming algorithm transforms the nonlinear optimization problem into a series of quadratic programming sub-problems through local quadratic approximation, and With output constraints Solve the optimal control sequence. Assume that the current time is , the problem to be solved is written as:
[0192] ;
[0193] ;
[0194] in To control the input increment sequence, is the Hessian matrix, is the gradient vector, and The matrix and vector represent the constraints respectively. By iteratively solving this quadratic programming problem, the optimal control input sequence at the current moment is obtained. During the control process, according to the film thickness and defect distribution corresponding to different wavelengths of light, defect indicators are collected in real time and the prediction model is used to predict the future. The output prediction at the moment, and based on the latest control input Real-time adjustments are made to processing parameters. For example, if thin film thickness and increased defects are detected at a specific wavelength, the predictive model will reflect the output deviation. The optimal control sequence calculated by the nonlinear model predictive control framework will adjust key parameters such as deposition rate or temperature to ensure that the film reaches the predetermined target, thus achieving closed-loop control. This process is repeated continuously, and at each moment, through updating the predictive model, hybrid parameter identification, and sequential quadratic programming optimization, the entire processing process is kept in an optimal control state, ensuring the stability and consistency of product quality.
[0195] Reference Figure 2 , this embodiment provides an optical film detection device based on image processing, comprising:
[0196] Acquisition module 1 is used to acquire multiple frames of images of the multilayer optical film under different illumination conditions, and perform preprocessing and eigenvalue calculation on the multiple frames of images to obtain an eigenvalue response matrix;
[0197] The feature fusion module 2 is configured to calculate the optimal weight coefficients of each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficients to obtain an integrated feature representation;
[0198] The feature extraction module 3 is configured to perform multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions;
[0199] The matching degree calculation module 4 is configured to extract spectral response features based on the defect candidate regions, and calculate the matching degree between the spectral response features and a preset wavelength-thickness mapping relationship matrix to obtain a multi-layer film defect distribution map;
[0200] The parameter optimization module 5 is configured to perform autoregressive prediction and processing control parameter optimization on the multi-layer film defect distribution map to obtain a closed-loop control scheme.
[0201] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the description in the above method embodiment, and details are not described herein again.
[0202] Refer to Figure 3 , in the embodiment of the present invention, a computer device is further provided. The computer device may be a server, and its internal structure may be as Figure 3 shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network. When the computer program is executed by the processor, the above method is implemented.
[0203] Those skilled in the art can understand that Figure 3 the structure shown in
[0204] It should be noted that in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, apparatus, article or method including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, apparatus, article or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, apparatus, article or method including such element.
[0205] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. An optical film detection method based on image processing, characterized in that It includes the following steps: Collect multiple frames of images of a multi-layer optical film under different illumination conditions, preprocess the multiple frames of images and calculate eigenvalue, and obtain an eigenvalue response matrix; Calculate the optimal weight coefficient of each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficient to obtain an integrated feature representation; Extract multi-scale defect features from the integrated feature representation to obtain defect candidate regions; Extract spectral response features based on the defect candidate regions, and calculate the matching degree between the spectral response features and a preset wavelength-thickness mapping relationship matrix to obtain a multi-layer film defect distribution map; specifically including: performing optical modeling analysis on the multi-layer optical film structure, constructing a wavelength-thickness mapping relationship matrix including reflectivity, transmittance and absorptance, and the mapping relationship matrix associates the thickness of each layer with the optical responses at different incident angles and wavelengths; applying local region Fourier transform and wavelet decomposition to the defect candidate regions, extracting the spectral features and phase information of the defect regions under different illumination conditions from multi-scale frequency domain analysis to generate a multi-dimensional spectral response feature vector; performing non-linear dimensionality reduction and feature optimization on the multi-dimensional spectral response feature vector to form discriminative spectral fingerprint features; inputting the discriminative spectral fingerprint features into a kernel function mapper, calculating the Mahalanobis distance between the feature space representation output by the kernel function mapper and the wavelength-thickness mapping relationship matrix to construct a hierarchical matching metric value; establishing a decision model based on the hierarchical matching metric value, introducing Bayesian prior constraints and spatial consistency regularization terms into the decision model to generate a film layer attribution label with the maximum posterior probability; fusing the film layer attribution label with the defect morphological features, and performing context optimization through a conditional random field model to generate a multi-layer film defect distribution map; Perform autoregressive prediction and processing control parameter optimization on the multi-layer film defect distribution map to obtain a closed-loop control scheme.
2. The optical film detection method based on image processing according to claim 1, wherein, The collecting multiple frames of images of a multi-layer optical film under different illumination conditions, preprocessing the multiple frames of images and calculating eigenvalue, and obtaining an eigenvalue response matrix includes: Adjust the light source angle and intensity, and collect multiple frames of images of a multi-layer optical film under different illumination conditions; Perform geometric correction on the multiple frames of images to obtain corrected images, and perform an adaptive histogram equalization operation on the corrected images to obtain illumination-equalized images; Apply a bilateral filtering algorithm to the illumination-equalized images to obtain smoothed images that suppress noise and retain edge information; Perform contrast-limited adaptive histogram equalization on the smoothed images to obtain images with enhanced details, and integrate the image sequence with enhanced details into a preprocessed image sequence; Construct a Hermitian positive definite matrix based on each frame of image in the preprocessed image sequence, calculate the maximum eigenvalue of the Hermitian positive definite matrix and standardize it to obtain an eigenvalue response matrix.
3. The optical film detection method based on image processing according to claim 2, wherein The constructing a Hermitian positive definite matrix based on each frame of image in the preprocessed image sequence, calculating the maximum eigenvalue of the Hermitian positive definite matrix and standardizing it to obtain an eigenvalue response matrix includes: Set a sliding window of a fixed size for each frame of the preprocessed image sequence, construct a local neighborhood window centered on each pixel point in each frame of the image, and extract the pixel data within the local neighborhood window; Perform an inner product operation on the pixel data within the local neighborhood window after subtracting the local mean to construct a Hermitian positive definite matrix; Perform eigenvalue decomposition on the Hermitian positive definite matrix and select the largest eigenvalue to form the largest eigenvalue data representing the local structure change of the image; Rearrange the largest eigenvalue data according to the pixel position correspondence to construct an eigenvalue matrix containing the largest eigenvalues at all positions; Perform normalization processing on the eigenvalue matrix to obtain a normalized feature matrix, calculate the detection statistic at each pixel position based on the normalized feature matrix, and organize the detection statistics into an eigenvalue response matrix.
4. The optical film detection method based on image processing according to claim 1, characterized in that Calculating the optimal weight coefficient for each frame of the image according to the eigenvalue response matrix, and performing multi-frame image feature fusion based on the optimal weight coefficient to obtain an integrated feature representation, including: Define an integration framework for the eigenvalue response matrix, and combine multiple frames of images into a single representation through weight coefficients; Introduce a quality evaluation mechanism into the integration framework, and establish a quality evaluation index for measuring the contribution degree of the image by evaluating the gradient information and clarity level of each frame of the image; Convert the quality evaluation index and the weight assignment relationship into a dynamic programming problem, divide the dynamic programming problem into multiple quantization levels, and establish a phased decision-making process; Calculate the optimal solution of each sub-problem from front to back based on the phased decision-making process, store it in the dynamic programming table, and determine the optimal weight coefficient of each frame of the image through backtracking; Apply the optimal weight coefficient to the eigenvalue response matrix of each frame of the image, perform linear weighted combination to generate a fused feature matrix, and perform edge-preserving filtering on the fused feature matrix to obtain a multi-frame integrated feature representation.
5. The optical film detection method based on image processing according to claim 1, wherein Performing multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions, including: Establish a mapping relationship between pixel points and graph nodes based on the integrated feature representation, construct an initial graph structure based on the spatial proximity between pixel points, and calculate the connection strength between nodes according to the pixel value similarity to generate the adjacency relationship of the graph; Add self-connections to the adjacency relationship of the graph and perform degree matrix normalization processing to obtain a normalized adjacency matrix, and multiply the normalized adjacency matrix by an adjustment matrix to construct a self-adjusting graph convolutional layer; Construct a UNet network with an encoder-decoder structure based on the self-adjusting graph convolutional layer, extract multi-level features through graph convolution and pooling operations in the encoder part of the integrated feature representation to form feature maps with different receptive fields; In the decoder part of the UNet network, perform upsampling operations on the feature maps with different receptive fields, splice and fuse them with the feature maps of the corresponding layers in the encoder, and process the fused features through the self-adjusting graph convolutional layer to obtain the target feature map; Perform classification and decision-making on the target feature map to generate a defect probability distribution map, and extract defect candidate regions from the defect probability distribution map according to the threshold segmentation method.
6. The optical film detection method based on image processing according to claim 1, wherein Performing autoregressive prediction and optimization of processing control parameters on the multi-layer film defect distribution map to obtain a closed-loop control scheme, including: Constructing an exogenous input autoregressive model of a multi-variable radial basis function for the multi-layer film defect distribution map, using the defect index in the multi-layer film defect distribution map as the system output, and using the processing control parameters as the control input to establish a prediction model reflecting the characteristics of the multi-layer optical film; Applying a hybrid parameter identification algorithm to the prediction model, where the hybrid parameter identification algorithm includes two stages: particle swarm iterative identification and multi-variate hierarchical multi-innovation stochastic gradient identification, to obtain optimized model parameters characterizing the relationship between parameters and defects; Based on the optimized model parameters, establishing a non-linear model predictive control framework, setting the prediction time domain and the control time domain, and constructing a multi-objective cost function including the output error and the control input; Introducing a sequential quadratic programming optimization algorithm to the multi-objective cost function, solving for the optimal control sequence under the constraints of the control input range and the output constraints, and adjusting the processing control parameters in real time according to the film layer thickness and defect distribution corresponding to different wavelengths of light to form a closed-loop control scheme.
7. An optical film detection device based on image processing, characterized in that, For implementing the steps of the method according to any one of claims 1 to 6, the device includes: An acquisition module, configured to acquire multiple frames of images of the multi-layer optical film under different illumination conditions, perform preprocessing and eigenvalue calculation on the multiple frames of images to obtain an eigenvalue response matrix; A feature fusion module, configured to calculate the optimal weight coefficients of each frame of image according to the eigenvalue response matrix, and perform multi-frame image feature fusion based on the optimal weight coefficients to obtain an integrated feature representation; A feature extraction module, configured to perform multi-scale defect feature extraction on the integrated feature representation to obtain defect candidate regions; A matching degree calculation module, configured to extract spectral response features based on the defect candidate regions, and calculate the matching degree between the spectral response features and a preset wavelength-film thickness mapping relationship matrix to obtain a multi-layer film defect distribution map; A parameter optimization module, configured to perform autoregressive prediction and optimization of processing control parameters on the multi-layer film defect distribution map to obtain a closed-loop control scheme.
8. A computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Optical film defect detection method and system thereof
US20170004612A1