Method for identifying grid lines of a solar panel
By acquiring grayscale images on the surface of the solar panel, using highlights and sliding window technology to identify the template grid lines, and through clustering and morphological corrosion technology, the problem of unclear grid lines under light interference is solved, achieving accurate identification and improving detection efficiency.
Patent Information
- Application Number
- CN202311805443.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2043-11-02
AI Technical Summary
The prior art is difficult to accurately identify the gate lines of solar panels, especially under light interference, which leads to unclear gate lines and cannot accurately determine whether there is an abnormality.
By obtaining the surface grayscale image of the solar panel, obtaining the highlights as the gate line positioning points, obtaining the template gate line, and setting sliding windows on both sides of the template gate line, sliding windows along the direction of the template gate line, obtaining the pixel vacancy rate of the window area, performing hierarchical clustering, obtaining the pixel vacancy rate of the cluster cluster, calculate the irregularity of the edge of the gate line to be detected, determining the size of the structural element, performing morphological corrosion, and obtaining the final gate line to be detected.
It realizes accurate identification of the gate lines of solar panels under light interference, improves detection efficiency, and ensures the accuracy and reliability of the gate lines.
Smart Images

Figure CN119180775B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data recognition, and particularly relates to a method for identifying grid lines of a solar panel. Background Art
[0002] With the increasing penetration of the concepts of low-carbon environmental protection and green development, photovoltaic power generation technology has been widely applied. Photovoltaic power generation technology mainly uses solar panels as the key components of photovoltaic power generation equipment. Since solar panels are exposed to the outdoor environment for a long time, strict quality requirements are imposed, especially on the grid lines of solar panels. Since the grid lines of solar panels mainly serve as circuits, it is very important to detect whether the distribution of the grid lines of solar panels is uniform and whether there are any abnormalities.
[0003] In the prior art, when detecting the grid lines of a solar panel, mainly through Hough line detection, the grid line area is obtained. However, during the use of the prior art, reflection is likely to occur on the surface of the solar panel, that is, the grid lines are interfered by light, resulting in unclear grid lines and unable to accurately identify the grid lines. Summary of the Invention
[0004] The present invention provides a method for identifying grid lines of a solar panel to solve the problem that the existing method cannot accurately match and identify the grid lines, and thus cannot accurately determine whether there are any abnormalities in the grid lines.
[0005] The method for identifying grid lines of a solar panel of the present invention adopts the following technical solutions:
[0006] Obtain the surface grayscale image of the solar panel;
[0007] Obtain the bright points in the surface grayscale image and use the bright points as grid line positioning points, and obtain the template grid lines of the solar panel according to the grid line positioning points;
[0008] Set sliding windows symmetric about the template grid lines on both sides of the template grid lines. Among them, the sliding windows start from the grid line positioning points and slide along the direction of the template grid lines, and obtain the window areas after each sliding;
[0009] Obtain the pixel vacancy rate of each window area according to the number of vacant pixel points in the window area within the window area; perform hierarchical clustering on the pixel vacancy rates of the window areas on both sides of each template grid line to obtain a plurality of clustering clusters, and obtain the pixel vacancy rate of the clustering cluster according to the pixel vacancy rates of all the window areas within each clustering cluster;
[0010] Obtain the irregularity degree of the edge of the to-be-detected grid line corresponding to each clustering cluster according to the pixel vacancy rate of each clustering cluster and the difference between the pixel vacancy rates of every two window areas symmetric about the template grid line within the clustering cluster;
[0011] According to the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster, obtain the size of the structuring element of the clustering cluster, and perform morphological erosion on the area corresponding to the size of the structuring element of the clustering cluster to obtain the final grid line to be detected.
[0012] Preferably, obtaining the pixel vacancy rate of each window region includes:
[0013] Obtain the gray mean value of all vacant pixel points in the window region;
[0014] Take the gray mean value of all vacant pixel points in the window region as the pixel vacancy rate of the window region.
[0015] Preferably, obtaining the pixel vacancy rate of the clustering cluster includes:
[0016] Take the mean value of the pixel vacancy rates of all window regions within the clustering cluster as the pixel vacancy rate of the clustering cluster.
[0017] Preferably, obtaining the irregularity degree of the edge of the grid line to be detected corresponding to each clustering cluster includes:
[0018] Obtain the absolute value of the difference between the pixel vacancy rates of every two window regions symmetric about the template grid line within the clustering cluster;
[0019] Multiply the sum value of the absolute values of the differences between the pixel vacancy rates of two window regions symmetric about the template grid line within the clustering cluster by the pixel vacancy rate of the clustering cluster to obtain a first target value;
[0020] Perform normalization calculation on the first target value to obtain the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster.
[0021] Preferably, obtaining the size of the structuring element of the clustering cluster includes:
[0022] Multiply the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster by a preset threshold to obtain a second target value;
[0023] Round up the second target value to obtain the side length of the structuring element corresponding to the clustering cluster;
[0024] Obtain the size of the structuring element of the clustering cluster according to the side length of the structuring element of the clustering cluster.
[0025] Preferably, obtaining the bright points in the surface gray image includes:
[0026] Perform threshold segmentation on the surface gray image to obtain grid line pixel points;
[0027] Perform edge detection on the grid line pixel points to obtain the grid line to be detected;
[0028] The intersection points of the grid lines to be detected are the bright points in the surface grayscale image.
[0029] Preferably, obtaining the template grid lines of the solar panel includes:
[0030] Set two mutually perpendicular lines on the surface grayscale image, where one line is perpendicular to the edge of the surface grayscale image;
[0031] Move along the horizontal or vertical direction of the surface grayscale image respectively. When the line passes through the grid line positioning point, the line is used as a template grid line;
[0032] Traverse and slide in turn until all grid line positioning points are on the line, that is, all template grid lines of the solar panel are obtained.
[0033] Preferably, the template grid line is a single-pixel line.
[0034] Preferably, the pixel points whose grayscale values in the window area are greater than the corresponding grayscale mean value of the window area are used as missing pixel points.
[0035] The beneficial effects of a grid line recognition method for a solar panel of the present invention are:
[0036] Through the analysis of the structure of the grid lines and single wafers of the solar panel, intersections are formed between the grid lines, and single wafer areas are enclosed by the grid lines. Therefore, first obtain the bright points in the surface grayscale image and use the bright points as grid line positioning points to obtain the template grid lines of the solar panel. Due to the influence of light, it is difficult to directly obtain the edge of the grid line to be detected. Therefore, in order to obtain the edge of the grid line to be detected, first narrow the range of the area where the edge of the grid line to be detected is located to improve the detection efficiency, that is, set sliding windows symmetric about the template grid line on both sides of the template grid line. Among them, the sliding window starts from the grid line positioning point and slides along the direction of the template grid line, and the window area after each slide is obtained to ensure that the edge of the grid line to be detected is located in the window area. Then, based on the characteristic that the grayscale of the grid line and the surface of the single wafer are different, missing pixel points are obtained to obtain the pixel vacancy rate of each window area according to the number of missing pixel points in the window area. Then, use the characteristics of the window areas with similar pixel vacancy rates to perform hierarchical clustering on the window areas, so as to obtain the pixel vacancy rate of the clustering clusters. Then, based on the pixel vacancy rate of each clustering cluster, the grid line to be detected in the window area is accurately extracted, that is, the irregularity degree of the edge of the grid line to be detected is obtained according to the pixel vacancy rate of the clustering clusters symmetrically stacked on both sides of the template grid line. Then, the size of the structural element is determined according to the irregularity degree of the edge of the grid line to be detected, and finally the grid line to be detected is obtained. The present invention realizes the recognition of clear final grid lines to be detected. Description of the Drawings
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0038] Figure 1 It is a flowchart of an embodiment of a method for identifying grid lines of a solar panel of the present invention. Specific embodiments
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0040] An embodiment of a method for identifying grid lines of a solar panel of the present invention has a use scenario: in the production and assembly link of the solar panel, the grid lines of the solar panel are detected to determine whether the single crystal wafer of the panel is installed properly, so as to prevent the skew or warping of the single crystal wafer from causing poor connection between the single crystal wafer and the panel body, thereby affecting the power generation function of the solar panel, that is, as Figure 1 shown, this embodiment includes:
[0041] S1. Obtain the surface grayscale image of the solar panel;
[0042] Specifically, this embodiment mainly detects the grid lines of a TOPCon structure solar panel (tunnel oxide passivated contact structure solar panel). Among them, in this embodiment, a high-definition camera is used to repeatedly collect the surface image of the solar panel, and then the collected surface image is grayscale processed to obtain the surface grayscale image of the solar panel. Among them, the grayscale processing of the image is the prior art, and this embodiment will not elaborate.
[0043] S2. Obtain the template grid line and the window areas on both sides of the template grid line;
[0044] Specifically, obtain the bright points in the surface grayscale image and use the bright points as grid line positioning points, and obtain the template grid line of the solar panel according to the grid line positioning points; set sliding windows symmetric about the template grid line on both sides of the template grid line. Among them, the sliding window slides along the direction of the template grid line starting from the grid line positioning point, and the window area after each slide is obtained. It should be noted that one side along the sliding direction of the sliding window is collinear with the template grid line.
[0045] Since the single-crystalline wafers laid on the surface of the solar panel are arranged neatly and there is a certain spacing between each single-crystalline wafer, the metal at the bottom of the panel will be exposed to form bright spots because there are no wafers laid at the corners of the single-crystalline wafers. Therefore, the positions of the bright spots indicate the distribution of the single-crystalline wafers. By obtaining the bright spots in the image as the positioning points of the grid lines, and then fitting the template grid lines according to the bright spots, while the grid lines obtained by subsequent image segmentation are the actual grid lines. Therefore, first obtain the bright spots in the surface grayscale image and use the bright spots as the grid line positioning points, and obtain the template grid lines of the solar panel according to the grid line positioning points.
[0046] Among them, obtaining the bright spots in the surface grayscale image includes performing threshold segmentation on the surface grayscale image to obtain grid line pixel points; performing edge detection on the grid line pixel points to obtain the grid lines to be detected; the intersection points of the grid lines to be detected are the bright spots in the surface grayscale image. Specifically: Since the grayscale of the grid lines is different from that of the surface of the single-crystalline wafers, the grayscale value of the grid lines is larger and the grayscale value of the single-crystalline wafers is smaller. Therefore, in this embodiment, the threshold of the threshold segmentation algorithm is set to 150, and the grid lines are separated from the single-crystalline wafers through threshold segmentation. Because the white lines in the grayscale image have obvious grayscale differences from other regions, and the lines to be segmented are white lines, that is, grid lines, this threshold is an empirical threshold, and the implementer can set it according to specific situations, that is, the pixel points with grayscale values greater than the preset threshold are used as the pixel points of the grid lines, and the pixel points less than or equal to the preset threshold are used as the pixel points of the single-crystalline wafers. Thus, the grid line pixel points are obtained. Since the bright spots in the grayscale image are at the intersections of the grid lines, the positions of the bright spots are obtained according to the distribution of the grid lines. Here, the canny operator detection (edge detection) is performed on the obtained grid line pixel points to obtain the straight lines where all the grid lines in the image are located. The canny operator detection algorithm is a well-known prior art and will not be elaborated here. Then, the intersection points of all the straight lines are obtained, and the intersection points are marked. Then the intersection points are the bright spots in the image, and the bright spots are used as the grid line positioning points.
[0047] Among them, obtaining the template grid lines of the solar panel includes: setting two mutually perpendicular straight lines on the surface grayscale image, and one of the straight lines is perpendicular to the edge of the surface grayscale image; moving along the horizontal or vertical direction of the surface grayscale image respectively. When the straight line passes through the grid line positioning points, the straight line is used as a template grid line; traverse and slide in turn until all the grid line positioning points are on the straight line, that is, all the template grid lines of the solar panel are obtained. It should be noted that the template grid lines are single-pixel lines.
[0048] Secondly, due to the influence of light, some grid lines on the solar panel are not clear, which may form brighter light spots, resulting in the directly obtained grid lines not being the real ones. However, under similar light gains, the original grid lines are still brighter than the surrounding areas, but the difference becomes smaller, leading to large errors in direct detection. Therefore, it is necessary to gradually obtain the real grid lines through morphological erosion. Since the grid line area cannot be directly obtained, symmetric sliding windows about the template grid line need to be set on both sides of the template grid line. The sliding window starts from the grid line positioning point and slides along the direction of the template grid line, and the window area after each slide is obtained. For a vertical template grid line, its corresponding window areas are distributed on both the left and right sides of the vertical template grid line, while for a horizontal template grid line, its corresponding window areas are distributed on both the upper and lower sides of the horizontal template grid line. Specifically, the method for obtaining the window area includes: when searching through the preset template grid line, taking the vertical template grid line as an example, single wafers are on both the left and right sides of the vertical template grid line, showing a symmetric distribution. Therefore, when performing pixel search, pixel left-right complementation is carried out according to the change of pixel points on both the left and right sides of the vertical template grid line, so as to obtain the pixel points at the vacant positions. Therefore, a 5*5 sliding window is set and slides along both the left and right sides of the vertical template grid line starting from the positioning point to obtain a 5*5 window area.
[0049] It should be noted that the purpose of obtaining the window area is that the grid line to be detected must be along the template grid line. Therefore, the window area is obtained on both sides of the template grid line, so that the edge of the grid line to be detected is located within the window area, which is convenient for accurately obtaining the edge line to be detected subsequently. In order to make the edge of the grid line to be detected located within the window area, a larger-sized sliding window needs to be set. Therefore, in this embodiment, an empirical value of a 5*5 sliding window is taken.
[0050] S3. Obtain the clustering clusters and calculate the pixel vacancy rate of the clustering clusters;
[0051] After obtaining the grid line positioning points, it is necessary to search for pixels based on the positions of the grid line positioning points to obtain the window area, that is, it is obtained that the boundary of the grid line to be detected is within the window area. There are not only pixel points corresponding to the single wafer but also pixel points of the grid line to be detected within the window area. For the window area, most of the pixel points within it are corresponding to the single wafer. Therefore, in this embodiment, it is necessary to first identify the non-single wafer pixel points in the window area, and then perform clustering based on the proportion of the non-single wafer pixel points, and obtain the pixel vacancy rate of the clustering cluster. Therefore, based on the window area obtained in step S2, the pixel vacancy rate of each window area is obtained according to the number of vacant pixel points in the window area within the window area; hierarchical clustering is performed on the pixel vacancy rates of the window areas on both sides of each template grid line to obtain multiple clustering clusters, and the pixel vacancy rate of the clustering cluster is obtained according to the pixel vacancy rates of all window areas within each clustering cluster. Among them, since hierarchical clustering is to cluster a continuous change sequence and there will be no jumping situation, hierarchical clustering is a prior art and will not be elaborated in this embodiment.
[0052] Among them, the pixel points with the gray value of the pixel points in the window area greater than the gray mean value corresponding to the window area are used as vacant pixel points, that is, the gray value of the pixel points in the window area is compared with the average value. If the gray value of the pixel point is greater than the average gray value, it means that the pixel point is not a pixel point in the single wafer area, and then the pixel point is a vacant pixel point and is assigned a value of 1. When the gray value of the pixel point is less than the average gray value, it means that the pixel point is a pixel point in the single wafer area. Therefore, the pixel point is not a vacant pixel point and is assigned a value of 0; among them, obtaining the pixel vacancy rate of each window area includes: obtaining the gray mean value of all vacant pixel points in the window area; taking the gray mean value of all vacant pixel points in the window area as the pixel vacancy rate of the window area, that is, the calculation formula for the pixel vacancy rate of the window area is:
[0053]
[0054] In the formula, D j represents the pixel vacancy rate of the j-th window area;
[0055] I i represents the gray value of the i-th vacant pixel point in the j-th window area;
[0056] m represents the total number of vacant pixel points in the j-th window area;
[0057] It should be noted that during the sliding of the sliding window, by comparing the gray-scale changes of the pixel points in the window areas on both sides of the template grid line, the vacancy rate of the pixel points is obtained. Since the gray-scale value of the pixel points at the grid line is large and the gray-scale value of the pixel points at the single crystal wafer is small, if the grid line is bent, then during the process of sliding along the template grid line, the gray-scale of the pixel points on the left and right sides will be different. Therefore, the pixel vacancy rate is different. Thus, the pixel vacancy rate represents the change of the pixel points of the actual grid line in each window area.
[0058] Among them, obtaining the pixel vacancy rate of the clustering cluster includes: taking the average value of the pixel vacancy rates of all window areas within the clustering cluster as the pixel vacancy rate of the clustering cluster. The calculation formula for the pixel vacancy rate of the clustering cluster is:
[0059]
[0060] In the formula, D r ′ represents the pixel vacancy rate of the rth clustering cluster;
[0061] n represents the number of window areas within the rth clustering cluster;
[0062] D j represents the pixel vacancy rate of the jth window area;
[0063] It should be noted that hierarchical clustering will cluster window areas with similar pixel vacancy rates into one category. Therefore, the larger the average pixel vacancy rate, the larger the pixel vacancy rate of the clustering cluster.
[0064] S4. Obtain the final grid line to be detected;
[0065] Based on the grid line positioning points in step S2, search for the edge line in the directions of the four template grid lines connected to it to obtain the fuzzy edge of the single crystal wafer, that is, the edge to be detected of the single crystal wafer is located within the window area. Then, combined with the pixel vacancy rate of each clustering cluster obtained in step S3, accurately obtain the fuzzy edge. Therefore, according to the pixel vacancy rate of each clustering cluster and the difference in the pixel vacancy rates of every two window areas symmetric about the template grid line within the clustering cluster, obtain the irregularity degree of the edge of the grid line to be detected corresponding to each clustering cluster; according to the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster, obtain the size of the structuring element of the clustering cluster, and perform morphological erosion on the area corresponding to the size of the structuring element of the clustering cluster to obtain the final grid line to be detected.
[0066] Specifically, obtaining the irregularity degree of the edge of the grid line to be detected corresponding to each clustering cluster includes: obtaining the absolute value of the difference in the pixel vacancy rate between every two window regions symmetric about the template grid line within the clustering cluster; multiplying the sum value of the absolute values of the differences in the pixel vacancy rate between all pairs of window regions symmetric about the template grid line within the clustering cluster by the pixel vacancy rate of the clustering cluster to obtain a first target value; performing a normalization calculation on the first target value to obtain the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster. Among them, the calculation formula for the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster is:
[0067]
[0068] In the formula, K r represents the irregularity degree of the edge of the grid line to be detected corresponding to the r-th clustering cluster;
[0069] D r ′ represents the pixel vacancy rate of the r-th clustering cluster;
[0070] D jz represents the pixel vacancy rate of the window region z in the j-th group of symmetric window regions about the template grid line;
[0071] D jy represents the pixel vacancy rate of the window region y in the j-th group of symmetric window regions about the template grid line;
[0072] N represents the total number of groups of window regions symmetric about the template grid line within the r-th clustering cluster;
[0073] Norm represents a normalization function, and the purpose is to make the value range of the irregularity degree of the edge of the grid line to be detected be [0, 1];
[0074] It should be noted that |D jz -D jy | represents the difference in pixel points within the window regions on both sides of the template grid line. Therefore, when proceeding according to the preset grid line, if there is no abnormality, the difference on both sides of the grid line is 0. When the grid line is abnormal, the difference is not 0, and the greater the degree of abnormality of the grid line, the greater the difference. Therefore, calculating the difference in the pixel vacancy rate within all window regions in the clustering cluster, the greater the difference in the pixel vacancy rate, the greater the irregularity degree of the edge of the grid line to be detected. Multiplying by the pixel vacancy rate D r ′ is because within the same clustering cluster, the pixel vacancy rate within each window region is similar. Therefore, based on the obtained pixel vacancy rate of the clustering cluster, the overall pixel change of the clustering cluster can be represented. Therefore, the irregularity degree of the edge of the grid line to be detected located in different window regions is calculated according to the vacancy rate of each clustering cluster, and based on this, the irregularity degree of different window regions is obtained, that is, the irregularity degree of the local edge of the actual edge line within the corresponding clustering cluster.
[0075] Since the greater the degree of irregularity of the edge of the gate line to be detected, the greater the degree of abnormality of the gate line to be detected. Therefore, when performing an erosion operation on the area corresponding to the gate line to be detected, a larger-sized structuring element is required to obtain a better processing effect, so that the empty pixel points can be complemented to a certain extent. That is, the most important thing in morphological erosion is to determine the size of the structuring element. If the size is too small, a complete edge cannot be obtained; if the size is too large, the obtained edge range will be enlarged. Therefore, according to the degree of irregularity of the edge of the gate line to be detected corresponding to each obtained cluster, the size of the structuring element of the cluster needs to be obtained. Specifically, obtaining the size of the structuring element of the cluster includes: multiplying the degree of irregularity of the edge of the gate line to be detected corresponding to the cluster by a preset threshold to obtain a second target value; rounding up the second target value to obtain the side length of the structuring element corresponding to the cluster; obtaining the size of the structuring element of the cluster according to the side length of the structuring element of the cluster. The calculation formula for the side length of the structuring element of the cluster is:
[0076]
[0077] In the formula, w r represents the side length of the structuring element corresponding to the r-th cluster. Based on the side length of the structuring element, the size of the structuring element can be obtained;
[0078] represents the rounding-up symbol;
[0079] K r represents the degree of irregularity of the edge of the gate line to be detected corresponding to the r-th cluster;
[0080] It should be noted that 10 represents the preset threshold. Multiplying by 10 is because the range of the degree of irregularity K r is [0, 1], and the size of the structuring element is a positive integer. Therefore, it is enlarged ten times and then rounded up.
[0081] Finally, perform morphological erosion on the area corresponding to the size of the structuring element of the cluster to obtain the final gate line to be detected, and the final gate line to be detected is the clear gate line to be detected.
[0082] Specifically, according to the distance from the edge of the final gate line to be detected to the corresponding template gate line, the degree of irregularity of the final gate line to be detected is obtained. According to the degree of irregularity of the final gate line to be detected, it is judged whether the final gate line to be detected is abnormal.
[0083] Among them, the irregularity degree of the finally to-be-detected grid line includes: obtaining the difference in the total number of pixel points between the actual single-crystal wafer area where the finally to-be-detected grid line is located and the pixel points of the template single-crystal wafer area where the template grid line corresponding to the finally to-be-detected grid line is located; normalizing the total number difference corresponding to each actual single-crystal wafer area and the corresponding template single-crystal wafer area to obtain the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area, that is, the calculation formula for the irregularity degree of the finally to-be-detected grid line is:
[0084] Q = Norm[T rm - T rd
[0085] In the formula, Q represents the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area;
[0086] T rm represents the total number of pixel points in the actual single-crystal wafer area where the finally to-be-detected grid line is located;
[0087] T rd represents the total number of pixel points in the template single-crystal wafer area where the template grid line corresponding to the finally to-be-detected grid line is located;
[0088] Norm represents the normalization function, and the purpose is to make the value range of the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area be [0, 1], so as to facilitate the subsequent setting of the threshold.
[0089] It should be noted that [T rm - T rd represents the difference in the total number of pixel points between the actual single-crystal wafer area where the finally to-be-detected grid line is located and the pixel points of the template single-crystal wafer area where the template grid line corresponding to the finally to-be-detected grid line is located. The larger the total number difference, the greater the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area.
[0090] Among them, judging whether there is an abnormality in the finally to-be-detected grid line includes: based on the obtained irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area, and the value range of the irregularity degree of the finally to-be-detected grid line is [0, 1], so the threshold of the rule degree is set to 0.12 here. When the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area is greater than 0.12, it indicates that there is an abnormality in the finally to-be-detected grid line corresponding to the actual single-crystal wafer area. When the irregularity degree of the finally to-be-detected grid line corresponding to the actual single-crystal wafer area is less than or equal to 0.12, it indicates that there is no abnormality in the finally to-be-detected grid line corresponding to the actual single-crystal wafer area.
[0091] A method for identifying grid lines of a solar panel according to the present invention analyzes the structure of the grid lines and single crystal wafers of the solar panel. Intersections are formed between grid lines, and single crystal wafer regions are enclosed by grid lines. Therefore, bright points in the surface grayscale image are first obtained and used as grid line positioning points to obtain the template grid lines of the solar panel. Due to the influence of light, it is difficult to directly obtain the edge of the grid lines to be detected. Therefore, in order to obtain the edge of the grid lines to be detected, the range of the region where the edge of the grid lines to be detected is located is first narrowed to improve the detection efficiency. That is, sliding windows symmetric about the template grid lines are set on both sides of the template grid lines. Among them, the sliding windows start from the grid line positioning points and slide along the direction of the template grid lines, and the window regions after each sliding are obtained to ensure that the edge of the grid lines to be detected is located in the window regions. Then, based on the characteristic that the grayscale of the grid lines is different from that of the surface of the single crystal wafer, vacant pixel points are obtained, and the pixel vacancy rate of each window region is obtained according to the number of vacant pixel points in the window region. Then, hierarchical clustering is performed on the window regions using the characteristics of the window regions with similar pixel vacancy rates, so as to obtain the pixel vacancy rate of the clustering clusters. Then, based on the pixel vacancy rate of each clustering cluster, the grid lines to be detected in the window regions are accurately extracted. That is, the irregularity degree of the edge of the grid lines to be detected is obtained according to the pixel vacancy rate of the clustering clusters symmetrically stacked on both sides of the template grid lines. Then, the size of the structural element is determined according to the irregularity degree of the edge of the grid lines to be detected. Finally, the grid lines to be detected are obtained, realizing accurate grid line identification.
Claims
1. A method for identifying grid lines of a solar panel, characterized in that, it includes: Obtain the surface grayscale image of the solar panel; Obtain the bright points in the surface grayscale image and use the bright points as grid line positioning points, and obtain the template grid lines of the solar panel according to the grid line positioning points; Set sliding windows symmetric about the template grid lines on both sides of the template grid lines. Among them, the sliding windows start from the grid line positioning points and slide along the direction of the template grid lines, and obtain the window areas after each sliding; Obtain the pixel vacancy rate of each window area according to the number of vacant pixel points in the window area within the window area; perform hierarchical clustering on the pixel vacancy rates of the window areas on both sides of each template grid line to obtain multiple clustering clusters, and obtain the pixel vacancy rate of the clustering cluster according to the pixel vacancy rates of all window areas within each clustering cluster; Obtain the irregularity degree of the edge of the grid line to be detected corresponding to each clustering cluster according to the pixel vacancy rate of each clustering cluster and the difference between the pixel vacancy rates of every two window areas symmetric about the template grid line within the clustering cluster; Obtain the size of the structuring element of the clustering cluster according to the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster, and perform morphological erosion on the area corresponding to the size of the structuring element of the clustering cluster to obtain the finally detected grid line; Obtain the bright points in the surface grayscale image, including: Perform threshold segmentation on the surface grayscale image to obtain grid line pixel points; Perform edge detection on the grid line pixel points to obtain the grid line to be detected; The intersection points of the grid lines to be detected are the bright points in the surface grayscale image; Obtain the template grid lines of the solar panel, including: Set two mutually perpendicular lines on the surface grayscale image, and one of the lines is perpendicular to the edge of the surface grayscale image; Move along the horizontal or vertical direction of the surface grayscale image respectively. When the line passes through the grid line positioning point, the line is used as a template grid line; Traverse and slide in sequence until all grid line positioning points are on the line, that is, all template grid lines of the solar panel are obtained.
2. The method for identifying grid lines of a solar panel according to claim 1, characterized in that, Obtain the pixel vacancy rate of each window area, including: Obtain the grayscale mean value of all vacant pixel points in the window area; Take the grayscale mean value of all vacant pixel points in the window area as the pixel vacancy rate of the window area.
3. The method for identifying grid lines of a solar panel according to claim 1, characterized in that, Obtain the pixel vacancy rate of the clustering cluster, including: Take the mean value of the pixel vacancy rates of all window areas within the clustering cluster as the pixel vacancy rate of the clustering cluster.
4. The method for identifying grid lines of a solar panel according to claim 1, characterized in that, Obtain the irregularity degree of the edge of the grid line to be detected corresponding to each clustering cluster, including: Obtain the absolute value of the difference between the pixel vacancy rates of every two window areas symmetric about the template grid line within the clustering cluster; Multiply the sum value of the absolute values of the differences between the pixel vacancy rates of two window areas symmetric about the template grid line within all clustering clusters by the pixel vacancy rate of the clustering cluster to obtain a first target value; Perform normalization calculation on the first target value to obtain the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster.
5. A method for identifying grid lines of a solar panel according to claim 1, characterized in that, obtaining the size of the structuring element of the clustering cluster, including: multiplying the irregularity degree of the edge of the grid line to be detected corresponding to the clustering cluster by a preset threshold value to obtain a second target value; rounding up the second target value to obtain the side length of the structuring element of the corresponding clustering cluster; obtaining the size of the structuring element of the clustering cluster according to the side length of the structuring element of the clustering cluster.
6. A method for identifying grid lines of a solar panel according to claim 1, characterized in that, the template grid line is a single-pixel line.
7. A method for identifying grid lines of a solar panel according to claim 1, characterized in that, taking the pixel points whose gray values are greater than the gray mean value corresponding to the window area in the window area as missing pixel points.
Citation Information
Patent Citations
Monocrystalline silicon solar cell surface defect detection method based on grating detection
CN107274393A
Method, device and equipment for detecting thickness abnormality of grid line of solar cell
CN110443278A