A photovoltaic module surface defect detection method based on image processing

By combining multi-threshold segmentation and Hough transform, the diversity and shadow interference problems of photovoltaic module grid line break detection are solved, efficient and accurate grid line break identification is achieved, and detection accuracy and robustness are improved.

CN120235880BActive Publication Date: 2025-09-12XIAN BOAO POWER ENG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510724387.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

The diversity of photovoltaic module grid line fracture morphologies and the interference of shadows on the module surface result in low efficiency and poor accuracy of traditional detection methods, making it difficult to meet the rapid inspection needs of large-scale photovoltaic power stations.

Method used

A method combining multi-threshold segmentation and Hough transform is adopted to analyze the changes in the brightness curve of highlight points through skeleton extraction and Hough space transformation, identify the broken grid defects of photovoltaic modules, use cluster analysis to screen the optimal threshold, and locate the broken area in combination with topological connectivity.

Benefits of technology

It significantly improves the detection accuracy and robustness of photovoltaic module grid line breakage defects, overcomes the sensitivity to uneven lighting, avoids false detection, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235880B_ABST
    Figure CN120235880B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology, and specifically relates to a method for detecting surface defects of photovoltaic modules based on image processing. The method comprises: segmenting the grayscale image to be detected of the photovoltaic module surface using different thresholds within a threshold range to obtain multiple binary images, performing skeleton extraction on each binary image to obtain several skeleton images, converting each skeleton image into a Hough space, determining the segmentation effect of the binary image corresponding to the target skeleton image based on the position distribution of the highlight points corresponding to the target skeleton image in the Hough space, drawing a brightness curve based on the brightness distribution of the highlight points corresponding to the target skeleton image in the Hough space, determining the defect probability of the highlight points based on the change in the brightness of the highlight points in the brightness curve and the segmentation effect, and then identifying the photovoltaic module grid line breakage defect. The present invention accurately identifies the fine grid line breakage defect of the photovoltaic module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically, to a method for detecting surface defects of photovoltaic modules based on image processing. Background Art

[0002] During long-term operation, photovoltaic modules are susceptible to factors such as environmental stress, mechanical loads and material aging, which causes their structural integrity to gradually deteriorate. This degradation process is often accompanied by the generation of various defects, among which the breakage of the cell grid line is one of the typical defects.

[0003] In photovoltaic modules, the grid lines serve as a critical conductive structure for current collection, and their integrity directly impacts the module's power generation performance. A broken grid line can hinder carrier transport, triggering localized current concentration and potentially causing adverse effects such as hot spot effects or output power degradation. In severe cases, this can even lead to permanent module failure. Traditional manual inspection methods are inefficient and rely heavily on experience. While electroluminescence testing offers high accuracy, it requires offline operation and carries high equipment costs, making it difficult to meet the rapid inspection needs of large-scale photovoltaic power plants.

[0004] To address these issues, automated detection technology based on image processing has become a research hotspot in the field of photovoltaic module defect detection. However, in practical applications, due to the diverse morphologies of gridline fractures (including microcracks, intermittent fractures, and other types), coupled with interference factors such as shadows on the module surface, defect signatures can easily be confused with background noise, thus affecting the accuracy of gridline fracture detection.

[0005] Therefore, there is an urgent need for an image processing method that can adapt to complex working conditions and take into account both accuracy and real-time performance to detect grid line fractures in photovoltaic modules. Summary of the Invention

[0006] To address the technical issues of the diversity of photovoltaic module gridline fracture morphologies and the impact of shadow interference on the accuracy of gridline fracture detection, the present invention provides a photovoltaic module surface defect detection method based on image processing, comprising:

[0007] The method comprises the following steps: obtaining an area to be detected in a grayscale image of the surface of a photovoltaic module; segmenting the area to be detected using different thresholds to obtain multiple binary images; performing skeleton extraction on each binary image to obtain several skeleton images; converting each skeleton image into the Hough space; taking any skeleton image as a target skeleton image, and determining the segmentation effect of the binary image corresponding to the target skeleton image based on the position distribution of the highlight points corresponding to the target skeleton image in the Hough space; drawing a brightness curve based on the brightness distribution of the highlight points corresponding to the target skeleton image in the Hough space; determining the defect probability of the highlight points based on the change in the brightness of the highlight points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image; and identifying the grid line break defect of the photovoltaic module based on the defect probability of each highlight point.

[0008] The present invention significantly improves the detection accuracy and robustness of photovoltaic module grid line fracture defects through the collaborative analysis of multi-threshold segmentation and Hough transform. The multi-threshold segmentation strategy effectively overcomes the sensitivity of the traditional single-threshold method to uneven lighting, ensuring that defect areas of different contrasts can be completely extracted; based on the skeletonized Hough space transformation, the photovoltaic grid lines are converted into a distribution of highlight points, and by analyzing their position aggregation and brightness curve changes, a quantitative assessment of fracture defects is achieved; the defect probability of the highlight points is dynamically determined based on the segmentation effect of the binary image corresponding to the target skeleton image, which not only avoids false detection due to over-segmentation, but also solves the problem of insufficient sensitivity of traditional edge detection methods to microcracks. While maintaining a high detection efficiency, the present invention has excellent recognition capabilities for fractures in the grid lines on the surface of photovoltaic modules.

[0009] Preferably, the method for obtaining the different thresholds is: taking any grayscale value appearing in the area to be detected as a candidate threshold, using the Otsu threshold segmentation method to calculate the inter-class variance under the candidate threshold, and taking the candidate threshold size and the inter-class variance to constitute the characteristic value of the candidate threshold; clustering all grayscale values ​​according to the characteristic values ​​of all grayscale values ​​in the area to be detected, and dividing the grayscale values ​​into several categories; taking the mean of the inter-class variance in the characteristic values ​​of each grayscale value in each category as the evaluation index for each category; taking the range formed by the grayscale values ​​in the category with the largest evaluation index as the threshold range; and taking any grayscale value within the threshold range as a threshold.

[0010] The present invention constructs a two-dimensional feature space based on each grayscale value and its corresponding inter-class variance, uses cluster analysis to identify threshold groups with similar segmentation characteristics, and then screens the optimal threshold cluster through the quantitative indicator of the inter-class variance mean, avoiding the randomness of single threshold selection, obtaining a stable threshold interval through clustering, and significantly improving the noise resistance and adaptability of threshold selection.

[0011] Preferably, the segmentation effect satisfies the expression: Where, Indicates the segmentation effect of the binary image corresponding to the target skeleton image; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is No. The first highlight and The vertical coordinate difference between the highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The mean of the vertical coordinate differences between all adjacent highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The number of highlight points; is an exponential function with a natural constant as its base.

[0012] The present invention takes into account the parallel distribution characteristics of the grid lines and measures the uniformity of the distribution intervals of the highlight points under the same horizontal coordinate based on the vertical coordinate difference between adjacent highlight points with the same horizontal coordinate in Hough space. The more uniform the distribution intervals of the highlight points under the same horizontal coordinate, the more effective the binary image corresponding to the target skeleton image is in separating the grid lines and the backplane in the area to be detected. Conversely, the more uneven the distribution intervals, the more incomplete the segmentation or the more mis-segmentation occurs. This quantitative evaluation can objectively judge the segmentation quality of the binary image corresponding to the target skeleton image.

[0013] Preferably, drawing the brightness curve includes: taking the highlight points with the same horizontal coordinate in the Hough space corresponding to the target skeleton image as a data set, and drawing the brightness curve based on the data set, the horizontal axis of the brightness curve is the vertical coordinate of these highlight points in the data set in the Hough space, and the vertical axis of the brightness curve is the brightness of these highlight points in the data set.

[0014] The present invention aggregates highlight points with the same horizontal coordinate in the Hough space into a data set and draws a brightness curve based on their vertical coordinate and brightness value. It can intuitively quantify and analyze the linear distribution intensity of the target skeleton image in a specific direction, effectively extract the spatial distribution characteristics in the Hough transform detection results, and provide quantifiable data support for the defect probability of subsequent highlight points, significantly improving the accuracy and efficiency of image feature analysis.

[0015] Preferably, the method of determining the defect probability of the highlight point based on the change in the brightness of the highlight point in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image includes: determining the brightness outlier value of each data point based on the brightness distribution of each data point in the brightness curve, and determining the symmetric outlier value of each data point based on the difference between each data point and its symmetrical data point in the brightness curve; determining the defect probability of the highlight point corresponding to each data point based on the brightness outlier value and symmetric outlier value of each data point and the segmentation effect of the binary image corresponding to the target skeleton image.

[0016] This method effectively quantifies the defect probability of a highlight point by analyzing the brightness anomaly value of each data point in the brightness curve and its deviation from the symmetrically located data points. This analysis, combined with the segmentation of the binary image corresponding to the target skeleton image, significantly improves the objectivity and accuracy of identifying break defects in the image space corresponding to a highlight point.

[0017] Preferably, the brightness abnormal value satisfies the expression: ; Take any data point in the brightness curve as the target data point, Indicates the brightness anomaly of the target data point; Indicates the number of all data points on the left side of the target data point in the brightness curve that have a brightness greater than the target data point. Indicates the number of all data points on the right side of the target data point in the brightness curve that have a brightness greater than the target data point; Indicates the absolute value of the difference in brightness between the target data point and the data point with the largest brightness on its left in the brightness curve; Indicates the absolute value of the brightness difference between the target data point and the data point with the maximum brightness to its right in the brightness curve; represents the hyperbolic tangent function.

[0018] Preferably, the method for obtaining the symmetrical data points is: to obtain the symmetrical data points in the rectangular coordinate system where the brightness curve is located, which is perpendicular to the horizontal axis and has an intercept of As the center line of the brightness curve; for any data point in the brightness curve, obtain the distance from the data point to the center line, and take the data point with the same distance to the center line as the distance from the data point to the center line as the symmetrical data point of the data point, where Represents the maximum value of the horizontal coordinates of all data points in the brightness curve, Indicates the maximum value among all data points in the brightness curve.

[0019] Preferably, the method for obtaining the symmetrical outlier value is: normalizing the difference between the brightness of the symmetrical data point of the data point and the brightness of the data point to obtain the symmetrical outlier value of the data point.

[0020] Preferably, the determination of the defect probability of the highlight corresponding to each data point includes: obtaining the mean of the brightness outlier value and the symmetric outlier value of the data point, and taking the product of the mean of the brightness outlier value and the symmetric outlier value of the data point and the segmentation effect of the binary image corresponding to the target skeleton image as the defect probability of the highlight corresponding to the data point.

[0021] Preferably, the method of identifying the broken grid line defects of photovoltaic modules according to the defect probability of each highlight point includes: in response to the defect probability of a highlight point being greater than a preset second value, treating the highlight point as an abnormal highlight point; mapping the abnormal highlight points in the Hough space corresponding to all skeleton images to the area to be detected to obtain multiple abnormal straight lines; obtaining the intersection points between the abnormal straight lines corresponding to all abnormal highlight points in the area to be detected; judging each intersection point, and in response to the number of straight lines passing through the intersection point being greater than a preset third value, treating the intersection point as a broken defect pixel point; and connecting all broken defect pixel points to obtain a broken defect area.

[0022] This method uses a probability threshold to filter out abnormal highlights, mapping them to abnormal lines in the area to be inspected. Potential breakpoints are then located by calculating the density of line intersections, ultimately accurately delineating the fractured area based on topological connectivity. This dual screening mechanism of probability threshold and density criterion effectively reduces the false detection rate. Hough space mapping ensures geometric accuracy in defect location, and a fractured area reconstruction algorithm based on topological connectivity improves the completeness of defect boundary identification.

[0023] The beneficial effects of the present invention are: the present invention significantly improves the detection accuracy and robustness of broken grid line defects in photovoltaic modules, effectively overcomes the sensitivity of the traditional single threshold method to uneven lighting, ensures that defective areas of different contrasts can be completely extracted, avoids false detection caused by over-segmentation, and solves the problem of insufficient sensitivity of traditional edge detection methods to microcracks. While maintaining a high detection efficiency, it has excellent recognition ability for broken grid lines on the surface of photovoltaic modules. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart schematically illustrating a method for detecting surface defects of photovoltaic modules based on image processing in the present invention;

[0025] Figure 2 is a schematic diagram schematically showing a grayscale image of the surface of a photovoltaic module;

[0026] Figure 3 is a schematic diagram schematically showing an area to be detected;

[0027] Figure 4 is a flow chart schematically illustrating step S2 of a photovoltaic module surface defect detection method based on image processing;

[0028] Figure 5 Schematic diagram of a binary image under a segmentation threshold;

[0029] Figure 6 Schematic diagram of a binary image under another segmentation threshold;

[0030] Figure 7It is schematically shown Figure 5 Schematic diagram of the corresponding skeleton image;

[0031] Figure 8 It is schematically shown Figure 6 Schematic diagram of the corresponding skeleton image;

[0032] Figure 9 It is schematically shown Figure 7 Schematic diagram of the transformation to Hough space;

[0033] Figure 10 It is schematically shown Figure 8 Schematic diagram of the transformation to Hough space;

[0034] Figure 11 is a schematic diagram schematically showing a straight line detected in a direction parallel to the skeleton;

[0035] Figure 12 is a schematic diagram schematically showing a straight line detected in a direction that is not parallel to the skeleton;

[0036] Figure 13 is a schematic diagram schematically showing a straight line detected in another direction that is not parallel to the skeleton;

[0037] Figure 14 It is schematically shown Figure 11 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0038] Figure 15 It is schematically shown Figure 12 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0039] Figure 16 It is schematically shown Figure 13 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0040] Figure 17 It schematically shows that when there is a grid line break, Figure 11 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0041] Figure 18 It schematically shows that when there is a grid line break, Figure 12 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0042] Figure 19 It schematically shows that when there is a grid line break, Figure 13 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space;

[0043] Figure 20FIG. 1 is a schematic diagram schematically showing a fracture defect area. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0045] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0046] The embodiment of the present invention discloses a method for detecting surface defects of photovoltaic modules based on image processing, referring to Figure 1 , including steps S1 to S5:

[0047] S1. Acquire a region to be detected in a grayscale image of the surface of a photovoltaic module.

[0048] During the regular inspection of photovoltaic power stations by drones, the RGB images of the photovoltaic module surfaces are captured by the cameras on the drones. For ease of processing, the captured RGB images are converted into grayscale images. Figure 2 Schematic diagram of the grayscale image of the photovoltaic module surface.

[0049] It should be noted that the grid lines on the photovoltaic module are divided into main grid lines and fine grid lines. The main grid lines are wider and thicker than the fine grid lines and have stronger bending resistance, while the fine grid lines are thinner and thinner than the main grid lines and are prone to breakage due to stress, hidden cracks, etc. In the actual use of the photovoltaic module, the probability of the fine grid lines breaking is much higher than the probability of the main grid lines breaking. Therefore, the present invention detects the fine grid line break defect. In order to facilitate the identification of fine grid line breakage, the present invention divides the grayscale image of the photovoltaic module surface into multiple areas with the main grid lines as the dividing line, so that each area only contains fine grid lines.

[0050] Specifically, semantic segmentation is performed on the grayscale image of the photovoltaic module surface to obtain the main grid lines in the grayscale image, the main grid lines are used as dividing lines, and the area between two adjacent dividing lines is used as an area to be detected. Figure 3 It should be noted that semantic segmentation is a well-known technology and will not be described in detail here.

[0051] S2. Segment the area to be detected using different thresholds to obtain multiple binary images, and extract the skeleton of each binary image to obtain several skeleton images.

[0052] Specifically, refer to Figure 4 , step S2 includes step S201 to step S202:

[0053] S201 , setting a threshold range according to the inter-class variance when each grayscale value in the area to be detected is used as a candidate threshold.

[0054] Any grayscale value appearing in the area to be detected is used as a candidate threshold, and the inter-class variance under the candidate threshold is calculated using the Otsu threshold segmentation method. The candidate threshold size and the inter-class variance constitute the characteristic value of the candidate threshold.

[0055] Perform mean shift clustering on all grayscale values ​​in the region to be detected based on their eigenvalues, dividing them into several categories. The mean of the inter-class variance of the eigenvalues ​​of each grayscale value in each category is used as the evaluation metric for each category. The category with the largest evaluation metric is obtained, and the range of grayscale values ​​in that category is used as the threshold range.

[0056] Among them, the Otsu threshold segmentation method is used to calculate the inter-class variance under the candidate threshold, specifically:

[0057] Count the frequencies of each grayscale value in the area to be detected, and divide the pixels corresponding to grayscale values ​​less than the candidate threshold into categories , the pixels corresponding to the grayscale values ​​greater than or equal to the candidate threshold are divided into categories , then the inter-class variance under the candidate threshold satisfies the expression:

[0058] ;

[0059] in, represents the candidate threshold, Represents the candidate threshold The between-class variance under ; Indicates that the pixels in the area to be detected are classified into categories The probability that is less than the candidate threshold The sum of the frequencies of all gray values; Indicates that the pixels in the area to be detected are classified into categories The probability of being greater than or equal to the candidate threshold The sum of the frequencies of all gray values; Representation category The average gray value of all pixels in ; Representation category It should be noted that the expression of the inter-class variance under the candidate threshold is a well-known technique in the Otsu threshold segmentation method, and the specific principle will not be described in detail here.

[0060] S202 , segmenting the area to be detected using different thresholds within a threshold range to obtain a plurality of binary images, and performing skeleton extraction on each binary image to obtain a plurality of skeleton images.

[0061] Specifically, any grayscale value within the threshold range is used as the threshold, grayscale values ​​greater than or equal to the threshold in the area to be detected are set to 1, and grayscale values ​​less than the threshold in the area to be detected are set to 0, thereby obtaining a binary image.

[0062] Similarly, a binary image is obtained when each gray value within the threshold range is used as the threshold. Figure 5 、 Figure 6 Schematic diagram of binary image under different thresholds.

[0063] Skeleton extraction is performed on each binary image to obtain a corresponding skeleton image. It should be noted that the present invention does not limit the algorithm used for skeleton extraction. Implementers can select a skeleton extraction algorithm based on actual implementation circumstances, such as using a distance transform-based skeleton extraction algorithm or the Guo-Hall Thinning Algorithm. Skeleton extraction using a distance transform-based skeleton extraction algorithm or the Guo-Hall Thinning Algorithm is well known and will not be described in detail here. Figure 7 for Figure 5 Schematic diagram of the corresponding skeleton image, Figure 8 for Figure 6 Schematic diagram of the corresponding skeleton image.

[0064] S3. Convert each skeleton image into Hough space respectively, take any skeleton image as the target skeleton image, and determine the segmentation effect of the binary image corresponding to the target skeleton image according to the position distribution of the highlight points corresponding to the target skeleton image in Hough space.

[0065] Specifically, each skeleton image is converted into the Hough space using the Hough line detection algorithm, and points in the Hough space with brightness greater than a preset first value M are used as highlight points. The first value M is set by the implementer according to the actual implementation situation, for example, 3. Figure 9 for Figure 7 Schematic diagram of conversion to Hough space, Figure 10 for Figure 8 Schematic diagram of the transformation to Hough space.

[0066] It should be noted that the pixel point in the first row and first column of the skeleton image is the coordinate origin, and the horizontal right direction is Axis, with the horizontal downward direction Axis, construct a rectangular coordinate system, then each pixel with a grayscale value of 1 in the skeleton image (i.e., white pixel) is a point in the rectangular coordinate system, and the straight line formed by the white pixels is a straight line in the rectangular coordinate system, and the rectangular coordinate system is the image space. The horizontal coordinate of the Hough space is the angle of the straight line in the image space, and the vertical coordinate of the Hough space is the distance from the coordinate origin in the image space to the straight line. After converting the skeleton image to the Hough space, each highlight point in the Hough space corresponds to a straight line in the image space, and the horizontal coordinate of the highlight point is the perpendicular line from the coordinate origin in the image space to the straight line corresponding to the highlight point in the image space and the vertical coordinate in the image space. The angle in the positive direction of the axis is expressed as Indicates that the range is The vertical coordinate of the highlight point is the signed vertical distance from the coordinate origin in the image space to the corresponding straight line of the highlight point in the image space, and is expressed as The brightness of a highlight point is the number of points on the corresponding line in the image space, that is, the number of pixels with a grayscale value of 1 on the line in the skeleton image.

[0067] It should be further explained that the grid lines in the photovoltaic module are straight lines. If the binary image segmentation effect is good, each skeleton in the corresponding skeleton image corresponds to a grid line, so each skeleton will correspond to a highlight point in the Hough space. Since the grid lines are parallel and the intervals are the same, the skeletons in the skeleton image are parallel and the intervals are the same, so the vertical coordinates of the highlight points corresponding to the skeletons in the Hough space are also evenly spaced. For example Figure 11 Schematic diagram of the straight line detected in the direction parallel to the skeleton. Since the point with brightness greater than the first value M in the Hough space is a highlight point, and the brightness of the highlight point in the Hough space is the number of points contained in the straight line corresponding to the highlight point in the image space, if the straight line in the direction not parallel to the skeleton direction has more than M intersections with the skeleton in the skeleton image, the straight line will also be detected, that is, the straight line will also correspond to a highlight point in the Hough space, and the straight lines parallel to and adjacent to the straight line will most likely have more than M intersections with the skeleton. Therefore, the straight lines detected in this direction are parallel and have the same intervals, and the vertical coordinates of the highlight points corresponding to these straight lines in the Hough space are also evenly spaced. For example Figure 12 This is a schematic diagram of a straight line detected in a direction that is not parallel to the skeleton. Figure 13 Therefore, the present invention determines the segmentation effect of the binary image corresponding to the skeleton image based on the interval between the highlight points with the same horizontal coordinate in the Hough space.

[0068] Specifically, the segmentation effect of the binary image corresponding to the target skeleton image satisfies the expression:

[0069] ;

[0070] Where, Indicates the segmentation effect of the binary image corresponding to the target skeleton image; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is No. The first highlight and The vertical coordinate difference between the highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The mean of the vertical coordinate differences between all adjacent highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The number of highlight points; is an exponential function with a natural constant as its base.

[0071] The grid lines in a photovoltaic module are parallel and evenly distributed. Highlight points with the same horizontal coordinate in Hough space correspond to parallel lines in image space. In the Hough space corresponding to the target skeleton image, the smaller the difference between the vertical coordinate difference between any two adjacent highlight points with the same horizontal coordinate and the mean of the vertical coordinate differences of all adjacent highlight points with the same horizontal coordinate, the more evenly spaced the parallel lines corresponding to these highlight points are in image space. This indicates that the binary image corresponding to the target skeleton image effectively separates the grid line features from the backplane features of the photovoltaic module, and the segmentation effect of the binary image corresponding to the target skeleton image is good. Conversely, the larger the difference between the vertical coordinate difference between any two adjacent highlight points with the same horizontal coordinate and the mean of the vertical coordinate differences of all adjacent highlight points with the same horizontal coordinate, the more irregular the spacing between the parallel lines corresponding to these highlight points in image space is. This suggests that the binary image corresponding to the target skeleton image may segment some of the photovoltaic module's grid line features as background and some of the backplane features as foreground. In this case, the segmentation effect of the binary image corresponding to the target skeleton image is poor.

[0072] S4. Draw a brightness curve based on the brightness distribution of the highlight points corresponding to the target skeleton image in the Hough space, and determine the defect probability of the highlight points based on the change in the brightness of the highlight points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image.

[0073] Specifically, the highlight points with the same horizontal coordinates in the Hough space corresponding to the target skeleton image are taken as a data set, and a brightness curve is drawn based on the data set. The horizontal axis of the brightness curve is the vertical coordinates of these highlight points in the data set in the Hough space, and the vertical axis of the brightness curve is the brightness of these highlight points in the data set.

[0074] It should be noted that, when the photovoltaic module is defect-free, the number of pixels on each skeleton is the same, and the brightness of the corresponding highlight points of each skeleton in the Hough space is the same, and the corresponding brightness curve is a straight line, for example Figure 11 See the schematic diagram of the brightness curve of the highlight corresponding to the middle straight line in Hough space. Figure 14 The number of intersections between the straight lines in the direction not parallel to the skeleton and the skeleton may show a characteristic of first increasing and then decreasing, for example Figure 12 , so that the corresponding brightness curve is in the shape of increasing and then decreasing, for example Figure 15 for Figure 12 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space. The number of intersections between the straight line and the skeleton in a direction not parallel to the skeleton may also show the characteristics of first increasing, then remaining unchanged, and finally decreasing, for example Figure 13 , so that the corresponding brightness curve first increases, then remains stable, and finally decreases, for example Figure 16 for Figure 13 Schematic diagram of the brightness curve of the highlight corresponding to the straight line in Hough space. Figure 14 、 Figure 15 、 Figure 16 It can be seen that when the photovoltaic module is defect-free, except for the last data point in the brightness curve, none of the other data points will be the minimum value point of the brightness curve. When the photovoltaic module has defects such as broken grid lines, the number of intersections between some straight lines and the skeleton may decrease, resulting in a change in the shape of the brightness curve, and the appearance of minimum value points other than the last data point, for example Figure 17 When there is a grid line break, Figure 11 Schematic diagram of the brightness curve of the highlight corresponding to the straight line in Hough space, Figure 18 When there is a grid line break, Figure 12 Schematic diagram of the brightness curve of the highlight corresponding to the straight line in Hough space, Figure 19 When there is a grid line break, Figure 13 Schematic diagram of the brightness curve of the highlight point corresponding to the middle straight line in Hough space. Therefore, the present invention determines the brightness abnormal value of each data point in the brightness curve according to the shape of the brightness curve, which is used to reflect the possibility of grid line breakage on the corresponding straight line in the image space of the highlight point corresponding to each data point.

[0075] Specifically, any data point in the brightness curve is used as the target data point, and the brightness abnormal value of the target data point satisfies the expression:

[0076] ;

[0077] in, Indicates the brightness anomaly of the target data point; Indicates the number of all data points on the left side of the target data point in the brightness curve that have a brightness greater than the target data point. Indicates the number of all data points on the right side of the target data point in the brightness curve that have a brightness greater than the target data point; Indicates the absolute value of the difference in brightness between the target data point and the data point with the largest brightness on its left in the brightness curve; Indicates the absolute value of the brightness difference between the target data point and the data point with the maximum brightness to its right in the brightness curve; Represents the hyperbolic tangent function, which is used to 、 Perform normalization.

[0078] when , When , the target data point may be located at Figure 15 、 Figure 16 The increasing curve segment in , When , the target data point may be located at Figure 15 、 Figure 16 The decreasing curve segment in , When , the target data point may be Figure 14 Any data in Figure 16 The data segment with constant brightness may also be Figure 15 The data point with the largest brightness in or When , the target data point conforms to the normal change of the brightness curve, and the brightness abnormality value of the target data point is 0; when 、 When both are not 0, the target data point is a minimum point in the brightness curve except the last data point. Therefore, when When the absolute value of the brightness difference between the target data point in the brightness curve and the data point with the maximum brightness on its right is The larger the value, the more abnormal the brightness of the target data point. When the absolute value of the brightness difference between the target data point in the brightness curve and the data point with the largest brightness on its left is The larger it is, the more abnormal the brightness of the target data point is.

[0079] It should be noted that when the length of the grid line break is long, more straight lines are affected, which may cause the shape of the brightness curve to change, but no minimum point appears. Figure 14 、 14 The brightness curves in 1 and 15 are symmetrical, but when there is a grid line break, the symmetry of the brightness curve will be destroyed. Therefore, the present invention further measures the symmetrical outliers of each data point in the brightness curve through the symmetry of the brightness curve.

[0080] Specifically, the intercept of the brightness curve in the rectangular coordinate system perpendicular to the horizontal axis is The straight line is used as the midline of the brightness curve, and the distance from the target data point to the midline is obtained. The data point with the same distance to the midline as the distance from the target data point to the midline is used as the symmetrical data point of the target data point. Represents the maximum value of the horizontal coordinates of all data points in the brightness curve, Indicates the maximum value among all data points in the brightness curve.

[0081] Furthermore, the symmetric outlier of the target data point satisfies the expression:

[0082] ;

[0083] in, A symmetric outlier representing the target data point; Indicates the brightness of the target data point; Represents the brightness of the symmetrical data point of the target data point; Represents a sigmoid function: , used for Normalization is performed. When there is no symmetrical data point for the target data point, the symmetrical outlier value of the target data point is set to 1.

[0084] Furthermore, the defect probability of the highlight point corresponding to the target data point is determined based on the brightness outlier value and the symmetric outlier value of the target data point:

[0085] ;

[0086] in, Indicates the defect probability of the highlight point corresponding to the target data point; Indicates the segmentation effect of the binary image corresponding to the target skeleton image; Indicates the brightness anomaly of the target data point; Indicates the symmetrical outlier value of the target data point. When the segmentation effect of the binary image corresponding to the target skeleton image is better, the brightness outlier value and symmetrical outlier value of the target data point obtained according to the brightness curve are more credible. At this time, when the brightness outlier value of the target data point is larger, or the symmetrical outlier value of the target data point is larger, the defect probability of the highlight point corresponding to the target data point is greater. On the contrary, when the segmentation effect of the binary image corresponding to the target skeleton image is worse, some grid line features may be segmented as background, and some back plate features may be segmented as foreground, resulting in a larger brightness outlier value or a larger symmetrical outlier value of the target pixel point. At this time, the brightness outlier value and symmetrical outlier value of the target pixel point are not credible, so the segmentation effect of the binary image corresponding to the target skeleton image is used. The defect probability of the highlight point corresponding to the target data point is reduced to prevent false detection.

[0087] Similarly, the defect probability of each highlight point corresponding to each skeleton image in the Hough space is obtained.

[0088] S5. Identify the photovoltaic module grid line breakage defect based on the defect probability of each highlight point.

[0089] In response to the defect probability of the highlight point being greater than the preset second value, it is considered that there is a grid line break defect on the straight line corresponding to the highlight point in the image space, and the highlight point is then regarded as an abnormal highlight point. It should be noted that the second value is set by the implementer according to the actual implementation situation, for example, 0.5, but it should be noted that since the value range of the defect probability is , so the second value should also be in the range within the range.

[0090] Map the abnormal highlight points in Hough space corresponding to all skeleton images to the inspection area, with each abnormal highlight point corresponding to a straight line in the inspection area on the PV module surface. Obtain the intersection points between the straight lines corresponding to all abnormal highlight points in the inspection area. Determine each intersection point. If the number of lines passing through the intersection point exceeds a preset third value, the intersection point is considered a fracture defect pixel. Note that the third value is set by the implementer based on actual implementation, for example, 3.

[0091] Connect all the fracture defect pixels to obtain the fracture defect area. Figure 20 Schematic diagram of the fracture defect area.

Claims

1. A photovoltaic module surface defect detection method based on image processing, characterized in that: include: Acquire the area to be detected in the grayscale image of the photovoltaic module surface; segment the area to be detected using different thresholds to obtain multiple binary images; perform skeleton extraction on each binary image to obtain several skeleton images; and convert each skeleton image into Hough space. Take any skeleton image as the target skeleton image, and determine the segmentation effect of the binary image corresponding to the target skeleton image according to the position distribution of the highlight points corresponding to the target skeleton image in Hough space, satisfying: , Indicates the segmentation effect of the binary image corresponding to the target skeleton image; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is No. The first highlight and The vertical coordinate difference between the highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The mean of the vertical coordinate differences between all adjacent highlight points; In the Hough space corresponding to the target skeleton image, the horizontal coordinate is The number of highlight points; is an exponential function with a natural constant as its base; Drawing a brightness curve based on the brightness distribution of highlight points corresponding to the target skeleton image in the Hough space, including: treating highlight points with the same horizontal coordinate in the Hough space corresponding to the target skeleton image as a data set, and drawing a brightness curve based on the data set, wherein the horizontal axis of the brightness curve is the vertical coordinate of these highlight points in the data set in the Hough space, and the vertical axis of the brightness curve is the brightness of these highlight points in the data set; The brightness of a highlight point is the number of points on the line corresponding to the highlight point in the image space, that is, the number of pixels with a grayscale value of 1 on the line in the skeleton image; the image space is a rectangular coordinate system constructed with the pixel point in the first row and first column of the skeleton image as the coordinate origin; Determining the defect probability of the highlight point based on changes in the brightness of the highlight point in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image, including: determining the brightness outlier value of each data point based on the brightness distribution of each data point in the brightness curve, and determining the symmetric outlier value of each data point based on the difference between each data point and its symmetrical data point in the brightness curve; determining the defect probability of the highlight point corresponding to each data point based on the brightness outlier value and symmetric outlier value of each data point and the segmentation effect of the binary image corresponding to the target skeleton image; Identify photovoltaic module grid line breakage defects based on the defect probability of each highlight point.

2. The method for detecting surface defects of photovoltaic modules based on image processing according to claim 1, characterized in that: The method for obtaining the different thresholds is: Any grayscale value appearing in the area to be detected is used as a candidate threshold, and the inter-class variance under the candidate threshold is calculated using the Otsu threshold segmentation method, and the candidate threshold size and the inter-class variance constitute the characteristic value of the candidate threshold; Cluster all grayscale values ​​according to their characteristic values ​​in the area to be detected, and divide the grayscale values ​​into several categories; The mean of the inter-class variance in the characteristic values ​​of each gray value in each category is used as the evaluation index of each category; the range of gray values ​​in the category with the largest evaluation index is used as the threshold range; Any grayscale value within the threshold range is used as a threshold.

3. The method for detecting surface defects of photovoltaic modules based on image processing according to claim 1, characterized in that: The brightness abnormal value satisfies the expression: ; Take any data point in the brightness curve as the target data point, Indicates the brightness anomaly of the target data point; Indicates the number of all data points on the left side of the target data point in the brightness curve that have a brightness greater than the target data point. Indicates the number of all data points on the right side of the target data point in the brightness curve that have a brightness greater than the target data point; Indicates the absolute value of the difference in brightness between the target data point and the data point with the largest brightness on its left in the brightness curve; Indicates the absolute value of the brightness difference between the target data point and the data point with the maximum brightness to its right in the brightness curve; represents the hyperbolic tangent function.

4. The photovoltaic module surface defect detection method based on image processing according to claim 1, characterized in that: The method for obtaining the symmetrical data points is: The rectangular coordinate system where the brightness curve is located is perpendicular to the horizontal axis and the intercept is The straight line is taken as the midline of the brightness curve; For any data point in the brightness curve, obtain the distance from the data point to the midline, and take the data point with the same distance to the midline as the distance from the data point to the midline as the symmetrical data point of the data point, where Represents the maximum value of the horizontal coordinates of all data points in the brightness curve, Indicates the maximum value among all data points in the brightness curve.

5. The photovoltaic module surface defect detection method based on image processing according to claim 1, characterized in that: The method for obtaining the symmetric outlier value is: Normalize the difference between the brightness of the symmetrical data point of the data point and the brightness of the data point to obtain the symmetrical outlier value of the data point.

6. The photovoltaic module surface defect detection method based on image processing according to claim 1, characterized in that: Determining the defect probability of the highlight point corresponding to each data point includes: The mean of the brightness outlier value and the symmetric outlier value of the data point is obtained, and the product of the mean of the brightness outlier value and the symmetric outlier value of the data point and the segmentation effect of the binary image corresponding to the target skeleton image is used as the defect probability of the highlight point corresponding to the data point.

7. The method for detecting surface defects of photovoltaic modules based on image processing according to claim 1, characterized in that: The method of identifying photovoltaic module grid line breakage defects based on the defect probability of each highlight point includes: In response to the defect probability of the highlight point being greater than a preset second value, the highlight point is identified as an abnormal highlight point; the abnormal highlight points in the Hough space corresponding to all skeleton images are mapped to the area to be detected to obtain multiple abnormal straight lines; and the intersection points between the abnormal straight lines corresponding to all the abnormal highlight points in the area to be detected are obtained; Each intersection is judged, and in response to the number of straight lines passing through the intersection being greater than a preset third value, the intersection is regarded as a fracture defect pixel point; all fracture defect pixel points are connected to obtain a fracture defect area.

Citation Information

Patent Citations

  • Photovoltaic cell panel anomaly detection method based on Hough transform

    CN114926406A

  • Photovoltaic panel image segmentation and anomaly identification method

    CN119851022A