Photovoltaic glass defect detection method and system based on image recognition
By employing multi-band image processing and frequency domain analysis techniques, the problem of distinguishing between real defects and optical artifacts on the surface of coated photovoltaic glass has been solved, enabling efficient and accurate defect detection and process optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2026-03-27
AI Technical Summary
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.
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. By combining polarization coherent light source and time-varying deconvolution filtering technology, interference effects and process noise are suppressed in the frequency domain space, defect regions are extracted and verified, and the actual defects are determined by energy ratio.
It achieves precise decoupling of photovoltaic glass defects, reduces the false judgment rate, improves the signal-to-noise ratio of detection, and quantitatively assesses the risk of artifact residue through energy ratio, ensuring efficient identification of defect features and traceability of production processes.
Smart Images

Figure CN120876437B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual inspection, in particular to a photovoltaic glass defect detection method and system based on image recognition. BACKGROUND
[0002] The visual inspection system is widely used in the automatic quality inspection of surface defects of photovoltaic glass manufacturing. The existing technology usually uses a high-resolution industrial camera to collect glass surface images, and combines image processing algorithms to identify defects such as scratches, cracks, and stains. For coated photovoltaic glass (such as anti-reflective film and anti-fogging film), the production line generally uses an imaging scheme in the visible light band to realize defect judgment through feature extraction and classification models.
[0003] However, the interference effect caused by the optical properties of the film layer on the surface of the coated glass will form optical artifacts in the visual system that are highly similar to real defects (such as micro-cracks and pinholes). The existing detection scheme cannot distinguish between inherent optical noise caused by material properties and real physical defects, resulting in a significant increase in misjudgment rate and directly affecting the reliability of the quality inspection results. SUMMARY
[0004] The present application provides a photovoltaic glass defect detection method and system based on image recognition to solve the technical problems in the prior art.
[0005] The technical solution of the present application to solve the above technical problems is as follows:
[0006] The present application provides the following technical solution:
[0007] The photovoltaic glass defect detection method based on image recognition comprises:
[0008] S1, acquiring reflection images and transmission images of the surface of the photovoltaic glass under illumination of multi-band light sources;
[0009] S2, extracting an interference feature map from the reflection images, and generating an optical artifact distribution map based on a pre-constructed coated layer interference feature library;
[0010] S3, adding a polarized coherent light source to the transmission images and converting them to a frequency domain space, locating a frequency domain interference region according to the optical artifact distribution map, constructing a process fluctuation frequency domain response template based on a deposition pulse frequency of a coating machine, and performing polarized coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate a de-interference image;
[0011] S4, extracting a defect candidate region based on the interference image, and verifying the defect candidate region for artifact exclusion based on the optical artifact distribution map to generate a verified defect region;
[0012] S5, calculating the energy proportion of the overlapping region of the verified defect region and the optical artifact distribution map in the frequency domain space.
[0013] S6, if the energy proportion of the frequency domain space exceeds a set threshold, triggering re-inspection, otherwise, according to the morphological features and texture features of the verified defect area, classifying and outputting the defect category and position.
[0014] Further, the reflection image and the transmission image of the photovoltaic glass surface under the irradiation of the multi-band light source are acquired, including:
[0015] The photovoltaic glass surface is irradiated by a multi-band light source containing a first band and a second band, wherein the first band is a specific band that can easily excite the interference effect of the coating layer, and the second band is a specific band that can penetrate the coating layer;
[0016] The reflection image under the irradiation of the first band and the transmission image under the irradiation of the second band are synchronously collected by an industrial camera;
[0017] The reflection image and the transmission image are subjected to pixel-level position calibration to ensure that the reflection image pixels and the transmission image pixels of the same surface region form a spatial coordinate mapping relationship.
[0018] Further, an interference feature map is extracted from the reflection image, and an optical artifact distribution map is generated based on a pre-constructed coating layer interference feature library, including:
[0019] The reflection image is subjected to multi-scale stripe feature extraction to obtain an interference feature map representing the interference intensity of the coating layer;
[0020] The pre-constructed coating layer interference feature library is called, which contains interference stripe templates of standard coating samples under different film thicknesses;
[0021] The interference feature map is matched with the interference stripe templates in the coating layer interference feature library pixel by pixel to identify the area in the reflection image formed by the interference effect of the coating layer;
[0022] Based on the matching result, an optical artifact distribution map spatially aligned with the reflection image is generated.
[0023] Further, the pixel value of the optical artifact distribution map represents the artifact confidence of the corresponding position.
[0024] Further, the transmission image is additionally irradiated by a polarized coherent light source and converted to a frequency domain space, the frequency domain interference area is located according to the optical artifact distribution map, the process fluctuation frequency domain response template is constructed based on the deposition pulse frequency of the coating machine, the polarized coherence degree screening and time-varying deconvolution collaborative filtering are performed in the frequency domain interference area to generate a de-interference image, including:
[0025] During the transmission image acquisition process, the photovoltaic glass surface is irradiated by a coherent light source with adjustable linear polarization direction, wherein the polarization direction is dynamically adjusted according to the birefringence characteristics of the coating layer;
[0026] performing two-dimensional Fourier transform on the transmission image after the additional polarized coherent light source generates a frequency domain space;
[0027] locating a coupling region of material characteristic noise and process noise in the frequency domain space as a frequency domain interference region;
[0028] 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;
[0029] Calculate the polarization coherence of each frequency point in the frequency domain interference region, and retain the frequency points with polarization coherence lower than the dynamic threshold, and the dynamic threshold is adaptively adjusted according to the birefringence of the film layer;
[0030] Performing time-varying deconvolution operation on the retained frequency points with phase synchronization, wherein the deconvolution parameters are real-time matched with the current pulse period of the coating machine;
[0031] The filtered frequency domain data is converted into a de-interference image through inverse Fourier transform.
[0032] Further, the coupling region of material characteristic noise and process noise in the frequency domain space is located as the frequency domain interference region according to the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the film interference feature library.
[0033] Further, based on the interference image, a defect candidate region is extracted, and the artifact exclusion verification is performed on the defect candidate region combined with the optical artifact distribution map to generate a verified defect region, including:
[0034] Performing multi-scale edge detection processing on the de-interference image to enhance the edge gradient features of the real defects;
[0035] Based on the edge gradient features, a defect candidate region is generated, and the morphological contour features of each defect candidate region are extracted;
[0036] According to the artifact confidence data of the optical artifact distribution map, the spatial overlap coefficient of the defect candidate region and the artifact region is calculated;
[0037] When the spatial overlap coefficient exceeds the artifact exclusion threshold, it is determined that the corresponding defect candidate region is an optical artifact interference region and is excluded;
[0038] For the defect candidate region whose spatial overlap coefficient does not exceed the artifact exclusion threshold, secondary verification is performed combined with the frequency domain texture features of the optical artifact distribution map;
[0039] The defect candidate regions that pass the secondary verification are merged into the verified defect region, and the original spatial coordinate information is retained.
[0040] 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:
[0041] 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.
[0042] Map the overlapping regions in the spatial domain to the corresponding set of frequency domain coordinates in the frequency domain.
[0043] 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;
[0044] 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.
[0045] The energy percentage is obtained by dividing the frequency domain energy value of the overlapping region by the total frequency domain energy value.
[0046] 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:
[0047] 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.
[0048] Based on high-precision deinterference images, defect candidate region extraction and artifact elimination verification are performed to generate high-confidence verified defect regions;
[0049] 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.
[0050] 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.
[0051] 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.
[0052] On the other hand, the present invention provides a photovoltaic glass defect detection system based on image recognition, comprising:
[0053] The image acquisition module is used to acquire reflection and transmission images of the photovoltaic glass surface under multi-band light source illumination;
[0054] An artifact extraction module is configured to extract an interference feature map from the reflection image, and generate an optical artifact distribution map based on a pre-constructed interference feature library of the coated layer;
[0055] A collaborative filtering module is configured to attach a polarized coherent light source to the transmission image and convert it to a frequency domain space, locate a frequency domain interference region according to the optical artifact distribution map, construct a process fluctuation frequency domain response template based on a deposition pulse frequency of the coating machine, and perform polarized coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate a de-interference image.
[0056] A defect verification module is configured to extract a defect candidate region based on the interference image, and perform artifact exclusion verification on the defect candidate region in combination with the optical artifact distribution map to generate a verified defect region.
[0057] An energy calculation module is configured to calculate an energy proportion of an overlapping region of the verified defect region and the optical artifact distribution map in the frequency domain space.
[0058] A decision output module is configured to trigger re-inspection if the energy proportion in the frequency domain space exceeds a set threshold, or output a defect category and position according to morphological features and texture features of the verified defect region.
[0059] The present application has the following advantages:
[0060] 1. By establishing an interference feature library of the coated layer and generating an optical artifact distribution map, the material inherent optical characteristics and the real physical defects are accurately decoupled in the photovoltaic glass defect detection, a collaborative mechanism is formed by using the interference feature map extracted from the reflection image and the frequency domain processing of the transmission image, the film layer interference effect and the process fluctuation noise are directionally suppressed in the frequency domain interference region through polarized coherence screening and time-varying deconvolution technology, the interference of optical artifacts on defect imaging is eliminated, the recognition bottleneck of the surface artifacts of the coated glass in the traditional visual detection is broken, and the signal-to-noise ratio of the defect features in the de-interference image is improved to an effective recognition level.
[0061] 2. The energy proportion is used to quantitatively evaluate the artifact residual risk, a dynamic decision-making mechanism for defect verification is constructed, a high-power re-inspection process is triggered when the frequency domain energy is abnormal, and the existing optical artifact distribution map and the frequency domain template are reused to realize efficient and accurate secondary verification; when the energy is normal, multi-dimensional classification is realized by fusing morphological and frequency domain texture features, not only the detection rate of real defects is ensured, but also the misjudgment caused by artifact interference in the traditional method is avoided, and the traceability analysis of the production process is realized through the energy proportion record, thereby providing direct data support for the optimization of the coating process. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 A flowchart of the photovoltaic glass defect detection method based on image recognition of the present application;
[0063] Figure 2 A structure diagram of a photovoltaic glass defect detection system based on image recognition of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0065] Embodiment 1 Figure 1 The photovoltaic glass defect detection method based on image recognition of the present application is given, which comprises:
[0066] S1, acquiring reflection images and transmission images of a photovoltaic glass surface under illumination of a multi-band light source;
[0067] S2, extracting an interference feature map from the reflection images, and generating an optical artifact distribution map based on a pre-constructed interference feature library of a coating layer;
[0068] S3, adding a polarized coherent light source to the transmission images and converting them to a frequency domain space, positioning a frequency domain interference area according to the optical artifact distribution map, constructing a process fluctuation frequency domain response template based on a deposition pulse frequency of a coating machine, and performing polarized coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference area to generate a de-interference image;
[0069] S4, extracting a defect candidate area based on the interference image, and verifying the defect candidate area by excluding artifacts in combination with the optical artifact distribution map to generate a verified defect area;
[0070] S5, calculating an energy proportion of an overlapping area of the verified defect area and the optical artifact distribution map in the frequency domain space;
[0071] S6, if the energy proportion in the frequency domain space exceeds a set threshold, triggering re-inspection, otherwise, classifying and outputting a defect category and a position according to morphological features and texture features of the verified defect area.
[0072] S1, acquiring reflection images and transmission images of a photovoltaic glass surface under illumination of a multi-band light source, which is implemented as follows:
[0073] The surface of the photovoltaic glass is irradiated by a multi-band light source comprising a first wave band and a second wave band, wherein the first wave band is a specific wave band that can easily trigger the interference effect of the coating layer, the wave band range is for example 450 nm to 480 nm, and the wave band range is determined according to the optical properties of the coating layer material, specifically by measuring the interference fringe contrast generated by irradiating a standard coating sample with light sources of different wavelengths, and the calculation method of the interference fringe contrast is (fringe maximum brightness-fringe minimum brightness) ÷ (fringe maximum brightness+fringe minimum brightness) × 100%, when the wavelength of the light source is in the range, the interference fringe contrast formed on the surface of the coating layer reaches the maximum value; the second wave band is a specific wave band that can penetrate the coating layer, the wave band range is for example 700 nm to 750 nm, and the range is determined by measuring the transmittance curve of the coating layer in the visible to infrared wave band, and the transmittance is measured by scanning the standard film sample with a spectrophotometer in the full wave band, and when the wavelength is greater than 700 nm, the transmittance is more than 95%.
[0074] The reflected image under the first wave band irradiation and the transmitted image under the second wave band irradiation are synchronously collected by an industrial camera, the industrial camera adopts a global shutter type, is installed directly above the photovoltaic glass, for example, at a distance of 30 cm, and the angle between the lens optical axis and the normal line of the glass surface is 45 degrees; the collection of the reflected image is realized by a coaxial light source cooperating with a beam splitter, and the collection of the transmitted image is realized by a backlight source cooperating with a diffuser; the synchronous collection is controlled by a hardware trigger signal, the light source controller turns on the light sources of the two wave bands at the rising edge of the trigger pulse, and the industrial camera exposes at the falling edge of the trigger pulse, and the exposure time is set to for example 5 ms, so as to ensure that the time difference between the collection of the reflected image and the transmitted image is less than 1 ms.
[0075] Pixel-level position calibration is performed on the reflected image and the transmitted image, and a chessboard calibration board is used to pre-establish a spatial coordinate mapping relationship, and the specific operation is as follows: a standard chessboard calibration board is placed on the photovoltaic glass, the size of the chessboard is for example 10 mm × 10 mm, and the grid line width is 0.2 mm; the reflected image and the transmitted image of the calibration board are collected under the same light source condition; the corner point coordinates in the two images are recognized, the recognized corner point coordinate set in the reflected image is recorded as set A, and the corresponding corner point coordinate set in the transmitted image is recorded as set B; an affine transformation matrix is solved by the least square method, so that the matrix satisfies the minimum error square sum of mapping set A to set B, and the error threshold is set to 0.3 pixels; the obtained affine transformation matrix is applied to the actually collected reflected image and transmitted image, and a bilinear interpolation transformation is performed on the transmitted image, so that the coordinate deviation between any pixel point in the reflected image and the corresponding point in the transmitted image after matrix mapping is less than 0.5 pixels, and the spatial coordinate mapping relationship between the reflected image pixel points and the transmitted image pixel points in the same surface region is ensured.
[0076] The verification method of the spatial coordinate mapping relationship is: a circular mark point with a diameter of, for example, 1 mm is arranged on the surface of the photovoltaic glass, the center coordinates of the mark point in the reflection image and the transmission image are extracted respectively, the coordinate difference value is calculated, and the root mean square error is counted, when the root mean square error is less than 0.5 pixels in continuous multiple measurement results, it is determined that the position calibration is completed. In actual application, the calibration plate calibration process is periodically re-executed to compensate for the mechanical drift of the optical system.
[0077] The specific implementation of the multi-band light source adopts a double-channel LED module, the first band channel is composed of an LED array with a peak wavelength of, for example, 460 nm, and the second band channel is composed of an LED array with a peak wavelength of, for example, 720 nm; the light source uniformity is ensured by an optical diffusion element, and the light intensity fluctuation amplitude in the irradiation area is not more than 5%. The synchronous acquisition control of the industrial camera is realized through programmable logic circuit, and the trigger signal jitter is less than 10 microseconds. The bilinear interpolation calculation in the pixel-level position calibration is realized by fixed-point operation.
[0078] The storage of the reflection image and the transmission image adopts a high-bit-depth original format; the spatial coordinate mapping relationship data is stored in the form of a transformation matrix. When the production line speed of the photovoltaic glass changes, the exposure time is automatically adjusted according to the motion speed: exposure time=k / v, wherein k is a proportional coefficient, v is a motion speed, the proportional coefficient k is determined through a calibration experiment, for example, the best value that makes the motion blur less than 2 pixels is selected in the range of 0.1 to 0.2. The light source intensity is adaptively adjusted according to the glass thickness, for example, when the glass thickness increases by 1 mm, the first band light source intensity is increased by 10%, and the second band light source intensity is increased by 8%, to compensate for the light attenuation caused by the increase in thickness.
[0079] The parameter adjustment range is determined through experiments, for example, the determination process of the exposure time proportional coefficient is: multiple parameter values are set in a preset interval, images under different speeds are collected, and the blur degree is calculated, and the coefficient closest to the target value is selected as the final set value. When measuring the interference fringe contrast, the standard coated sample contains multiple known film thickness specifications, the measurement environment temperature is controlled at 23±2℃, and the humidity is controlled at 50±5%RH. The corner point recognition of the calibration plate adopts a sub-pixel accuracy algorithm, and the recognition accuracy reaches 0.1 pixels. When solving the affine transformation matrix, the least square method iteration termination condition is set to be that the error change amount of adjacent two iterations is less than 0.01 pixels.
[0080] S2, extract the interference feature map from the reflection image, and generate an optical artifact distribution map based on a pre-constructed coated layer interference feature library, the specific implementation is as follows:
[0081] The multi-scale fringe feature extraction is performed on the reflection image to obtain an interference feature map representing the interference intensity of the film layer. The specific process includes: using a multi-scale Gabor filter set to process the reflection image, the scale parameters of the filter set are set according to the typical interference fringe width range of the photovoltaic glass film layer, for example, three scale parameters of 1.0 pixel, 2.0 pixel and 4.0 pixel are selected; the direction parameters cover 0 degree, 45 degree and 90 degree three directions to capture interference fringes of different orientations; the filter output amplitude value of each scale and direction combination is taken as the maximum value in all scale and direction combinations as the interference intensity value of the pixel point to form the interference feature map. The real part function expression of the multi-scale Gabor filter is the product of the Gaussian function and the cosine function, and the imaginary part is the product of the Gaussian function and the sine function, wherein the spatial constant of the Gaussian envelope function is determined according to the scale parameter, for example, when the scale parameter is 2.0 pixel, the spatial constant is set to 1.5 pixel.
[0082] The pre-constructed film layer interference feature library includes interference fringe templates of standard film samples at different film thicknesses, and the feature library construction process is: preparing a series of standard film samples, the film thickness range covers the actual film thickness tolerance range of the photovoltaic glass production line, for example, 80 nanometers to 120 nanometers, and multiple samples are prepared at intervals of 5 nanometers; the reflection images of each standard sample are collected under the same light source conditions as the actual detection; 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 stored as interference fringe template library according to the film thickness values. The film thickness value of the standard film sample is measured and verified by an ellipsometer.
[0083] The interference feature map is matched with the interference fringe templates in the film layer interference feature library pixel by pixel, and the matching process is: for each pixel position in the interference feature map, the similarity of the same position in all interference fringe templates in the feature library is calculated; the similarity calculation adopts the normalized cross-correlation method, and the formula is the covariance of the pixel values in the local window of the two images divided by the product of the standard deviations; the local window size is set to, for example, 11 pixels x 11 pixels; for each pixel position, the film thickness value of the interference fringe template with the highest similarity in the feature library and the highest similarity value are recorded as the matching degree. When the highest similarity value exceeds the set threshold, it is determined that there is an interference effect of the film layer at this position.
[0084] Based on the matching result, an optical artifact distribution map spatially aligned with the reflection image is generated, and the generation method is: creating a two-dimensional matrix with the same size as the reflection image as the optical artifact distribution map; for each pixel position in the image, if the matching degree value is within the set range, the artifact confidence is set to the matching degree value; the pixel value of the optical artifact distribution map directly represents the artifact confidence of the corresponding position, and the numerical range is 0 to 1.0.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] The determination process with a matching degree threshold of 0.7 is: 200 sample images containing known artifact regions are collected, the matching degree distribution is counted, and the threshold point that makes the artifact recognition accuracy reach more than 95% and the misjudgment rate be less than 5% is selected. The setting basis of the local window size of 11 pixels x 11 pixels is: the average period of 100 groups of sample interference fringes is 10.5 pixels, and the nearest odd value is taken as the window size. The design principle of the segmentation mapping rule when generating the optical artifact distribution map is: when the matching degree is less than 0.7, it is determined that there is no artifact; the confidence degree is linearly mapped in the interval of 0.7 to 0.9; and it is considered as a determined artifact when it is higher than 0.9. The morphological closing operation selects a 3-pixel x 3-pixel circular structural element to ensure that gaps smaller than 2 pixels can be smoothed. The feature library update period is set to be monthly, which is based on the production line coating process stability monitoring data. The determination of the temperature compensation factor of 0.2% / °C is obtained through the comparison experiment in the thermostat: test the feature extraction stability every 1°C interval in the interval of 20°C to 30°C, and calculate the required compensation amount.
[0091] S3, a polarized coherent light source is added to the transmission image and converted to a frequency domain space, the frequency domain interference region is located according to the optical artifact distribution map, a process fluctuation frequency domain response template is constructed based on the deposition pulse frequency of the coating machine, and polarized coherence screening and time-varying deconvolution collaborative filtering are performed in the frequency domain interference region to generate a de-interference image, which is implemented as follows:
[0092] A linearly polarized direction adjustable coherent light source is added to irradiate the photovoltaic glass surface during the transmission image acquisition process, wherein the polarization direction is dynamically adjusted according to the birefringence characteristics of the coating layer, and 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; the polarization plate is rotated to the target angle by a stepping motor, and the target angle has a quantitative relationship with the birefringence, for example, when the birefringence is 0.005, the polarization direction is set to be 45 degrees with the optical axis; the coherent light source uses a single-mode laser to cooperate with a beam shaper to form a uniform illumination field, and the light field uniformity is greater than 90%.
[0093] A two-dimensional Fourier transform is performed on the transmission image after the addition of the polarized coherent light source to generate a frequency domain space, and the specific operation is: the transmission image is converted into a single-channel gray matrix; the spatial domain image is converted into a frequency domain representation by using a fast Fourier transform algorithm; the output result is a complex matrix, including real and imaginary parts; the frequency domain space coordinate system takes 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.
[0094] According to the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the coating layer interference feature library, a frequency domain interference region is located, specifically including: first, extracting a pixel region with a confidence level of an artifact higher than a set threshold in the optical artifact distribution map to form a spatial domain artifact region; converting the spatial domain artifact region coordinates into frequency domain spatial coordinates through a pre-established spatial coordinate mapping relationship; simultaneously, obtaining the characteristic frequency band range of the current film thickness sample from the coating layer interference feature library; finally, determining the frequency domain interference region as the intersection region of the converted coordinates and the characteristic frequency band, which represents the coupling effect of material characteristic noise and process noise.
[0095] 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, and the construction process is: 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 inverse of the frequency; the frequency domain response template function is defined as a complex exponential form, the real part is a cosine function, and the imaginary part is 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.
[0096] The polarization coherence of each frequency point in the frequency domain interference region is calculated, and the calculation method is: taking a local neighborhood window centered on the target frequency point; calculating the standard deviation of the amplitude of each frequency point in the window; calculating the amplitude of the center frequency point; the polarization coherence is equal to the standard deviation divided by the amplitude; the dynamic threshold is adjusted adaptively 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 each increase of 0.001 of the birefringence; the frequency point data with a polarization coherence lower than the dynamic threshold is retained.
[0097] The time-varying deconvolution operation of phase synchronization is performed on the retained frequency points, and the specific steps are: the current pulse period is obtained in real time from the coating machine; a deconvolution kernel function is constructed, and the kernel function is the inverse of the frequency domain response template function; point multiplication operation is performed on the complex data of the retained frequency points; the regularization coefficient in the deconvolution parameter is set according to the pulse period, for example, when the pulse period is less than 0.1 second, the coefficient is set to 0.01.
[0098] The filtered frequency domain data is converted into a de-interference image through inverse Fourier transform, and the conversion process includes: performing inverse fast Fourier transform on the processed frequency domain complex matrix; extracting the real part matrix of the conversion result as spatial domain image data; performing gray scale normalization processing on the image data, and outputting the final de-interference image.
[0099] The determination basis of the dynamic threshold adjustment rule is: collecting frequency domain data of different birefringence samples, analyzing the polarization coherence distribution characteristics of noise frequency points, and establishing a linear relationship model between the threshold and the 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 period is synchronized with the pulse frequency sampling period.
[0100] The setting method of the deconvolution regularization coefficient is: preparing a plurality of groups of test images containing known noise patterns, testing the influence of different coefficient values on the output image quality under different pulse period conditions, and selecting the optimal coefficient by maximizing the peak signal-to-noise ratio. The size of the neighborhood window is set to 3*3 pixels, which is determined by analyzing the typical noise frequency domain diffusion range.
[0101] The real-time data acquisition mechanism includes: the pulse frequency of the coating machine is transmitted through a standard industrial bus protocol, and the sampling frequency is 10 Hz; the birefringence parameter is automatically updated from the process database every hour. The abnormal processing strategy is: when the pulse frequency obtained for three times continuously exceeds the normal range, the latest valid value is enabled and an alarm signal is triggered.
[0102] The amplitude calculation in the polarization coherence calculation uses complex modulus operation, and the standard deviation calculation uses a fast iteration algorithm. The gray scale normalization method of the deinterference image is: calculating the mean and standard deviation of the gray scale histogram of the original transmission image, and linearly mapping the output image gray scale to the range of mean ± 3 times standard deviation.
[0103] The verification method includes: measuring the spatial resolution variation rate of the deinterference image through a standard resolution test board; calculating the noise suppression rate through a uniform coating area; and evaluating the positioning accuracy of the frequency domain interference area by manual annotation comparison.
[0104] The acquisition logic of the birefringence parameter of the coating layer is: querying the coating formula database according to the current production batch number, and extracting the historical measured average value of the birefringence corresponding to the formula. The wavelength of the coherent light source is selected as 532 nm, which is determined by testing the defect signal-to-noise ratio under different wavelengths.
[0105] The image boundary processing after inverse transformation adopts a symmetric extension strategy to avoid edge distortion. The complex number operation in the frequency domain data processing process adopts parallel calculation acceleration of separating real and imaginary parts. The final output deinterference image retains the original spatial coordinate mapping relationship, ensuring data connection with subsequent processing steps.
[0106] S4, based on the interference image, extracting a defect candidate region, and combining an optical artifact distribution map to verify the artifact exclusion of the defect candidate region, generating a verified defect region, and the specific implementation is as follows:
[0107] A multi-scale edge detection process is performed on the de-interfered image to enhance the edge gradient features of the real defects, and the specific process includes: a Laplace-Gaussian operator is used to process the de-interfered image in three scales, and the scale parameters are set to be, for example, σ=0.8 pixels, σ=1.2 pixels and σ=1.6 pixels; the absolute values of the convolution results of each scale are taken, and the maximum value among the three scale results is selected as the pixel edge intensity value; a non-maximum suppression process is performed on the edge intensity image to retain the local gradient maximum points; and finally an edge-enhanced image is generated, in which the gradient features of the real defect edges are strengthened.
[0108] Based on the edge gradient features, a defect candidate region is generated, and the specific operation is: performing adaptive threshold segmentation on the edge-enhanced image, and the threshold is set to be 1.5 times the average gradient value of the image; performing connected component analysis on the binary segmentation result, and each connected component is used as an initial defect candidate region; extracting the morphological contour features of each defect candidate region, including area, perimeter, aspect ratio and seven Hu invariant moments, to form a feature vector.
[0109] According to the optical artifact distribution map, the spatial overlap coefficient of the defect candidate region and the artifact region is calculated, and the calculation method is: in the optical artifact distribution map, the pixel region with an artifact confidence greater than a set value (for example, 0.7) is extracted as an artifact region; the number of pixels intersected by the defect candidate region and the artifact region is calculated; and the spatial overlap coefficient=(number of intersected pixels ÷ total number of pixels in the defect candidate region)×100%.
[0110] When the spatial overlap coefficient exceeds the artifact exclusion threshold (for example, 40%), it is determined that the corresponding defect candidate region is an optical artifact interference region and is excluded; the threshold is determined through experiments: collect known artifact and real defect sample regions, draw a spatial overlap coefficient-artifact probability relationship curve, and select the coefficient value corresponding to the balance point of the precision rate and recall rate.
[0111] For the defect candidate region whose spatial overlap coefficient does not exceed the artifact exclusion threshold, a secondary verification is performed in combination with the frequency domain texture features of the optical artifact distribution map, and the specific steps are: extracting the image block corresponding to the position of the defect candidate region in the optical artifact distribution map; performing two-dimensional Fourier transform on the image block to extract a frequency domain texture feature vector, including radial energy distribution (divided into eight angle intervals), ring energy distribution (divided into five radius intervals) and frequency domain entropy value; inputting the feature vector into a pre-trained artifact classification model to output an artifact confidence score; and when the score exceeds a set value (for example, 0.6), determining that it is an artifact region and excluding it.
[0112] The defect candidate regions that pass the secondary verification are merged into verified defect regions, and the processing includes: performing non-maximum suppression on all retained regions, and merging the regions with an overlap rate exceeding a set value (for example, 30%); retaining the original spatial coordinate information of the merged regions, and recording it as a bounding box coordinate set.
[0113] The training method of the artifact classification model is: preparing a labeled sample set (containing artifacts and real defect regions); extracting the frequency domain texture feature vector of each sample; using a support vector machine classifier to train the model, and selecting a radial basis function as the kernel function; and optimizing the model parameters through cross-validation.
[0114] The spatial overlap coefficient calculation increases the geometric correction: performing a 1-pixel morphological dilation process on the artifact region to compensate for the boundary positioning error. The frequency domain feature extraction parameters in the secondary verification are optimized through principal component analysis to maximize the feature discrimination.
[0115] The defect candidate region merging rule includes: regions with a distance less than a set value (e.g., 5 pixels) are forced to merge; regions with an area less than a set value (e.g., 25 pixels) are directly excluded. The edge detection scale parameter is determined by testing the typical defect edge response, and the parameter combination that maximizes the signal-to-noise ratio is selected.
[0116] The frequency domain texture feature extraction performs preprocessing: applying a Hanning window function to the image block. The classification model output is converted into a confidence score using a probability calibration method. The final output of the verified defect region data includes: boundary box coordinates, morphological contour feature vectors, verification pass flag, and data format compatible with subsequent processing.
[0117] Dynamic adjustment mechanism of artifact exclusion threshold: when the coating process is changed, re-collect samples to update the threshold curve. Stability verification of morphological contour feature extraction: the coefficient of variation of Hu moments under rotation and translation transformation is less than 0.05. Real-time processing uses edge detection acceleration algorithm and frequency domain transformation optimization library. The verification method includes measuring the artifact exclusion accuracy, defect retention rate and coordinate positioning accuracy.
[0118] S5, calculate the energy proportion of the overlap area between the verified defect region and the optical artifact distribution map in the frequency domain space, which is implemented as follows:
[0119] According to the spatial coordinate mapping relationship between the verified defect region and the optical artifact distribution map, the spatial domain overlap region is determined, and the specific process includes: reading the boundary box coordinate set from the verified defect region data, which is recorded in the format of x_min, y_min, x_max, y_max; simultaneously obtaining the pixel coordinate set of the optical artifact distribution map with a confidence greater than a set value, for example, 0.7; using the spatial coordinate mapping relationship established in step S1, converting the boundary box coordinates of the verified defect region to the corresponding coordinate system of the optical artifact distribution map; calculating the intersection area of the converted boundary box and the artifact region coordinate set, which is the spatial domain overlap region; assigning a unique identifier to each spatial domain overlap region and recording its included pixel coordinate set.
[0120] Mapping the spatial domain overlapping region to the corresponding set of frequency domain coordinates in the frequency domain space, the mapping method is: obtaining the frequency domain space data generated in S3 step and its corresponding spatial frequency coordinate system; according to the scale zooming characteristics of Fourier transform, the mapping rule of spatial domain pixel coordinates (u, v) to frequency domain coordinates (x, y) is established: x = u × (N / M), y = v × (N / M), wherein N is the size of the frequency domain space, and M is the size of the spatial domain image; for each pixel coordinate (u, v) of the spatial domain overlapping region, the corresponding frequency domain coordinate (x, y) is calculated by applying the mapping rule; the calculation results are summarized to form a set of frequency domain coordinates, which is stored in the form of a two-dimensional array, and each row contains a pair of frequency domain coordinates.
[0121] Extracting the amplitude spectrum data of the set of frequency domain coordinates in the frequency domain space, and calculating the square sum of the corresponding amplitude spectrum data as the frequency domain energy value of the overlapping region, the specific steps comprising: reading the complex number data from the frequency domain complex number matrix generated in S3 step according to each coordinate (x, y) in the set of frequency domain coordinates; calculating the amplitude of each complex number data, which is the square root of the square of the real part plus the square of the imaginary part; forming a sequence of amplitude data corresponding to each coordinate position; calculating the square sum of all amplitudes in the sequence, that is, the square sum of all amplitudes in the sequence, wherein the sum range covers all coordinate points in the set of frequency domain coordinates.
[0122] Calculating the square sum of the amplitude spectrum data of all frequency points in the entire frequency domain space as the total frequency domain energy value, the calculation process is: traversing each frequency point coordinate (x, y) in the frequency domain space; calculating the amplitude of each frequency point, which is the square root of the square of the real part plus the square of the imaginary part; calculating the square sum of all frequency point amplitudes, that is, the square sum of all amplitudes, wherein the sum range covers all frequency points in the entire frequency domain space; using a block accumulation algorithm to optimize the calculation process, dividing the frequency domain space into multiple sub-blocks, and calculating the partial sum of each sub-block independently and then summarizing.
[0123] Dividing the overlapping region frequency domain energy value by the total frequency domain energy value to obtain the energy proportion, the specific calculation is: energy proportion = overlapping region frequency domain energy value ÷ total frequency domain energy value; the calculation result is stored in the form of a floating point number, and the precision is retained to four decimal places; at the same time, the size of the set of frequency domain coordinates used in the calculation process and the total size of the frequency domain space are recorded as auxiliary data.
[0124] The implementation details of the spatial coordinate mapping relationship include: when the spatial domain image size and the frequency domain matrix size are inconsistent, the coordinate mapping is processed by using bilinear interpolation; a coordinate mapping lookup table is established to speed up the calculation, and the lookup table is updated every time the detection task starts. The amplitude calculation uses a fast square root algorithm, and the calculation error is controlled within 0.1%.
[0125] 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%.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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:
[0132] The re-inspection process is triggered when the energy ratio exceeds a set threshold, and the specific implementation process includes: setting the threshold value to 0.15, which is determined by analyzing historical data, that is, collecting multiple sets of samples to draw the energy ratio versus artifact misclassification rate relationship curve, and selecting the value corresponding to the point where the misclassification rate rises significantly; control the mechanical device to switch the optical lens from the standard magnification to the high magnification, for example, from 20 times to 50 times; reacquire the photovoltaic glass surface transmission image, the resolution is increased to 2.5 times of the original image; reuse the generated optical artifact distribution map, and adapt the high-resolution image through bicubic interpolation; reuse the process fluctuation frequency domain response template, keeping the template parameters unchanged; re-execute the polarization coherent light source additional operation, the light source intensity is adjusted according to the imaging area ratio, for example, when the area is reduced to 1 / 2.5, the intensity is increased to 2.5 times; complete the cooperative filtering step to generate a high-precision de-interference image.
[0133] Based on the high-precision de-interference image, the defect candidate region extraction and artifact exclusion verification are performed, specifically including: using a multi-scale edge detection method, the gradient detection threshold is adjusted to 1.2 times the original value; the curvature feature dimension is added to the morphological contour feature extraction; the resolution of the optical artifact distribution map is adapted using Gaussian pyramid upsampling; sub-pixel accuracy correction is introduced into the spatial overlap coefficient calculation; the window size for frequency domain texture feature extraction is adjusted to 23 pixels x 23 pixels; and a high-confidence verified defect region is generated.
[0134] When the energy ratio does not exceed the set threshold, the standard process is executed: the frequency domain texture spectrum features of the verified defect region are extracted from the original de-interference image, the extraction method is: performing two-dimensional Fourier transform on the minimum circumscribed rectangle of the defect region; calculating the logarithmic amplitude spectrum; dividing the amplitude spectrum into 8x8 sub-blocks; extracting the energy mean value of each sub-block to form a 64-dimensional feature; adding the full spectrum entropy value and the barycenter coordinate feature to form a 67-dimensional feature vector.
[0135] The morphological contour features and the frequency domain texture spectrum features are fused, and the specific operation is: the 10-dimensional morphological features including 7 Hu invariant moments, area, and perimeter are spliced with the 67-dimensional frequency domain features to form a 77-dimensional fusion feature; standardization processing is performed, and the standardization parameters of each feature dimension come from the statistical values of the training data set.
[0136] The defect category is determined through a defect classification model, and the model implementation includes: using a support vector machine multi-classifier, and selecting a radial basis function as the kernel function; inputting the 77-dimensional fusion feature vector and outputting the confidence of each category; the classification judgment threshold is 0.7; the model is incrementally trained with new samples every week.
[0137] The defect category and spatial position information are associated and output, and the output format is: each defect region records the defect category number, the bounding box coordinates, the feature vector, and the energy ratio value; the spatial coordinate system is consistent with step S1; and the data is transmitted through JSON format encapsulation.
[0138] The determination method of the energy proportion threshold 0.15: the corresponding relationship between the energy proportion and the false detection rate in the production line historical data is counted, and when the false detection rate exceeds 15%, the corresponding proportion value is obtained; the high-magnification lens switching adopts a linear motor drive, and the positioning accuracy reaches ±0.01 millimeter; the light source intensity adjustment coefficient is calculated according to the inverse proportional relationship between the light intensity and the imaging area.
[0139] Feature dimension reduction processing: principal component analysis is performed on 77-dimensional features, and principal components with a cumulative contribution rate of 95% are retained; the grid search method is used for classification model parameter optimization. The segmented linear calibration method is used for classification confidence calibration.
[0140] Real-time processing measures: high-magnification imaging is only for the peripheral area of the defect, for example, a 200 pixel x 200 pixel range is cropped; the fast Fourier transform acceleration library is used for frequency domain feature extraction. Boundary processing: the defect area across the image boundary is filled by symmetric continuation.
[0141] Quality traceability mechanism: each record contains fields such as time stamp, position coordinates and energy proportion; the database supports energy proportion interval retrieval. Verification method: samples are extracted monthly for manual review, and the classification accuracy is calculated.
[0142] Abnormal processing: when the energy proportion is in the interval of 0.13 to 0.17, the standard and re-inspection processes are executed in parallel; when it exceeds 0.9, the system self-check is triggered. Environmental adaptability: when the environmental light intensity changes by more than 20%, the light source is automatically recalibrated.
[0143] Defect classification key feature explanation: the decision basis feature item of each category is output, for example, the key feature of a bubble defect is that the specific frequency domain sub-block energy value is greater than 0.15 and the circularity is greater than 0.8. The S1 calibration matrix is used for spatial coordinate system conversion. The energy proportion numerical record precision is 0.001.
[0144] Preprocessing of frequency domain texture spectrum feature extraction: gray scale normalization is performed on the defect area image to eliminate light differences. Fusion feature standardization formula: each feature dimension is subtracted by the mean μ and divided by the standard deviation σ, where μ and σ come from the training set statistics table. The number of principal component analysis dimensions is determined through cross-validation to ensure that the test set classification accuracy is not less than 95%.
[0145] Example 2 Figure 2 The structure diagram of the photovoltaic glass defect detection system based on image recognition is given, and the photovoltaic glass defect detection system based on image recognition comprises:
[0146] An image acquisition module is configured to acquire reflection images and transmission images of a photovoltaic glass surface under illumination of multi-band light sources.
[0147] An artifact extraction module is configured to extract an interference feature map from the reflection image, and generate an optical artifact distribution map based on a pre-constructed interference feature library of the coating layer;
[0148] A collaborative filtering module is configured to attach a polarized coherent light source to the transmission image and convert it to a frequency domain space, locate a frequency domain interference region according to the optical artifact distribution map, construct a process fluctuation frequency domain response template based on a deposition pulse frequency of the coating machine, and perform polarized coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference region to generate a de-interference image.
[0149] A defect verification module is configured to extract a defect candidate region based on the interference image, and perform artifact exclusion verification on the defect candidate region in combination with the optical artifact distribution map to generate a verified defect region.
[0150] An energy calculation module is configured to calculate an energy proportion of an overlapping region of the verified defect region and the optical artifact distribution map in the frequency domain space.
[0151] A decision output module is configured to trigger re-inspection if the energy proportion in the frequency domain space exceeds a set threshold, and otherwise output a defect category and position according to morphological features and texture features of the verified defect region.
[0152] In the embodiments, all calculations are de-dimensioned to obtain numerical values, and preset parameters and threshold values in the calculations are set by a person skilled in the art according to actual conditions.
[0153] It should be noted that the present application can be deployed in a device itself to realize embedded applications, or run on a PC terminal or other terminal with a user interface, thereby meeting various hardware environments and use requirements.
[0154] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of 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, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wireless or wired transmission. The wired transmission includes optical fiber, twisted pair, coaxial cable, etc. The wireless transmission includes infrared, microwave, etc. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0155] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and module can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0156] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0157] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, which can be located in one place or distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.
[0158] In addition, each functional module in the various embodiments of the present application can be integrated in one processing module, or each module can exist physically independently, or two or more modules can be integrated in one module.
[0159] If the functions are implemented in the form of 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 solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0160] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0161] Finally, the above is only the preferred embodiments of the present application, and is not used to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting defects in photovoltaic glass based on image recognition, characterized in that, The method comprises the following steps: S1, acquiring a reflection image and a transmission image of a photovoltaic glass surface under illumination of a multi-band light source; S2, extracting an interference feature map from the reflection image, and generating an optical artifact distribution map based on a pre-constructed coated layer interference feature library, comprising: performing multi-scale fringe feature extraction on the reflection image to obtain an interference feature map representing the interference intensity of the coating layer; calling the pre-constructed coated layer interference feature library, which contains interference fringe templates of standard coated samples under different film thicknesses; performing pixel-by-pixel matching between the interference feature map and the interference fringe templates in the coated layer interference feature library to identify the area in the reflection image formed by the interference effect of the coated layer; generating an optical artifact distribution map that is spatially aligned with the reflection image based on the matching results; S3, adding a polarized coherent light source to the transmission image and converting it to a frequency domain space, locating the frequency domain interference area according to the optical artifact distribution map, constructing a process fluctuation frequency domain response template based on the deposition pulse frequency of the coating machine, and performing polarized coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference area to generate a de-interference image, comprising: During the transmission image acquisition process, a coherent light source with adjustable linear polarization direction is used to irradiate the photovoltaic glass surface, and the polarization direction is dynamically adjusted according to the birefringence characteristics of the coated layer; performing two-dimensional Fourier transform on the transmission image after adding the polarized coherent light source to generate a frequency domain space; locating the coupling area of material characteristic noise and process noise in the frequency domain space as the frequency domain interference area; 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 degree of each frequency point in the frequency domain interference area, and retain the frequency points with polarization coherence degree lower than the dynamic threshold, which is adaptively adjusted according to the birefringence of the film layer; Performing phase-synchronous time-varying deconvolution operation on the retained frequency points, wherein the deconvolution parameters are matched in real time with the current pulse period of the coating machine; Convert the filtered frequency domain data to a de-interference image through inverse Fourier transform; S4, extracting defect candidate regions based on the de-interference image, and verifying the defect candidate regions by excluding artifacts in combination with the optical artifact distribution map to generate verified defect regions; S5, calculating the energy proportion of the overlapping area of the verified defect region and the optical artifact distribution map in the frequency domain space; S6, if the energy proportion in the frequency domain space exceeds a certain threshold, trigger re-inspection, otherwise, classify and output the defect category and position according to the morphological features and texture features of the verified defect region.
2. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, Acquiring a reflection image and a transmission image of a photovoltaic glass surface under illumination of a multi-band light source, comprising: using a multi-band light source containing a first waveband and a second waveband to irradiate the photovoltaic glass surface, wherein the first waveband is a specific waveband that easily excites the interference effect of the coated layer, and the second waveband is a specific waveband that penetrates the coated layer; synchronously collecting the reflection image under the first waveband and the transmission image under the second waveband by an industrial camera; performing pixel-level position calibration on the reflection image and the transmission image to ensure that the pixel points of the reflection image and the pixel points of the transmission image of the same surface region form a spatial coordinate mapping relationship.
3. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, The pixel value of the optical artifact distribution map represents the artifact confidence of the corresponding position.
4. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, The coupling area of material characteristic noise and process noise in the frequency domain space is located as a frequency domain interference area according to the spatial coordinate mapping relationship of the optical artifact distribution map and the frequency domain response characteristics of the coating layer interference feature library.
5. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, Based on the de-interference image, the defect candidate area is extracted, and the artifact exclusion verification is performed on the defect candidate area combined with the optical artifact distribution map to generate a verified defect area, including: Performing multi-scale edge detection processing on the de-interference image to enhance the edge gradient features of the real defects; Based on the edge gradient features, the defect candidate area is generated, and the morphological contour features of each defect candidate area are extracted; According to the artifact confidence data of the optical artifact distribution map, the spatial overlap coefficient of the defect candidate area and the artifact area is calculated; When the spatial overlap coefficient exceeds the artifact exclusion threshold, it is determined that the corresponding defect candidate area is an optical artifact interference area and is excluded; For the defect candidate area whose spatial overlap coefficient does not exceed the artifact exclusion threshold, secondary verification is performed combined with the frequency domain texture features of the optical artifact distribution map; The defect candidate areas that pass the secondary verification are merged into the verified defect area, and the original spatial coordinate information is retained.
6. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, The energy proportion of the overlapping area of the verified defect area and the optical artifact distribution map in the frequency domain space is calculated, including: According to the spatial coordinate information of the verified defect area and the spatial coordinate mapping relationship of the optical artifact distribution map, the spatial domain overlapping area is determined; The spatial domain overlapping area is mapped to the corresponding frequency domain coordinate set in the frequency domain space; The amplitude spectrum data of the frequency domain coordinate set in the frequency domain space is extracted, and the square sum of the corresponding amplitude spectrum data is calculated as the frequency domain energy value of the overlapping area; The square sum of the amplitude spectrum data of all frequency points in the entire frequency domain space is calculated as the total frequency domain energy value; The energy proportion is obtained by dividing the frequency domain energy value of the overlapping area by the total frequency domain energy value.
7. The image recognition based photovoltaic glass defect detection method according to claim 1, characterized in that, If the energy proportion in the frequency domain space exceeds the set threshold, reexamination is triggered, otherwise, according to the morphological features and texture features of the verified defect area, the defect category and position are classified and output, including: When the energy proportion exceeds the set threshold, switch to a high-power optical lens to reacquire the transmission image of the photovoltaic glass surface, reuse the generated optical artifact distribution map and process fluctuation frequency domain response template, and reexecute the polarization coherent light source addition and subsequent collaborative filtering steps to generate a high-precision de-interference image; Based on the high-precision de-interference image, the defect candidate area extraction and artifact exclusion verification are performed to generate a high-confidence verified defect area; When the energy proportion does not exceed the set threshold, the frequency domain texture spectrum features of the verified defect area are extracted from the original de-interference image; Fusing the morphological contour features and the frequency domain texture spectrum features of the verified defect area, the defect category is determined through a defect classification model; The defect category and the spatial position information of the verified defect area are associated and output, and the energy proportion value is recorded as the quality trace basis.
8. A photovoltaic glass defect detection system based on image recognition for implementing the photovoltaic glass defect detection method based on image recognition according to any one of claims 1 to 7, characterized in that, Including: An image acquisition module for acquiring reflection images and transmission images of a photovoltaic glass surface under illumination of multi-band light sources; An artifact extraction module for extracting an interference feature map from the reflection image, and generating an optical artifact distribution map based on a pre-constructed coating layer interference feature library; A collaborative filtering module is configured to attach a polarization coherent light source to the transmission image and convert to a frequency domain space, locate a frequency domain interference area according to an optical artifact distribution map, construct a process fluctuation frequency domain response template based on a deposition pulse frequency of a coating machine, perform polarization coherence screening and time-varying deconvolution collaborative filtering in the frequency domain interference area, and generate a de-interference image; A defect verification module is configured to extract a defect candidate area based on the de-interference image, and perform artifact exclusion verification on the defect candidate area in combination with the optical artifact distribution map, and generate a verified defect area; An energy calculation module is configured to calculate an energy proportion of an overlapping area between the verified defect area and the optical artifact distribution map in the frequency domain space; A decision output module is configured to trigger a re-inspection if the energy proportion in the frequency domain space exceeds a set threshold, or otherwise output a defect category and position according to a morphological feature and a texture feature of the verified defect area.
Citation Information
Patent Citations
Glass fiber composite defect detecting method based on terahertz time-domain spectroscopy
CN105044016A
Interferometric defect detection and classification
US20110075151A1