Photovoltaic module surface defect detection method based on image processing

Through the multi-threshold segmentation and Hough transform collaborative analysis method based on image processing, the gate line fracture defects of photovoltaic modules are identified, which solves the problems of low efficiency and low accuracy of traditional detection methods, and achieves efficient and accurate defect detection.

CN120235880AActive Publication Date: 2025-07-01XIAN BOAO POWER ENG CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

During operation, photovoltaic modules are susceptible to factors such as environmental stress, mechanical loads and material aging, resulting in gate lines breakage. The traditional detection methods are low in efficiency and low in accuracy, making it difficult to meet the rapid inspection needs of large-scale photovoltaic power plants.

Method used

The collaborative analysis method of multi-threshold segmentation and Hoff transformation based on image processing is adopted. By acquiring the grayscale image of the photovoltaic module surface, multi-threshold segmentation and skeleton extraction are performed, and the position distribution and brightness curve of the high brightness point are analyzed, the defect probability of the high brightness point is determined, and the gate line fracture defect of the photovoltaic module is identified.

Benefits of technology

The detection accuracy and robustness of gate line fracture defects of photovoltaic modules have been significantly improved, and the problems of traditional methods' uneven light sensitivity and insufficient microcrack recognition have been overcome, so as to achieve efficient identification of gate line fractures on the surface of photovoltaic modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235880A_ABST
    Figure CN120235880A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to a photovoltaic module surface defect detection method based on image processing, which comprises the following steps of: segmenting a to-be-detected area of a gray level image on the surface of a photovoltaic module by adopting different thresholds in a threshold range to obtain a plurality of binary images, performing skeleton extraction on each binary image, and extracting the skeleton of each binary image; the method comprises the steps of obtaining a plurality of skeleton images, converting each skeleton image into a Hough space, determining the segmentation effect of a binary image corresponding to a target skeleton image according to the position distribution of highlight points corresponding to the target skeleton image in the Hough space, and determining the segmentation effect of a binary image corresponding to the target skeleton image according to the brightness distribution of the highlight points corresponding to the target skeleton image in the Hough space. And drawing a brightness curve, determining the defect probability of the highlight points according to the change of the brightness of the highlight points in the brightness curve and the segmentation effect, and further identifying the grid line fracture defect of the photovoltaic module. According to the invention, the fine grid line fracture defect of the photovoltaic module can be identified accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During the long-term operation of photovoltaic modules, they are vulnerable to factors such as environmental stress, mechanical load, and material aging, which cause the gradual deterioration of their structural integrity. This deterioration process is often accompanied by the occurrence of various defects, and the fracture of the grid lines of the solar cells is one of the typical defects.

[0003] In photovoltaic modules, the grid lines are the key conductive structures for current collection, and their integrity directly affects the power generation performance of the modules. When the grid lines are fractured, it will lead to the obstruction of carrier transmission, trigger local current accumulation, and then cause adverse phenomena such as hot spot effect or output power attenuation. In severe cases, it may even cause permanent failure of the module. The traditional manual detection method is inefficient and relies on experience, while the electroluminescence detection has high accuracy, but it requires offline operation and the equipment cost is high, making it difficult to meet the rapid inspection needs of large-scale photovoltaic power stations.

[0004] In view of the above problems, the automatic detection technology based on image processing has gradually become a research hotspot in the field of photovoltaic module defect detection. However, in practical applications, due to the diversity of the fracture forms of the grid lines (including various types such as microcracks and intermittent fractures), and the interference factors such as shadows on the surface of the module, it is easy for the defect features to be confused with background noise, thus affecting the accuracy of grid line fracture detection.

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

[0006] To solve the above technical problems of the diversity of the fracture forms of the grid lines of photovoltaic modules and the influence of shadow interference on the surface of the module on the accuracy of grid line fracture detection, the present invention provides a method for detecting surface defects of photovoltaic modules based on image processing, including: Obtain the region to be detected in the grayscale image of the photovoltaic module surface; perform segmentation on the region to be detected using different thresholds to obtain multiple binary images; perform skeleton extraction on each binary image to obtain several skeleton images; convert each skeleton image into the 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 high-brightness points corresponding to the target skeleton image in the Hough space; draw a brightness curve according to the brightness distribution of the high-brightness points corresponding to the target skeleton image in the Hough space; determine the defect probability of the high-brightness points according to the change of the brightness of the high-brightness points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image; identify the grid line break defect of the photovoltaic module according to the defect probability of each high-brightness point.

[0007] Through the collaborative analysis of multi-threshold segmentation and Hough transform, the present invention significantly improves the detection accuracy and robustness of the grid line break defect of the photovoltaic module. The multi-threshold segmentation strategy effectively overcomes the sensitivity of the traditional single-threshold method to uneven illumination, ensuring that defect regions with different contrasts can be completely extracted; the Hough space conversion based on skeletonization converts the photovoltaic grid lines into the distribution of high-brightness points, and through analyzing its position aggregation and the change of the brightness curve, a quantitative evaluation of the break defect is realized; the defect probability of the high-brightness points is dynamically determined according to the segmentation effect of the binary image corresponding to the target skeleton image, which not only avoids false detection caused by over-segmentation, but also solves the problem of insufficient sensitivity of the traditional edge detection method to micro-cracks. While maintaining a high detection efficiency, the present invention has excellent recognition ability for the break of the grid lines on the surface of the photovoltaic module.

[0008] Preferably, the method for obtaining the different thresholds is as follows: take any gray value that appears in the region to be detected as a candidate threshold, calculate the between-class variance under the candidate threshold using the Otsu threshold segmentation method, and form the eigenvalue of the candidate threshold with the size of the candidate threshold and the between-class variance; cluster all gray values according to the eigenvalues of all gray values in the region to be detected, and divide the gray values into several categories; take the mean value of the between-class variances among the eigenvalues of each gray value in each category as the evaluation index of each category; take the range formed by the gray values in the category with the largest evaluation index as the threshold range; take any gray value within the threshold range as a threshold.

[0009] The present invention constructs a two-dimensional feature space according to each gray value and its corresponding between-class variance, uses clustering analysis to identify the threshold groups with similar segmentation characteristics, and then screens the optimal threshold cluster through the quantitative index of the mean value of the between-class variance, avoiding the contingency of single-threshold selection, obtaining a stable threshold interval through clustering, and significantly improving the anti-noise performance and adaptability of threshold selection.

[0010] Preferably, the segmentation effect satisfies the expression: ; in the formula, It represents the segmentation effect of the binary image corresponding to the target skeleton image; In the Hough space corresponding to the target skeleton image, it represents the abscissa as the th ordinate difference between the high-brightness points and the In the Hough space corresponding to the target skeleton image, it represents the abscissa as average value of the ordinate differences between all adjacent high-brightness points; In the Hough space corresponding to the target skeleton image, it represents the abscissa as number of high-brightness points; is the exponential function with the natural constant as the base.

[0011] In consideration of the parallel distribution characteristics of the grid lines, the present invention measures the uniformity of the distribution interval of high-brightness points at the same abscissa according to the ordinate difference between adjacent high-brightness points with the same abscissa in the Hough space. When the distribution interval of high-brightness points at the same abscissa is more uniform, it indicates that the binary image corresponding to the target skeleton image effectively separates the grid lines and the backplane in the region to be detected. On the contrary, if the distribution interval is more uneven, it indicates that there is an incomplete segmentation or mis-segmentation phenomenon. Through this quantitative evaluation, the segmentation quality of the binary image corresponding to the target skeleton image can be objectively judged.

[0012] Preferably, the drawing of the brightness curve includes: taking the high-brightness points with the same abscissa in the Hough space corresponding to the target skeleton image as a data set, and drawing a brightness curve according to the data set. The horizontal axis of the brightness curve is the ordinate of these high-brightness points in the Hough space, and the vertical axis of the brightness curve is the brightness of these high-brightness points.

[0013] By aggregating the high-brightness points with the same abscissa in the Hough space into a data set and drawing a brightness curve based on their ordinates and brightness values, the present invention can intuitively and quantitatively analyze the straight-line distribution intensity of the target skeleton image in a specific direction, effectively extract the spatial distribution characteristics in the Hough transform detection result, and also provide quantifiable data support for the defect probability of subsequent high-brightness points, significantly improving the accuracy and efficiency of image feature analysis.

[0014] Preferably, determining the defect probability of the high-brightness points according to the change of the brightness of the high-brightness points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image includes: determining the brightness outliers of each data point according to the brightness distribution of each data point in the brightness curve, and determining the symmetry outliers of each data point according to the difference between each data point and its symmetric data point in the brightness curve; determining the defect probability of the high-brightness points corresponding to each data point according to the brightness outliers and symmetry outliers of each data point, and the segmentation effect of the binary image corresponding to the target skeleton image.

[0015] The present invention analyzes the luminance outliers of each data point in the luminance curve and their deviation values from the data points at the symmetric positions, and combines the segmentation effect of the binary image corresponding to the target skeleton image, so as to effectively quantify the defect probability of the highlight. Through the dual verification mechanism (luminance outlier and symmetry analysis), the objectivity and accuracy of the recognition of the fracture defect on the straight line corresponding to the highlight in the image space are significantly improved.

[0016] Preferably, the luminance outlier satisfies the expression: ; taking any data point in the luminance curve as the target data point, represents the luminance outlier of the target data point; represents the number of all data points on the left side of the target data point in the luminance curve whose luminance is greater than that of the target data point, represents the number of all data points on the right side of the target data point in the luminance curve whose luminance is greater than that of the target data point; represents the absolute value of the difference in luminance between the target data point and the data point with the maximum luminance on its left side in the luminance curve; represents the absolute value of the difference in luminance between the target data point and the data point with the maximum luminance on its right side in the luminance curve; represents the hyperbolic tangent function.

[0017] Preferably, the method for obtaining the symmetric data point is: taking the straight line perpendicular to the horizontal axis and with an intercept of in the rectangular coordinate system where the luminance curve is located as the median line of the luminance curve; for any data point in the luminance curve, obtaining the distance from the data point to the median line, and taking the data point with the same distance from the median line as the symmetric data point of the data point, where represents the maximum value of the abscissas of all data points in the luminance curve, represents the maximum value of the abscissas of all data points in the luminance curve.

[0018] Preferably, the method for obtaining the symmetric outlier is: normalizing the difference between the luminance of the symmetric data point of the data point and the luminance of the data point to obtain the symmetric outlier of the data point.

[0019] Preferably, determining the defect probability of the highlight corresponding to each data point includes: obtaining the mean value of the luminance outlier and the symmetric outlier of the data point, and taking the product of the mean value of the luminance outlier and the symmetric outlier 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.

[0020] Preferably, identifying the grid line breakage defect of the photovoltaic module according to the defect probabilities of the high-brightness points includes: in response to the defect probability of a high-brightness point being greater than a preset second value, regarding this high-brightness point as an abnormal high-brightness point; mapping the abnormal high-brightness points in the Hough space corresponding to all skeleton images into the area to be detected, obtaining multiple abnormal straight lines; acquiring the intersections between the abnormal straight lines corresponding to all abnormal high-brightness points in the area to be detected; judging each intersection, and in response to the number of straight lines passing through the intersection being greater than a preset third value, regarding the intersection as a broken defect pixel point; connecting all the broken defect pixel points to obtain a broken defect area.

[0021] The present invention screens abnormal high-brightness points based on a probability threshold, maps them to abnormal straight lines in the area to be detected, then locates potential breakpoints by calculating the intersection density of the straight lines, and finally accurately outlines the broken area based on topological connectivity. The dual screening mechanism of the probability threshold and the density criterion can effectively reduce the false detection rate. The Hough space mapping ensures the geometric accuracy of defect location, and the broken area reconstruction algorithm based on topology connection improves the integrity recognition of the defect boundary.

[0022] The beneficial effects of the present invention are as follows: The present invention significantly improves the detection accuracy and robustness of the grid line breakage defect of the photovoltaic module, effectively overcomes the sensitivity of the traditional single-threshold method to uneven illumination, ensures that defect areas with 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 micro-cracks. While maintaining a high detection efficiency, it has excellent recognition ability for the breakage of the grid lines on the surface of the photovoltaic module. Description of the Drawings

[0023] Figure 1 is a flowchart schematically showing a method for detecting surface defects of a photovoltaic module based on image processing in the present invention; Figure 2 is a schematic diagram of a grayscale image of the surface of a photovoltaic module; Figure 3 is a schematic diagram of an area to be detected; Figure 4 is a flowchart schematically showing step S2 of a method for detecting surface defects of a photovoltaic module based on image processing; Figure 5 is a schematic diagram of a binary image under a segmentation threshold; Figure 6 is a schematic diagram of a binary image under another segmentation threshold; Figure 7 is schematically showing Figure 5 the corresponding schematic diagram of the skeleton image; Figure 8 is schematically showing Figure 6Schematic diagram of the corresponding skeleton image; Figure 9 is schematically shown Figure 7 Schematic diagram of conversion to the Hough space; Figure 10 is schematically shown Figure 8 Schematic diagram of conversion to the Hough space; Figure 11 is a schematic diagram of a straight line detected in a direction parallel to the skeleton; Figure 12 is a schematic diagram of a straight line detected in a direction not parallel to the skeleton; Figure 13 is a schematic diagram of a straight line detected in another direction not parallel to the skeleton; Figure 14 is schematically shown Figure 11 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 15 is schematically shown Figure 12 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 16 is schematically shown Figure 13 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 17 is schematically shown that when there is a grid line break, Figure 11 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 18 is schematically shown that when there is a grid line break, Figure 12 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 19 is schematically shown that when there is a grid line break, Figure 13 Schematic diagram of the brightness curve of the high-brightness point corresponding to the straight line in the Hough space in; Figure 20 is a schematic diagram of the fracture defect area. Detailed implementation manners

[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0025] Next, the specific implementation manners of the present invention will be described in detail in conjunction with the accompanying drawings.

[0026] An embodiment of the present invention discloses a method for detecting surface defects of photovoltaic modules based on image processing. Refer to Figure 1 , which includes steps S1 to S5: S1. Obtain the area to be detected in the grayscale image of the surface of the photovoltaic module.

[0027] During the regular inspection of the photovoltaic power station by the unmanned aerial vehicle (UAV), an RGB image of the surface of the photovoltaic module is captured by a camera carried on the UAV. For easy processing, the captured RGB image is converted into a grayscale image. Figure 2 It is a schematic diagram of the grayscale image of the surface of the photovoltaic module.

[0028] 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 more fragile than the main grid lines and are prone to breakage due to stress, hidden cracks, etc. During the actual use of the photovoltaic module, the probability of fine grid line breakage is much higher than that of main grid line breakage. Therefore, the present invention detects the defect of fine grid line breakage. For easy identification of fine grid line breakage, the present invention divides the grayscale image of the surface of the photovoltaic module into multiple regions with the main grid line as the dividing line, so that each region only contains fine grid lines.

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

[0030] S2. Segment the area to be detected with different thresholds to obtain multiple binary images, and perform skeleton extraction on each binary image to obtain several skeleton images.

[0031] Specifically, refer to Figure 4 , step S2 includes steps S201 to S202: S201. Set the threshold range according to the between-class variance when each grayscale value in the area to be detected is used as a candidate threshold.

[0032] Any grayscale value that appears in the area to be detected is used as a candidate threshold. The between-class variance under the candidate threshold is calculated by using the Otsu threshold segmentation method, and the candidate threshold value and the between-class variance form the eigenvalue of the candidate threshold.

[0033] Perform mean shift clustering on all gray values according to the eigenvalues of all gray values in the area to be detected, divide the gray values into several categories, and use the mean of the between-class variances of the eigenvalues of each gray value in each category as the evaluation index for each category. Obtain the category with the largest evaluation index, and use the range formed by the gray values in this category as the threshold range.

[0034] Among them, use the Otsu threshold segmentation method to calculate the between-class variance under the candidate threshold, specifically: Count the frequencies of each gray value in the area to be detected, and divide the pixel points corresponding to the gray values less than the candidate threshold into category and divide the pixel points corresponding to the gray values greater than or equal to the candidate threshold into category , then the between-class variance under the candidate threshold satisfies the expression: ; Among them, represents the candidate threshold, represents the candidate threshold of the between-class variance; represents the probability that the pixel points in the area to be detected are divided into category , specifically the sum of the frequencies of all gray values less than the candidate threshold ; represents the probability that the pixel points in the area to be detected are divided into category , specifically the sum of the frequencies of all gray values greater than or equal to the candidate threshold ; represents the average gray value of all pixel points in category ; represents the average gray value of all pixel points in category . It should be noted that the expression of the between-class variance under the candidate threshold is a well-known technology in the Otsu threshold segmentation method, and the specific principle will not be elaborated here in detail.

[0035] S202. Segment the area to be detected using different thresholds within the threshold range to obtain a number of binary images, and perform skeleton extraction on each binary image to obtain a number of skeleton images.

[0036] Specifically, take any gray value within the threshold range as the threshold, set the gray values greater than or equal to the threshold in the area to be detected to 1, and set the gray values less than the threshold in the area to be detected to 0 to obtain a binary image.

[0037] Similarly, obtain the binary images when each gray value within the threshold range is used as the threshold. Figure 5 . Figure 6 are schematic diagrams of binary images under different thresholds.

[0038] Skeleton extraction is performed on each binary image to obtain a skeleton image corresponding to each binary 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 according to the actual implementation situation. For example, the skeleton can be extracted using a distance transformation algorithm or the Guo-Hall thinning algorithm (Guo-Hall Thinning Algorithm). Extracting the skeleton using the distance transformation algorithm and the Guo-Hall thinning algorithm are well-known techniques and will not be elaborated in detail here. Figure 7 is Figure 5 a schematic diagram of the corresponding skeleton image, Figure 8 is Figure 6 a schematic diagram of the corresponding skeleton image.

[0039] S3. Each skeleton image is respectively transformed into the Hough space. Any skeleton image is used as the target skeleton image. According to the position distribution of the high-brightness points corresponding to the target skeleton image in the Hough space, the segmentation effect of the binary image corresponding to the target skeleton image is determined.

[0040] Specifically, each skeleton image is respectively transformed into the Hough space using the Hough line detection algorithm. The points in the Hough space with a brightness greater than a preset first value M are used as high-brightness points. The first value M is set by the implementer according to the actual implementation situation, such as 3. Figure 9 is Figure 7 a schematic diagram of the transformation into the Hough space, Figure 10 is Figure 8 a schematic diagram of the transformation into the Hough space.

[0041] It should be noted that taking the pixel point at the first row and first column in the skeleton image as the coordinate origin, with the horizontal right direction as the axis, and the horizontal downward direction as the axis, a rectangular coordinate system is constructed. Then each pixel point with a gray value of 1 (i.e., a white pixel point) in the skeleton image is a point in the rectangular coordinate system, and the straight line formed by the white pixel points is a straight line in the rectangular coordinate system. This rectangular coordinate system is the image space. The abscissa of the Hough space is the angle of the straight line in the image space, and the ordinate of the Hough space is the signed perpendicular distance from the coordinate origin in the image space to the straight line. After transforming the skeleton image into the Hough space, each high-brightness point in the Hough space corresponds to a straight line in the image space. The abscissa of the high-brightness point is the angle between the perpendicular line from the coordinate origin in the image space to the straight line corresponding to the high-brightness point in the image space and the positive direction of the axis in the image space, represented by , with a range of , and the ordinate of the high-brightness point is the signed perpendicular distance from the coordinate origin in the image space to the straight line corresponding to the high-brightness point in the image space, represented by The brightness of a highlight point is the number of points contained in the corresponding straight line in the image space, that is, the number of pixels with a gray value of 1 on this straight line in the skeleton image.

[0042] It should be further noted that the grid lines in the photovoltaic module are linear. If the binary image segmentation effect is good, each skeleton in the corresponding skeleton image corresponds to a grid line. Therefore, each skeleton will correspond to a highlight point in the Hough space. Since the grid lines are parallel and have the same interval, the skeletons in the skeleton image are parallel and have the same interval. Therefore, the ordinates of the highlight points corresponding to the skeletons in the Hough space are also evenly spaced. For example Figure 11 is a schematic diagram of the straight line detected in the direction parallel to the skeleton. Since the points with a brightness greater than the first value M in the Hough space are highlight points, and the brightness of the highlight points in the Hough space is the number of points contained in the corresponding straight line in the image space, when a straight line in a direction not parallel to the skeleton direction has more than M intersections with the skeletons in the skeleton image, this straight line will also be detected, that is, this straight line will also correspond to a highlight point in the Hough space, and the straight line parallel and adjacent to this straight line will probably also have more than M intersections with the skeletons. Therefore, the straight lines detected in this direction are parallel and have the same interval, and the ordinates of the highlight points corresponding to these straight lines in the Hough space are also evenly spaced. For example Figure 12 is a schematic diagram of the straight line detected in a direction not parallel to the skeleton, Figure 13 is a schematic diagram of the straight line detected in another direction not parallel to the skeleton. Therefore, the present invention determines the segmentation effect of the binary image corresponding to the skeleton image according to the interval between the highlight points with the same abscissa in the Hough space.

[0043] Specifically, the segmentation effect of the binary image corresponding to the target skeleton image satisfies the expression: ; In the formula, represents the segmentation effect of the binary image corresponding to the target skeleton image; represents the ordinate difference between the th highlight point and the th highlight point with the abscissa of in the Hough space corresponding to the target skeleton image; represents the average value of the ordinate differences between all adjacent highlight points with the abscissa of in the Hough space corresponding to the target skeleton image; represents the number of highlight points with the abscissa of in the Hough space corresponding to the target skeleton image;

[0044] In a photovoltaic module, the grid lines are parallel and evenly distributed. The straight lines corresponding to the high-brightness points with the same abscissa in the Hough space are parallel to each other in the image space. In the Hough space corresponding to the target skeleton image, the smaller the difference between the ordinate differences of any two adjacent high-brightness points with the same abscissa and the average value of the ordinate differences of all adjacent high-brightness points with the same abscissa, the more evenly spaced the parallel straight lines corresponding to these high-brightness points are in the image space, indicating that the binary image corresponding to the target skeleton image better separates the grid line features and the backplane features of the photovoltaic module. At this time, the segmentation effect of the binary image corresponding to the target skeleton image is better. On the contrary, the greater the difference between the ordinate differences of any two adjacent high-brightness points with the same abscissa and the average value of the ordinate differences of all adjacent high-brightness points with the same abscissa, the more irregular the intervals of the parallel straight lines corresponding to these high-brightness points are in the image space. Furthermore, it indicates that the binary image corresponding to the target skeleton image may segment some grid line features of the photovoltaic module into the background and some backplane features into the foreground. At this time, the segmentation effect of the binary image corresponding to the target skeleton image is poor.

[0045] S4. According to the brightness distribution of the high-brightness points corresponding to the target skeleton image in the Hough space, draw a brightness curve. Based on the change of the brightness of the high-brightness points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image, determine the defect probability of the high-brightness points.

[0046] Specifically, take the high-brightness points with the same abscissa in the Hough space corresponding to the target skeleton image as a data set, and draw a brightness curve according to the data set. The horizontal axis of the brightness curve is the ordinate of these high-brightness points in the Hough space in the data set, and the vertical axis of the brightness curve is the brightness of these high-brightness points in the data set.

[0047] It should be noted that in the case of no defects in the photovoltaic module, the number of pixel points on each skeleton is the same, so the brightness of the high-brightness points corresponding to each skeleton in the Hough space is the same, and the corresponding brightness curve is linear. For example Figure 11 The schematic diagram of the brightness curve of the high-brightness points corresponding to the straight line in the Hough space in Figure 14 . The number of intersections between the straight line in the direction not parallel to the skeleton and the skeleton may first increase and then decrease. For example Figure 12 , making the corresponding brightness curve increase first and then decrease. For example Figure 15 is Figure 12 The schematic diagram of the brightness curve of the high-brightness points corresponding to the straight line in the Hough space in Figure 13 . The number of intersections between the straight line in the direction not parallel to the skeleton and the skeleton may also first increase, then remain unchanged, and finally decrease. For example Figure 16 is Figure 13Schematic diagram of the brightness curve of the highlight point corresponding to the straight line in the Hough space. According to Figure 14 、 Figure 15 、 Figure 16 it can be known that, in the case of no defects in the photovoltaic module, 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 there are defects such as grid line breaks in the photovoltaic module, it may cause the number of intersections of some straight lines and the skeleton to decrease, resulting in a change in the shape of the brightness curve and the appearance of a minimum value point other than the last data point. For example Figure 17 is the schematic diagram of the brightness curve of the highlight point corresponding to the straight line in the Hough space when there is a grid line break in Figure 11 , Figure 18 is the schematic diagram of the brightness curve of the highlight point corresponding to the straight line in the Hough space when there is a grid line break in Figure 12 , Figure 19 is the schematic diagram of the brightness curve of the highlight point corresponding to the straight line in the Hough space when there is a grid line break in Figure 13 . Therefore, the present invention determines the brightness anomaly value of each data point in the brightness curve according to the shape of the brightness curve, so as to reflect the possibility of grid line breaks on the straight line corresponding to the highlight point corresponding to each data point in the image space.

[0048] Specifically, any data point in the brightness curve is used as the target data point, and the brightness anomaly value of the target data point satisfies the expression: ; wherein, represents the brightness anomaly value of the target data point; represents the number of all data points on the left side of the target data point in the brightness curve whose brightness is greater than that of the target data point, represents the number of all data points on the right side of the target data point in the brightness curve whose brightness is greater than that of the target data point; represents the absolute value of the difference in brightness between the target data point and the data point with the maximum brightness on its left side in the brightness curve; represents the absolute value of the difference in brightness between the target data point and the data point with the maximum brightness on its right side in the brightness curve; represents the hyperbolic tangent function, which is used to 、 for normalization.

[0049] When , , the target data point may be located in the Figure 15 、 Figure 16 increasing curve segment, when , , the target data point may be located in the Figure 15 、 Figure 16 decreasing curve segment, when , When, the target data point may be Figure 14 any one of the data in, may be Figure 16 the data segment with unchanged brightness in, may also be Figure 15 the data point with the maximum brightness in, therefore, when or When, the target data point conforms to the change of the normal brightness curve, and the brightness anomaly value of the target data point is 0 at this time; when , are both not 0, the target data point is a minimum value point in the brightness curve except the last data point. Therefore, when When, if the absolute value of the difference in brightness between the target data point in the brightness curve and the data point with the maximum brightness on its right is larger, the brightness of the target data point is more abnormal. When When, if the absolute value of the difference in brightness between the target data point in the brightness curve and the data point with the maximum brightness on its left is larger, the brightness of the target data point is more abnormal.

[0050] It should be noted that when the break length of the gate line is relatively long, more straight lines are affected, which may cause the shape of the brightness curve to change, but no minimum value point appears. And Figure 14 , 14 , and the brightness curves in 15 are all symmetric. When there is a break in the gate line, it will cause the symmetry of the brightness curve to be destroyed. Therefore, the present invention further measures the symmetry anomaly value of each data point in the brightness curve through the symmetry of the brightness curve.

[0051] Specifically, a straight line perpendicular to the horizontal axis and with an intercept of in the rectangular coordinate system where the brightness curve is located is used as the median line of the brightness curve. The distance from the target data point to the median line is obtained, and the data point with the same distance from the median line as the target data point is used as the symmetric data point of the target data point. represents the maximum value of the abscissas of all data points in the brightness curve. represents the maximum value of the abscissas of all data points in the brightness curve.

[0052] Furthermore, the symmetry anomaly value of the target data point satisfies the expression: ; wherein, represents the symmetry anomaly value of the target data point; represents the brightness of the target data point; represents the brightness of the symmetric data point of the target data point; represents the S-shaped function: , used for Perform normalization. When there is no symmetric data point for the target data point, it is stipulated that the symmetric outlier of the target data point is 1.

[0053] Further, determine the defect probability of the highlight corresponding to the target data point according to the brightness outlier and the symmetric outlier of the target data point: ; Wherein, represents the defect probability of the highlight corresponding to the target data point; represents the segmentation effect of the binary image corresponding to the target skeleton image; represents the brightness outlier of the target data point; represents the symmetric outlier of the target data point. When the segmentation effect of the binary image corresponding to the target skeleton image is better, the brightness outlier and the symmetric outlier of the target data point obtained according to the brightness curve are more credible. At this time, when the brightness outlier of the target data point is larger, or the symmetric outlier of the target data point is larger, the defect probability of the highlight corresponding to the target data point is larger. 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 the background, and some backplane features may be segmented as the foreground, resulting in a larger brightness outlier or symmetric outlier of the target pixel point. At this time, the brightness outlier and the symmetric outlier of the target pixel point are not credible. Therefore, use the segmentation effect to reduce the defect probability of the highlight corresponding to the target data point and prevent false detection.

[0054] Similarly, obtain the defect probability of each highlight corresponding to each skeleton image in the Hough space.

[0055] S5. Identify the grid line break defect of the photovoltaic module according to the size of the defect probability of each highlight.

[0056] In response to the defect probability of the highlight being greater than a preset second value, it is considered that there is a grid line break defect on the straight line corresponding to the highlight in the image space. At this time, the highlight is used as an abnormal highlight. It should be noted that the second value is set by the implementer according to the actual implementation situation, such as 0.5. However, it should be noted that since the value range of the defect probability is , so the value range of the second value should also be within range.

[0057] Map the abnormally high bright points in the Hough space corresponding to all the skeleton images to the area to be detected, where each abnormally high bright point corresponds to a straight line in the area to be detected on the surface of the photovoltaic module. Obtain the intersection points between the straight lines corresponding to all the abnormally high bright points in the area to be detected. Judge each intersection point, and in response to the number of straight lines passing through the intersection point being greater than a preset third value, take the intersection point as a broken defect pixel point. It should be noted that the third value is set by the implementer according to the actual implementation situation, for example, 3.

[0058] Connect all the broken defect pixel points to obtain a broken defect area. Figure 20 Schematic diagram of the broken defect area.

Claims

1. A method for detecting surface defects of photovoltaic modules based on image processing, characterized in that, Including: Obtain the area to be detected in the grayscale image on the surface of the photovoltaic module; segment the area to be detected with different thresholds to obtain a plurality of binary images; perform skeleton extraction on each binary image to obtain a plurality of skeleton images; respectively transform each skeleton image into the Hough space; Take any one of the skeleton images 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 high-brightness points corresponding to the target skeleton image in the Hough space; Draw a brightness curve according to the brightness distribution of the high-brightness points corresponding to the target skeleton image in the Hough space; determine the defect probability of the high-brightness points according to the change of the brightness of the high-brightness points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image; Identify the grid line breakage defect of the photovoltaic module according to the defect probability of each high-brightness point; 2. The method for detecting surface defects of a photovoltaic module based on image processing according to claim 1, wherein, The method for obtaining the different thresholds is as follows: Take any one of the grayscale values that appear in the area to be detected as a candidate threshold, calculate the between-class variance under the candidate threshold by using the Otsu threshold segmentation method, and form the eigenvalue of the candidate threshold with the size of the candidate threshold and the between-class variance; Cluster all the grayscale values according to the eigenvalues of all the grayscale values in the area to be detected, and divide the grayscale values into several categories; Take the mean value of the between-class variances of the eigenvalues of each grayscale value in each category as the evaluation index of each category; take the range composed of the grayscale values in the category with the largest evaluation index as the threshold range; Take any grayscale value within the threshold range as a threshold.

3. The method for detecting surface defects of a photovoltaic module based on image processing according to claim 1, characterized in that, The segmentation effect satisfies the expression: ; In the formula, represents the segmentation effect of the binary image corresponding to the target skeleton image; represents, in the Hough space corresponding to the target skeleton image, the vertical coordinate difference between the -th high-brightness point with the abscissa of and the -th high-brightness point; represents the average value of the vertical coordinate differences between all adjacent high-brightness points with the abscissa of in the Hough space corresponding to the target skeleton image; is the exponential function with the natural constant as the base.

4. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 1, characterized in that, The drawing of the brightness curve includes: Take the high-brightness points with the same abscissa in the Hough space corresponding to the target skeleton image as a data set, and draw a brightness curve according to the data set. The horizontal axis of the brightness curve is the ordinate of these high-brightness points in the Hough space, and the vertical axis of the brightness curve is the brightness of these high-brightness points.

5. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 1 or 4, characterized in that, The determination of the defect probability of the high-brightness points according to the change of the brightness of the high-brightness points in the brightness curve and the segmentation effect of the binary image corresponding to the target skeleton image includes: Determine the brightness outliers of each data point according to the brightness distribution of each data point in the brightness curve, and determine the symmetry outliers of each data point according to the difference between each data point and its symmetric data point in the brightness curve; determine the defect probability of the high-brightness points corresponding to each data point according to the brightness outliers and symmetry outliers of each data point and the segmentation effect of the binary image corresponding to the target skeleton image.

6. The method for detecting surface defects of a photovoltaic module based on image processing according to claim 5, wherein, The brightness outlier satisfies the expression: ; Take any data point in the luminance curve as the target data point, represent the luminance anomaly value of the target data point; represent the number of all data points on the left side of the target data point in the luminance curve whose luminance is greater than that of the target data point, represent the number of all data points on the right side of the target data point in the luminance curve whose luminance is greater than that of the target data point; represent the absolute value of the difference in luminance between the target data point in the luminance curve and the data point with the maximum luminance on its left; represent the absolute value of the difference in luminance between the target data point in the luminance curve and the data point with the maximum luminance on its right; represent the hyperbolic tangent function.

7. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 5, characterized in that The method for obtaining the symmetric data point is: In the rectangular coordinate system where the luminance curve lies, a straight line perpendicular to the horizontal axis and with an intercept of is taken as the median line of the luminance curve; For any data point in the brightness curve, obtain the distance from this data point to the midline, and use the data point with the same distance to the midline as this data point as the symmetric data point of this data point, where represents the maximum value among the abscissas of all data points in the brightness curve, represents the maximum value among the abscissas of all data points in the brightness curve.

8. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 5, characterized in that, The method for obtaining the symmetry outlier is: Normalize the difference between the brightness of the symmetric data point and the brightness of the data point of the data point to obtain the symmetry outlier of the data point.

9. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 5, characterized in that The determination of the defect probability of the high-brightness points corresponding to each data point includes: Obtain the mean value of the brightness outlier and symmetry outlier of the data point, and take the product of the mean value of the brightness outlier and symmetry outlier of the data point and the segmentation effect of the binary image corresponding to the target skeleton image as the defect probability of the high-brightness point corresponding to the data point.

10. A method for detecting surface defects of a photovoltaic module based on image processing according to claim 1, wherein, The identification of the grid line breakage defect of the photovoltaic module according to the defect probability of each high-brightness point includes: In response to the defect probability of the high-brightness point being greater than a preset second value, the high-brightness point is taken as an abnormal high-brightness point; the abnormal high-brightness points in the Hough space corresponding to all the skeleton images are mapped into the region to be detected to obtain multiple abnormal straight lines; the intersections between the abnormal straight lines corresponding to all the abnormal high-brightness points in the region to be detected are obtained. Each intersection is judged. In response to the number of straight lines passing through the intersection being greater than a preset third value, the intersection is taken as a fracture defect pixel point; all the fracture defect pixel points are connected to obtain a fracture defect region.

Citation Information

Patent Citations

  • Image multi-threshold segmentation method

    CN107292903A

  • Photovoltaic cell panel anomaly detection method based on Hough transform

    CN114926406A

  • Defect detection method for printing error of layout on surface of cloth

    CN118537335A

  • Photovoltaic panel image segmentation and anomaly identification method

    CN119851022A

  • Road line recognition apparatus

    US20060239509A1

Cited By

  • Device and method for detecting flatness of building surface

    CN120823513A