Photovoltaic glass defect detection method and system based on image recognition

By employing multi-band image acquisition and frequency domain processing technologies, the challenge of distinguishing between real defects and optical artifacts on the surface of coated photovoltaic glass has been solved, enabling high-precision defect detection and process optimization.

CN120876437AActive Publication Date: 2025-10-31HUBEI POLYTECHNIC UNIV

Patent Information

Application Number
CN202511043874.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-10-31
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

Existing technologies struggle to distinguish between real defects and optical artifacts on the surface of coated photovoltaic glass, leading to a high misjudgment rate and affecting the reliability of quality inspection results.

Method used

By acquiring reflection and transmission images of the photovoltaic glass surface under multi-band light sources, an optical artifact distribution map is generated using the coating layer interference feature library. Combined with polarization coherent light source and time-varying deconvolution filtering technology, interference effects and process noise are suppressed in the frequency domain space, achieving precise decoupling of defects and artifact elimination.

Benefits of technology

This has improved the accuracy of defect detection in coated photovoltaic glass, reduced the false positive rate, and quantified the risk of artifact residue through energy ratio, ensuring the detection rate of real defects and optimizing the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876437A_ABST
    Figure CN120876437A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic glass defect detection method and system based on image recognition, particularly relates to the technical field of visual inspection, and is used for solving the problem that defect recognition is interfered by optical artifacts caused by a film layer interference effect on the surface of coated glass. The method comprises the following steps: extracting interference characteristics through a reflection image to generate an optical artifact distribution diagram, positioning an interference region in a transmission image frequency domain space, constructing a process response template in combination with a sedimentary pulse frequency, and executing polarization coherence screening and time-varying deconvolution collaborative filtering to eliminate artifacts; based on energy ratio dynamic decision reinspection or defect classification process implementation, inherent optical noise and real physical defects of a material are effectively separated, and the accuracy and reliability of coated glass defect detection are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual inspection technology, and in particular to a method and system for detecting defects in photovoltaic glass based on image recognition. Background Technology

[0002] Visual inspection systems are widely used for automated quality inspection of surface defects in photovoltaic glass manufacturing. Current technologies typically employ high-resolution industrial cameras to acquire images of the glass surface, combined with image processing algorithms to identify defects such as scratches, cracks, and stains. For coated photovoltaic glass (such as anti-reflective coatings and anti-reflective coatings), production lines generally use imaging schemes in the visible light band, employing feature extraction and classification models to determine defects.

[0003] However, the interference effect caused by the optical properties of the coating on the surface of coated glass can create optical artifacts in the vision system that are highly similar to real defects (such as microcracks and pinholes). Existing detection methods have difficulty distinguishing between the inherent optical noise caused by such material properties and real physical defects, resulting in a significant increase in the misjudgment rate and directly affecting the reliability of the quality inspection results. Summary of the Invention

[0004] This invention addresses the technical problems existing in the prior art by providing a method and system for detecting defects in photovoltaic glass based on image recognition.

[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: This invention provides the following technical solution: Image recognition-based methods for detecting defects in photovoltaic glass include: S1. Acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; S2. Extract the interference feature map from the reflection image, and generate an optical artifact distribution map based on the pre-built coating layer interference feature library; S3. Add a polarization coherent light source to the transmission image and convert it to the frequency domain space. Locate the frequency domain interference region based on the optical artifact distribution map. Construct a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine. Perform polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. S4. Based on the interference image, extract the candidate region of the defect and combine it with the optical artifact distribution map to verify the artifact elimination of the candidate region of the defect and generate the verified defect region. S5. Calculate the energy percentage of the overlapping region between the defect region and the optical artifact distribution map in the frequency domain after verification. S6. If the energy proportion in the frequency domain exceeds the set threshold, a re-inspection is triggered; otherwise, the defect category and location are output according to the morphological and texture features of the defect area after verification.

[0006] Furthermore, reflectance and transmission images of the photovoltaic glass surface under multi-band light source illumination are acquired, including: The surface of the photovoltaic glass is irradiated with a multi-band light source containing a first band and a second band, wherein the first band is a specific band that easily excites the interference effect of the coating layer, and the second band is a specific band that penetrates the coating layer. The reflected image under the first band of illumination and the transmitted image under the second band of illumination are acquired simultaneously using an industrial camera. Pixel-level position calibration is performed on the reflected and transmitted images to ensure that the pixels in the reflected and transmitted images of the same surface area form a spatial coordinate mapping relationship.

[0007] Furthermore, interference feature maps are extracted from the reflection image, and optical artifact distribution maps are generated based on a pre-built interference feature library of the coating layer, including: Multi-scale fringe feature extraction is performed on the reflection image to obtain an interference feature map characterizing the interference intensity of the film layer; Call the pre-built coating layer interference feature library, which contains interference fringe templates of standard coating samples at different film thicknesses; The interference feature map is matched pixel by pixel with the interference fringe template in the coating layer interference feature library to identify the region in the reflection image formed by the coating layer interference effect; An optical artifact distribution map, spatially aligned with the reflected image, is generated based on the matching results.

[0008] Furthermore, the pixel values ​​of the optical artifact distribution map represent the confidence level of the artifact at the corresponding location.

[0009] Furthermore, a polarization-coherent light source is added to the transmission image and converted to the frequency domain. Frequency domain interference regions are located based on the optical artifact distribution map. A frequency domain response template for process fluctuations is constructed based on the deposition pulse frequency of the coating machine. Polarization coherence filtering and time-varying deconvolution collaborative filtering are performed in the frequency domain interference regions to generate an interference-free image, including: During the transmission image acquisition process, an additional coherent light source with adjustable linear polarization direction is used to illuminate the photovoltaic glass surface, wherein the polarization direction is dynamically adjusted according to the birefringence characteristics of the coating layer. A two-dimensional Fourier transform is performed on the transmitted image after adding a polarized coherent light source to generate the frequency domain space; The coupling region between material property noise and process noise in the frequency domain space is defined as the frequency domain interference region; Based on the time-varying characteristics of the deposition pulse frequency of the coating machine, a frequency domain response template reflecting the phase synchronization of process fluctuations is constructed. Calculate the polarization coherence of each frequency point within the frequency domain interference region, and retain the frequency points with polarization coherence below the dynamic threshold. The dynamic threshold is adaptively adjusted according to the birefringence of the film. A phase-synchronized time-varying deconvolution operation is performed on the reserved frequency points, where the deconvolution parameters are matched in real time to the current pulse period of the coating machine. The filtered frequency domain data is used to generate an interference-free image through inverse Fourier transform.

[0010] Furthermore, the coupling region between material property noise and process noise in the frequency domain space is located as the frequency domain interference region based on the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the coating layer interference feature library.

[0011] Furthermore, candidate defect regions are extracted based on the interferometric image, and the optical artifact distribution map is used to verify the candidate defect regions by eliminating artifacts, generating verified defect regions, including: Multi-scale edge detection processing is performed on the deinterference image to enhance the edge gradient features of real defects; Defect candidate regions are generated based on edge gradient features, and the morphological contour features of each defect candidate region are extracted. Based on the artifact confidence data of the optical artifact distribution map, the spatial overlap coefficient between the defect candidate region and the artifact region is calculated. When the spatial overlap coefficient exceeds the artifact exclusion threshold, the corresponding defect candidate region is determined to be an optical artifact interference region and is excluded. For defect candidate regions whose spatial overlap coefficient does not exceed the artifact exclusion threshold, secondary verification is performed by combining the frequency domain texture features of the optical artifact distribution map. The candidate defect regions that pass the secondary verification are merged into the verified defect regions, while retaining their original spatial coordinate information.

[0012] Furthermore, the energy percentage in the frequency domain of the overlapping region between the defect region and the optical artifact distribution map after verification is calculated, including: Based on the spatial coordinate mapping relationship between the verified defect area and the optical artifact distribution map, the spatial domain overlap area is determined. Map the overlapping regions in the spatial domain to the corresponding set of frequency domain coordinates in the frequency domain. Extract the amplitude spectrum data of the frequency domain coordinate set in the frequency domain space, and calculate the sum of squares of the corresponding amplitude spectrum data as the frequency domain energy value of the overlapping region; The sum of squares of the amplitude spectrum data at all frequency points in the entire frequency domain is calculated as the total frequency domain energy value. The energy percentage is obtained by dividing the frequency domain energy value of the overlapping region by the total frequency domain energy value.

[0013] Furthermore, if the energy proportion in the frequency domain exceeds a set threshold, a re-inspection is triggered; otherwise, the defect category and location are output based on the morphological and texture features of the verified defect area, including: When the energy percentage exceeds the set threshold, switch to a high-magnification optical lens to re-acquire the transmission image of the photovoltaic glass surface, reuse the generated optical artifact distribution map and process fluctuation frequency domain response template, and re-execute the polarization coherent light source addition and subsequent collaborative filtering steps to generate a high-precision interference-free image. Based on high-precision deinterference images, defect candidate region extraction and artifact elimination verification are performed to generate high-confidence verified defect regions; When the energy percentage does not exceed the set threshold, the frequency domain texture spectrum features of the verified defect region are extracted from the original deinterference image. After fusing the morphological contour features and frequency domain texture spectrum features of the defect region after verification, the defect category is determined by a defect classification model. The defect category is associated with the spatial location information of the defect area after verification, and the energy percentage value is recorded as a basis for quality traceability.

[0014] On the other hand, the present invention provides a photovoltaic glass defect detection system based on image recognition, comprising: The image acquisition module is used to acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; The artifact extraction module is used to extract interference feature maps from reflection images and generate optical artifact distribution maps based on a pre-built interference feature library of coating layers. The collaborative filtering module is used to add a polarization coherent light source to the transmission image and convert it to the frequency domain space. It locates the frequency domain interference region based on the optical artifact distribution map, constructs a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine, and performs polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. The defect verification module is used to extract candidate defect regions based on interference images and verify the candidate defect regions by combining optical artifact distribution maps to eliminate artifacts and generate verified defect regions. The energy calculation module is used to calculate the energy ratio of the overlapping region between the defect region and the optical artifact distribution map after verification in the frequency domain space. The decision output module is used to trigger a re-inspection if the energy proportion in the frequency domain exceeds a set threshold; otherwise, it outputs the defect category and location based on the morphological and texture features of the defect area after verification.

[0015] The beneficial effects of this invention are: 1. By establishing an interference feature library of the coating layer and generating an optical artifact distribution map, the inherent optical properties of the material and the real physical defects are accurately decoupled in the defect detection of photovoltaic glass. The interference feature map extracted from the reflection image and the frequency domain processing of the transmission image form a synergistic mechanism. Through polarization coherence screening and time-varying deconvolution technology, the interference effect of the coating layer and the noise of process fluctuations are directionally suppressed in the frequency domain interference region, eliminating the interference of optical artifacts on defect imaging. This breaks through the bottleneck of traditional visual inspection in the identification of artifacts on the surface of coated glass, and improves the signal-to-noise ratio of defect features in the deinterference image to a level that can be effectively identified.

[0016] 2. By quantitatively assessing the risk of artifact residue through energy ratio, a dynamic decision-making mechanism for defect verification was constructed. When the frequency domain energy is abnormal, a high-magnification re-inspection process is triggered, reusing existing optical artifact distribution maps and frequency domain templates to achieve efficient and accurate secondary verification. When the energy is normal, morphological and frequency domain texture features are fused to achieve multi-dimensional classification, which not only ensures the detection rate of real defects, but also avoids misjudgment caused by artifact interference in traditional methods. At the same time, the traceability analysis of the production process is realized through energy ratio recording, providing direct data support for the optimization of coating process. Attached Figure Description

[0017] Figure 1 This is a flowchart of the photovoltaic glass defect detection method based on image recognition according to the present invention; Figure 2 This is a schematic diagram of the photovoltaic glass defect detection system based on image recognition according to the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Example 1: Figure 1 The present invention provides a photovoltaic glass defect detection method based on image recognition, comprising: S1. Acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; S2. Extract the interference feature map from the reflection image, and generate an optical artifact distribution map based on the pre-built coating layer interference feature library; S3. Add a polarization coherent light source to the transmission image and convert it to the frequency domain space. Locate the frequency domain interference region based on the optical artifact distribution map. Construct a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine. Perform polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. S4. Based on the interference image, extract the candidate region of the defect and combine it with the optical artifact distribution map to verify the artifact elimination of the candidate region of the defect and generate the verified defect region. S5. Calculate the energy percentage of the overlapping region between the defect region and the optical artifact distribution map in the frequency domain after verification. S6. If the energy proportion in the frequency domain exceeds the set threshold, a re-inspection is triggered; otherwise, the defect category and location are output according to the morphological and texture features of the defect area after verification.

[0020] S1. Obtain reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination. The specific implementation is as follows: The photovoltaic glass surface is irradiated with a multi-band light source containing a first band and a second band. The first band is a specific band that easily excites the interference effect of the coating layer. The selected range of this band is, for example, 450 nm to 480 nm. This band range is determined based on the optical properties of the coating layer material. Specifically, it is obtained by measuring the contrast of interference fringes produced by standard coating samples irradiated with light sources of different wavelengths. The contrast of interference fringes is calculated as (maximum fringe brightness - minimum fringe brightness) ÷ (maximum fringe brightness + minimum fringe brightness) × 100%. When the wavelength of the light source is within this range, the contrast of interference fringes formed on the surface of the coating layer reaches its maximum value. The second band is a specific band that penetrates the coating layer. The selected range of this band is, for example, 700 nm to 750 nm. This range is determined by measuring the transmittance curve of the coating layer in the visible to infrared bands. The transmittance measurement is obtained by scanning the standard coating sample with a spectrophotometer across the entire band. When the wavelength is greater than 700 nm, the transmittance exceeds 95%.

[0021] The reflective image under the first band of illumination and the transmitted image under the second band of illumination are simultaneously acquired by an industrial camera. The industrial camera is a global shutter model and is installed directly above the photovoltaic glass, for example, 30 cm away, with the lens optical axis at an angle of 45 degrees to the normal of the glass surface. The reflective image is acquired by a coaxial light source in conjunction with a beam splitter, while the transmitted image is acquired by a backlight in conjunction with a diffuser. The simultaneous acquisition is controlled by a hardware trigger signal. The light source controller illuminates the light sources of both bands simultaneously on the rising edge of the trigger pulse, and the industrial camera exposes simultaneously on the falling edge of the trigger pulse. The exposure time is set to, for example, 5 milliseconds to ensure that the time difference between the acquisition of the reflective and transmitted images is less than 1 millisecond.

[0022] Pixel-level position calibration is performed on the reflected and transmitted images. A checkerboard calibration board is used to pre-establish a spatial coordinate mapping relationship. The specific operation is as follows: a standard checkerboard calibration board is placed on the photovoltaic glass, with a checkerboard size of, for example, 10 mm × 10 mm and a grid line width of 0.2 mm; reflected and transmitted images of the calibration board are acquired under the same light source conditions; the corner coordinates of the checkerboard in the two images are identified, and the set of corner coordinates identified in the reflected image is denoted as set A, and the set of corresponding corner coordinates in the transmitted image is denoted as set B; the affine transformation matrix is ​​solved using the least squares method to minimize the sum of squared errors in mapping set A to set B, with an error threshold of 0.3 pixels; the obtained affine transformation matrix is ​​applied to the actually acquired reflected and transmitted images, and bilinear interpolation transformation is performed on the transmitted image to ensure that the coordinates of any pixel in the reflected image deviate from the coordinates of the corresponding point in the transmitted image after matrix mapping by less than 0.5 pixels, ensuring that the pixels in the reflected image and the pixels in the transmitted image of the same surface area form a spatial coordinate mapping relationship.

[0023] The verification method for spatial coordinate mapping is as follows: Circular markers with a diameter of, for example, 1 mm are set on the surface of the photovoltaic glass. The center coordinates of these markers are extracted from both the reflected and transmitted images. The coordinate difference is calculated, and the root mean square error (RMSE) is statistically analyzed. When the RMSE is consistently below 0.5 pixels across multiple measurements, the position calibration is considered complete. In practical applications, the calibration board calibration process is periodically re-executed to compensate for mechanical drift in the optical system.

[0024] The multi-band light source is implemented using a dual-channel LED module. The first channel consists of an LED array with a peak wavelength of, for example, 460 nm, and the second channel consists of an LED array with a peak wavelength of, for example, 720 nm. Light source uniformity is ensured by optical diffusion elements, with light intensity fluctuations within the illumination area not exceeding 5%. Synchronous acquisition and control of the industrial camera are achieved through programmable logic circuits, with trigger signal jitter less than 10 microseconds. Bilinear interpolation calculations in pixel-level position calibration are implemented using fixed-point arithmetic.

[0025] The reflected and transmitted images are stored in a high-bit-depth raw format; spatial coordinate mapping data is stored in the form of a transformation matrix. When the photovoltaic glass production line speed changes, the exposure time is automatically adjusted according to the movement speed: exposure time = k / v, where k is a scaling factor and v is the movement speed. The scaling factor k is determined through calibration experiments, for example, testing within the range of 0.1 to 0.2 to select the optimal value that minimizes motion blur to less than 2 pixels. The light source intensity is adaptively adjusted according to the glass thickness. For example, when the glass thickness increases by 1 mm, the intensity of the first band of light source increases by 10%, and the intensity of the second band of light source increases by 8%, compensating for the light attenuation caused by the increased thickness.

[0026] The parameter adjustment range was determined experimentally. For example, the process for determining the exposure time ratio coefficient was as follows: multiple parameter values ​​were set within a preset range, images were acquired at different speeds and the blurriness was calculated, and the coefficient with the blurriness closest to the target value was selected as the final set value. During interference fringe contrast measurement, the standard coating samples included various known film thickness specifications, and the measurement environment temperature was controlled at 23±2℃, and the humidity at 50±5%RH. The calibration board corner point identification employed a sub-pixel accuracy algorithm, achieving an accuracy of 0.1 pixels. When solving the affine transformation matrix, the least squares iteration termination condition was set to the error change between two adjacent iterations being less than 0.01 pixels.

[0027] S2. Extract the interference feature map from the reflection image, and generate an optical artifact distribution map based on the pre-built interference feature library of the coating layer. The specific implementation is as follows: Multi-scale fringe feature extraction is performed on the reflected image to obtain an interference feature map characterizing the interference intensity of the film layer. The specific process includes: processing the reflected image using a multi-scale Gabor filter bank. The scale parameters of the filter bank are set according to the typical interference fringe width range of the photovoltaic glass coating layer, for example, selecting three scale parameters: 1.0 pixel, 2.0 pixel, and 4.0 pixel. The orientation parameters cover three directions: 0 degrees, 45 degrees, and 90 degrees to capture interference fringes with different orientations. The filter output amplitude value for each scale and orientation combination is taken as the maximum value among all scale and orientation combinations as the interference intensity value of that pixel, forming the interference feature map. The real part of the multi-scale Gabor filter is expressed as the product of a Gaussian function and a cosine function, and the imaginary part is the product of a Gaussian function and a sine function. The spatial constant of the Gaussian envelope function is determined according to the scale parameters; for example, when the scale parameter is 2.0 pixels, the spatial constant is set to 1.5 pixels.

[0028] The pre-constructed interference feature library for coated layers contains interference fringe templates of standard coated samples at different film thicknesses. The library construction process is as follows: a series of standard coated samples are prepared, with film thicknesses covering the actual film thickness tolerance range of photovoltaic glass production lines, for example, 80 nm to 120 nm, and multiple samples are prepared at 5 nm intervals; reflection images of each standard sample are acquired under the same light source conditions as actual testing; the same multi-scale fringe feature extraction operation is performed on each standard reflection image to obtain the corresponding interference feature map; the extracted interference feature maps are classified and stored as an interference fringe template library according to film thickness values. The film thickness values ​​of the standard coated samples are verified by ellipsometry measurement.

[0029] The interference feature map is matched pixel-by-pixel with interference fringe templates in the coating layer interference feature library. The matching process is as follows: For each pixel position in the interference feature map, the similarity between it and all interference fringe templates in the feature library at the same position is calculated. The similarity calculation adopts the normalized cross-correlation method, and the formula is the product of the covariance of the pixel values ​​within the local window of the two images divided by their respective standard deviations. The local window size is set to, for example, 11 pixels × 11 pixels. For each pixel position, the film thickness value of the interference fringe template with the highest similarity in the feature library is recorded, and the highest similarity value is used as the matching degree. When the highest similarity value exceeds a set threshold, it is determined that there is a coating layer interference effect at that position.

[0030] Based on the matching results, an optical artifact distribution map aligned with the spatial dimensions of the reflected image is generated. The generation method is as follows: a two-dimensional matrix with the same size as the reflected image is created as the optical artifact distribution map; for each pixel position in the image, if the matching degree value is within a set range, the artifact confidence is set as the matching degree value; the pixel value of the optical artifact distribution map directly represents the artifact confidence at the corresponding position, with a value range of 0 to 1.0.

[0031] The parameters of the multi-scale Gabor filter are set as follows: the scale parameter is determined by analyzing the spatial frequency distribution of interference fringes in historical images; the number of direction parameters is set according to the variation range of the coating direction on the production line; the window size in the normalized cross-correlation calculation is selected based on the average period of the interference fringes, obtained by measuring the statistical average of the fringe spacing of multiple sets of samples. The matching degree threshold is determined by collecting sample images containing known artifact regions, plotting the relationship curve between the matching degree value and the probability of artifact presence, and selecting the value at the inflection point of the curve as the threshold.

[0032] The interference feature library is updated periodically by adding standard coating sample data for the current batch, and reconstructing the complete feature library when the production line coating formula changes. Outlier handling during the matching process employs a neighborhood consistency check. For the matching result of a single pixel, the matching results of most pixels in its neighboring region are checked; if the difference exceeds a set tolerance, correction is performed. After the optical artifact distribution map is generated, morphological operations are performed to eliminate small holes and maintain the spatial continuity of the artifact area.

[0033] In practice, multi-scale Gabor filter calculations employ computational optimization methods; normalized cross-correlation calculations utilize acceleration techniques; and feature library data is stored using a spatial index structure to accelerate the template retrieval process. Spatial alignment of the optical artifact distribution map is achieved by directly reusing the spatial coordinate mapping relationship established in step S1.

[0034] Parameter validation methods include: validating the scale parameter using synthesized stripe images; validating the orientation parameter completeness using rotation tests. The reliability of the matching threshold is evaluated statistically. Optimization of the feature library sample size is based on learning curve analysis.

[0035] The interference feature map is stored in floating-point format; the optical artifact distribution map is output as a grayscale image. Real-time processing is ensured through parallel computing and instruction optimization. An environmental temperature compensation mechanism automatically adjusts filter parameters when temperature changes exceed a set range.

[0036] The process for determining the matching degree threshold of 0.7 is as follows: 200 sample images containing known artifact regions are collected, the matching degree distribution is statistically analyzed, and a threshold point is selected that achieves an artifact recognition accuracy of over 95% and a false positive rate of less than 5%. The local window size of 11 pixels × 11 pixels is set based on the fact that the average period of the interference fringes of 100 sets of samples is 10.5 pixels, and the closest odd value is taken as the window size. The design principle of the segmented mapping rule when generating the optical artifact distribution map is as follows: when the matching degree is below 0.7, no artifacts are considered; the confidence level is linearly mapped in the range of 0.7 to 0.9; and when it is above 0.9, it is considered a definite artifact. The morphological closing operation uses a 3-pixel × 3-pixel circular structural element to ensure smoothing of gaps smaller than 2 pixels. The feature library update cycle is set to monthly, based on the stability monitoring data of the production line coating process. The temperature compensation factor of 0.2% / ℃ is determined through comparative experiments in a constant temperature chamber: the feature extraction stability is tested at 1℃ intervals in the range of 20℃ to 30℃, and the required compensation amount is calculated.

[0037] S3. Add a polarization-coherent light source to the transmission image and convert it to the frequency domain. Locate the frequency domain interference region based on the optical artifact distribution map. Construct a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine. Perform polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. The specific implementation is as follows: During the transmission image acquisition process, an additional coherent light source with adjustable linear polarization direction illuminates the photovoltaic glass surface. The polarization direction is dynamically adjusted according to the birefringence characteristics of the coating layer. The specific implementation process includes: real-time acquisition of the birefringence parameter of the current coating layer, which is derived from the measured value recorded in the coating process database; rotation of the polarizer to the target angle by driving a stepper motor, where there is a quantitative relationship between the target angle and the birefringence. For example, when the birefringence is 0.005, the polarization direction is set to be at a 45-degree angle with the optical axis; the coherent light source uses a single-mode laser in conjunction with a beam shaper to form a uniform illumination field with a light field uniformity greater than 90%.

[0038] A two-dimensional Fourier transform is performed on the transmitted image after adding a polarized coherent light source to generate a frequency domain space. The specific operations are as follows: convert the transmitted image into a single-channel grayscale matrix; apply the Fast Fourier Transform algorithm to convert the spatial domain image into a frequency domain representation; the output result is a complex matrix containing real and imaginary components; the frequency domain space coordinate system has the image center as the origin, the horizontal axis corresponds to the spatial frequency u component, and the vertical axis corresponds to the spatial frequency v component.

[0039] Based on the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the coating layer interference feature library, the frequency domain interference region is located. Specifically, this involves: firstly, extracting pixel regions with artifact confidence scores higher than a set threshold from the optical artifact distribution map to form spatial domain artifact regions; secondly, converting the coordinates of the spatial domain artifact regions into frequency domain spatial coordinates through a pre-established spatial coordinate mapping relationship; and thirdly, obtaining the characteristic frequency band range of the current film thickness sample from the coating layer interference feature library. Finally, the frequency domain interference region is determined to be the intersection of the above-mentioned transformed coordinates and the characteristic frequency band, which represents the coupling effect of material property noise and process noise.

[0040] Based on the time-varying characteristics of the deposition pulse frequency of the coating machine, a frequency domain response template reflecting the phase synchronization of process fluctuations is constructed. The construction process is as follows: the current pulse frequency of the coating machine is obtained in real time through an industrial communication interface; the pulse period is calculated as the reciprocal of the frequency; the frequency domain response template function is defined as a complex exponential form, with its real part being a cosine function and its imaginary part being a sine function, and the function parameters include the pulse period variable; the template size is completely consistent with the dimension of the frequency domain space matrix.

[0041] The polarization coherence of each frequency point within the frequency domain interference region is calculated as follows: a local neighborhood window is taken with the target frequency point as the center; the standard deviation of the amplitude of each frequency point within the window is calculated; the amplitude of the center frequency point is calculated; the polarization coherence is equal to the standard deviation divided by the amplitude; the dynamic threshold is adaptively adjusted according to the birefringence parameter of the film layer, and the adjustment rule is: the basic threshold is set to 0.3, and the threshold is increased by 0.02 for every 0.001 increase in birefringence; frequency point data with polarization coherence lower than the dynamic threshold are retained.

[0042] The time-varying deconvolution operation with phase synchronization is performed on the retained frequency points. The specific steps are as follows: obtain the current pulse period from the coating machine in real time; construct the deconvolution kernel function, which is the reciprocal of the frequency domain response template function; perform dot multiplication on the complex data of the retained frequency points; the regularization coefficient in the deconvolution parameters is set according to the pulse period, for example, when the pulse period is less than 0.1 seconds, the coefficient is set to 0.01.

[0043] The filtered frequency domain data is transformed into an interference-free image through inverse Fourier transform. The transformation process includes: performing an inverse fast Fourier transform on the processed frequency domain complex matrix; extracting the real part of the transform result as spatial domain image data; performing grayscale normalization on the image data; and outputting the final interference-free image.

[0044] The dynamic threshold adjustment rule is determined based on: collecting frequency domain data of samples with different birefringences, analyzing the polarization coherence distribution characteristics of noise frequencies, and establishing a linear relationship model between the threshold and birefringence. The construction principle of the frequency domain response template is based on the phase modulation characteristics of process fluctuations in the frequency domain, and the template update cycle is synchronized with the pulse frequency sampling cycle.

[0045] The method for setting the deconvolution regularization coefficients is as follows: prepare multiple sets of test images containing known noise patterns, test the impact of different coefficient values ​​on the output image quality under different pulse period conditions, and select the optimal coefficients with the goal of maximizing the peak signal-to-noise ratio. The neighborhood window size is set to 3×3 pixels, which is determined by analyzing the typical noise frequency domain diffusion range.

[0046] The real-time data acquisition mechanism includes: the pulse frequency of the coating machine is transmitted via a standard industrial bus protocol, with a sampling frequency of 10 Hz; the birefringence parameter is automatically updated hourly from the process database. The anomaly handling strategy is as follows: when the pulse frequency acquired three times consecutively exceeds the normal range, the most recent valid value is used and an alarm signal is triggered.

[0047] In the calculation of polarization coherence, the amplitude is calculated using complex modular arithmetic, and the standard deviation is calculated using a fast iterative algorithm. The gray-level normalization method for the deinterference image is as follows: calculate the mean and standard deviation of the gray-level histogram of the original transmission image, and linearly map the gray-level of the output image to the range of mean ± 3 times the standard deviation.

[0048] The verification methods include: measuring the rate of change of spatial resolution of the interference-free image using a standard resolution test board; calculating the noise suppression rate using a uniformly coated area; and evaluating the accuracy of the frequency domain interference area positioning through manual annotation and comparison.

[0049] The logic for obtaining the birefringence parameter of the coating layer is as follows: Based on the current production batch number, the coating formula database is queried, and the historical measured average value of the birefringence corresponding to that formula is extracted. The wavelength of the coherent light source is selected as 532 nm, which is determined by testing the defect signal-to-noise ratio at different wavelengths.

[0050] The image boundary processing after inverse transform employs a symmetric extension strategy to avoid edge distortion. Complex number operations in the frequency domain data processing are accelerated using parallel computation that separates the real and imaginary parts. The final output derecognizant image retains the original spatial coordinate mapping relationship, ensuring data consistency with subsequent processing steps.

[0051] S4. Based on the interferometric image, extract the candidate defect region, and combine it with the optical artifact distribution map to verify the artifact elimination of the candidate defect region, generating the verified defect region. The specific implementation is as follows: Multi-scale edge detection processing is performed on the deinterference image to enhance the edge gradient features of real defects. The specific process includes: processing the deinterference image at three scales using the Laplacian-Gaussian operator, with scale parameters set to, for example, σ=0.8 pixels, σ=1.2 pixels, and σ=1.6 pixels; taking the absolute value of the convolution result at each scale and selecting the maximum value among the three scale results as the pixel edge intensity value; performing non-maximum suppression processing on the edge intensity image to retain local gradient maximum points; and finally generating an edge-enhanced image in which the gradient features of real defect edges are strengthened.

[0052] The defect candidate region is generated based on edge gradient features. The specific operation is as follows: adaptive threshold segmentation is performed on the edge enhancement image, and the threshold is set to 1.5 times the average gradient value of the image; connected component analysis is performed on the binary segmentation result, and each connected component is used as the initial defect candidate region; the morphological contour features of each defect candidate region are extracted, including area, perimeter, aspect ratio and seven Hu invariant moments, to form a feature vector.

[0053] Based on the artifact confidence data of the optical artifact distribution map, the spatial overlap coefficient between the defect candidate region and the artifact region is calculated. The calculation method is as follows: extract the pixel region with an artifact confidence greater than a set value (e.g., 0.7) in the optical artifact distribution map as the artifact region; calculate the number of pixels that intersect between the defect candidate region and the artifact region; spatial overlap coefficient = (number of intersecting pixels ÷ total number of pixels in the defect candidate region) × 100%.

[0054] When the spatial overlap coefficient exceeds the artifact exclusion threshold (e.g., 40%), the corresponding defect candidate region is determined to be an optical artifact interference region and excluded. This threshold is determined experimentally: collect known artifact and real defect sample regions, plot the relationship curve between spatial overlap coefficient and artifact probability, and select the coefficient value corresponding to the balance point between precision and recall.

[0055] For candidate defect regions whose spatial overlap coefficient does not exceed the artifact exclusion threshold, secondary verification is performed by combining the frequency domain texture features of the optical artifact distribution map. The specific steps are as follows: extract the image patch corresponding to the candidate defect region in the optical artifact distribution map; perform a two-dimensional Fourier transform on the image patch to extract the frequency domain texture feature vector, including radial energy distribution (divided into eight angular intervals), circumferential energy distribution (divided into five radius intervals), and frequency domain entropy value; input the feature vector into a pre-trained artifact classification model and output the artifact confidence score; when the score exceeds a set value (e.g., 0.6), it is determined to be an artifact region and excluded.

[0056] The defect candidate regions that pass the secondary verification are merged into verified defect regions. The process includes: performing non-maximum suppression on all retained regions, merging regions with an overlap rate exceeding a set value (e.g., 30%); retaining the original spatial coordinate information of the merged regions and recording it as a bounding box coordinate set.

[0057] The training method for the artifact classification model is as follows: prepare a labeled sample set (containing artifact and real defect regions); extract the frequency domain texture feature vector of each sample; train the model using a support vector machine classifier, with the radial basis function selected as the kernel function; and optimize the model parameters through cross-validation.

[0058] The spatial overlap coefficient calculation incorporates geometric correction: a 1-pixel morphological dilation process is applied to artifact regions to compensate for boundary positioning errors. The frequency domain feature extraction parameters in the secondary validation are optimized through principal component analysis to maximize feature discriminative power.

[0059] The defect candidate region merging rules include: regions with a spacing smaller than a set value (e.g., 5 pixels) are forcibly merged; regions with an area smaller than a set value (e.g., 25 pixels) are directly discarded. The edge detection scale parameters are determined by testing typical defect edge responses, and the parameter combination that maximizes the signal-to-noise ratio is selected.

[0060] Frequency domain texture feature extraction preprocesses by applying a Hanning window function to the image patches. The classification model output is converted to confidence scores using a probability calibration method. The final output, verified defect region data, includes bounding box coordinates, morphological contour feature vectors, and a verification pass flag; the data format is compatible with subsequent processing.

[0061] Dynamic adjustment mechanism for artifact removal threshold: When the coating process changes, samples are re-collected and the threshold curve is updated. Stability verification of morphological contour feature extraction: The coefficient of variation of Hu moments under rotation and translation transformations is less than 0.05. Real-time processing employs an edge detection acceleration algorithm and a frequency domain transform optimization library. Validation methods include measuring artifact removal accuracy, defect retention rate, and coordinate positioning accuracy.

[0062] S5. Calculate the energy percentage of the overlapping region between the defect region and the optical artifact distribution map in the frequency domain after verification. The specific implementation is as follows: Based on the spatial coordinate mapping relationship between the verified defect region and the optical artifact distribution map, the spatial domain overlapping region is determined. The specific process includes: reading the bounding box coordinate set from the verified defect region data, which is recorded in the format x_min, y_min, x_max, y_max; simultaneously obtaining the set of pixel coordinates in the optical artifact distribution map where the artifact confidence is greater than a set value, such as 0.7; using the spatial coordinate mapping relationship established in step S1, transforming the bounding box coordinates of the verified defect region to the coordinate system corresponding to the optical artifact distribution map; calculating the intersection region between the transformed bounding box and the artifact region coordinate set, which is the spatial domain overlapping region; assigning a unique identifier to each spatial domain overlapping region and recording the set of pixel coordinates it contains.

[0063] The spatial domain overlapping region is mapped to the corresponding frequency domain coordinate set in the frequency domain space. The mapping method is as follows: obtain the frequency domain spatial data generated in step S3 and its corresponding spatial frequency coordinate system; based on the scaling characteristics of Fourier transform, establish the mapping rule from spatial domain pixel coordinates (u,v) to frequency domain coordinates (x,y): x=u×(N / M), y=v×(N / M), where N is the frequency domain space size and M is the spatial domain image size; for each pixel coordinate (u,v) in the spatial domain overlapping region, apply the mapping rule to calculate the corresponding frequency domain coordinates (x,y); summarize the calculation results to form a frequency domain coordinate set, which is stored in the form of a two-dimensional array, with each row containing a frequency domain coordinate pair.

[0064] The amplitude spectrum data of the frequency domain coordinate set in the frequency domain space is extracted, and the sum of squares of the corresponding amplitude spectrum data is calculated as the frequency domain energy value of the overlapping region. The specific steps include: reading complex data from the frequency domain complex matrix generated in step S3 according to each coordinate (x,y) in the frequency domain coordinate set; calculating the amplitude for each complex data, which is the square root of the sum of the squares of the real part and the squares of the imaginary part; forming a sequence of amplitude data corresponding to each coordinate position; calculating the sum of squares of all amplitudes in the sequence, that is, the frequency domain energy value of the overlapping region is the sum of the squares of all amplitudes, where the summation range covers all coordinate points in the frequency domain coordinate set.

[0065] The total frequency domain energy value is calculated by summing the squares of the amplitude spectrum data of all frequency points in the entire frequency domain space. The calculation process is as follows: traverse the coordinates (x, y) of each frequency point in the frequency domain space; calculate the amplitude of each frequency point, which is the square root of the sum of the squares of the real part and the square of the imaginary part; calculate the sum of the squares of the amplitudes of all frequency points, that is, the total frequency domain energy value is the sum of the squares of all amplitudes, where the summation range covers all frequency points in the entire frequency domain space; the calculation process is optimized by using a block accumulation algorithm, which divides the frequency domain space into multiple sub-blocks, and calculates the partial sum of each sub-block independently before summing them up.

[0066] The energy percentage is obtained by dividing the frequency domain energy value of the overlapping region by the total frequency domain energy value. Specifically, the calculation is: Energy percentage = Frequency domain energy value of overlapping region ÷ Total frequency domain energy value. The calculation result is stored in floating-point form with precision retained to four decimal places. At the same time, the size of the frequency domain coordinate set and the total size of the frequency domain space used in the calculation process are recorded as auxiliary data.

[0067] The implementation details of the spatial coordinate mapping relationship include: when the spatial domain image size and the frequency domain matrix size are inconsistent, bilinear interpolation is used for coordinate mapping; a coordinate mapping lookup table is established to accelerate calculation, and the lookup table is updated at the beginning of each detection task. The amplitude calculation adopts the fast square root algorithm, and the calculation error is controlled within 0.1%.

[0068] Numerical stability measures in the energy value calculation process include: using the Kahan summation algorithm to reduce rounding errors during accumulation; and setting a lower limit threshold for the amplitude, such as 10⁻⁻⁶. 6 Amplitudes below this value are considered zero; 64-bit floating-point numbers are used for calculations in ultra-large frequency domain spaces. The storage of the frequency domain coordinate set adopts a run-length encoding compression algorithm, with a compression rate of over 50%.

[0069] The anomaly handling mechanism includes: when the spatial domain overlapping region is an empty set, the energy percentage is directly set to 0; when the total frequency domain energy value is zero, the energy percentage is set to an invalid value, such as -1.0, and an anomaly flag is recorded. Boundary condition processing: the spatial domain coordinates are smoothed by 1 pixel Gaussian to reduce mapping errors; when the frequency domain coordinates exceed the valid range, they are automatically truncated to the nearest boundary.

[0070] Real-time optimization measures include: using a pre-generated lookup table for frequency domain coordinate mapping; using SIMD instructions for parallel processing of amplitude calculation; and employing multi-threaded block calculation for energy summation, with the number of threads adaptively adjusted according to the number of CPU cores. The time complexity of the calculation process is O(n), where n is the size of the frequency domain coordinate set.

[0071] The verification methods include: creating a standard test image with a known frequency domain energy distribution, verifying that the energy percentage calculation error is less than 0.5%; and statistically analyzing the numerical stability of 1000 calculations, with a standard deviation of less than 0.1%. Auxiliary data records include timestamps, image identifiers, and calculation parameter version numbers.

[0072] Verification of the physical meaning of the energy percentage results: A reference table of typical energy percentage ranges for different defect types is established using a sample set of known defect types. For example, the energy percentage of crack defects is typically below 0.05, while that of bubble defects is between 0.05 and 0.15. Environmental adaptability of the calculation process: When the temperature change exceeds ±5℃, the amplitude calculation parameters are automatically recalibrated. The final output includes the energy percentage value, calculation status code, and quality assessment indicators.

[0073] Anti-aliasing in frequency domain coordinate mapping: Applying a Hanning window function to the spatial domain coordinates reduces spectral leakage. Frequency point selection during total frequency domain energy value calculation: Excluding DC components (0 frequency point) and points exceeding the Nyquist frequency improves calculation efficiency. Normalization of energy percentage values: Linearly mapping the results to the 0-1 range facilitates subsequent threshold determination. Historical data recording: Establishing an energy percentage log database to store the results of the most recent 1000 calculations for trend analysis.

[0074] S6. If the energy proportion in the frequency domain exceeds a set threshold, a re-inspection is triggered; otherwise, the defect category and location are output based on the morphological and texture features of the defect area after verification. The specific implementation is as follows: When the energy percentage exceeds a set threshold, a re-inspection process is triggered. The specific implementation process includes: setting the threshold to 0.15, which is determined by analyzing historical data, i.e., collecting multiple sets of samples to plot the relationship curve between energy percentage and artifact false detection rate, and selecting the value corresponding to the point where the false detection rate increases significantly; controlling the mechanical device to switch the optical lens from standard magnification to high magnification, for example, from 20x to 50x; re-acquiring the transmission image of the photovoltaic glass surface, increasing the resolution to 2.5 times that of the original image; reusing the generated optical artifact distribution map and adapting it to the high-resolution image through bicubic interpolation; reusing the process fluctuation frequency domain response template, keeping the template parameters unchanged; re-executing the polarization coherent light source additional operation, adjusting the light source intensity according to the imaging area ratio, for example, increasing the intensity to 2.5 times when the area is reduced to 1 / 2.5; and fully executing the collaborative filtering step to generate a high-precision interference-free image.

[0075] Based on high-precision deinterference image processing, defect candidate region extraction and artifact elimination verification are performed, specifically including: adopting a multi-scale edge detection method, adjusting the gradient detection threshold to 1.2 times the original value; adding curvature feature dimension to morphological contour feature extraction; using Gaussian pyramid upsampling for resolution adaptation of optical artifact distribution map; introducing sub-pixel precision correction in spatial overlap coefficient calculation; adjusting the window size of frequency domain texture feature extraction to 23 pixels × 23 pixels; and generating a high-confidence verified defect region.

[0076] When the energy percentage does not exceed the set threshold, the standard procedure is executed: extract the frequency domain texture spectrum features of the verified defect region from the original deinterference image. The extraction method is as follows: perform a two-dimensional Fourier transform on the minimum bounding rectangle of the defect region; calculate the logarithmic amplitude spectrum; divide the amplitude spectrum into 8×8 sub-blocks; extract the energy mean of each sub-block to form a 64-dimensional feature; add the full spectrum entropy value and centroid coordinate features to form a 67-dimensional feature vector.

[0077] The morphological contour features and frequency domain texture spectrum features are fused. Specifically, 10-dimensional morphological features, including 7 Hu invariant moments, area, perimeter, etc., are concatenated with 67-dimensional frequency domain features to form a 77-dimensional fused feature. Standardization is then performed, with the standardized parameters for each feature dimension derived from statistical values ​​in the training dataset.

[0078] The defect category is determined by a defect classification model. The model implementation includes: using a support vector machine multi-classifier, selecting the radial basis function as the kernel function; inputting a 77-dimensional fused feature vector, and outputting the confidence score of each category; the classification threshold is 0.7; the model is incrementally trained with new samples added every week.

[0079] The defect category is associated with the spatial location information and output in the following format: each defect region records the defect category number, bounding box coordinates, feature vector, and energy percentage; the spatial coordinate system is consistent with step S1; the data is encapsulated and transmitted in JSON format.

[0080] The method for determining the energy ratio threshold of 0.15 is as follows: the correlation between energy ratio and false detection rate in the historical data of the production line is statistically analyzed, and the corresponding ratio value is determined when the false detection rate exceeds 15%; the high-magnification lens switching is driven by a linear motor, with a positioning accuracy of ±0.01 mm; the light source intensity adjustment coefficient is calculated based on the inverse relationship between light intensity and imaging area.

[0081] Feature dimensionality reduction: Principal component analysis was performed on the 77-dimensional features, retaining principal components with a cumulative contribution rate of 95%; grid search method was used to optimize the classification model parameters. Piecewise linear calibration was used for classification confidence calibration.

[0082] Real-time processing measures: High-magnification imaging only targets the area surrounding the defect, for example, cropping a 200-pixel × 200-pixel range; frequency domain feature extraction uses a Fast Fourier Transform acceleration library. Boundary processing: Symmetrical extension filling is used for defect regions that cross image boundaries.

[0083] Quality traceability mechanism: Each record includes fields such as timestamp, location coordinates, and energy percentage; the database supports searching by energy percentage range. Verification method: Samples are randomly selected monthly for manual review, and classification accuracy is calculated.

[0084] Anomaly Handling: When the energy percentage is between 0.13 and 0.17, the standard and re-inspection processes are executed in parallel; when it exceeds 0.9, a system self-test is triggered. Environmental Adaptability: The light source is automatically recalibrated when the ambient light intensity changes by more than 20%.

[0085] Explanation of key features for defect classification: Output the decision-making criteria for each category. For example, the key features of a bubble defect are an energy value greater than 0.15 in a specific frequency domain sub-block and a roundness greater than 0.8. Spatial coordinate system transformation uses the S1 calibration matrix. The energy percentage value is recorded with a precision of 0.001.

[0086] Preprocessing for frequency domain texture spectral feature extraction: Gray-level normalization is performed on the defect region image to eliminate illumination differences. Feature standardization formula: Subtract the mean μ from each feature dimension and divide by the standard deviation σ, where μ and σ are derived from the training set statistics table. Principal component analysis retains the number of dimensions determined through cross-validation to ensure a classification accuracy of at least 95% on the test set.

[0087] Example 2: Figure 2 A schematic diagram of the photovoltaic glass defect detection system based on image recognition of the present invention is provided. The photovoltaic glass defect detection system based on image recognition includes: The image acquisition module is used to acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; The artifact extraction module is used to extract interference feature maps from reflection images and generate optical artifact distribution maps based on a pre-built interference feature library of coating layers. The collaborative filtering module is used to add a polarization coherent light source to the transmission image and convert it to the frequency domain space. It locates the frequency domain interference region based on the optical artifact distribution map, constructs a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine, and performs polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. The defect verification module is used to extract candidate defect regions based on interference images and verify the candidate defect regions by combining optical artifact distribution maps to eliminate artifacts and generate verified defect regions. The energy calculation module is used to calculate the energy ratio of the overlapping region between the defect region and the optical artifact distribution map after verification in the frequency domain space. The decision output module is used to trigger a re-inspection if the energy proportion in the frequency domain exceeds a set threshold; otherwise, it outputs the defect category and location based on the morphological and texture features of the defect area after verification.

[0088] All calculations involved in the embodiments are dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.

[0089] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.

[0090] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center containing one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0091] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0092] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0093] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0095] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0096] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0097] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A photovoltaic glass defect detection method based on image recognition, characterized in that, include: S1. Acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; S2. Extract the interference feature map from the reflection image, and generate an optical artifact distribution map based on the pre-built coating layer interference feature library; S3. Add a polarization coherent light source to the transmission image and convert it to the frequency domain space. Locate the frequency domain interference region based on the optical artifact distribution map. Construct a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine. Perform polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. S4. Based on the interference image, extract the candidate region of the defect and combine it with the optical artifact distribution map to verify the artifact elimination of the candidate region of the defect and generate the verified defect region. S5. Calculate the energy percentage of the overlapping region between the defect region and the optical artifact distribution map in the frequency domain after verification. S6. If the energy proportion in the frequency domain exceeds the set threshold, a re-inspection is triggered; otherwise, the defect category and location are output according to the morphological and texture features of the defect area after verification.

2. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, Acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination, including: The surface of the photovoltaic glass is irradiated with a multi-band light source containing a first band and a second band, wherein the first band is a specific band that easily excites the interference effect of the coating layer, and the second band is a specific band that penetrates the coating layer. The reflected image under the first band of illumination and the transmitted image under the second band of illumination are acquired simultaneously using an industrial camera. Pixel-level position calibration is performed on the reflected and transmitted images to ensure that the pixels in the reflected and transmitted images of the same surface area form a spatial coordinate mapping relationship.

3. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, Interference feature maps are extracted from the reflection image, and optical artifact distribution maps are generated based on a pre-built interference feature library of coating layers, including: Multi-scale fringe feature extraction is performed on the reflection image to obtain an interference feature map characterizing the interference intensity of the film layer; Call the pre-built coating layer interference feature library, which contains interference fringe templates of standard coating samples at different film thicknesses; The interference feature map is matched pixel by pixel with the interference fringe template in the coating layer interference feature library to identify the region in the reflection image formed by the coating layer interference effect; An optical artifact distribution map, spatially aligned with the reflected image, is generated based on the matching results.

4. The photovoltaic glass defect detection method based on image recognition according to claim 3, characterized in that, The pixel values ​​in the optical artifact distribution map represent the confidence level of the artifact at the corresponding location.

5. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, A polarization-coherent light source is added to the transmission image and converted to the frequency domain. Frequency domain interference regions are located based on the optical artifact distribution map. A frequency domain response template for process fluctuations is constructed based on the deposition pulse frequency of the coating machine. Polarization coherence screening and time-varying deconvolution collaborative filtering are performed in the frequency domain interference regions to generate an interference-free image, including: During the transmission image acquisition process, an additional coherent light source with adjustable linear polarization direction is used to illuminate the photovoltaic glass surface, wherein the polarization direction is dynamically adjusted according to the birefringence characteristics of the coating layer. A two-dimensional Fourier transform is performed on the transmitted image after adding a polarized coherent light source to generate the frequency domain space; The coupling region between material property noise and process noise in the frequency domain space is defined as the frequency domain interference region; Based on the time-varying characteristics of the deposition pulse frequency of the coating machine, a frequency domain response template reflecting the phase synchronization of process fluctuations is constructed. Calculate the polarization coherence of each frequency point within the frequency domain interference region, and retain the frequency points with polarization coherence below the dynamic threshold. The dynamic threshold is adaptively adjusted according to the birefringence of the film. A phase-synchronized time-varying deconvolution operation is performed on the reserved frequency points, where the deconvolution parameters are matched in real time to the current pulse period of the coating machine. The filtered frequency domain data is used to generate an interference-free image through inverse Fourier transform.

6. The photovoltaic glass defect detection method based on image recognition according to claim 5, characterized in that, The coupling region of material property noise and process noise in the frequency domain space is located as the frequency domain interference region based on the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the coating layer interference feature library.

7. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, Defect candidate regions are extracted based on interferometric images, and artifact elimination verification is performed on the defect candidate regions in conjunction with optical artifact distribution maps to generate verified defect regions, including: Multi-scale edge detection processing is performed on the deinterference image to enhance the edge gradient features of real defects; Defect candidate regions are generated based on edge gradient features, and the morphological contour features of each defect candidate region are extracted. Based on the artifact confidence data of the optical artifact distribution map, the spatial overlap coefficient between the defect candidate region and the artifact region is calculated. When the spatial overlap coefficient exceeds the artifact exclusion threshold, the corresponding defect candidate region is determined to be an optical artifact interference region and is excluded. For defect candidate regions whose spatial overlap coefficient does not exceed the artifact exclusion threshold, secondary verification is performed by combining the frequency domain texture features of the optical artifact distribution map. The candidate defect regions that pass the secondary verification are merged into the verified defect regions, while retaining their original spatial coordinate information.

8. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, The energy percentage of the overlapping region between the defect region and the optical artifact distribution map after verification in the frequency domain space is calculated, including: Based on the spatial coordinate mapping relationship between the verified defect area and the optical artifact distribution map, the spatial domain overlap area is determined. Map the overlapping regions in the spatial domain to the corresponding set of frequency domain coordinates in the frequency domain. Extract the amplitude spectrum data of the frequency domain coordinate set in the frequency domain space, and calculate the sum of squares of the corresponding amplitude spectrum data as the frequency domain energy value of the overlapping region; The sum of squares of the amplitude spectrum data at all frequency points in the entire frequency domain is calculated as the total frequency domain energy value. The energy percentage is obtained by dividing the frequency domain energy value of the overlapping region by the total frequency domain energy value.

9. The photovoltaic glass defect detection method based on image recognition according to claim 1, characterized in that, If the energy proportion in the frequency domain exceeds a set threshold, a re-inspection is triggered; otherwise, the defect category and location are output based on the morphological and texture features of the defect area after verification, including: When the energy percentage exceeds the set threshold, switch to a high-magnification optical lens to re-acquire the transmission image of the photovoltaic glass surface, reuse the generated optical artifact distribution map and process fluctuation frequency domain response template, and re-execute the polarization coherent light source addition and subsequent collaborative filtering steps to generate a high-precision interference-free image. Based on high-precision deinterference images, defect candidate region extraction and artifact elimination verification are performed to generate high-confidence verified defect regions; When the energy percentage does not exceed the set threshold, the frequency domain texture spectrum features of the verified defect region are extracted from the original deinterference image. After fusing the morphological contour features and frequency domain texture spectrum features of the defect region after verification, the defect category is determined by a defect classification model. The defect category is associated with the spatial location information of the defect area after verification, and the energy percentage value is recorded as a basis for quality traceability.

10. A photovoltaic glass defect detection system based on image recognition, used to implement the photovoltaic glass defect detection method based on image recognition as described in any one of claims 1-9, characterized in that, include: The image acquisition module is used to acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination; The artifact extraction module is used to extract interference feature maps from reflection images and generate optical artifact distribution maps based on a pre-built interference feature library of coating layers. The collaborative filtering module is used to add a polarization coherent light source to the transmission image and convert it to the frequency domain space. It locates the frequency domain interference region based on the optical artifact distribution map, constructs a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine, and performs polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate an interference-free image. The defect verification module is used to extract candidate defect regions based on interference images and verify the candidate defect regions by combining optical artifact distribution maps to eliminate artifacts and generate verified defect regions. The energy calculation module is used to calculate the energy ratio of the overlapping region between the defect region and the optical artifact distribution map after verification in the frequency domain space. The decision output module is used to trigger a re-inspection if the energy proportion in the frequency domain exceeds a set threshold; otherwise, it outputs the defect category and location based on the morphological and texture features of the defect area after verification.

Citation Information

Patent Citations

  • Glass fiber composite defect detecting method based on terahertz time-domain spectroscopy

    CN105044016A

  • Method for reconstructing low-dose image by using multi-scale feature perception depth network

    CN111899315A

  • Gas leakage detection device and detection method

    CN113176042A

  • Interferometric defect detection and classification

    US20110075151A1

Cited By

  • Gold core particle image generation method and system based on multi-scale feature comparison

    CN121120837A

  • Defect detection method and system based on honeycomb catalyst stacking

    CN121231494A

  • Aluminum alloy profile surface defect online identification system based on machine vision

    CN121599949A

  • Transformer abnormal state intelligent identification system

    CN121612888A

  • Film layer overflow detection method and device based on film interference imaging

    CN121904050A