Method and system for detecting defects on the back surface of an ultrathin optical device coated with a film based on machine vision
By using multi-channel polarization imaging and a deep convolutional network model, combined with multi-layer optical path difference decoupling and polarization phase resolution, the problem of distinguishing between artifacts and real defects on the coating surface of ultra-thin optical devices was solved, achieving efficient and accurate defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG SHENHUA OPTICAL TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies struggle to effectively distinguish between artifacts and real defects on the coating surface of ultrathin optical devices, resulting in a high false defect misjudgment rate, which affects device performance and increases costs.
By employing multi-channel polarization imaging, multi-layer optical path difference decoupling, dynamic adaptive contrast enhancement, polarization phase resolution, and deep convolutional network models, we can achieve accurate identification and localization of defects on the coating surface of ultra-thin optical devices.
It enables precise detection of the coated surface of ultra-thin optical devices, reduces the false defect misjudgment rate, improves detection efficiency and accuracy, and ensures device performance stability.
Smart Images

Figure CN122335831A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultra-thin optical device inspection technology, and in particular to a method and system for detecting surface defects in ultra-thin optical devices after coating based on machine vision. Background Technology
[0002] Ultrathin optical devices, with their advantages of being lightweight, thin, and highly transparent, rely heavily on coating surface quality, which directly determines the performance of the final product. Therefore, accurate detection of surface defects after coating is crucial for ensuring product yield. Currently, industrial production lines mostly employ machine vision technology for automated screening, capturing and processing optical signals to identify and locate defects. However, some existing detection technologies suffer from technical limitations, such as difficulty in removing interference fringe artifacts caused by multiple reflections from ultrathin substrates.
[0003] For example, because the substrate is extremely thin, the incident light is reflected and superimposed multiple times on the front and back surfaces of the substrate and between the coating layers to form artifacts. These artifacts are similar to the image grayscale characteristics of real submicron-level defects such as pinholes and fine scratches, making it difficult for the detection system to distinguish them accurately.
[0004] This defect not only leads to a high false defect rate, resulting in material waste, reduced production line efficiency, and increased costs, but also masks genuine defects. In particular, submicron-level defects, which are difficult to identify effectively, can affect the subsequent optical performance of devices. For example, minute defects in medical endoscope devices can reduce image quality, while in optical communication devices, they can affect signal transmission stability. Although existing methods attempt to suppress artifacts with simple filtering, they still cannot effectively separate artifacts from genuine defect signals, nor can they balance detection accuracy and efficiency. Therefore, they cannot yet meet the stringent inspection requirements of high-end manufacturing. Summary of the Invention
[0005] This invention provides a method and system for detecting surface defects of ultra-thin optical devices after coating based on machine vision, which can achieve accurate identification and location of surface defects of ultra-thin optical devices after coating.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: A first aspect is a method for detecting surface defects in ultra-thin optical devices after coating, based on machine vision, the method comprising: By performing linear scanning polarization imaging perpendicular to the transmission direction, multi-channel light intensity signals are acquired synchronously, and transmission jitter is eliminated by aligning in the time domain and stitching together overlapping areas of adjacent rows, thus obtaining the original interferometric superimposed image sequence. A forward model of the multilayer interference optical field is constructed using the thickness parameters of the ultrathin substrate and the reflectivity distribution of the film. Based on the forward model of the multilayer interference optical field, the original interference superimposed image sequence is decoupled in reverse. The front surface defect signal is separated and enhanced, and the back surface interference is integrated into a suppressed image, thus obtaining the front and back surface decoupled image. After extracting the decoupled image of the front surface, the contrast stretching map is dynamically generated by local gray-level histogram statistical analysis. The weak undulation signal is amplified by nonlinear suppression of specular reflection and gradient amplification to obtain a high-contrast image of weak morphology. Polarization phase delay analysis is performed on the weak-morphology high-contrast image to obtain the polarization response map of the hidden defect. The polarization degree gradient field of the response map is analyzed to dynamically extract multiple topological singularities. The spatial coordinates of each topological singularity precisely correspond to the pixel position where the joint entropy value of polarization ellipticity and azimuth angle in the gradient field reaches an extreme value. Using the topological singularities as constraint nodes, a minimum volume anisotropic feature shell is fitted. By implementing anisotropic scaling transformation, the cascade features of its surface curvature spectrum and volume-surface area ratio are calculated as the geometric feature vector of the defect. Based on the geometric feature vector, and combined with the back surface interference suppression information in the pre-acquired front and back surface decoupling images, false defects are eliminated. A preset deep convolutional network model is used to classify the defects, and the defect classification and localization results are obtained.
[0007] Secondly, a machine vision-based system for detecting surface defects in ultra-thin optical devices after coating includes: The multi-channel polarization imaging module is used to synchronously capture multi-channel polarized reflected light signals from the coated surface along the production line conveying direction, providing a source of raw optical signals for image processing. The image preprocessing module is used to perform temporal alignment and spatial stitching on the raw light intensity signals captured by the multi-channel polarization imaging module to obtain a raw interferometric superimposed image sequence that covers the entire surface and is consistent in time and space. The optical path difference decoupling module is used to perform multi-layer optical path difference decoupling operations on the original interferometric superimposed image sequence, remove the interference fringe artifacts formed by multiple reflections of the ultrathin substrate, and obtain the front and rear surface decoupled images; The contrast enhancement module is used to import the decoupled images of the front and rear surfaces into the dynamic adaptive contrast enhancement process, suppress the strong reflection of the multi-layer coated mirror and amplify the submicron weak undulation signal to obtain a high-contrast image with weak morphology. The polarization phase analysis module is used to perform polarization phase delay analysis on weak topography high contrast images to obtain the polarization response map of the hidden defect, and analyze the polarization gradient field of this response map and dynamically extract multiple topological singularities. The feature extraction module is used to fit the minimum volume anisotropic feature shell with topological singular points as constraint nodes, and calculate the geometric feature vector of the defect through anisotropic scaling transformation. The defect classification and localization module is used to eliminate false defects based on geometric feature vectors and back surface interference suppression information in the front and back surface decoupling images, and to classify defects using a preset deep convolutional network model to obtain defect classification and localization results.
[0008] Thirdly, a computing device, comprising: One or more processors; A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to implement the method.
[0009] Fourthly, a computer-readable storage medium storing a program that, when executed by a processor, implements the method.
[0010] The above-described solution of the present invention has at least the following beneficial effects: By synchronously capturing and temporally aligning multi-channel polarized reflected light signals, stable acquisition of high-fidelity original signals across the entire surface was achieved. Multi-layer optical path difference decoupling operations were used to remove interference fringe artifacts, overcoming false defect misjudgments caused by crosstalk between front and rear surface signals, resulting in decoupled images with effective separation of front and rear surfaces. Dynamic adaptive contrast enhancement overcame the problem of specular highlights obscuring weak defects, extracting high-contrast images of weak morphology. Polarization phase delay analysis and the construction of a polarization gradient field dynamically extracted topological singularities, overcoming the difficulty in detecting hidden defects such as nanobubbles and stress wrinkles, generating feature response maps reflecting the optical anisotropy of defects. By fitting a minimum volume anisotropic feature shell and implementing anisotropic scale transformation, the cascaded features of curvature spectrum and volume-surface area ratio were calculated, overcoming the limitations of insufficient quantification capabilities of traditional morphological parameters and providing highly discriminative multidimensional features. Finally, combining back surface interference suppression information to eliminate false defects and employing deep convolutional networks for classification overcame the contradiction between accuracy and speed in high-speed online detection, achieving real-time and accurate classification of various coating defects. Attached Figure Description
[0011] Figure 1 This is a schematic flowchart of a machine vision-based method for detecting surface defects in ultra-thin optical devices after coating, provided in an embodiment of the present invention.
[0012] Figure 2 This is a schematic diagram of a machine vision-based surface defect detection system for ultra-thin optical devices after coating, provided in an embodiment of the present invention.
[0013] Figure 3 This is a simulation diagram of the multi-channel polarization signal acquisition and time-domain alignment effect of the present invention.
[0014] Figure 4 This is a statistical chart of the multilayer optical path difference decoupling and interference fringe stripping effect of the present invention.
[0015] Figure 5 This is a simulation diagram of the dynamic adaptive contrast enhancement effect of the present invention.
[0016] Figure 6 This is a trend diagram of polarization phase delay analysis and topological singularity extraction of the present invention.
[0017] Figure 7 This is a statistical diagram of the anisotropic feature shell and geometric feature extraction of the present invention.
[0018] Figure 8 This is a comparison chart of the comprehensive effects of defect classification and location in this invention. Detailed Implementation
[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0020] like Figure 1 As shown, embodiments of the present invention propose a method for detecting surface defects in ultra-thin optical devices after coating based on machine vision. The method includes the following steps: Step 1: By performing line scanning polarization imaging perpendicular to the transmission direction, multi-channel light intensity signals are acquired synchronously, and transmission jitter is eliminated by aligning in the time domain and stitching together overlapping areas of adjacent rows to obtain the original interferometric superimposed image sequence. Step 2: Construct a forward model of the multilayer interference light field using the thickness parameters of the ultrathin substrate and the reflectivity distribution of the film layer. Based on the forward model of the multilayer interference light field, reverse decouple the original interference superimposed image sequence, separate and enhance the front surface defect signal, and integrate the back surface interference into a suppressed image to obtain the front and back surface decoupled image. Step 3: After extracting the front surface decoupled image, the contrast stretching map is dynamically generated by local gray-level histogram statistical analysis. The weak undulation signal is amplified by nonlinear suppression of specular reflection and gradient amplification to obtain a weak morphology high contrast image. Step 4: Perform polarization phase delay analysis on the weak topography high contrast image to obtain the polarization response map of the hidden defect; analyze the polarization gradient field of the response map to dynamically extract multiple topological singularities, the spatial coordinates of each topological singularity precisely correspond to the pixel position where the joint entropy value of polarization ellipticity and azimuth angle in the gradient field reaches an extreme value; use the topological singularities as constraint nodes to fit a minimum volume anisotropic feature shell, and calculate the cascade features of its surface curvature spectrum and volume-surface area ratio by implementing anisotropic scaling transformation, as the geometric feature vector of the defect; Step 5: Based on the geometric feature vector, and combined with the back surface interference suppression information in the pre-acquired front and back surface decoupling images, false defects are eliminated. A preset deep convolutional network model is used to classify the defects, and the defect classification and localization results are obtained.
[0021] In this embodiment of the invention, by synchronously capturing and aligning multi-channel polarized reflected light signals in the temporal and spatial domains, strong specular reflections are effectively suppressed, improving the signal-to-noise ratio of the original signal and the consistency of full surface coverage. Multi-layer optical path difference decoupling operations are used to remove interference fringe artifacts caused by multiple reflections from an ultrathin substrate, achieving precise separation of front and rear surface defect signals and avoiding misjudgments caused by rear surface interference. Dynamic adaptive contrast enhancement suppresses highlights while amplifying submicron-level weak fluctuation signals, effectively improving the visibility of weak morphological defects. Furthermore, polarization phase delay analysis is employed to extract topological singularities in the polarization gradient field, enabling the identification of hidden defects such as nanobubbles and stress wrinkles. Based on anisotropic characteristic shells, the cascaded features of curvature spectrum and volume-surface area ratio are calculated, providing highly discriminative geometric feature vectors for defects. Combined with rear surface interference suppression information, pseudo-defects are eliminated, and a deep convolutional network is used to classify the feature vectors, achieving real-time and accurate classification of defects such as pinholes, scratches, bubbles, and uneven film thickness stripes. Simultaneously, the location, size, and surface label of each defect are output.
[0022] In a preferred embodiment of the present invention, step 1 above may include: Step 1.1: Arrange the imaging field of view along the direction perpendicular to the production line conveyor, and synchronously trigger the acquisition of raw light intensity signals from multiple different polarization channels reflected from the surface before coating at a fixed sampling frequency to obtain the raw signal sequence organized by the scan rows, specifically including: A linear array polarization imaging device is installed perpendicular to the production line transmission direction. The imaging device consists of a linear array image sensor, a pre-polarization beam splitting component, and a synchronous trigger controller. The linear array image sensor is used to collect light intensity signals row by row. The pre-polarization beam splitting component decomposes the incident light into multiple independent channels according to the polarization direction, enabling the imaging field of view to completely cover the full width of the coating surface to ensure no omission areas. A fixed row trigger sampling frequency is set, and this frequency is dynamically matched with the real-time transmission speed of the production line to ensure that each unit of transmission distance exactly triggers one scan line. At each trigger moment, the image acquisition of multiple polarization channels is simultaneously started through the synchronous controller. Each channel corresponds to a preset polarization direction, and these polarization directions include but are not limited to 0°, 45°, 90°, and 135° linear polarization directions, which are respectively used to capture the components of the reflected light from the front surface of the coating in the corresponding directions. The original light intensity data collected by each channel are sequentially stored in the buffer according to the order of occurrence of the scan lines, and at the same time, the spatial position index and timestamp corresponding to each row are recorded, thus forming an original signal sequence organized by scan lines, where each row of data contains the complete original light intensity information of all polarization channels at the position of that row.
[0023] Step 1.2, for the original light intensity signals of each polarization channel at the same spatial position within each scan line, perform time-domain alignment according to the sampling timestamp to obtain an aligned multi-channel polarization signal group, which specifically includes: for each stored scan line, extract the original light intensity signals collected by each polarization channel at the same spatial position (i.e., the same pixel column coordinate) within that row, and use the sampling timestamp corresponding to that position as the reference; for the signals of different polarization channels at the same spatial position, first sort them according to the order of the sampling timestamps, and identify the time deviation between the earliest and the latest timestamps; select the timestamp of a reference channel (such as the 0° polarization channel) as the alignment reference, and for other channels, compensate according to the time difference between them and the reference. If the linear interpolation method is used, locate the two adjacent sampling points before and after the reference moment. Let the reference moment be T, the moments of the two adjacent sampling points before and after it be T1 and T2 respectively, and the corresponding light intensity values be I1 and I2, and T1 < T < T2; then the time difference Δt1 = T - T1, Δt2 = T2 - T; the interpolated light intensity value corresponding to the reference moment T = (I1×Δt2 + I2×Δt1)÷(Δt1 + Δt2).
[0024] If the nearest neighbor method is used, the light intensity value of the sampling point closest to the reference time is directly taken, and sampling points further away are ignored. The above compensation eliminates the small time deviation caused by hardware delay between channels, and achieves strict consistency of all channels in the time domain. The light intensity values of all polarization channels under the same spatial position and the same effective timestamp after alignment are arranged in a preset channel order (such as 0 degrees, 45 degrees, 90 degrees, 135 degrees) and combined into a multi-dimensional vector form of multi-channel polarization signal group. The group is assigned a unique spatial coordinate label, that is, the row number and column number of the position. The above extraction, alignment and combination operations are repeated for all spatial positions in all scan rows, and finally, an aligned multi-channel polarization signal group covering the entire coating surface and whose spatial position completely corresponds to the polarization channel is obtained.
[0025] Step 1.3 involves spatially stitching the overlapping areas between adjacent scan lines using the aligned multi-channel polarization signal groups to eliminate spatial offset caused by transmission jitter, ultimately forming the original interferometric superimposed image sequence. Specifically, this includes: identifying the overlapping area in the transmission direction of two adjacent scan lines from the aligned multi-channel polarization signal groups. The width of this overlapping area is determined by the ratio of the production line transmission speed to the sampling frequency and the overlap rate of the imaging field of view. Within the overlapping area, multiple feature points or feature blocks from the previous scan line are selected, each feature block containing a multi-channel polarization signal group of several adjacent pixels. For each selected feature block, the corresponding block with the highest matching degree is searched in the overlapping area of the next scan line, based on the overall similarity of the light intensity values of each polarization channel within the two blocks. A local offset is calculated based on the difference in the center coordinates of each pair of matching blocks. By statistically averaging or median filtering all local offsets, the global spatial offset between the previous scan line and the next scan line is obtained. This offset includes two components: row direction and column direction. This offset mainly comes from random jitter or speed fluctuations during the production line conveying process. Based on the calculated offset, the reverse position correction is performed on all signal groups of the next scan line. Subpixel precision resampling or translation transformation can be used to make its spatial coordinates accurately aligned with the previous scan line.
[0026] The corrected adjacent scan lines are seamlessly stitched together in spatial order to form two-dimensional image data covering the entire surface. Each pixel retains the multi-channel polarization information after temporal alignment, and the spatial coordinates of all pixels are strictly consistent with the sampling time. Finally, the stitching result is checked for boundary consistency to ensure that there is no ghosting or breakage, thus obtaining a spatiotemporally consistent original interferometric superimposed image sequence.
[0027] In a preferred embodiment of the present invention, step 2 above may include: Step 2.1: Obtain the thickness parameters and reflectivity distribution of the ultrathin substrate and construct a forward transmission model of the multilayer interference optical field. Specifically, this includes: measuring or reading the actual thickness of the ultrathin waveguide substrate and the refractive index and thickness parameters of each coating layer; determining the reflectivity and transmittance of each layer at the incident light wavelength; and constructing an initial framework for a forward transmission model of the multilayer interference optical field based on the transmission matrix method in thin-film interference theory. The basic principle of the transmission matrix method based on thin-film interference theory is as follows: for each uniform dielectric layer, a 2×2 characteristic matrix is used to describe the light wave passing through that layer. The relationship between electric and magnetic field changes is obtained. This matrix contains information on film thickness, refractive index, incident angle, and wavelength. The characteristic matrices of all films in the multilayer film system are multiplied in the order of light propagation to obtain the total transmission matrix of the entire film system. The overall reflection coefficient and transmission coefficient of the film system can be directly calculated from the total transmission matrix, and then the complex amplitude superposition result of the front surface reflected light, the rear surface reflected light, and the internal multiple reflected light is obtained. The model takes the substrate thickness, refractive index, extinction coefficient, and thickness of each film layer as adjustable parameters, and the incident light wavelength, polarization state, and angle as input variables, and outputs the interference superposition intensity distribution on the detection plane.
[0028] To train the forward transmission model, a set of standard samples is prepared, covering the possible variations in substrate thickness and film parameter deviations on the production line. Under the same multi-channel polarized illumination and acquisition conditions, the original interferometric superposition image sequence for each sample is acquired, and the actual substrate thickness and optical parameters of each film layer are measured for each sample. These are used as labels for supervised learning, and the samples are divided into training and validation sets according to a set ratio. During training, the adjustable parameters of the initial model are used as optimization variables, and the mean square error between the model-predicted interferometric superposition intensity and the actual acquired image sequence is used as the loss function. The mathematical expression of this loss function is: ; in, This represents the value of the loss function. Represents the total number of samples. Indicates the sample index. Indicates the first The predicted intensity of each sample is calculated by the forward transport model based on the currently adjustable parameters; Indicates the first The actual intensity of each sample, obtained from the label value acquired through offline detection; total number of samples. The number of all pixels or feature points in the training set; when using the gradient descent algorithm, for each adjustable parameter The parameter update formula is: ; In the formula This represents the learning rate (i.e., the set step size). Represents the loss function For parameters The partial derivative (i.e., gradient) of . These are the updated parameters. These are the parameters before the update; the gradient is repeatedly calculated and the parameters are updated until the loss function is reached. Convergence; if a nonlinear least squares algorithm is used, the loss function is considered as the sum of squared residuals, and the residual vector is . Each component Then the loss function During iterative solving, the parameter update formula for the Gauss-Newton method is: ; in, The Jacobian matrix has the following elements. The Levonberg-Marquardt method introduces a damping factor into the Gauss-Newton method, updating the formula as follows: ; The damping factor, Using an identity matrix, this method typically converges faster. The trained forward transmission model can quickly simulate the corresponding multilayer interference optical field distribution based on the input ultrathin waveguide thickness and film parameters. The forward transmission model is an improvement on the transmission matrix method and has the advantages of high computational efficiency, clear physical meaning, and easy parameter calibration. Its advantage lies in providing an accurate theoretical benchmark for reverse decoupling operations without having to solve complex wave equations pixel by pixel, thereby effectively improving the robustness and real-time performance of front and rear surface signal separation and meeting the requirements of high-speed online inspection on production lines.
[0029] Step 2.2 involves performing a reverse decoupling operation between the original interferometric superimposed image sequence and the constructed forward transmission model of the multi-layer interferometric optical field to separate the dominant signal of the front surface defect and the dominant signal of the rear surface interference. Specifically, this includes: using the obtained original interferometric superimposed image sequence as the input observation signal, and using the forward transmission model trained in Step 2.1 as a theoretical reference; employing a reverse solution method, which essentially uses the predictive power of the forward transmission model to inversely calculate the actual surface signal; specifically, firstly, setting a set of initial estimates for the front surface reflection signal and the rear surface reflection signal, then inputting these two sets of estimates into the forward transmission model, allowing the model to simulate the corresponding interferometric superimposed intensity distribution, and then comparing the simulation results with the actual observation signal. The system performs pixel-by-pixel comparisons and adjusts the estimated values of the front and rear surface signals in reverse based on the degree of difference between them. This process is repeated: after each adjustment, the new estimated values are substituted back into the forward transmission model to obtain the simulation results again and compare them with the observed signals until the difference between the simulation results and the observed signals is less than a set threshold. At this point, the forward transmission model acts as a mapping from the estimated signal to the simulated signal, while the reverse solution continuously corrects the estimated signal to make the mapping result approximate the actual observation. Finally, two components are separated from the original interferometric superposition signal: one mainly comes from the contribution of the front surface defects, denoted as the front surface defect-dominated signal; the other mainly comes from the interference of multiple reflections from the rear surface and its interior, denoted as the rear surface interference-dominated signal.
[0030] Step 2.3: Perform signal enhancement processing on the dominant signal of the front surface defect to obtain the front surface decoupling image; simultaneously, integrate the dominant signal of the rear surface interference into a rear surface interference suppression image. Combine the front surface decoupling image and the rear surface interference suppression image to form the front and rear surface decoupling image. Specifically, this includes: for the separated dominant signal of the front surface defect, perform local contrast stretching or edge sharpening operations to enhance the weak features related to defects such as pinholes and scratches, while suppressing residual noise, to generate the front surface decoupling image; for the dominant signal of the rear surface interference, integrate it according to its spatial location, retain it as the basis for judging false defects on the rear surface, but do not perform defect feature enhancement, to form the rear surface interference suppression image; combine the front surface decoupling image and the rear surface interference suppression image to form the front and rear surface decoupling image for use in subsequent steps.
[0031] In a preferred embodiment of the present invention, step 3 above may include: Step 3.1, extracting the front surface decoupling image from the front and rear surface decoupling images, specifically includes: reading the output front and rear surface decoupling images, which contain two independent data layers in terms of data organization: the first layer is the front surface decoupling image, and the second layer is the rear surface interference suppression image; according to the pre-agreed data layering structure, using an index extraction operation to separate the first layer data from the front and rear surface decoupling images, obtaining a separate front surface decoupling image matrix, denoted as... ,in and These represent the row and column coordinates of the pixel, respectively; the second layer data is retained as the back surface interference suppression image for use in step 5.
[0032] Step 3.2 involves performing local grayscale histogram statistical analysis on the front surface decoupled image and dynamically calculating the contrast stretching mapping function in the neighborhood of each pixel. Specifically, this includes: processing the front surface decoupled image... Divide into multiple local neighborhoods, each neighborhood consisting of pixels. Centered on a given area, it includes all pixels within a preset side length; for each local neighborhood... The grayscale value distribution of all pixels within the region is statistically analyzed to generate a local grayscale histogram. Based on the cumulative distribution characteristics of the histogram, the grayscale value corresponding to the cumulative probability reaching a preset lower limit threshold (e.g., 0.01) is taken as the lowest effective lower limit for that neighborhood. The grayscale value corresponding to the cumulative probability reaching a preset upper limit threshold (e.g., 0.99) is taken as the highest effective upper limit. Based on these lower and upper limits, a linear contrast stretching mapping function is constructed. Its mathematical expression is: ; in, This represents the original grayscale value of the input pixel (ranging from 0 to 255). This indicates that the pixel is in the neighborhood. The new grayscale value after downmapping; and Pixels The lowest and highest effective limits of the neighborhood both vary with spatial location; when the denominator is zero (i.e., all gray values in the neighborhood are the same), directly set... This mapping function linearly expands grayscale values within the valid range to the full range, and compresses grayscale values below the lower limit or above the upper limit to 0 or 255, respectively.
[0033] Step 3.3: Based on the contrast stretching mapping function, nonlinear suppression is applied to the specular reflection in the high grayscale region, while gradient amplification is applied to the weak fluctuation signal in the low grayscale region to obtain a high-contrast image with weak morphology. Specifically, this includes: traversing each pixel in the front surface decoupled image, and applying the contrast stretching mapping function corresponding to the neighborhood of that pixel... The process involves calculating the initial grayscale value after mapping. For pixels whose grayscale value remains in the high grayscale region (e.g., greater than 200) after mapping, they are identified as specular reflection areas. A nonlinear attenuation factor (e.g., power transformation with an exponent greater than 1) is used to further reduce their grayscale value to suppress residual strong specular reflection. For pixels whose grayscale value is in the low grayscale region (e.g., less than 50) after mapping, they are identified as weak fluctuation signal areas. The local gradient amplitude of the pixel is calculated (e.g., the result of the Sobel operator), and the original grayscale value is multiplied by the gradient amplitude by a preset amplification factor, such as 2 to 5 times, to enhance subtle morphological changes. For pixels in the intermediate grayscale region, only the mapped grayscale value is retained without further processing. All pixels that have undergone the above nonlinear suppression and gradient amplification processes are recombined according to their original spatial positions to form a high-contrast image with weak morphological features. .
[0034] In a preferred embodiment of the present invention, step 4 above may include: Step 4.1 involves analyzing the polarization phase delay of each pixel in the weak-topography high-contrast image point by point, calculating the polarization ellipticity and azimuth angle corresponding to each pixel, and obtaining the polarization response map of the hidden defect. Specifically, this includes reading the weak-topography high-contrast image output in step 3. Each pixel in the image corresponds to a set of multi-channel polarization information; for each pixel... Based on the Stokes parameter calculation method, the polarization phase delay at that point is calculated from the multi-channel polarized light intensity values. Then, based on the polarization phase delay, the polarization ellipticity of that pixel is further calculated. With azimuth The calculation formula is as follows:
[0035] In the formula , , , Representing pixels The total light intensity at the location, the difference between the polarization components at 0° and 90°, the difference between the polarization components at 45° and 135°, and the difference between the left-handed and right-handed circular polarization components; The value ranges from -1 to 1, the absolute value represents the magnitude of the ellipticity, and the sign represents the direction of rotation; The value range is -90° to 90°, representing the direction of the major axis of the ellipse; for each pixel... and The data is stored as two two-dimensional matrices, which together form the polarization response map of the hidden defect. .
[0036] Step 4.2: Perform gradient calculation on the polarization response map of the hidden defect to obtain the polarization degree gradient field. Specifically, this includes: processing the polarization response map of the hidden defect obtained in Step 4.1... To perform gradient calculations, first calculate the polarization ellipticity. The first-order partial derivatives in the horizontal and vertical directions are denoted as... and Similarly, calculate the azimuth angle. partial derivatives and ; Then define the polarization gradient magnitude of each pixel. The formula is as follows:
[0037] Will Arranged by pixel position, the polarization gradient field is obtained. .
[0038] Step 4.3: In the polarization gradient field, dynamically search for pixel locations where the joint entropy value of polarization ellipticity and azimuth angle reaches a local extremum, mark the spatial coordinates of these pixel locations as topological singularities, and obtain the coordinate set of all topological singularities. Specifically, this includes: in the obtained polarization gradient field... In the process, the pixel location where the joint entropy value of polarization ellipticity and azimuth angle reaches a local extremum is dynamically searched; first, each pixel point is defined. joint entropy as follows:
[0039] in, Represented in pixels A local neighborhood centered on the center (e.g., a 5x5 window). and Iterate through the polarization ellipticity quantization level and azimuth quantization level of all pixels in the neighborhood respectively. Let be the joint probability distribution function, i.e., the polarization ellipticity in the neighborhood is at the th . The level and azimuth angle are at the first The pixel ratio of the level; calculate the pixel ratio of each pixel in the entire image. Then, find all local extrema, i.e. Locations with values greater than their 8 neighboring pixel values; spatial coordinates of these local extrema. (in , The total number of extreme points is marked as topological singularities, and the coordinate set of all topological singularities is output. .
[0040] In a preferred embodiment of the present invention, step 4 above may include: Step 4.4: Using the coordinate set of all topological singularities as constraint nodes, fit a minimum volume anisotropic feature shell in the feature space, such that the minimum volume anisotropic feature shell contains all constraint nodes inside or on its boundary. Specifically, this includes: using the coordinate set of all topological singularities output in step 4.3. To constrain the nodes, a minimum volume anisotropic feature shell is fitted in the feature space; specifically, the two-dimensional image coordinates of each topological singularity point are first... Mapped to a three-dimensional feature space, the three dimensions of which are respectively taken as: polarization ellipticity Azimuth and local polarization gradient magnitude Mapped points Recorded as: ; In a three-dimensional feature space, find a convex closed surface such that the surface contains all mapped points. Furthermore, the enclosed Euclidean volume is minimized; this surface is defined as an anisotropic characteristic shell, the shape of which is determined by a set of adjustable radial distance functions. Description, in which Polar angle, Let be the azimuth angle. The minimum volume enclosing ellipsoid algorithm is used for iterative solution: First, an initial ellipsoid containing all mapping points is initialized, typically with the center of the mapping point set as the ellipsoid center and the half-span of the point set in each direction as the initial semi-axis length. In each iteration, it is checked whether the current ellipsoid contains all mapping points. If a mapping point exists outside the ellipsoid, it is added to the optimization objective with a certain weight. By updating the ellipsoid's center, semi-axis length, and rotation direction, the ellipsoid volume is slightly increased but still contains the external point. This process is repeated, continuously adjusting the ellipsoid parameters to gradually approach the minimum ellipsoid that can contain all mapping points. The iteration terminates when all mapping points are inside or on the boundary of the ellipsoid, and any further shrinking of the ellipsoid would result in the exclusion of a mapping point. The final convex surface is the minimum volume anisotropic feature shell, denoted as . This minimal volume anisotropic feature shell can compactly characterize the overall distribution range of defects in the polarization feature space.
[0041] Step 4.5 involves performing anisotropic scaling on the minimum volume anisotropic feature shell, independently scaling the geometric dimensions of the shell along different directions to obtain the transformed anisotropic shell. Specifically, this includes: processing the obtained minimum volume anisotropic feature shell... Anisotropic scaling transformation is performed, and the shell is first determined through principal component analysis (PCA). By determining the inertial principal axis direction, three orthogonal principal axes are obtained, each corresponding to a dimension in the feature space; the original semi-axis length of the shell in that direction is measured along each principal axis direction and denoted as . 、 、 Introduce three independent scaling factors 、 、 These correspond to the three principal axis directions mentioned above, and satisfy the following conditions: , , Typically, at least one factor not equal to 1 is set to achieve anisotropy; the anisotropic characteristic shell is transformed: let the center of the shell be... For any point on the shell Calculate its offset vector relative to the center. Multiply each component of the offset vector by its corresponding scaling factor to obtain the transformed offset vector. The coordinates of the transformed point are After performing the above transformation on all points on the shell, the resulting new surface is called the transformed anisotropic shell, denoted as . This transformation can independently stretch or compress the shell along different principal axes to better match the geometric anisotropy characteristics of real defects.
[0042] Step 4.6: Calculate the surface curvature spectrum and volume-to-surface area ratio of the transformed anisotropic shell. Concatenate and combine the surface curvature spectrum and volume-to-surface area ratio to form the geometric feature vector of the defect. Specifically, this includes: calculating the transformed anisotropic shell... The surface curvature spectrum and the volume-to-surface-area ratio, first in Uniform sampling on the surface points (e.g.) For each sampling point, calculate its two principal curvatures: the maximum curvature. With minimum curvature ; Divide the principal curvature values of all sampling points into groups according to their magnitude. A continuous interval (e.g.) The frequency of curvature occurrences within each interval is counted, and the normalized values yield the curvature spectrum vector. ,in Indicates the first Normalized frequency of each interval.
[0043] calculate The volume enclosed With surface area ,volume The calculation formula is: ; 、 、 These are the transformed anisotropic shells. The semi-axis lengths along the three principal axes hold true when the shell is ellipsoidal; if the shell is non-ellipsoidal, the volume is calculated using a discretized numerical integration method, with an ellipsoidal approximation used here for simplicity; surface area. The calculation formula is as follows (for an ellipsoid):
[0044] Among them, the index is an empirical constant, dimensionless, and is usually taken as 1.6075 to approximate the surface area of the ellipsoid; , , These represent the semi-axis lengths of the transformed shell along the three principal axes, with units consistent with the feature space; thus, the volume is obtained. With surface area Then, calculate the ratio. Finally, the curvature spectrum vector and ratio Cascaded sequentially to form a collection A vector with several components, denoted as the geometric feature vector of the defect. The vector synthesis describes the local curvature distribution and overall compactness of the defect shell.
[0045] In a preferred embodiment of the present invention, step 5 above may include: Step 5.1: Obtain the geometric feature vector and the back surface interference suppression information in the front and back surface decoupling images for spatial alignment and feature association. Simultaneously, identify the feature components belonging to the back surface pseudo-defects and remove them from the geometric feature vector to obtain the geometric feature vector of the real front surface defect. Specifically, this includes: reading the defect geometric feature vector output in step 4, which is stored in a list format. Each element in the list corresponds to a defect entry. Each entry contains the spatial coordinate information of the defect (such as the row and column index of the defect center in the image, and the vertex coordinates of the minimum bounding rectangle of the defect), size information (such as equivalent diameter, length, width, etc.), and feature components composed of the calculated curvature spectrum and the volume surface area ratio; and simultaneously reading the back surface interference suppression image retained in step 2. The image is a single-channel grayscale image with the same size as the original image. The grayscale value of each pixel is normalized to between 0 and 255, representing the relative intensity of the back surface interference signal at that position.
[0046] The algorithm iterates through each defect in the geometric feature vector in order of defect entries. For the current defect, it extracts the center point coordinates (row and column numbers) from its spatial coordinate information and locates the pixel gray value at these coordinates in the back surface interference suppression image. This gray value is compared with a pre-calibrated pseudo-defect discrimination threshold (e.g., set to 80, obtained by statistical analysis of a batch of known front and back surface defects, such that more than 95% of the gray values of pseudo-defects on the back surface are greater than the threshold, and more than 95% of the gray values of real defects on the front surface are less than the threshold). If the gray value is greater than or equal to the threshold, the defect is determined to be mainly caused by back surface reflection interference and is a pseudo-defect. The defect entry is then marked as to be removed from the geometric feature vector list. If the gray value is less than the threshold, the defect is determined to actually exist on the front surface coating layer and is marked as to be retained.
[0047] After the traversal is completed, a new list is created based on the marked status. All defect entries marked as retained are copied to the new list in their original order to form a geometric feature vector containing only the true defect information of the front surface. The geometric feature vector is denoted as the geometric feature vector of the true defect of the front surface and passed to step 5.2.
[0048] Step 5.2: Input the geometric feature vector of the real defects on the front surface into a preset deep convolutional network model. The preset deep convolutional network model classifies each defect, distinguishing between pinholes, scratches, bubbles, and uneven film thickness stripes, and obtains the classification result. Specifically, the preset deep convolutional network model takes the geometric feature vector of the real defects on the front surface output in step 5.1 as input and outputs the probability distribution of the defects belonging to the four categories of pinholes, scratches, bubbles, and uneven film thickness stripes. The preset deep convolutional network model is built based on a one-dimensional convolutional neural network architecture (specifically, an improved 1D-CNN). Its original architecture draws on the design ideas of the lightweight network MobileNetV1, and uses depthwise separable convolution to replace standard convolution to significantly reduce the number of model parameters while maintaining the ability to extract local patterns from feature vectors.
[0049] For a specific application scenario of this invention: namely, the length of the input feature vector is fixed. ,For example When the value is 10, the vector length is 11, and each component has a definite physical meaning (frequency of each interval of the curvature spectrum and volume surface area ratio). The following adaptive improvements were made to the original architecture: A batch normalization layer was added after the input layer to accelerate the convergence speed during model training and alleviate the internal covariate bias; the fully connected mapping layer at the end of the original MobileNetV1 was replaced with a combination of a global average pooling layer and two fully connected mapping layers. The global average pooling layer performs mean compression on the spatial dimension of the convolution output feature map. The two fully connected mapping layers contain 64 and 32 neurons, respectively. Finally, a probability normalization layer with four output nodes, namely the Softmax layer, is connected to convert the network's original output score into probability values for four categories; the entire network contains three one-dimensional convolutional blocks. Each convolutional block consists of a depthwise separable convolution, a batch normalization layer, and an activation layer (ReLU). The kernel sizes are 3, 3, and 5, respectively, and the number of output channels are 16, 32, and 64, respectively.
[0050] During the training phase, a large amount of sample data is first collected: geometric feature vectors of confirmed defect categories are extracted from historical detection results or offline experiments, and each sample contains a feature vector. The dataset includes real-valued samples and manually labeled defect categories (pinholes, scratches, bubbles, or uneven film thickness streaks) verified by high-precision offline detection methods such as scanning electron microscopy or white light interferometry. A total of no fewer than 5000 samples were collected, covering various defect morphologies and severity that may occur on the production line. The sample set was randomly divided into training, validation, and test sets in a 6:2:2 ratio. Cross-entropy was used as the loss calculation criterion, and the Adam optimizer was used for iterative parameter optimization. The initial learning rate was set to 0.001, and the batch size was set to 32. After each training epoch (i.e., traversing the entire training set once), the classification accuracy and loss value were calculated on the validation set.
[0051] If the validation set loss value does not decrease after five consecutive rounds, the learning rate is multiplied by 0.5 for decay. An early stopping strategy is also employed: if the validation set classification accuracy no longer improves after 10 consecutive rounds, training is immediately stopped, and the model parameters with the highest validation set accuracy are saved. After training, the model is finally evaluated on the test set, requiring the test set accuracy to reach a preset target (e.g., greater than 98%). The advantages of the model based on a one-dimensional convolutional architecture are: it can automatically learn the local correlations between adjacent feature components in geometric feature vectors, such as the frequency variation patterns of adjacent intervals in the curvature spectrum; it has stronger feature abstraction capabilities and generalization performance compared to traditional fully connected networks; and the use of depthwise separable convolutions makes the model extremely lightweight, with a single inference time on a typical industrial computer controlled within 1 millisecond, fully meeting the real-time online classification requirements of a production line at a line speed of 300 millimeters per second. After training, the model is solidified and deployed to an online detection system for classifying defect geometric feature vectors extracted in real time.
[0052] Step 5.3: Based on the classification results and combined with the spatial coordinate information implicit in the geometric feature vector of the true front surface defects, output the position, size, and surface label of each defect as the defect classification and localization result. Specifically, this includes: for each true front surface defect for which the classification result has been obtained in Step 5.2, extracting its implicit spatial coordinate information and size information from the output geometric feature vector of the true front surface defect; wherein the spatial coordinate information includes the coordinates of the four vertices of the minimum bounding rectangle of the defect (arranged in the order of top left, top right, bottom right, and bottom left) and the contour boundary point set, which consists of a series of continuous row and column coordinates; the size information is calculated using different methods depending on the defect category, as detailed below: For defects classified as pinholes, a set of contour points is first extracted from the defect entries. This set of contour points consists of a series of continuous pixel coordinates on the defect boundary. The least squares circle fitting method is used to determine an ideal circle that best approximates the contour: that is, to find a center coordinate and radius value that minimizes the sum of the squares of the differences between the distances from all points on the contour to the center and the radius. In implementation, the centroid of the contour point set is first calculated as the initial center, and then the center position and radius are adjusted iteratively. In each iteration, the distance from all contour points to the current center is calculated, and the center and radius are updated according to the distance deviation until the deviation change is less than a preset convergence threshold, such as 0.01 pixels. The diameter of the finally fitted circle is used as the equivalent diameter of the pinhole, and the diameter is converted from pixel units to micrometer units according to the calibration coefficient of the imaging system (the actual number of micrometers corresponding to each pixel).
[0053] For defects classified as scratches, the minimum bounding rectangle of the defect contour is first calculated using the rotating caliper calculation method. This rectangle can enclose the entire defect contour in any direction, and its area is the minimum value among all possible bounding rectangles. After obtaining the rectangle, the lengths of the two sides of the rectangle are recorded: the longer side is taken as the length of the scratch, and the shorter side is taken as the width of the scratch. If the ratio of the scratch length to the width is less than a certain threshold, such as 3:1, the defect morphology is further examined, and if necessary, the category is re-determined or it is marked as a suspected scratch. Both the length and width are converted to micrometers using calibration coefficients and recorded separately.
[0054] For defects classified as bubbles, the total number of pixels contained within the defect contour is first counted using a scan-line filling algorithm. Specifically, each pixel is scanned line by line within the closed area enclosed by the contour to determine whether it is located inside the contour. The number of all internal pixels is summed to obtain the pixel area. Each pixel corresponds to a fixed area in the actual physical space. This area is determined by the magnification of the imaging system, i.e., the linear polarization imaging device described in step 1.1, and the camera pixel size. For example, if the calibration result is 0.5 micrometers per pixel, then the physical area of each pixel is 0.25 square micrometers. The total number of pixels within the contour is multiplied by the actual physical area corresponding to a single pixel to obtain the true area value of the bubble, which is output in square micrometers.
[0055] For defects classified as uneven film thickness stripes, the minimum bounding rectangle of the defect is first calculated using the same method as for scratches. The shorter side of the rectangle is taken as the width of the stripe, in micrometers. At the same time, the main extension direction of the stripe needs to be determined: that is, the direction indicated by the longer side of the rectangle. Along this direction, the two points at the farthest ends of the contour point set are found. This can be achieved by calculating the extreme values of the projection of the contour point set onto the direction vector. The Euclidean distance between these two points is calculated as the extension length of the stripe, also recorded in micrometers. If the stripe has a curved shape, the skeletonization method is used to extract the center line, and then the curve length is calculated along the center line as the extension length.
[0056] All the above dimensional calculation results are integrated with the defect category label, spatial coordinate information (the center coordinate is the center point of the smallest bounding rectangle, or the coordinates of the four vertices are provided directly), and surface label (uniformly labeled as front surface) to form a complete inspection result item. All defect items are organized according to the output format required by the production line, such as JSON array or XML document. Each item includes: unique defect number, category name, center x-coordinate, center y-coordinate, size value (diameter for pinholes, length × width for scratches, area for bubbles, width × extension length for stripes), size unit, surface label, and optional timestamp. Finally, the report is output to the production line control terminal or quality inspection terminal.
[0057] like Figure 2 As shown, embodiments of the present invention also provide a machine vision-based surface defect detection system for ultra-thin optical devices after coating, comprising: The multi-channel polarization imaging module is used to synchronously capture multi-channel polarized reflected light signals from the coated surface along the production line conveying direction, providing a source of raw optical signals for image processing. The image preprocessing module is used to perform temporal alignment and spatial stitching on the raw light intensity signals captured by the multi-channel polarization imaging module to obtain a raw interferometric superimposed image sequence that covers the entire surface and is consistent in time and space. The optical path difference decoupling module is used to perform multi-layer optical path difference decoupling operations on the original interferometric superimposed image sequence, remove the interference fringe artifacts formed by multiple reflections of the ultrathin substrate, and obtain the front and rear surface decoupled images; The contrast enhancement module is used to import the decoupled images of the front and rear surfaces into the dynamic adaptive contrast enhancement process, suppress the strong reflection of the multi-layer coated mirror and amplify the submicron weak undulation signal to obtain a high-contrast image with weak morphology. The polarization phase analysis module is used to perform polarization phase delay analysis on weak topography high contrast images to obtain the polarization response map of the hidden defect, and analyze the polarization gradient field of this response map and dynamically extract multiple topological singularities. The feature extraction module is used to fit the minimum volume anisotropic feature shell with topological singular points as constraint nodes, and calculate the geometric feature vector of the defect through anisotropic scaling transformation. The defect classification and localization module is used to eliminate false defects based on geometric feature vectors and back surface interference suppression information in the front and back surface decoupling images, and to classify defects using a preset deep convolutional network model to obtain defect classification and localization results.
[0058] It should be noted that this system is a system corresponding to the above method. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0059] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0060] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0061] Experimental example: I. Experiment Overview This experimental example addresses the high-precision detection requirements of surface defects in ultra-thin optical devices after coating, verifying the effectiveness of a defect detection method based on multi-channel polarization imaging and multi-layer optical path difference decoupling. The experiment was conducted in a semiconductor optical device production line environment, using a linear polarization imaging device to perform online detection on the coated ultra-thin optical wafer. Defect classification and precise location were achieved through five steps.
[0062] The experiment tested 1200 coated ultrathin optical wafers, of which 2847 samples were manually marked with defects, covering four typical defect types: pinholes, scratches, bubbles, and uneven film thickness streaks. The experiment focused on verifying the processing effects of each step and the final defect classification and localization performance.
[0063] II. Experimental Conditions The experiment was conducted in a standard semiconductor cleanroom environment, with the ambient temperature controlled at 22±1°C and the relative humidity at 45±5%. The detection system was deployed along the production line conveyor direction at a linear speed of 300 mm / s. The specific experimental configuration is shown in Table 1.
[0064] Table 1 Experimental Conditions
[0065] III. Experimental Procedures and Results Step 1, Multi-channel polarization signal acquisition and time-domain alignment: Along the production line conveyor direction, a four-channel polarization imaging device (0°, 45°, 90°, 135°) was synchronously triggered at a sampling frequency of 50kHz to acquire the polarization intensity signal reflected from the coated surface. For the original signals of each polarization channel at the same spatial position within each scan row, time-domain alignment was performed according to the sampling timestamp to eliminate time misalignment caused by differences in sensor sampling rates. After alignment, the overlapping areas between adjacent scan rows were spatially stitched to eliminate spatial offset caused by conveyor jitter, ultimately forming an original interferometric superimposed image sequence covering the entire surface. The experimental results are shown in Table 2.
[0066] Table 2. Results of Step 1: Data Acquisition and Alignment
[0067] like Figure 3 As shown, there is a significant time offset in the four polarization channels before alignment, while the signal waveforms highly overlap after alignment. The spatial stitching accuracy increases with the width of the overlapping area, reaching 99.1% when the overlap width reaches 15 pixels, and the stitching RMSE decreases to 0.62 pixels.
[0068] Step 2, Multi-layer optical path difference decoupling operation: Based on the thickness parameters (0.1~2.0 mm) of the ultrathin substrate and the reflectivity distribution of the film layers, a forward propagation model of the multilayer interferometric optical field was constructed. The original interferometric superimposed image sequence was decoupled from the forward propagation model through inverse decoupling operations to separate the dominant signal of the front surface defect from the dominant signal of the rear surface interference. The dominant signal of the front surface defect was enhanced to obtain the front surface decoupled image; simultaneously, the dominant signal of the rear surface interference was integrated into a rear surface interference suppressed image. The experimental results are shown in Table 3.
[0069] Table 3 Results of optical path difference decoupling in step 2
[0070] like Figure 4 As shown, the decoupling operation effectively removes interference fringe artifacts formed by multiple reflections from the ultrathin substrate. After decoupling, the interference fringe contrast of the front surface image decreased from 0.82 to 0.12 (a reduction of 85.4%), and the signal-to-noise ratio increased from 8.5 dB to 32.6 dB.
[0071] Step 3, Dynamic Adaptive Contrast Enhancement: The decoupled image of the front surface was extracted, and local gray-level histogram statistical analysis was performed to dynamically calculate the contrast stretching mapping function in the neighborhood of each pixel. Based on the mapping function, nonlinear suppression was applied to the specular reflection in the high gray-level region, while gradient amplification was applied to the weak fluctuation signal in the low gray-level region to obtain a high-contrast image with weak morphology. The experimental results are shown in Table 4.
[0072] Table 4. Results of contrast enhancement in step 3
[0073] like Figure 5 As shown, before enhancement, the grayscale distribution was concentrated in the high-level range (median grayscale 180), with significant overlap between the specular reflection area and the weak fluctuation signal area. After enhancement, the grayscale distribution was significantly broadened, and the weak fluctuation signal area (80~120 grayscale) was independently distributed. The contrast of defects of various sizes was improved by an average of 3.8 times, with the most significant improvement observed in submicron-sized defects.
[0074] Step 4, Polarization phase delay analysis and topological singularity extraction: The polarization phase delay of each pixel in the high-contrast image of weak morphology is analyzed point by point to calculate the polarization ellipticity and azimuth angle, thus obtaining the polarization response map of the hidden defect. Gradient calculation is performed on the polarization response map to obtain the polarization degree gradient field. Pixel locations where the joint entropy value of polarization ellipticity and azimuth angle reaches a local extremum are searched in the gradient field and marked as topological singularities. Using all topological singularities as constraint nodes, a minimum volume anisotropic feature shell is fitted, and the cascaded features of the surface curvature spectrum and volume-surface area ratio are solved to form the defect geometric feature vector. The experimental results are shown in Table 5.
[0075] Table 5 Results of topological singularity extraction and feature shell in Step 4
[0076] like Figure 6 As shown, the polarization gradient field reaches the convergence threshold (0.95) in the 12th iteration, and the joint entropy stability index stabilizes simultaneously above 0.96. When the gradient threshold is increased from 0.1 to 0.7, the number of pseudo-singularities rapidly decreases from 892 to 14.
[0077] like Figure 7 As shown, the four types of defects exhibit significant differences in curvature spectrum distribution: the curvature spectrum of bubble defects is concentrated in the high-value region (mean 5.2 μm). -1 The film thickness unevenness streaks are concentrated in the low-value region (mean 0.8 μm). -1 In the two-dimensional feature space, the four defect cluster boundaries are clear, and the Fisher criterion value is 4.62.
[0078] Step 5, False Defect Removal and Defect Classification and Location: Geometric feature vectors and back surface interference suppression images are obtained, and spatial alignment and feature association are performed. False defect feature components on the back surface are identified and removed to obtain the true defect geometric feature vectors on the front surface. These true defect geometric feature vectors are then input into a pre-trained deep separable one-dimensional convolutional classification network (4 layers, input dimension 128, output dimension 4), which outputs the defect category. Based on the classification results, spatial coordinates and size information are analyzed to output complete defect classification and localization results. Experimental results are shown in Table 6.
[0079] Table 6 Defect Classification and Location Results in Step 5
[0080] like Figure 8 As shown, the overall classification accuracy of the method of this invention reaches 98.6%, which is 4.8% higher than YOLOv5, 6.5% higher than Faster R-CNN, 10.1% higher than SVM and HOG, and 16.3% higher than the traditional threshold method. The F1 score of all four types of defects is above 97%, the submicron level defect detection rate is 94.2%, and the single inference time is only 0.8ms.
[0081] IV. Experimental Conclusions The multi-channel polarization signal temporal alignment and spatial stitching method effectively eliminates the four-channel sampling time offset (reduced by 97.5%) and spatial offset caused by transmission jitter (stitching RMSE reduced to 0.62 pixels), achieving an alignment accuracy of 99.1% with a 15-pixel overlap width. Multi-layer optical path difference decoupling successfully removes interference fringe artifacts formed by multiple reflections from ultrathin substrates. The contrast of interference fringes in the front surface decoupled image is reduced by 85.4%, and the signal-to-noise ratio is improved by 283.5%, effectively solving the signal aliasing problem between the front and back surfaces of ultrathin substrates. The dynamic adaptive contrast enhancement method improves the contrast of defects of various sizes by an average of 3.8 times, effectively suppresses specular reflection, and significantly amplifies submicron-level weak fluctuation signals, providing high-quality image input for subsequent defect detection. The polarization phase delay analysis and topological singularity extraction method achieves stable convergence in the 12th iteration. The geometric feature vectors extracted from the anisotropic feature shell exhibit excellent separability among the four types of defects (Fisher criterion value 4.62), effectively solving the problem of extracting latent defect features. The defect classification method based on a depthwise separable one-dimensional convolutional network achieves an overall accuracy of 98.6% with a single inference time of only 0.8ms, which is comprehensively superior to traditional thresholding methods, SVM+HOG, Faster R-CNN and YOLOv5, and realizes real-time high-precision defect detection at the production line level.
[0082] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting surface defects in ultrathin optical devices after coating based on machine vision, characterized in that, The method includes: By performing linear scanning polarization imaging perpendicular to the transmission direction, multi-channel light intensity signals are acquired synchronously, and transmission jitter is eliminated by aligning in the time domain and stitching together overlapping areas of adjacent rows, thus obtaining the original interferometric superimposed image sequence. A forward model of the multilayer interference optical field is constructed using the thickness parameters of the ultrathin substrate and the reflectivity distribution of the film. Based on the forward model of the multilayer interference optical field, the original interference superimposed image sequence is decoupled in reverse. The front surface defect signal is separated and enhanced, and the back surface interference is integrated into a suppressed image, thus obtaining the front and back surface decoupled image. After extracting the decoupled image of the front surface, the contrast stretching map is dynamically generated by local gray-level histogram statistical analysis. The weak undulation signal is amplified by nonlinear suppression of specular reflection and gradient amplification to obtain a high-contrast image of weak morphology. Polarization phase delay analysis is performed on the weak-morphology high-contrast image to obtain the polarization response map of the hidden defect. The polarization degree gradient field of the response map is analyzed to dynamically extract multiple topological singularities. The spatial coordinates of each topological singularity precisely correspond to the pixel position where the joint entropy value of polarization ellipticity and azimuth angle in the gradient field reaches an extreme value. Using the topological singularities as constraint nodes, a minimum volume anisotropic feature shell is fitted. By implementing anisotropic scaling transformation, the cascade features of its surface curvature spectrum and volume-surface area ratio are calculated as the geometric feature vector of the defect. Based on the geometric feature vector, and combined with the back surface interference suppression information in the pre-acquired front and back surface decoupling images, false defects are eliminated. A preset deep convolutional network model is used to classify the defects, and the defect classification and localization results are obtained.
2. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 1, characterized in that, By performing linear scanning polarization imaging perpendicular to the transmission direction, multi-channel light intensity signals are simultaneously acquired. Transmission jitter is eliminated by temporal alignment and stitching together overlapping areas of adjacent rows, resulting in the original interferometric superimposed image sequence, including: An imaging field of view is arranged along the direction perpendicular to the production line. The original light intensity signals of multiple polarization channels reflected from the surface before coating are synchronously triggered at a fixed sampling frequency to obtain the original signal sequence organized according to the scan row. For the original light intensity signals of each polarization channel at the same spatial position within each scan line, time-domain alignment is performed according to the sampling timestamp to obtain an aligned multi-channel polarization signal group; By aligning the multi-channel polarization signal groups, the overlapping areas between adjacent scan lines are spatially stitched together to eliminate spatial offset caused by transmission jitter, ultimately forming the original interferometric superimposed image sequence.
3. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 2, characterized in that, A forward model of the multilayer interference optical field is constructed using the thickness parameters of the ultrathin substrate and the reflectivity distribution of the film. Based on this forward model, the original interferometric superimposed image sequence is decoupled in reverse. The front surface defect signal is separated and enhanced, and the back surface interference is integrated into a suppressed image, resulting in a decoupled image of the front and back surfaces, including: Obtain the thickness parameters and reflectivity distribution of the ultrathin substrate and construct a forward transmission model of the multilayer interference optical field; The original interferometric superimposed image sequence and the forward transmission model of the constructed multi-layer interferometric light field are decoupled in reverse to separate the front surface defect-dominated signal and the rear surface interference-dominated signal. The signal enhancement processing of the front surface defect-dominant signal is performed to obtain the front surface decoupling image; at the same time, the rear surface interference-dominant signal is integrated into the rear surface interference suppression image, and the front surface decoupling image and the rear surface interference suppression image are used together as the front and rear surface decoupling image.
4. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 3, characterized in that, After extracting the decoupled image of the front surface, a contrast stretching map is dynamically generated using local grayscale histogram statistical analysis. By nonlinearly suppressing specular reflections and gradient amplifying weak undulation signals, a high-contrast image of weak topography is obtained, including: Extract the front surface decoupling image from the front and rear surface decoupling images; Local gray-level histogram statistical analysis is performed on the front surface decoupled image to dynamically calculate the contrast stretching mapping function in the neighborhood of each pixel; According to the contrast stretching mapping function, nonlinear suppression is applied to the specular reflection in the high grayscale region, while gradient amplification is applied to the weak fluctuation signal in the low grayscale region to obtain a high-contrast image with weak morphology.
5. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 4, characterized in that, Polarization phase delay analysis is performed on the weak-morphology high-contrast image to obtain a polarization response map of the hidden defect; the polarization gradient field of the response map is analyzed to dynamically extract multiple topological singularities, where the spatial coordinates of each topological singularity precisely correspond to the pixel position where the joint entropy value of polarization ellipticity and azimuth angle in the gradient field reaches an extreme value, including: The polarization phase delay of each pixel in the weak morphology high contrast image is analyzed point by point, and the polarization ellipticity and azimuth angle corresponding to each pixel are calculated to obtain the polarization response map of the hidden defect. Gradient calculations are performed on the polarization response map of the hidden defect to obtain the polarization gradient field; In the polarization gradient field, the pixel positions where the joint entropy value of polarization ellipticity and azimuth angle takes a local extreme value are dynamically searched, and the spatial coordinates of the pixel positions are marked as topological singularities, thus obtaining the coordinate set of all topological singularities.
6. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 5, characterized in that, Using the topological singularity as constraint nodes, a minimum volume anisotropic feature shell is fitted. By implementing anisotropic scaling, the cascaded features of its surface curvature spectrum and volume-to-surface-area ratio are calculated as the geometric feature vector of the defect, including: Using the set of coordinates of all the topological singular points as constraint nodes, fit a minimum volume anisotropic feature shell in the feature space, such that the minimum volume anisotropic feature shell contains all the constraint nodes inside or on its boundary. An anisotropic scaling transformation is performed on the minimum volume anisotropic feature shell, and the geometric dimensions of the shell are independently scaled along different directions to obtain the transformed anisotropic shell. The surface curvature spectrum and the volume-to-surface-area ratio of the transformed anisotropic shell are calculated, and the surface curvature spectrum and the volume-to-surface-area ratio are cascaded and combined to form the geometric feature vector of the defect.
7. The method for detecting surface defects of ultra-thin optical devices after coating based on machine vision according to claim 6, characterized in that, Based on the geometric feature vectors, and combined with the back surface interference suppression information in the pre-acquired front and back surface decoupling images, false defects are eliminated. A pre-defined deep convolutional network model is used to classify the defects, resulting in defect classification and localization results, including: The geometric feature vector and the back surface interference suppression information in the front and back surface decoupling images are obtained for spatial alignment and feature association. At the same time, feature components belonging to back surface pseudo defects are identified and removed from the geometric feature vector to obtain the geometric feature vector of the front surface true defects. The geometric feature vectors of the real defects on the front surface are input into a preset deep convolutional network model. The preset deep convolutional network model classifies each defect, distinguishing between pinholes, scratches, bubbles, and uneven film thickness stripes, and obtains the classification results. Based on the classification results, and combined with the spatial coordinate information implicit in the geometric feature vector of the actual defects on the front surface, the location, size, and surface label of each defect are output as the defect classification and localization results.
8. A machine vision-based system for detecting surface defects in ultra-thin optical devices after coating, wherein the system implements the method as described in any one of claims 1 to 7, characterized in that, include: The multi-channel polarization imaging module is used to synchronously capture multi-channel polarized reflected light signals from the coated surface along the production line conveying direction, providing a source of raw optical signals for image processing. The image preprocessing module is used to perform temporal alignment and spatial stitching on the raw light intensity signals captured by the multi-channel polarization imaging module to obtain a raw interferometric superimposed image sequence that covers the entire surface and is consistent in time and space. The optical path difference decoupling module is used to perform multi-layer optical path difference decoupling operations on the original interferometric superimposed image sequence, remove the interference fringe artifacts formed by multiple reflections of the ultrathin substrate, and obtain the front and rear surface decoupled images; The contrast enhancement module is used to import the decoupled images of the front and rear surfaces into the dynamic adaptive contrast enhancement process, suppress the strong reflection of the multi-layer coated mirror and amplify the submicron weak undulation signal to obtain a high contrast image with weak morphology. The polarization phase analysis module is used to perform polarization phase delay analysis on high-contrast images with weak topography to obtain the polarization response map of the hidden defect, and analyze the polarization gradient field of this response map and dynamically extract multiple topological singularities. The feature extraction module is used to fit the minimum volume anisotropic feature shell with topological singular points as constraint nodes, and calculate the geometric feature vector of the defect through anisotropic scaling transformation. The defect classification and localization module is used to eliminate false defects based on geometric feature vectors and back surface interference suppression information in the front and back surface decoupling images, and to classify defects using a preset deep convolutional network model to obtain defect classification and localization results.
9. A computing device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.